22%option never-interactive
23%option prefix="pycodeYY"
25%option extra-type="struct pycodeYY_state *"
30#define YY_TYPEDEF_YY_SCANNER_T
38#include <unordered_map>
65#define DBG_CTX(x) do { } while(0)
68#define YY_NO_UNISTD_H 1
76 OutputCodeList *
code =
nullptr;
160#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
A abstract class representing of a compound symbol.
The common base class of all entity definitions found in the sources.
Class representing a list of different code generators.
This is an alternative implementation of QCString.
static void addVariable(yyscan_t yyscanner, QCString type, QCString name)
std::vector< std::string > StringVector
static void generateClassOrGlobalLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &clName, bool typeOnly=FALSE)
static void writeMultiLineCodeLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const QCString &text)
static void endCodeLine(yyscan_t yyscanner)
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static void codifyLines(yyscan_t yyscanner, const QCString &text)
static void incrementFlowKeyWordCount(yyscan_t yyscanner)
static void codify(yyscan_t yyscanner, const QCString &text)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static int countLines(yyscan_t yyscanner)
static void addToSearchIndex(yyscan_t yyscanner, const QCString &text)
static const char * stateToString(int state)
static bool findMemberLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *sym, const QCString &symName)
static void pop_state(yyscan_t yyscanner)
static bool getLinkInScope(yyscan_t yyscanner, const QCString &c, const QCString &m, const QCString &memberText, OutputCodeList &ol, const QCString &text)
static void startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
static void generateFunctionLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &funcName)
static void adjustScopesAndSuites(yyscan_t yyscanner, unsigned indentLength)
static const ClassDef * stripClassName(yyscan_t yyscanner, const QCString &s, Definition *d)
static const char * getLexerFILE()
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
static bool getLink(yyscan_t yyscanner, const QCString &className, const QCString &memberName, OutputCodeList &ol, const QCString &text=QCString())
Web server based search engine.
const FileDef * sourceFileDef
const Definition * currentDefinition
VariableContext theVarContext
int yyLineNr
current line number
QCString docBlock
contents of all lines of a documentation block
std::unordered_map< std::string, ScopedTypeVariant > codeClassMap
std::stack< yy_size_t > indents
Tracks indentation levels for scoping in python.
std::vector< const Definition * > foldStack
TooltipManager tooltipManager
StringVector curClassBases
int inputLines
number of line in the code fragment
const Definition * searchCtx
const MemberDef * currentMemberDef
bool insideSpecialComment
SymbolResolver symbolResolver
const char * inputString
the code fragment as text
std::unique_ptr< FileDef > exampleFileDef
CallContext theCallContext
int inputPosition
read offset during parsing
const char * currentFontClass
A bunch of utility functions.
174LETTER [A-Za-z\x80-\xFF]
175NONEMPTY [A-Za-z0-9_\x80-\xFF]
176EXPCHAR [#(){}\[\],:.%/\\=`*~|&<>!;+-]
177PARAMNONEMPTY [^ \t\n():]
178IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
179SCOPE {IDENTIFIER}("."{IDENTIFIER})*
185TRIDOUBLEQUOTE "\"\"\""
186LONGSTRINGCHAR [^\\"']
188LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
189SMALLQUOTE ("\"\""|"\""|"'"|"''")
190LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
192STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
193KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"async"|"def"|"True"|"False")
194FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
224 BEGIN( FunctionDec );
static void startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
226 "async"{BB}"def"{BB} {
230 BEGIN( FunctionDec );
244 "self."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER}"(" {
245 codify(yyscanner,
"self.");
248 "self."{IDENTIFIER}/"(" {
249 codify(yyscanner,
"self.");
252 "self."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER} {
253 codify(yyscanner,
"self.");
256 "self."{IDENTIFIER} {
257 codify(yyscanner,
"self.");
260 "cls."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER}"(" {
264 "cls."{IDENTIFIER}/"(" {
268 "cls."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER} {
276 "@"{SCOPE}{CALLANY}? {
283<ClassDec>{IDENTIFIER} {
286 yyextra->curClassName = yytext;
287 yyextra->curClassBases.clear();
288 BEGIN( ClassInheritance );
static void generateClassOrGlobalLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &clName, bool typeOnly=FALSE, bool varOnly=FALSE)
296 ({IDENTIFIER}".")*{IDENTIFIER} {
310 yyextra->curClassBases.emplace_back(yytext);
311 yyextra->insideBody =
true;
313 yyextra->insideBody =
false;
327 for (
const auto &s : yyextra->curClassBases)
329 const ClassDef *baseDefToAdd =
nullptr;
331 auto it = yyextra->codeClassMap.find(s);
332 if (it != yyextra->codeClassMap.end())
334 baseDefToAdd =
toClassDef(it->second.globalDef());
337 if (baseDefToAdd==
nullptr)
339 baseDefToAdd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,s.c_str(),
true);
342 if (baseDefToAdd && baseDefToAdd->
name()!=yyextra->curClassName)
344 var.localDef()->insertBaseClass(baseDefToAdd->
name());
347 yyextra->codeClassMap.emplace(yyextra->curClassName.str(),std::move(var));
350 yyextra->curClassName.clear();
351 yyextra->curClassBases.clear();
353 yyextra->noSuiteFound =
TRUE;
virtual const QCString & name() const =0
ClassDef * toClassDef(Definition *d)
static void generateFunctionLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &funcName)
366 BEGIN( FunctionParams );
376 ({IDENTIFIER}|{PARAMNONEMPTY}+) {
static void codifyLines(yyscan_t yyscanner, const QCString &text)
395 yyextra->noSuiteFound =
TRUE;
static void incrementFlowKeyWordCount(yyscan_t yyscanner)
419 ({IDENTIFIER}".")*{IDENTIFIER}/"(" {
420 yyextra->insideBody =
true;
422 yyextra->insideBody =
false;
424 ({IDENTIFIER}".")+{IDENTIFIER} {
425 yyextra->insideBody =
true;
427 yyextra->insideBody =
false;
429 {IDENTIFIER} {
codify(yyscanner,yytext); }
452 yyextra->noSuiteFound =
FALSE;
462 yyextra->noSuiteFound =
FALSE;
470 if (YY_START==SingleQuoteString ||
471 YY_START==DoubleQuoteString ||
472 YY_START==TripleString
477 yy_push_state(YY_START,yyscanner);
479 yyextra->docBlock=yytext;
484 if ( yyextra->noSuiteFound )
487 BEGIN ( SuiteCaptureIndent );
504 yyextra->indents.push(yyleng);
512 {BB}/({NONEMPTY}|{EXPCHAR}) {
529 ""/({NONEMPTY}|{EXPCHAR}) {
541 BEGIN( SuiteMaintain );
557 {STRINGPREFIX}?{TRIDOUBLEQUOTE} {
563 BEGIN(yyextra->stringContext);
580 {STRINGPREFIX}?{TRISINGLEQUOTE} {
586 BEGIN(yyextra->stringContext);
600 if (yyextra->doubleQuote==(yytext[0]==
'"'))
603 BEGIN(yyextra->stringContext);
621<*>{STRINGPREFIX}?{TRISINGLEQUOTE} {
622 if (YY_START==SingleQuoteString) REJECT;
624 yyextra->stringContext=YY_START;
625 yyextra->doubleQuote=yytext[yyleng-1]==
'"';
629<*>{STRINGPREFIX}?{TRIDOUBLEQUOTE} {
630 if (YY_START==DoubleQuoteString) REJECT;
632 yyextra->stringContext=YY_START;
633 yyextra->doubleQuote=yytext[yyleng-1]==
'"';
637<*>{STRINGPREFIX}?"'" {
638 if (YY_START==SingleQuoteString ||
639 YY_START==DoubleQuoteString ||
640 YY_START==TripleString)
645 yyextra->stringContext=YY_START;
647 BEGIN(SingleQuoteString);
649<*>{STRINGPREFIX}?"\"" {
650 if (YY_START==SingleQuoteString ||
651 YY_START==DoubleQuoteString ||
652 YY_START==TripleString)
657 yyextra->stringContext=YY_START;
659 BEGIN(DoubleQuoteString);
662 yyextra->docBlock+=yytext;
664<DocBlock>"\n"{B}("#") {
665 yyextra->docBlock+=yytext;
static void pop_state(yyscan_t yyscanner)
676 if (YY_START==SingleQuoteString ||
677 YY_START==DoubleQuoteString ||
678 YY_START==TripleString)
682 yy_push_state(YY_START,yyscanner);
684 yyextra->docBlock=yytext;
687 if (YY_START==SingleQuoteString ||
688 YY_START==DoubleQuoteString ||
689 YY_START==TripleString)
698 if (yyextra->endComment)
700 yyextra->endComment=
FALSE;
725 if (YY_START==DocBlock)
741 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
746 auto it = yyextra->codeClassMap.
find(ltype.
str());
747 if (it!=yyextra->codeClassMap.end())
749 yyextra->theVarContext.addVariable(lname,std::move(it->second));
753 const ClassDef *varType = getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,ltype);
760 if (!yyextra->theVarContext.atGlobalScope())
773 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
774 int inputPosition = yyextra->inputPosition;
775 const char *s = yyextra->inputString + inputPosition;
777 while( c < max_size && *s )
782 yyextra->inputPosition += c;
794 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
796 if (!yyextra->indents.empty() && indentLength < yyextra->indents.top())
798 while (!yyextra->indents.empty() && indentLength < yyextra->indents.top())
801 yyextra->indents.pop();
803 yyextra->currentMemberDef=
nullptr;
804 if (yyextra->currentDefinition)
805 yyextra->currentDefinition=yyextra->currentDefinition->getOuterScope();
810 if (!yyextra->indents.empty())
825 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
826 const char *p=yyextra->inputString;
832 if (c==
'\n') count++;
834 if (p>yyextra->inputString && *(p-1)!=
'\n')
846 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
849 if (yyextra->searchCtx)
874 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
881 QCString clName=className+templSpec;
883 if (!yyextra->classScope.isEmpty())
885 cd=yyextra->symbolResolver.resolveClass(d,yyextra->classScope+
"::"+clName,
true);
889 cd=yyextra->symbolResolver.resolveClass(d,clName,
true);
905 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
906 while (!yyextra->foldStack.empty())
908 const Definition *dd = yyextra->foldStack.back();
911 yyextra->code->endFold();
913 yyextra->foldStack.pop_back();
924 if (endLine!=-1 && startLine!=endLine &&
932 (yyextra->foldStack.empty() || yyextra->foldStack.back()->getEndBodyLine()!=startLine))
935 yyextra->code->startFold(yyextra->yyLineNr,
"",
"");
936 yyextra->foldStack.push_back(d);
950 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
952 if (yyextra->sourceFileDef)
958 const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
964 yyextra->currentDefinition = d;
965 yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
966 yyextra->insideBody =
false;
967 yyextra->endComment =
FALSE;
968 yyextra->searchingForBody =
TRUE;
969 yyextra->realScope = d->
name();
970 yyextra->classScope = d->
name();
972 yyextra->bodyCurlyCount = 0;
974 lineAnchor.
sprintf(
"l%05d",yyextra->yyLineNr);
975 if (yyextra->currentMemberDef)
978 yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
979 yyextra->currentMemberDef->getOutputFileBase(),
980 yyextra->currentMemberDef->anchor(),yyextra->yyLineNr,
981 !yyextra->includeCodeFragment);
990 !yyextra->includeCodeFragment);
1002 !yyextra->includeCodeFragment);
1005 yyextra->code->startCodeLine(yyextra->yyLineNr);
1006 yyextra->insideCodeLine=
true;
1008 if (yyextra->currentFontClass)
1010 yyextra->code->startFontClass(yyextra->currentFontClass);
1018 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1019 yyextra->code->codify(text);
1026 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1028 yyextra->code->endCodeLine();
1029 yyextra->insideCodeLine=
false;
1036 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1037 const char *fc = yyextra->currentFontClass;
1038 if (yyextra->insideCodeLine)
1042 if (yyextra->yyLineNr<yyextra->inputLines)
1044 yyextra->currentFontClass = fc;
1060 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1063 yyextra->tooltipManager.addTooltip(d);
1068 if (!sourceTooltips)
1073 const char *p=text.
data();
1078 while ((c=*p++) && c!=
'\n') { }
1081 yyextra->yyLineNr++;
1099 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1102 yyextra->code->startSpecialComment();
1103 yyextra->insideSpecialComment =
true;
1106 if (
qstrcmp(yyextra->currentFontClass,s)!=0)
1109 yyextra->code->startFontClass(s);
1110 yyextra->currentFontClass=s;
1118 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1119 if (yyextra->currentFontClass)
1121 yyextra->code->endFontClass();
1122 yyextra->currentFontClass=
nullptr;
1124 if (specialComment && yyextra->insideSpecialComment)
1126 yyextra->code->endSpecialComment();
1127 yyextra->insideSpecialComment=
false;
1135 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1138 const char *p=text.
data(),*sp=p;
1144 while ((c=*p++) && c!=
'\n') { }
1147 yyextra->yyLineNr++;
1148 size_t l =
static_cast<size_t>(p-sp-1);
1149 std::string tmp(sp,l);
1150 yyextra->code->codify(tmp.c_str());
1155 yyextra->code->codify(sp);
1171 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1189 if (yyextra->currentDefinition && yyextra->currentMemberDef && yyextra->collectXRefs && yyextra->insideBody)
1211 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1216 if (!yyextra->curClassName.isEmpty())
1219 c.
prepend(yyextra->curClassName);
1238 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1242 if (className.
isEmpty())
return;
1244 DBG_CTX((stderr,
"generateClassOrGlobalLink(className=%s)\n",
qPrint(className)));
1251 if ((lcd=yyextra->theVarContext.findVariable(className))==
nullptr)
1253 const Definition *d = yyextra->currentDefinition;
1256 cd = yyextra->symbolResolver.resolveClass(d,
substitute(className,
".",
"::"),
true);
1257 md = yyextra->symbolResolver.getTypedef();
1259 DBG_CTX((stderr,
"d=%s yyextra->sourceFileDef=%s\n",
1261 yyextra->currentDefinition?
qPrint(yyextra->currentDefinition->displayName()):
"<null>"));
1264 if (cd==
nullptr && md==
nullptr)
1273 else if (
getLink(yyscanner,yyextra->classScope,clName,ol,clName))
1283 yyextra->theCallContext.setScope(*lcd);
1286 DBG_CTX((stderr,
"is a local variable cd=%p!\n",cd));
1299 yyextra->currentMemberDef && yyextra->collectXRefs && yyextra->insideBody)
1307 int scopeEnd = className.
findRev(
".");
1308 if (scopeEnd!=-1 && !typeOnly)
1326 yyextra->currentMemberDef && yyextra->collectXRefs && yyextra->insideBody)
1349 yyextra->currentMemberDef && yyextra->collectXRefs && yyextra->insideBody)
1378 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1379 QCString locScope=yyextra->classScope;
1385 locScope=locFunc.
left(i);
1391 auto it = yyextra->codeClassMap.find(locScope.
str());
1392 if (it!=yyextra->codeClassMap.end())
1400 if (
getLink(yyscanner,bcName,locFunc,ol,funcName))
1408 if (!
getLink(yyscanner,locScope,locFunc,ol,funcName))
1422 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1435 if (yyextra->currentMemberDef && yyextra->collectXRefs)
1459 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1465 if (yyextra->currentDefinition)
1468 for (
const auto &p : v)
1474 codify(yyscanner,symName);
1480 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1481 if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction())
1502 pycodeYYlex_init_extra(&
p->state,&
p->yyscanner);
1511 pycodeYYlex_destroy(
p->yyscanner);
1516 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
1517 yyextra->codeClassMap.clear();
1518 yyextra->currentDefinition =
nullptr;
1519 yyextra->currentMemberDef =
nullptr;
1520 yyextra->doubleStringIsDoc =
FALSE;
1521 yyextra->paramParens = 0;
1522 while (!yyextra->indents.empty()) yyextra->indents.pop();
1530 bool stripCodeComments,
1531 bool isExampleBlock,
1536 bool inlineFragment,
1544 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1551 yyextra->fileName = fileDef ? fileDef->
fileName():
"";
1552 yyextra->code = &codeOutIntf;
1553 yyextra->inputString = input.
data();
1554 yyextra->inputPosition = 0;
1555 yyextra->currentFontClass =
nullptr;
1556 yyextra->insideCodeLine =
FALSE;
1557 yyextra->searchCtx=searchCtx;
1558 yyextra->collectXRefs=collectXRefs;
1560 yyextra->yyLineNr = startLine;
1562 yyextra->yyLineNr = 1;
1564 yyextra->inputLines = endLine+1;
1566 yyextra->inputLines = yyextra->yyLineNr +
countLines(yyscanner) - 1;
1569 yyextra->exampleBlock = isExampleBlock;
1570 yyextra->exampleName = exampleName;
1571 yyextra->sourceFileDef = fileDef;
1572 yyextra->symbolResolver.setFileScope(fileDef);
1573 yyextra->foldStack.clear();
1574 yyextra->insideSpecialComment =
false;
1576 if (yyextra->exampleBlock && fileDef==
nullptr)
1580 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
1582 if (yyextra->sourceFileDef)
1587 yyextra->includeCodeFragment = inlineFragment;
1591 pycodeYYrestart(
nullptr,yyscanner);
1593 pycodeYYlex(yyscanner);
1595 if (!yyextra->indents.empty())
1600 if (yyextra->insideCodeLine)
1606 while (!yyextra->foldStack.empty())
1608 yyextra->code->endFold();
1609 yyextra->foldStack.pop_back();
1612 if (yyextra->exampleFileDef)
1615 yyextra->exampleFileDef.reset();
1616 yyextra->sourceFileDef=
nullptr;
1619 yyextra->tooltipManager.writeTooltips(codeOutIntf);
1624 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1625 if ( yyg->yy_start_stack_ptr <= 0 )
1626 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected statement '%s'",yytext );
1628 yy_pop_state(yyscanner);
1631#include "pycode.l.h"
virtual const MemberDef * getMemberByName(const QCString &) const =0
Returns the member with the given name.
virtual int isBaseClass(const ClassDef *bcd, bool followInstances, const QCString &templSpec=QCString()) const =0
Returns TRUE iff bcd is a direct or indirect base class of this class.
static bool isFlagSet(const DebugMask mask)
virtual int getEndBodyLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual const FileDef * getBodyDef() const =0
virtual bool isLinkableInProject() const =0
virtual int getStartDefLine() const =0
virtual QCString getReference() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
static NamespaceDefMutable * globalScope
static std::mutex countFlowKeywordsMutex
static SymbolMap< Definition > * symbolMap
static SearchIndexIntf searchIndex
A model of a file symbol.
virtual QCString fileName() const =0
std::vector< QCString > baseClasses() const
A model of a class/file/namespace member symbol.
virtual QCString typeString() const =0
virtual GroupDef * getGroupDef()=0
virtual void incrementFlowKeyWordCount()=0
An abstract interface of a namespace symbol.
virtual const MemberDef * getMemberByName(const QCString &) const =0
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip)
void stripCodeComments(bool b)
void resetCodeParserState() override
Resets the state of the code parser.
~PythonCodeParser() override
void parseCode(OutputCodeList &codeOutIntf, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXrefs=TRUE) override
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
std::unique_ptr< Private > p
int find(char c, int index=0, bool cs=TRUE) const
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
const std::string & str() const
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
QCString right(size_t len) const
QCString & sprintf(const char *format,...)
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
ClassDef * getClass(const QCString &n)
static void writeMultiLineCodeLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const QCString &text)
static void endCodeLine(yyscan_t yyscanner)
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static int countLines(yyscan_t yyscanner)
static void addToSearchIndex(yyscan_t yyscanner, const QCString &text)
static bool getLinkInScope(yyscan_t yyscanner, const QCString &c, const QCString &m, const QCString &memberText, OutputCodeList &ol, const QCString &text, bool varOnly=FALSE)
static const ClassDef * stripClassName(yyscan_t yyscanner, const QCString &s, const Definition *d)
static bool getLink(yyscan_t yyscanner, const QCString &className, const QCString &memberName, OutputCodeList &ol, const QCString &text=QCString(), bool varOnly=FALSE)
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
static void codeFolding(yyscan_t yyscanner, const Definition *d)
#define Config_getBool(name)
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
void addDocCrossReference(const MemberDef *s, const MemberDef *d)
MemberDefMutable * toMemberDefMutable(Definition *d)
MemberDef * toMemberDef(Definition *d)
#define warn(file, line, fmt,...)
NamespaceDef * getResolvedNamespace(const QCString &name)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
const char * qPrint(const char *s)
int qstrcmp(const char *str1, const char *str2)
SrcLangExt
Language as given by extension.
QCString removeRedundantWhiteSpace(const QCString &s)
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
GetDefResult getDefs(const GetDefInput &input)