#include <stdio.h>
#include <stdlib.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qcstring.h>
#include <qstack.h>
#include <qdict.h>
#include <qregexp.h>
#include <ctype.h>
#include "doxygen.h"
#include "debug.h"
#include "util.h"
#include "pagedef.h"
#include "docparser.h"
#include "doctokenizer.h"
#include "cmdmapper.h"
#include "printdocvisitor.h"
#include "message.h"
#include "section.h"
#include "searchindex.h"
#include "language.h"
#include "portable.h"
#include "cite.h"
#include "arguments.h"
#include "vhdldocgen.h"
#include "groupdef.h"
#include "classlist.h"
#include "filedef.h"
#include "memberdef.h"
#include "namespacedef.h"
#include "reflist.h"
#include "formula.h"
#include "config.h"
#include "growbuf.h"
#include "markdown.h"
#include "htmlentity.h"
Go to the source code of this file.
Classes | |
struct | DocParserContext |
struct | ActiveRowSpan |
Macros | |
#define | DBG(x) do {} while(0) |
#define | INTERNAL_ASSERT(x) do {} while(0) |
#define | CHECK_FOR_COMMAND(str, action) |
Typedefs | |
typedef QList< ActiveRowSpan > | RowSpanList |
Functions | |
static void | docParserPushContext (bool saveParamInfo=TRUE) |
static void | docParserPopContext (bool keepParamInfo=FALSE) |
static void | unescapeCRef (QCString &s) |
static QCString | findAndCopyImage (const char *fileName, DocImage::Type type) |
static void | checkArgumentName (const QCString &name, bool isParam) |
static void | checkUndocumentedParams () |
static void | detectNoDocumentedParams () |
static QCString | stripKnownExtensions (const char *text) |
static bool | insidePRE (DocNode *n) |
static bool | insideLI (DocNode *n) |
static bool | insideUL (DocNode *n) |
static bool | insideOL (DocNode *n) |
static bool | insideTable (DocNode *n) |
static bool | findDocsForMemberOrCompound (const char *commandName, QCString *pDoc, QCString *pBrief, Definition **pDef) |
static bool | defaultHandleToken (DocNode *parent, int tok, QList< DocNode > &children, bool handleWord=TRUE) |
static int | handleStyleArgument (DocNode *parent, QList< DocNode > &children, const QCString &cmdName) |
static void | handleStyleEnter (DocNode *parent, QList< DocNode > &children, DocStyleChange::Style s, const HtmlAttribList *attribs) |
static void | handleStyleLeave (DocNode *parent, QList< DocNode > &children, DocStyleChange::Style s, const char *tagName) |
static void | handlePendingStyleCommands (DocNode *parent, QList< DocNode > &children) |
static void | handleInitialStyleCommands (DocPara *parent, QList< DocNode > &children) |
static int | handleAHref (DocNode *parent, QList< DocNode > &children, const HtmlAttribList &tagHtmlAttribs) |
static void | handleUnclosedStyleCommands () |
static void | handleLinkedWord (DocNode *parent, QList< DocNode > &children, bool ignoreAutoLinkFlag=FALSE) |
static void | handleParameterType (DocNode *parent, QList< DocNode > &children, const QCString ¶mTypes) |
static DocInternalRef * | handleInternalRef (DocNode *parent) |
static DocAnchor * | handleAnchor (DocNode *parent) |
static void | defaultHandleTitleAndSize (const int cmd, DocNode *parent, QList< DocNode > &children, QCString &width, QCString &height) |
static void | handleImg (DocNode *parent, QList< DocNode > &children, const HtmlAttribList &tagHtmlAttribs) |
static int | internalValidatingParseDoc (DocNode *parent, QList< DocNode > &children, const QCString &doc) |
static void | readTextFileByName (const QCString &file, QCString &text) |
static void | flattenParagraphs (DocNode *root, QList< DocNode > &children) |
static bool | findAttribute (const HtmlAttribList &tagHtmlAttribs, const char *attrName, QCString *result) |
static QCString | extractCopyDocId (const char *data, uint &j, uint len) |
static uint | isCopyBriefOrDetailsCmd (const char *data, uint i, uint len, bool &brief) |
static uint | isVerbatimSection (const char *data, uint i, uint len, QCString &endMarker) |
static uint | skipToEndMarker (const char *data, uint i, uint len, const QCString &endMarker) |
static QCString | processCopyDoc (const char *data, uint &len) |
DocRoot * | validatingParseDoc (const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex) |
DocText * | validatingParseText (const char *input) |
void | docFindSections (const char *input, Definition *d, MemberGroup *mg, const char *fileName) |
Variables | |
static const char * | sectionLevelToName [] |
static Definition * | g_scope |
static QCString | g_context |
static bool | g_inSeeBlock |
static bool | g_xmlComment |
static bool | g_insideHtmlLink |
static QStack< DocNode > | g_nodeStack |
static QStack< DocStyleChange > | g_styleStack |
static QStack< DocStyleChange > | g_initialStyleStack |
static QList< Definition > | g_copyStack |
static QCString | g_fileName |
static QCString | g_relPath |
static bool | g_hasParamCommand |
static bool | g_hasReturnCommand |
static QDict< void > | g_paramsFound |
static MemberDef * | g_memberDef |
static bool | g_isExample |
static QCString | g_exampleName |
static SectionDict * | g_sectionDict |
static QCString | g_searchUrl |
static QCString | g_includeFileText |
static uint | g_includeFileOffset |
static uint | g_includeFileLength |
static QStack< DocParserContext > | g_parserStack |
#define CHECK_FOR_COMMAND | ( | str, | |
action | |||
) |
Definition at line 7040 of file docparser.cpp.
#define DBG | ( | x | ) | do {} while(0) |
Definition at line 59 of file docparser.cpp.
#define INTERNAL_ASSERT | ( | x | ) | do {} while(0) |
Definition at line 68 of file docparser.cpp.
typedef QList<ActiveRowSpan> RowSpanList |
List of ActiveRowSpan classes.
Definition at line 3740 of file docparser.cpp.
Collects the parameters found with @param or @retval commands in a global list g_paramsFound. If isParam is set to TRUE and the parameter is not an actual parameter of the current member g_memberDef, then a warning is raised (unless warnings are disabled altogether).
Definition at line 386 of file docparser.cpp.
|
static |
Checks if the parameters that have been specified using @param are indeed all parameters. Must be called after checkArgumentName() has been called for each argument.
Definition at line 455 of file docparser.cpp.
|
static |
Definition at line 1255 of file docparser.cpp.
|
static |
Definition at line 1331 of file docparser.cpp.
|
static |
Check if a member has documentation for its parameter and or return type, if applicable. If found this will be stored in the member, this is needed as a member can have brief and detailed documentation, while only one of these needs to document the parameters.
Definition at line 527 of file docparser.cpp.
void docFindSections | ( | const char * | input, |
Definition * | d, | ||
MemberGroup * | m, | ||
const char * | fileName | ||
) |
Searches for section and anchor commands in the input
Definition at line 7434 of file docparser.cpp.
Definition at line 191 of file docparser.cpp.
Definition at line 148 of file docparser.cpp.
Definition at line 6979 of file docparser.cpp.
|
static |
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 262 of file docparser.cpp.
|
static |
Definition at line 5760 of file docparser.cpp.
|
static |
Looks for a documentation block with name commandName in the current context (g_context). The resulting documentation string is put in pDoc, the definition in which the documentation was found is put in pDef.
TRUE | if name was found. |
FALSE | if name was not found. |
Definition at line 716 of file docparser.cpp.
Definition at line 2523 of file docparser.cpp.
|
static |
Definition at line 981 of file docparser.cpp.
Definition at line 1218 of file docparser.cpp.
|
static |
Definition at line 1676 of file docparser.cpp.
Definition at line 972 of file docparser.cpp.
|
static |
Definition at line 1196 of file docparser.cpp.
|
static |
Definition at line 1054 of file docparser.cpp.
|
static |
Definition at line 1181 of file docparser.cpp.
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 957 of file docparser.cpp.
|
static |
Definition at line 848 of file docparser.cpp.
|
static |
Called when a style change starts. For instance a <b> command is encountered.
Definition at line 908 of file docparser.cpp.
|
static |
Called when a style change ends. For instance a </b> command is encountered.
Definition at line 920 of file docparser.cpp.
|
static |
Definition at line 1041 of file docparser.cpp.
Returns TRUE iff node n is a child of a html list item node
Definition at line 657 of file docparser.cpp.
Returns TRUE iff node n is a child of a ordered html list node
Definition at line 684 of file docparser.cpp.
Returns TRUE iff node n is a child of a preformatted node
Definition at line 644 of file docparser.cpp.
Definition at line 697 of file docparser.cpp.
Returns TRUE iff node n is a child of a unordered html list node
Definition at line 670 of file docparser.cpp.
|
static |
Definition at line 1713 of file docparser.cpp.
Definition at line 7044 of file docparser.cpp.
Definition at line 7055 of file docparser.cpp.
Definition at line 7094 of file docparser.cpp.
Definition at line 1756 of file docparser.cpp.
|
static |
Definition at line 7076 of file docparser.cpp.
|
static |
Strips known html and tex extensions from text.
Definition at line 625 of file docparser.cpp.
|
static |
Definition at line 237 of file docparser.cpp.
DocRoot* validatingParseDoc | ( | const char * | fileName, |
int | startLine, | ||
Definition * | context, | ||
MemberDef * | md, | ||
const char * | input, | ||
bool | indexWords, | ||
bool | isExample, | ||
const char * | exampleName = 0 , |
||
bool | singleLine = FALSE , |
||
bool | linkFromIndex = FALSE |
||
) |
Main entry point for the documentation parser.
fileName | File in which the documentation block is found (or the name of the example file in case isExample is TRUE). |
startLine | Line at which the documentation block is found. |
context | Class or namespace to which this block belongs. |
md | Member definition to which the documentation belongs. Can be 0. |
input | String representation of the documentation block. |
indexWords | Indicates whether or not words should be put in the search index. |
isExample | TRUE if the documentation belongs to an example. |
exampleName | Base name of the example file (0 if isExample is FALSE). |
singleLine | Output should be presented on a single line, so without starting a new paragraph at the end. |
linkFromIndex | TRUE if the documentation is generated from an index page. In this case context is not used to determine the relative path when making a link. |
Definition at line 7179 of file docparser.cpp.
DocText* validatingParseText | ( | const char * | input | ) |
Main entry point for parsing simple text fragments. These fragments are limited to words, whitespace and symbols.
Definition at line 7381 of file docparser.cpp.
|
static |
Definition at line 87 of file docparser.cpp.
|
static |
Definition at line 94 of file docparser.cpp.
|
static |
Definition at line 103 of file docparser.cpp.
|
static |
Definition at line 95 of file docparser.cpp.
|
static |
Definition at line 98 of file docparser.cpp.
|
static |
Definition at line 99 of file docparser.cpp.
|
static |
Definition at line 109 of file docparser.cpp.
|
static |
Definition at line 108 of file docparser.cpp.
|
static |
Definition at line 107 of file docparser.cpp.
|
static |
Definition at line 93 of file docparser.cpp.
|
static |
Definition at line 88 of file docparser.cpp.
|
static |
Definition at line 90 of file docparser.cpp.
|
static |
Definition at line 102 of file docparser.cpp.
|
static |
Definition at line 101 of file docparser.cpp.
Definition at line 91 of file docparser.cpp.
|
static |
Definition at line 100 of file docparser.cpp.
|
static |
Definition at line 144 of file docparser.cpp.
|
static |
Definition at line 96 of file docparser.cpp.
|
static |
Definition at line 86 of file docparser.cpp.
|
static |
Definition at line 105 of file docparser.cpp.
|
static |
Definition at line 104 of file docparser.cpp.
|
static |
Definition at line 92 of file docparser.cpp.
|
static |
Definition at line 89 of file docparser.cpp.
|
static |
Definition at line 73 of file docparser.cpp.