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:504
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:526
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:661
#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 (!argName.isEmpty())
320 {
321 size_t count = context.paramsFound.count(argName.str());
322 if (count==0 && a.docs.isEmpty())
323 {
324 undocParams.push_back(a);
325 }
326 else if (count>1 && Config_getBool(WARN_IF_DOC_ERROR))
327 {
328 warn_doc_error(context.memberDef->docFile(),
329 context.memberDef->docLine(),
330 "%s",
331 qPrint("argument '" + aName +
332 "' from the argument list of " +
333 QCString(context.memberDef->qualifiedName()) +
334 " has multiple @param documentation sections"));
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+=" of "+
344 QCString(context.memberDef->qualifiedName()) +
345 QCString(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(),
357 context.memberDef->docLine(),
358 "%s",
359 qPrint(substitute(errMsg,"%","%%")));
360 }
361 }
362 else
363 {
364 if (context.paramsFound.empty() && Config_getBool(WARN_IF_DOC_ERROR))
365 {
366 warn_doc_error(context.memberDef->docFile(),
367 context.memberDef->docLine(),
368 "%s",
369 qPrint(context.memberDef->qualifiedName() +
370 " has @param documentation sections but no arguments"));
371 }
372 }
373 }
374}
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, 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 998 of file docparser.cpp.

999{
1000 AUTO_TRACE();
1001 auto ns = AutoNodeStack(this,parent);
1002
1003 // parse title
1004 tokenizer.setStateTitle();
1005 Token tok = tokenizer.lex();
1006 while (!tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1007 {
1008 if (tok.is(TokenRetval::TK_WORD) && (context.token->name=="width=" || context.token->name=="height="))
1009 {
1010 // special case: no title, but we do have a size indicator
1011 break;
1012 }
1013 else if (tok.is(TokenRetval::TK_HTMLTAG))
1014 {
1015 tokenizer.unputString(context.token->text);
1016 break;
1017 }
1018 if (!defaultHandleToken(parent,tok,children))
1019 {
1020 errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd));
1021 }
1022 tok = tokenizer.lex();
1023 }
1024 // parse size attributes
1025 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1026 {
1027 tok=tokenizer.lex();
1028 }
1029 while (tok.is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG)) // there are values following the title
1030 {
1031 if (tok.is(TokenRetval::TK_WORD))
1032 {
1033 if (context.token->name=="width=" || context.token->name=="height=")
1034 {
1035 tokenizer.setStateTitleAttrValue();
1036 context.token->name = context.token->name.left(context.token->name.length()-1);
1037 }
1038
1039 if (context.token->name=="width")
1040 {
1041 width = context.token->chars;
1042 }
1043 else if (context.token->name=="height")
1044 {
1045 height = context.token->chars;
1046 }
1047 else // other text after the title -> treat as normal text
1048 {
1049 tokenizer.unputString(context.token->name);
1050 //warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
1051 // qPrint(context.token->name), qPrint(Mappers::cmdMapper->find(cmd)));
1052 break;
1053 }
1054 }
1055
1056 tok=tokenizer.lex();
1057 // if we found something we did not expect, push it back to the stream
1058 // so it can still be processed
1059 if (tok.is_any_of(TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1060 {
1061 tokenizer.unputString(context.token->name);
1062 tokenizer.unputString(tok.is(TokenRetval::TK_COMMAND_AT) ? "@" : "\\");
1063 break;
1064 }
1065 else if (tok.is(TokenRetval::TK_SYMBOL))
1066 {
1067 tokenizer.unputString(context.token->name);
1068 break;
1069 }
1070 else if (tok.is(TokenRetval::TK_HTMLTAG))
1071 {
1072 tokenizer.unputString(context.token->text);
1073 break;
1074 }
1075 }
1076 tokenizer.setStatePara();
1077
1079 AUTO_TRACE_EXIT("width={} height={}",width,height);
1080}
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:1310
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 1202 of file docparser.cpp.

1203{
1204 AUTO_TRACE("token={} handleWord={}",tok.to_string(),handleWord);
1205 if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
1206 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
1207 )
1208 {
1209 }
1210reparsetoken:
1211 QCString tokenName = context.token->name;
1212 AUTO_TRACE_ADD("tokenName={}",tokenName);
1213 switch (tok.value())
1214 {
1215 case TokenRetval::TK_COMMAND_AT:
1216 // fall through
1217 case TokenRetval::TK_COMMAND_BS:
1218 switch (Mappers::cmdMapper->map(tokenName))
1219 {
1221 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_BSlash);
1222 break;
1224 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_At);
1225 break;
1227 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Less);
1228 break;
1230 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Greater);
1231 break;
1233 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Amp);
1234 break;
1236 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dollar);
1237 break;
1239 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Hash);
1240 break;
1242 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_DoubleColon);
1243 break;
1245 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Percent);
1246 break;
1248 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1249 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1250 break;
1252 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1253 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1254 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1255 break;
1257 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quot);
1258 break;
1260 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dot);
1261 break;
1263 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Plus);
1264 break;
1266 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1267 break;
1269 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Equal);
1270 break;
1272 {
1273 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE);
1274 tok=handleStyleArgument(parent,children,tokenName);
1275 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE);
1276 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1277 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1278 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1279 {
1280 AUTO_TRACE_ADD("CommandType::CMD_EMPHASIS: reparsing");
1281 goto reparsetoken;
1282 }
1283 }
1284 break;
1286 {
1287 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE);
1288 tok=handleStyleArgument(parent,children,tokenName);
1289 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE);
1290 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1291 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1292 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1293 {
1294 AUTO_TRACE_ADD("CommandType::CMD_BOLD: reparsing");
1295 goto reparsetoken;
1296 }
1297 }
1298 break;
1300 {
1301 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE);
1302 tok=handleStyleArgument(parent,children,tokenName);
1303 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE);
1304 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1305 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1306 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1307 {
1308 AUTO_TRACE_ADD("CommandType::CMD_CODE: reparsing");
1309 goto reparsetoken;
1310 }
1311 }
1312 break;
1314 {
1315 tokenizer.setStateHtmlOnly();
1316 tok = tokenizer.lex();
1317 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block");
1318 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1319 {
1320 warn_doc_error(context.fileName,tokenizer.getLineNr(),"htmlonly section ended without end marker");
1321 }
1322 tokenizer.setStatePara();
1323 }
1324 break;
1326 {
1327 tokenizer.setStateManOnly();
1328 tok = tokenizer.lex();
1329 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName);
1330 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1331 {
1332 warn_doc_error(context.fileName,tokenizer.getLineNr(),"manonly section ended without end marker");
1333 }
1334 tokenizer.setStatePara();
1335 }
1336 break;
1338 {
1339 tokenizer.setStateRtfOnly();
1340 tok = tokenizer.lex();
1341 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName);
1342 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1343 {
1344 warn_doc_error(context.fileName,tokenizer.getLineNr(),"rtfonly section ended without end marker");
1345 }
1346 tokenizer.setStatePara();
1347 }
1348 break;
1350 {
1351 tokenizer.setStateLatexOnly();
1352 tok = tokenizer.lex();
1353 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName);
1354 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1355 {
1356 warn_doc_error(context.fileName,tokenizer.getLineNr(),"latexonly section ended without end marker");
1357 }
1358 tokenizer.setStatePara();
1359 }
1360 break;
1362 {
1363 tokenizer.setStateXmlOnly();
1364 tok = tokenizer.lex();
1365 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName);
1366 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1367 {
1368 warn_doc_error(context.fileName,tokenizer.getLineNr(),"xmlonly section ended without end marker");
1369 }
1370 tokenizer.setStatePara();
1371 }
1372 break;
1374 {
1375 tokenizer.setStateDbOnly();
1376 tok = tokenizer.lex();
1377 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName);
1378 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1379 {
1380 warn_doc_error(context.fileName,tokenizer.getLineNr(),"docbookonly section ended without end marker");
1381 }
1382 tokenizer.setStatePara();
1383 }
1384 break;
1386 {
1387 children.append<DocFormula>(this,parent,context.token->id);
1388 }
1389 break;
1392 {
1393 handleAnchor(parent,children);
1394 }
1395 break;
1397 {
1398 handlePrefix(parent,children);
1399 }
1400 break;
1402 {
1403 handleInternalRef(parent,children);
1404 tokenizer.setStatePara();
1405 }
1406 break;
1408 {
1409 tokenizer.setStateSetScope();
1410 (void)tokenizer.lex();
1411 context.context = context.token->name;
1412 //printf("Found scope='%s'\n",qPrint(context.context));
1413 tokenizer.setStatePara();
1414 }
1415 break;
1417 handleImage(parent,children);
1418 break;
1420 tokenizer.pushState();
1421 tokenizer.setStateILine();
1422 (void)tokenizer.lex();
1423 tokenizer.popState();
1424 break;
1426 tokenizer.pushState();
1427 tokenizer.setStateIFile();
1428 (void)tokenizer.lex();
1429 tokenizer.popState();
1430 break;
1431 default:
1432 return FALSE;
1433 }
1434 break;
1435 case TokenRetval::TK_HTMLTAG:
1436 {
1437 switch (Mappers::htmlTagMapper->map(tokenName))
1438 {
1440 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <div> tag in heading");
1441 break;
1443 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <pre> tag in heading");
1444 break;
1446 if (!context.token->endTag)
1447 {
1448 handleStyleEnter(parent,children,DocStyleChange::Bold,tokenName,&context.token->attribs);
1449 }
1450 else
1451 {
1452 handleStyleLeave(parent,children,DocStyleChange::Bold,tokenName);
1453 }
1454 break;
1456 if (!context.token->endTag)
1457 {
1458 handleStyleEnter(parent,children,DocStyleChange::S,tokenName,&context.token->attribs);
1459 }
1460 else
1461 {
1462 handleStyleLeave(parent,children,DocStyleChange::S,tokenName);
1463 }
1464 break;
1466 if (!context.token->endTag)
1467 {
1468 handleStyleEnter(parent,children,DocStyleChange::Strike,tokenName,&context.token->attribs);
1469 }
1470 else
1471 {
1473 }
1474 break;
1476 if (!context.token->endTag)
1477 {
1478 handleStyleEnter(parent,children,DocStyleChange::Del,tokenName,&context.token->attribs);
1479 }
1480 else
1481 {
1482 handleStyleLeave(parent,children,DocStyleChange::Del,tokenName);
1483 }
1484 break;
1486 if (!context.token->endTag)
1487 {
1488 handleStyleEnter(parent,children,DocStyleChange::Underline,tokenName,&context.token->attribs);
1489 }
1490 else
1491 {
1493 }
1494 break;
1496 if (!context.token->endTag)
1497 {
1498 handleStyleEnter(parent,children,DocStyleChange::Ins,tokenName,&context.token->attribs);
1499 }
1500 else
1501 {
1502 handleStyleLeave(parent,children,DocStyleChange::Ins,tokenName);
1503 }
1504 break;
1506 case HtmlTagType::XML_C:
1507 if (!context.token->endTag)
1508 {
1509 handleStyleEnter(parent,children,DocStyleChange::Code,tokenName,&context.token->attribs);
1510 }
1511 else
1512 {
1513 handleStyleLeave(parent,children,DocStyleChange::Code,tokenName);
1514 }
1515 break;
1517 if (!context.token->endTag)
1518 {
1519 handleStyleEnter(parent,children,DocStyleChange::Kbd,tokenName,&context.token->attribs);
1520 }
1521 else
1522 {
1523 handleStyleLeave(parent,children,DocStyleChange::Kbd,tokenName);
1524 }
1525 break;
1527 if (!context.token->endTag)
1528 {
1529 handleStyleEnter(parent,children,DocStyleChange::Italic,tokenName,&context.token->attribs);
1530 }
1531 else
1532 {
1534 }
1535 break;
1537 if (!context.token->endTag)
1538 {
1539 handleStyleEnter(parent,children,DocStyleChange::Subscript,tokenName,&context.token->attribs);
1540 }
1541 else
1542 {
1544 }
1545 break;
1547 if (!context.token->endTag)
1548 {
1549 handleStyleEnter(parent,children,DocStyleChange::Superscript,tokenName,&context.token->attribs);
1550 }
1551 else
1552 {
1554 }
1555 break;
1557 if (!context.token->endTag)
1558 {
1559 handleStyleEnter(parent,children,DocStyleChange::Center,tokenName,&context.token->attribs);
1560 }
1561 else
1562 {
1564 }
1565 break;
1567 if (!context.token->endTag)
1568 {
1569 handleStyleEnter(parent,children,DocStyleChange::Small,tokenName,&context.token->attribs);
1570 }
1571 else
1572 {
1573 handleStyleLeave(parent,children,DocStyleChange::Small,tokenName);
1574 }
1575 break;
1577 if (!context.token->endTag)
1578 {
1579 handleStyleEnter(parent,children,DocStyleChange::Cite,tokenName,&context.token->attribs);
1580 }
1581 else
1582 {
1583 handleStyleLeave(parent,children,DocStyleChange::Cite,tokenName);
1584 }
1585 break;
1587 if (!context.token->endTag)
1588 handleImg(parent,children,context.token->attribs);
1589 break;
1590 default:
1591 return FALSE;
1592 break;
1593 }
1594 }
1595 break;
1596 case TokenRetval::TK_SYMBOL:
1597 {
1600 {
1601 children.append<DocSymbol>(this,parent,s);
1602 }
1603 else
1604 {
1605 return FALSE;
1606 }
1607 }
1608 break;
1609 case TokenRetval::TK_WHITESPACE:
1610 case TokenRetval::TK_NEWPARA:
1611handlepara:
1612 if (insidePRE(parent) || !children.empty())
1613 {
1614 children.append<DocWhiteSpace>(this,parent,context.token->chars);
1615 }
1616 break;
1617 case TokenRetval::TK_LNKWORD:
1618 if (handleWord)
1619 {
1620 handleLinkedWord(parent,children);
1621 }
1622 else
1623 return FALSE;
1624 break;
1625 case TokenRetval::TK_WORD:
1626 if (handleWord)
1627 {
1628 children.append<DocWord>(this,parent,context.token->name);
1629 }
1630 else
1631 return FALSE;
1632 break;
1633 case TokenRetval::TK_URL:
1634 if (context.insideHtmlLink)
1635 {
1636 children.append<DocWord>(this,parent,context.token->name);
1637 }
1638 else
1639 {
1640 children.append<DocURL>(this,parent,context.token->name,context.token->isEMailAddr);
1641 }
1642 break;
1643 default:
1644 return FALSE;
1645 }
1646 return TRUE;
1647}
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:1379

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_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_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_Greater, HtmlEntityMapper::Sym_Hash, HtmlEntityMapper::Sym_Less, HtmlEntityMapper::Sym_Minus, HtmlEntityMapper::Sym_Percent, HtmlEntityMapper::Sym_Plus, 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 542 of file docparser.cpp.

544{
545 switch (tok.value())
546 {
547 case TokenRetval::TK_COMMAND_AT:
548 // fall through
549 case TokenRetval::TK_COMMAND_BS:
550 {
551 char cs[2] = { tok.command_to_char(), 0 };
552 children.append<DocWord>(this,parent,cs + context.token->name);
553 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Illegal command '%c%s' found as part of a %s",
554 tok.command_to_char(),qPrint(context.token->name),qPrint(txt));
555 }
556 break;
557 case TokenRetval::TK_SYMBOL:
558 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported symbol '%s' found as part of a %s",
559 qPrint(context.token->name), qPrint(txt));
560 break;
561 case TokenRetval::TK_HTMLTAG:
562 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported HTML tag <%s%s> found as part of a %s",
563 context.token->endTag ? "/" : "",qPrint(context.token->name), qPrint(txt));
564 break;
565 default:
566 children.append<DocWord>(this,parent,context.token->name);
567 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unexpected token %s found as part of a %s",
568 tok.to_string(), qPrint(txt));
569 break;
570 }
571}
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:624
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:6169
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:3262

References FileDef::absFilePath(), IndexList::addImageFile(), 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(), 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 389 of file docparser.cpp.

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

934{
935 AUTO_TRACE();
936 Token tok=tokenizer.lex();
937 if (!tok.is(TokenRetval::TK_WHITESPACE))
938 {
939 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
940 qPrint(context.token->name));
941 return;
942 }
943 tokenizer.setStateAnchor();
944 tok=tokenizer.lex();
945 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
946 {
947 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
948 "argument of command %s",qPrint(context.token->name));
949 return;
950 }
951 else if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
952 {
953 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
954 tok.to_string(),qPrint(context.token->name));
955 return;
956 }
957 tokenizer.setStatePara();
958 children.append<DocAnchor>(this,parent,context.token->name,FALSE);
959}

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

1083{
1084 AUTO_TRACE();
1085 bool inlineImage = false;
1086 QCString anchorStr;
1087
1088 Token tok=tokenizer.lex();
1089 if (!tok.is(TokenRetval::TK_WHITESPACE))
1090 {
1091 if (tok.is(TokenRetval::TK_WORD))
1092 {
1093 if (context.token->name == "{")
1094 {
1095 tokenizer.setStateOptions();
1096 tokenizer.lex();
1097 tokenizer.setStatePara();
1098 StringVector optList=split(context.token->name.str(),",");
1099 for (const auto &opt : optList)
1100 {
1101 if (opt.empty()) continue;
1102 QCString locOpt(opt);
1103 QCString locOptLow;
1104 locOpt = locOpt.stripWhiteSpace();
1105 locOptLow = locOpt.lower();
1106 if (locOptLow == "inline")
1107 {
1108 inlineImage = true;
1109 }
1110 else if (locOptLow.startsWith("anchor:"))
1111 {
1112 if (!anchorStr.isEmpty())
1113 {
1114 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1115 "multiple use of option 'anchor' for 'image' command, ignoring: '%s'",
1116 qPrint(locOpt.mid(7)));
1117 }
1118 else
1119 {
1120 anchorStr = locOpt.mid(7);
1121 }
1122 }
1123 else
1124 {
1125 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1126 "unknown option '%s' for 'image' command specified",
1127 qPrint(locOpt));
1128 }
1129 }
1130 tok=tokenizer.lex();
1131 if (!tok.is(TokenRetval::TK_WHITESPACE))
1132 {
1133 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1134 return;
1135 }
1136 }
1137 }
1138 else
1139 {
1140 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1141 return;
1142 }
1143 }
1144 tok=tokenizer.lex();
1145 if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
1146 {
1147 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of \\image",
1148 tok.to_string());
1149 return;
1150 }
1151 tok=tokenizer.lex();
1152 if (!tok.is(TokenRetval::TK_WHITESPACE))
1153 {
1154 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1155 return;
1156 }
1158 QCString imgType = context.token->name.lower();
1159 if (imgType=="html") t=DocImage::Html;
1160 else if (imgType=="latex") t=DocImage::Latex;
1161 else if (imgType=="docbook") t=DocImage::DocBook;
1162 else if (imgType=="rtf") t=DocImage::Rtf;
1163 else if (imgType=="xml") t=DocImage::Xml;
1164 else
1165 {
1166 warn_doc_error(context.fileName,tokenizer.getLineNr(),"output format `%s` specified as the first argument of "
1167 "\\image command is not valid",
1168 qPrint(imgType));
1169 return;
1170 }
1171 tokenizer.setStateFile();
1172 tok=tokenizer.lex();
1173 tokenizer.setStatePara();
1174 if (!tok.is(TokenRetval::TK_WORD))
1175 {
1176 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of \\image",
1177 tok.to_string());
1178 return;
1179 }
1180 if (!anchorStr.isEmpty())
1181 {
1182 children.append<DocAnchor>(this,parent,anchorStr,true);
1183 }
1184 HtmlAttribList attrList;
1185 children.append<DocImage>(this,parent,attrList,
1186 findAndCopyImage(context.token->name,t),t,"",inlineImage);
1187 children.get_last<DocImage>()->parse();
1188}
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:6945

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

1652{
1653 AUTO_TRACE();
1654 bool found=FALSE;
1655 size_t index=0;
1656 for (const auto &opt : tagHtmlAttribs)
1657 {
1658 AUTO_TRACE_ADD("option name={} value='{}'",opt.name,opt.value);
1659 if (opt.name=="src" && !opt.value.isEmpty())
1660 {
1661 // copy attributes
1662 HtmlAttribList attrList = tagHtmlAttribs;
1663 // and remove the src attribute
1664 attrList.erase(attrList.begin()+index);
1666 children.append<DocImage>(
1667 this,parent,attrList,
1668 findAndCopyImage(opt.value,t,false),
1669 t,opt.value);
1670 found = TRUE;
1671 }
1672 ++index;
1673 }
1674 if (!found)
1675 {
1676 warn_doc_error(context.fileName,tokenizer.getLineNr(),"IMG tag does not have a SRC attribute!");
1677 }
1678}

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 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:296
QCString tagName() const
Definition docnode.h:297
Style style() const
Definition docnode.h:292

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

911{
912 Token tok=tokenizer.lex();
913 QCString tokenName = context.token->name;
914 AUTO_TRACE("name={}",tokenName);
915 if (!tok.is(TokenRetval::TK_WHITESPACE))
916 {
917 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
918 qPrint(tokenName));
919 return;
920 }
921 tokenizer.setStateInternalRef();
922 tok=tokenizer.lex(); // get the reference id
923 if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
924 {
925 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
926 tok.to_string(),qPrint(tokenName));
927 return;
928 }
929 children.append<DocInternalRef>(this,parent,context.token->name);
930 children.get_last<DocInternalRef>()->parse();
931}

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

775{
776 QCString name = linkToText(context.lang,context.token->name,TRUE);
777 AUTO_TRACE("word={}",name);
778 bool autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
779 if (!autolinkSupport && !ignoreAutoLinkFlag) // no autolinking -> add as normal word
780 {
781 children.append<DocWord>(this,parent,name);
782 return;
783 }
784
785 // ------- try to turn the word 'name' into a link
786
787 const Definition *compound=nullptr;
788 const MemberDef *member=nullptr;
789 size_t len = context.token->name.length();
790 ClassDef *cd=nullptr;
791 bool ambig = false;
792 FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,context.fileName,ambig);
793 //printf("handleLinkedWord(%s) context.context=%s\n",qPrint(context.token->name),qPrint(context.context));
794 if (!context.insideHtmlLink &&
795 (resolveRef(context.context,context.token->name,context.inSeeBlock,&compound,&member,TRUE,fd,TRUE)
796 || (!context.context.isEmpty() && // also try with global scope
797 resolveRef(QCString(),context.token->name,context.inSeeBlock,&compound,&member,FALSE,nullptr,TRUE))
798 )
799 )
800 {
801 //printf("ADD %s = %p (linkable?=%d)\n",qPrint(context.token->name),(void*)member,member ? member->isLinkable() : FALSE);
802 if (member && member->isLinkable()) // member link
803 {
804 AUTO_TRACE_ADD("resolved reference as member link");
805 if (member->isObjCMethod())
806 {
807 bool localLink = context.memberDef ? member->getClassDef()==context.memberDef->getClassDef() : FALSE;
808 name = member->objCMethodName(localLink,context.inSeeBlock);
809 }
810 children.append<DocLinkedWord>(
811 this,parent,name,
812 member->getReference(),
813 member->getOutputFileBase(),
814 member->anchor(),
815 member->briefDescriptionAsTooltip());
816 }
817 else if (compound->isLinkable()) // compound link
818 {
819 AUTO_TRACE_ADD("resolved reference as compound link");
820 QCString anchor = compound->anchor();
821 if (compound->definitionType()==Definition::TypeFile)
822 {
823 name=context.token->name;
824 }
825 else if (compound->definitionType()==Definition::TypeGroup)
826 {
827 name=toGroupDef(compound)->groupTitle();
828 }
829 children.append<DocLinkedWord>(
830 this,parent,name,
831 compound->getReference(),
832 compound->getOutputFileBase(),
833 anchor,
834 compound->briefDescriptionAsTooltip());
835 }
836 else if (compound->definitionType()==Definition::TypeFile &&
837 (toFileDef(compound))->generateSourceFile()
838 ) // undocumented file that has source code we can link to
839 {
840 AUTO_TRACE_ADD("resolved reference as source link");
841 children.append<DocLinkedWord>(
842 this,parent,context.token->name,
843 compound->getReference(),
844 compound->getSourceFileBase(),
845 "",
846 compound->briefDescriptionAsTooltip());
847 }
848 else // not linkable
849 {
850 AUTO_TRACE_ADD("resolved reference as unlinkable compound={} (linkable={}) member={} (linkable={})",
851 compound ? compound->name() : "<none>", compound ? (int)compound->isLinkable() : -1,
852 member ? member->name() : "<none>", member ? (int)member->isLinkable() : -1);
853 children.append<DocWord>(this,parent,name);
854 }
855 }
856 else if (!context.insideHtmlLink && len>1 && context.token->name.at(len-1)==':')
857 {
858 // special case, where matching Foo: fails to be an Obj-C reference,
859 // but Foo itself might be linkable.
860 context.token->name=context.token->name.left(len-1);
861 handleLinkedWord(parent,children,ignoreAutoLinkFlag);
862 children.append<DocWord>(this,parent,":");
863 }
864 else if (!context.insideHtmlLink && (cd=getClass(context.token->name+"-p")))
865 {
866 // special case 2, where the token name is not a class, but could
867 // be a Obj-C protocol
868 children.append<DocLinkedWord>(
869 this,parent,name,
870 cd->getReference(),
871 cd->getOutputFileBase(),
872 cd->anchor(),
874 }
875 else // normal non-linkable word
876 {
877 AUTO_TRACE_ADD("non-linkable");
878 if (context.token->name.startsWith("#"))
879 {
880 warn_doc_error(context.fileName,tokenizer.getLineNr(),"explicit link request to '%s' could not be resolved",qPrint(name));
881 }
882 children.append<DocWord>(this,parent,context.token->name);
883 }
884}
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)
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1892
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, 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 886 of file docparser.cpp.

887{
888 QCString name = context.token->name; // save token name
889 AUTO_TRACE("name={}",name);
890 QCString name1;
891 int p=0, i=0, ii=0;
892 while ((i=paramTypes.find('|',p))!=-1)
893 {
894 name1 = paramTypes.mid(p,i-p);
895 ii=name1.find('[');
896 context.token->name=ii!=-1 ? name1.mid(0,ii) : name1; // take part without []
897 handleLinkedWord(parent,children);
898 if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii)); // add [] part
899 p=i+1;
900 children.append<DocSeparator>(this,parent,"|");
901 }
902 name1 = paramTypes.mid(p);
903 ii=name1.find('[');
904 context.token->name=ii!=-1 ? name1.mid(0,ii) : name1;
905 handleLinkedWord(parent,children);
906 if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii));
907 context.token->name = name; // restore original token name
908}

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:295

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

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

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

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

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

References DocNodeList::append(), AUTO_TRACE, GrowVector< T >::back(), context, parent(), 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 636 of file docparser.cpp.

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

References DocNodeList::append(), AUTO_TRACE, context, FALSE, parent(), qPrint(), tokenizer, 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 context.initialStyleStack.pop();
768 warn_doc_error(context.fileName,tokenizer.getLineNr(),
769 "end of comment block while expecting "
770 "command </%s>",qPrint(tagName));
771 }
772}
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 1682 of file docparser.cpp.

1684{
1685 AUTO_TRACE();
1686 Token retval = Token::make_RetVal_OK();
1687
1688 if (doc.isEmpty()) return retval;
1689
1690 tokenizer.init(doc.data(),context.fileName,context.markdownSupport,context.insideHtmlLink);
1691
1692 // first parse any number of paragraphs
1693 bool isFirst=TRUE;
1694 DocPara *lastPar=!children.empty() ? std::get_if<DocPara>(&children.back()): nullptr;
1695 if (lastPar)
1696 { // last child item was a paragraph
1697 isFirst=FALSE;
1698 }
1699 do
1700 {
1701 children.append<DocPara>(this,parent);
1702 DocPara *par = children.get_last<DocPara>();
1703 if (isFirst) { par->markFirst(); isFirst=FALSE; }
1704 retval=par->parse();
1705 if (!par->isEmpty())
1706 {
1707 if (lastPar) lastPar->markLast(FALSE);
1708 lastPar=par;
1709 }
1710 else
1711 {
1712 children.pop_back();
1713 }
1714 } while (retval.is(TokenRetval::TK_NEWPARA));
1715 if (lastPar) lastPar->markLast();
1716
1717 AUTO_TRACE_EXIT("isFirst={} isLast={}",lastPar?lastPar->isFirst():-1,lastPar?lastPar->isLast():-1);
1718 return retval;
1719}
bool isLast() const
Definition docnode.h:1068
void markLast(bool v=TRUE)
Definition docnode.h:1066
bool isFirst() const
Definition docnode.h:1067
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 1879 of file docparser.cpp.

1880{
1881 AUTO_TRACE("data={} len={}",Trace::trunc(data),len);
1882 GrowBuf buf;
1883 size_t i=0;
1884 int lineNr = tokenizer.getLineNr();
1885 while (i<len)
1886 {
1887 char c = data[i];
1888 if (c=='@' || c=='\\') // look for a command
1889 {
1890 bool isBrief=TRUE;
1891 size_t j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
1892 if (j>0)
1893 {
1894 // skip whitespace
1895 while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
1896 // extract the argument
1897 QCString id = extractCopyDocId(data,j,len);
1898 const Definition *def = nullptr;
1899 QCString doc,brief;
1900 //printf("resolving docs='%s'\n",qPrint(id));
1901 bool found = findDocsForMemberOrCompound(id,&doc,&brief,&def);
1902 if (found && def->isReference())
1903 {
1904 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1905 "@copy%s or @copydoc target '%s' found but is from a tag file, skipped", isBrief?"brief":"details",
1906 qPrint(id));
1907 }
1908 else if (found)
1909 {
1910 //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
1911 auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
1912 if (it==context.copyStack.end()) // definition not parsed earlier
1913 {
1914 QCString orgFileName = context.fileName;
1915 context.copyStack.push_back(def);
1916 auto addDocs = [&](const QCString &file_,int line_,const QCString &doc_)
1917 {
1918 buf.addStr(" \\ifile \""+file_+"\" ");
1919 buf.addStr("\\iline "+QCString().setNum(line_)+" \\ilinebr ");
1920 size_t len_ = doc_.length();
1921 buf.addStr(processCopyDoc(doc_.data(),len_));
1922 };
1923 if (isBrief)
1924 {
1925 addDocs(def->briefFile(),def->briefLine(),brief);
1926 }
1927 else
1928 {
1929 addDocs(def->docFile(),def->docLine(),doc);
1931 {
1932 const MemberDef *md = toMemberDef(def);
1933 const ArgumentList &docArgList = md->templateMaster() ?
1934 md->templateMaster()->argumentList() :
1935 md->argumentList();
1936 buf.addStr(inlineArgListToDoc(docArgList));
1937 }
1938 }
1939 context.copyStack.pop_back();
1940 buf.addStr(" \\ilinebr \\ifile \""+context.fileName+"\" ");
1941 buf.addStr("\\iline "+QCString().setNum(lineNr)+" ");
1942 }
1943 else
1944 {
1945 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1946 "Found recursive @copy%s or @copydoc relation for argument '%s'.",
1947 isBrief?"brief":"details",qPrint(id));
1948 }
1949 }
1950 else
1951 {
1952 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1953 "@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
1954 qPrint(id));
1955 }
1956 // skip over command
1957 i=j;
1958 }
1959 else
1960 {
1961 QCString endMarker;
1962 size_t k = isVerbatimSection(data,i,len,endMarker);
1963 if (k>0)
1964 {
1965 size_t orgPos = i;
1966 i=skipToEndMarker(data,k,len,endMarker);
1967 buf.addStr(data+orgPos,i-orgPos);
1968 // TODO: adjust lineNr
1969 }
1970 else
1971 {
1972 buf.addChar(c);
1973 i++;
1974 }
1975 }
1976 }
1977 else // not a command, just copy
1978 {
1979 buf.addChar(c);
1980 i++;
1981 lineNr += (c=='\n') ? 1 : 0;
1982 }
1983 }
1984 len = buf.getPos();
1985 buf.addChar(0);
1986 AUTO_TRACE_EXIT("result={}",Trace::trunc(buf.get()));
1987 return buf.get();
1988}
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 1723 of file docparser.cpp.

1724{
1725 AUTO_TRACE("file={} text={}",file,text);
1726 bool ambig = false;
1727 QCString filePath = findFilePath(file,ambig);
1728 if (!filePath.isEmpty())
1729 {
1730 text = fileToString(filePath,Config_getBool(FILTER_SOURCE_FILES));
1731 if (ambig)
1732 {
1733 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file name '%s' is ambiguous"
1734 "Possible candidates:\n%s",qPrint(file),
1736 );
1737 }
1738 }
1739 else
1740 {
1741 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file '%s' is not found. "
1742 "Check your EXAMPLE_PATH",qPrint(file));
1743 }
1744}
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(), 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: