20%option never-interactive
21%option prefix="pyscannerYY"
23%option extra-type="struct pyscannerYY_state *"
27#define YY_TYPEDEF_YY_SCANNER_T
63#define DBG_CTX(x) do { } while(0)
66#define YY_NO_UNISTD_H 1
68#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
160#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
163static inline const char *
getLexerFILE() {
return __FILE__;}
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static void addVariable(yyscan_t yyscanner, QCString type, QCString name)
static const char * getLexerFILE()
std::unordered_map< std::string, std::string > StringUnorderedMap
#define lineCount(s, len)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
static void newEntry(yyscan_t yyscanner)
static void incLineNr(yyscan_t yyscanner)
static void docVariable(yyscan_t yyscanner, const char *s)
static void initSpecialBlock(yyscan_t yyscanner)
static void initTriSingleQuoteBlock(yyscan_t yyscanner)
static void addFrom(yyscan_t yyscanner, bool all)
static void setProtection(yyscan_t yyscanner)
static void endOfDef(yyscan_t yyscanner, int correction=0)
static QCString findPackageScope(yyscan_t yyscanner, const QCString &fileName)
static void searchFoundClass(yyscan_t yyscanner)
static QCString findPackageScopeFromPath(yyscan_t yyscanner, const QCString &path)
static void newVariable(yyscan_t yyscanner)
static void initTriDoubleQuoteBlock(yyscan_t yyscanner)
static void searchFoundDef(yyscan_t yyscanner)
static void addEntry(yyscan_t yyscanner)
static void newFunction(yyscan_t yyscanner)
static void addToString(yyscan_t yyscanner, const char *s)
Some helper functions for std::string.
std::shared_ptr< Entry > previous
std::shared_ptr< Entry > current
StringUnorderedMap packageNameCache
std::shared_ptr< Entry > bodyEntry
TextStream decoratorCommentStr
std::shared_ptr< Entry > current_root
bool packageCommentAllowed
OutlineParserInterface * thisParser
std::vector< QCString > decorators
CommentScanner commentScanner
A bunch of utility functions.
177HEXNUMBER "0"[xX][0-9a-fA-F]+[lL]?
178OCTNUMBER "0"[0-7]+[lL]?
179NUMBER {DIGIT}+[lLjJ]?
180INTNUMBER {HEXNUMBER}|{OCTNUMBER}|{NUMBER}
181FLOATNUMBER {DIGIT}+"."{DIGIT}+([eE][+\-]?{DIGIT}+)?[jJ]?
183LETTER [A-Za-z\x80-\xFF]
184NONEMPTY [A-Za-z0-9_\x80-\xFF]
185EXPCHAR [#(){}\[\],:.%/\\=`*~|&<>!;+-]
186PARAMNONEMPTY [^ \t\n():]
187IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
188SCOPE {IDENTIFIER}("."{IDENTIFIER})*
190TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
191TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)?
192ENDTRISINGLEQUOTE "'''"
193ENDTRIDOUBLEQUOTE "\"\"\""
194LONGSTRINGCHAR [^\\"']
196LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
197SMALLQUOTE ("\"\""|"\""|"'"|"''")
198LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
200STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
201POUNDCOMMENT "#"[^#\n][^\n]*
206LINENR {B}*[1-9][0-9]*
207FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
208FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
209FILECHARS {FILEICHAR}*{FILEECHAR}+
210HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
211VFILEMASK {FILECHARS}("."{FILECHARS})*
212FILEMASK {VFILEMASK}|{HFILEMASK}
215ID [a-z_A-Z%]+{IDSYM}*
238%x FunctionTypeAnnotation
239%x FunctionParamDefVal
258%x SingleQuoteStringIgnore
259%x DoubleQuoteStringIgnore
279 DBG_CTX((stderr,
"Found def at %d\n",yyextra->yyLineNr));
282 BEGIN( FunctionDec );
284 ^{B}"async"{BB}"def"{BB} {
285 DBG_CTX((stderr,
"Found async def at %d\n",yyextra->yyLineNr));
288 BEGIN( FunctionDec );
292 BEGIN( FunctionDec );
294 "async"{BB}"def"{BB} {
296 BEGIN( FunctionDec );
300 DBG_CTX((stderr,
"Found class at %d\n",yyextra->yyLineNr));
311 yyextra->packageCommentAllowed =
FALSE;
317 yyextra->packageCommentAllowed =
FALSE;
320 ^{B}{IDENTIFIER}/{B}"="{B}"property" {
321 yyextra->current->section = EntryType::makeVariable();
322 yyextra->current->mtype = MethodTypes::Property;
324 yyextra->current->fileName = yyextra->fileName;
325 yyextra->current->startLine = yyextra->yyLineNr;
326 yyextra->current->bodyLine = yyextra->yyLineNr;
327 yyextra->packageCommentAllowed =
FALSE;
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
330 ^{B}{IDENTIFIER}/{B}"="[^=] {
331 if (yyextra->searchCount>0) REJECT;
333 yyextra->current->section = EntryType::makeVariable();
335 yyextra->current->fileName = yyextra->fileName;
336 yyextra->current->startLine = yyextra->yyLineNr;
337 yyextra->current->bodyLine = yyextra->yyLineNr;
338 yyextra->packageCommentAllowed =
FALSE;
341 ^{B}{IDENTIFIER}/{B}":" {
342 if (yyextra->searchCount>0) REJECT;
344 if (
id ==
"try" ||
id ==
"else" ||
id ==
"except" ||
id ==
"finally") REJECT;
346 yyextra->current->section = EntryType::makeVariable();
347 yyextra->current->name = id;
348 yyextra->current->fileName = yyextra->fileName;
349 yyextra->current->startLine = yyextra->yyLineNr;
350 yyextra->current->bodyLine = yyextra->yyLineNr;
351 yyextra->packageCommentAllowed =
FALSE;
354 {B}{IDENTIFIER}/({B},{B}{IDENTIFIER})*{B}")"*{B}"="[^=] {
358 if (yyextra->searchCount>1) REJECT;
360 yyextra->current->section = EntryType::makeVariable();
362 yyextra->current->fileName = yyextra->fileName;
363 yyextra->current->startLine = yyextra->yyLineNr;
364 yyextra->current->bodyLine = yyextra->yyLineNr;
365 yyextra->packageCommentAllowed =
FALSE;
369 yyextra->stringContext=YY_START;
370 yyextra->copyString=
nullptr;
371 yyextra->packageCommentAllowed =
FALSE;
372 BEGIN( SingleQuoteString );
375 yyextra->stringContext=YY_START;
376 yyextra->copyString=
nullptr;
377 yyextra->packageCommentAllowed =
FALSE;
378 BEGIN( DoubleQuoteString );
381 yyextra->isStatic=
TRUE;
385 yyextra->decoratorRound = 1;
386 yyextra->copyString=
nullptr;
393 if (yyextra->yyLineNr != 1) REJECT;
400 yyextra->packageCommentAllowed =
FALSE;
412 BEGIN(TripleComment);
417 BEGIN(TripleComment);
420 {B}{STARTDOCSYMS}/[^#] {
422 yyextra->packageCommentAllowed =
FALSE;
424 BEGIN(SpecialComment);
427 yyextra->searchCount++;
430 if (yyextra->searchCount>0)
432 yyextra->searchCount--;
436 yyextra->current->doc.clear();
437 yyextra->current->brief.clear();
451 {IDENTIFIER}({B}"."{B}{IDENTIFIER})* {
452 yyextra->packageName=yytext;
474 {IDENTIFIER}/{B}","{B} {
477 {IDENTIFIER}/{B}")" {
482 if (!yyextra->importTuple)
489 if (!yyextra->importTuple)
497 yyextra->importTuple=
TRUE;
500 yyextra->importTuple=
FALSE;
515 {IDENTIFIER}({B}"."{B}{IDENTIFIER})* {
517 yyextra->current->fileName = yyextra->fileName;
519 yyextra->current->section=EntryType::makeUsingDecl();
520 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
QCString removeRedundantWhiteSpace(const QCString &s)
537 ("cls"|"self")"."{IDENTIFIER}/{B}[,)] {
538 const char *s = strchr(yytext,
'.'); s++;
539 DBG_CTX((stderr,
"Found instance method variable %s in %s at %d\n",s,
qPrint(yyextra->current_root->name.data(),yyextra->yyLineNr)));
const char * qPrint(const char *s)
543 ("cls"|"self")"."{IDENTIFIER}/{B}"=" {
544 const char *s = strchr(yytext,
'.'); s++;
545 DBG_CTX((stderr,
"Found instance method variable %s in %s at %d\n",s,
qPrint(yyextra->current_root->name.data(),yyextra->yyLineNr)));
547 BEGIN( SearchSkipValue );
549 ("cls"|"self")"."{IDENTIFIER}/{B}":" {
550 const char *s = strchr(yytext,
'.'); s++;
551 DBG_CTX((stderr,
"Found instance method variable %s in %s at %d\n",s,
qPrint(yyextra->current_root->name.data(),yyextra->yyLineNr)));
557 BEGIN(TripleComment);
562 BEGIN(TripleComment);
565 {STARTDOCSYMS}/[^#] {
567 BEGIN(SpecialComment);
572 yyextra->stringContext=YY_START;
573 yyextra->copyString=
nullptr;
574 BEGIN( SingleQuoteString );
577 yyextra->stringContext=YY_START;
578 yyextra->copyString=
nullptr;
579 BEGIN( DoubleQuoteString );
583 yyextra->current->doc.clear();
584 yyextra->current->brief.clear();
586 BEGIN( SearchSkipValue );
595 yyextra->braceCount=0;
598 yyextra->current->type+=*yytext;
599 yyextra->braceCount++;
602 yyextra->current->type+=*yytext;
603 yyextra->braceCount--;
606 yyextra->stringContext=YY_START;
607 yyextra->copyString=
nullptr;
608 BEGIN( SingleQuoteString );
611 yyextra->stringContext=YY_START;
612 yyextra->copyString=
nullptr;
613 BEGIN( DoubleQuoteString );
616 if (yyextra->braceCount==0)
618 yyextra->current->type = yyextra->current->type.stripWhiteSpace();
620 BEGIN(SearchSkipValue);
624 yyextra->current->type+=*yytext;
628 yyextra->current->type = yyextra->current->type.stripWhiteSpace();
631 BEGIN(SearchMemVars);
634 yyextra->current->type+=
' ';
638 yyextra->current->type+=*yytext;
642<SearchSkipValue,VariableDec>{
645 yyextra->startInit =
TRUE;
646 yyextra->current->initializer.str(yytext);
647 yyextra->current->initializer <<
" ";
650 yyextra->current->initializer << yytext;
654 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"int";
655 yyextra->current->initializer << yytext;
658 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"float";
659 yyextra->current->initializer << yytext;
662 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"bool";
663 yyextra->current->initializer << yytext;
666 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"str";
667 yyextra->current->initializer << yytext;
668 yyextra->copyString=&yyextra->current->initializer;
669 yyextra->stringContext=YY_START;
670 BEGIN( SingleQuoteString );
672 {STRINGPREFIX}?"\"" {
673 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"str";
674 yyextra->current->initializer << yytext;
675 yyextra->copyString=&yyextra->current->initializer;
676 yyextra->stringContext=YY_START;
677 BEGIN( DoubleQuoteString );
680 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"str";
681 yyextra->current->initializer << yytext;
682 yyextra->doubleQuote=
TRUE;
683 yyextra->copyString=&yyextra->current->initializer;
684 yyextra->stringContext=YY_START;
689 if (yyextra->current->type.isEmpty()) yyextra->current->type =
"str";
690 yyextra->current->initializer << yytext;
691 yyextra->doubleQuote=
FALSE;
692 yyextra->copyString=&yyextra->current->initializer;
693 yyextra->stringContext=YY_START;
697 if (yyextra->current->mtype!=MethodTypes::Property && yyextra->startInit)
699 yyextra->current->type =
"tuple";
701 yyextra->current->initializer << *yytext;
702 yyextra->atomStart=
'(';
703 yyextra->atomEnd=
')';
704 yyextra->atomCount=1;
705 yyextra->atomContext=YY_START;
706 BEGIN( VariableAtom );
709 if (yyextra->startInit) yyextra->current->type =
"list";
710 yyextra->current->initializer << *yytext;
711 yyextra->atomStart=
'[';
712 yyextra->atomEnd=
']';
713 yyextra->atomCount=1;
714 yyextra->atomContext=YY_START;
715 BEGIN( VariableAtom );
718 if (yyextra->startInit) yyextra->current->type =
"dict";
719 yyextra->current->initializer << *yytext;
720 yyextra->atomStart=
'{';
721 yyextra->atomEnd=
'}';
722 yyextra->atomCount=1;
723 yyextra->atomContext=YY_START;
724 BEGIN( VariableAtom );
727 yyextra->current->initializer << yytext;
732 if (yyextra->current->type.isEmpty())
734 for (
const auto &child : yyextra->current_root->children())
736 if (child->name == yytext)
738 yyextra->current->type = child->type;
743 yyextra->startInit =
FALSE;
744 yyextra->current->initializer << yytext;
747 yyextra->startInit =
FALSE;
748 yyextra->current->initializer << *yytext;
752 {STARTDOCSYMS}/[^#] {
754 BEGIN(SpecialComment);
760 BEGIN(SearchMemVars);
764 BEGIN(SearchMemVars);
769 \n{B}/{IDENTIFIER}[^{LETTER}{DIGIT}_] {
781 yyextra->current->program << yytext;
795 yyextra->current->program << yytext;
803 yyextra->current->program << yytext;
807 if (yyextra->curIndent<=yyextra->indent)
815 yyextra->current->program << yytext;
819 yyextra->current->program << yytext;
820 yyextra->stringContext=YY_START;
821 yyextra->specialBlock =
FALSE;
822 yyextra->copyString=&yyextra->current->program;
823 BEGIN( SingleQuoteString );
826 yyextra->current->program << yytext;
827 yyextra->stringContext=YY_START;
828 yyextra->specialBlock =
FALSE;
829 yyextra->copyString=&yyextra->current->program;
830 BEGIN( DoubleQuoteString );
833 yyextra->current->program << yytext;
834 yyextra->specialBlock =
FALSE;
837 yyextra->current->program << yytext;
840 yyextra->current->program << yytext;
844 yyextra->current->program << yytext;
847 yyextra->current->program << *yytext;
848 yyextra->specialBlock =
FALSE;
852 yyextra->current->program << yytext;
854 BEGIN(TripleComment);
858 yyextra->current->program << yytext;
860 BEGIN(TripleComment);
868 yyextra->current->name = yytext;
869 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
873 yyextra->specialBlock =
TRUE;
874 yyextra->bodyEntry = yyextra->current;
875 yyextra->current->bodyLine = yyextra->yyLineNr;
880 yyextra->defVal.str(std::string());
881 yyextra->braceCount = 0;
882 BEGIN(FunctionTypeAnnotation);
885 yyextra->funcParamsEnd =
FALSE;
886 yyextra->current->bodyLine = yyextra->yyLineNr;
887 BEGIN(FunctionParams);
890 if (yyextra->current->argList.empty())
892 yyextra->current->argList.setNoParameters(
TRUE);
895 yyextra->funcParamsEnd =
TRUE;
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
904 if (!yyextra->argType.isEmpty())
908 a.
type = yyextra->argType;
909 yyextra->current->argList.push_back(a);
910 yyextra->argType =
"";
This class contains the information about the argument of a function or template.
915 yyextra->argType = yytext;
921 a.
type = yyextra->argType;
922 yyextra->current->argList.push_back(a);
923 yyextra->argType =
"";
928 yyextra->defVal.str(std::string());
929 yyextra->braceCount = 0;
930 BEGIN(FunctionParamDefVal);
933 if (!yyextra->argType.isEmpty())
937 a.
type = yyextra->argType;
938 yyextra->current->argList.push_back(a);
939 yyextra->argType =
"";
945 yyextra->defVal.str(std::string());
946 yyextra->braceCount = 0;
947 BEGIN(FunctionAnnotation);
956<FunctionTypeAnnotation>{
960 ++yyextra->braceCount;
961 yyextra->defVal << *yytext;
966 --yyextra->braceCount;
967 yyextra->defVal << *yytext;
970 if (yyextra->braceCount == 0)
972 yyextra->current->type = yyextra->defVal.str();
977 yyextra->defVal << *yytext;
980 yyextra->defVal << *yytext;
981 yyextra->copyString=&yyextra->defVal;
982 yyextra->stringContext=FunctionTypeAnnotation;
983 BEGIN(SingleQuoteString);
986 yyextra->defVal << *yytext;
987 yyextra->copyString=&yyextra->defVal;
988 yyextra->stringContext=FunctionTypeAnnotation;
989 BEGIN(DoubleQuoteString);
992 yyextra->defVal << *yytext;
996 yyextra->defVal << *yytext;
1000<FunctionAnnotation>{
1004 ++yyextra->braceCount;
1005 yyextra->defVal << *yytext;
1009 --yyextra->braceCount;
1010 yyextra->defVal << *yytext;
1015 if (yyextra->braceCount == 0)
1017 if (!yyextra->current->argList.empty())
1018 yyextra->current->argList.back().type += yyextra->defVal.str();
1021 BEGIN(FunctionParams);
1026 --yyextra->braceCount;
1027 yyextra->defVal << *yytext;
1031 yyextra->defVal << *yytext;
1032 yyextra->copyString=&yyextra->defVal;
1033 yyextra->stringContext=FunctionAnnotation;
1034 BEGIN(SingleQuoteString);
1037 yyextra->defVal << *yytext;
1038 yyextra->copyString=&yyextra->defVal;
1039 yyextra->stringContext=FunctionAnnotation;
1040 BEGIN(DoubleQuoteString);
1043 yyextra->defVal << *yytext;
1047 yyextra->defVal << *yytext;
1051<FunctionParamDefVal>{
1055 ++yyextra->braceCount;
1056 yyextra->defVal << *yytext;
1060 --yyextra->braceCount;
1061 yyextra->defVal << *yytext;
1065 if (yyextra->braceCount == 0)
1067 if (!yyextra->current->argList.empty())
1071 BEGIN(FunctionParams);
1076 --yyextra->braceCount;
1077 yyextra->defVal << *yytext;
1082 yyextra->defVal << *yytext;
1083 yyextra->copyString=&yyextra->defVal;
1084 yyextra->stringContext=FunctionParamDefVal;
1085 BEGIN( SingleQuoteString );
1088 yyextra->defVal << *yytext;
1089 yyextra->copyString=&yyextra->defVal;
1090 yyextra->stringContext=FunctionParamDefVal;
1091 BEGIN( DoubleQuoteString );
1094 yyextra->defVal << *yytext;
1098 yyextra->defVal << *yytext;
1104 \n/{IDENTIFIER}{BB} {
1108 for (i=(
int)yyleng-1;i>=0;i--)
1119 yyextra->current->program << yytext;
1126 for (i=(
int)yyleng-1;i>=0;i--)
1137 yyextra->current->program << yytext;
1141 yyextra->current->program << yytext;
1149 DBG_CTX((stderr,
"yyextra->curIndent=%d yyextra->indent=%d\n",yyextra->curIndent,yyextra->indent));
1150 if (yyextra->curIndent<=yyextra->indent)
1154 yyextra->indent=yyextra->curIndent;
1162 yyextra->current->program << yytext;
1166 yyextra->current->program << *yytext;
1167 yyextra->stringContext=YY_START;
1168 yyextra->specialBlock =
FALSE;
1169 yyextra->copyString=&yyextra->current->program;
1170 BEGIN( SingleQuoteString );
1173 yyextra->current->program << *yytext;
1174 yyextra->stringContext=YY_START;
1175 yyextra->specialBlock =
FALSE;
1176 yyextra->copyString=&yyextra->current->program;
1177 BEGIN( DoubleQuoteString );
1180 yyextra->current->program << yytext;
1181 yyextra->specialBlock =
FALSE;
1185 yyextra->current->program << *yytext;
1189 yyextra->current->program << yytext;
1192 yyextra->specialBlock =
FALSE;
1193 yyextra->current->program << *yytext;
1197 yyextra->current->program << yytext;
1199 BEGIN(TripleComment);
1204 yyextra->current->program << yytext;
1206 BEGIN(TripleComment);
1210<ClassDec>{IDENTIFIER} {
1211 if (yyextra->current->type.isEmpty())
1213 yyextra->current->type =
"class";
1216 yyextra->current->section = EntryType::makeClass();
1217 yyextra->current->name = yytext;
1222 if (yyextra->current_root->section.isScope())
1225 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
1228 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1229 yyextra->current->fileName = yyextra->fileName;
1230 yyextra->docBlockContext = YY_START;
1231 yyextra->docBlockInBody =
FALSE;
1232 yyextra->docBlockJavaStyle =
FALSE;
1233 yyextra->docBlock.clear();
1234 yyextra->bracketDepth = 0;
1236 BEGIN(ClassInheritance);
1243 yyextra->bracketDepth++;
1246 if (yyextra->bracketDepth > 0)
1247 yyextra->bracketDepth--;
1250 yyextra->specialBlock =
TRUE;
1251 yyextra->current->bodyLine = yyextra->yyLineNr;
1252 yyextra->current->program.str(std::string());
1253 BEGIN(ClassCaptureIndent);
1257 if (yyextra->bracketDepth == 0)
1259 yyextra->current->extends.emplace_back(
1260 substitute(yytext,
".",
"::"),Protection::Public,Specifier::Normal
1266 yyextra->stringContext=YY_START;
1267 BEGIN( SingleQuoteStringIgnore );
1270 yyextra->stringContext=YY_START;
1271 BEGIN( DoubleQuoteStringIgnore );
1275<SingleQuoteStringIgnore>{
1277 BEGIN(yyextra->stringContext);
1281<DoubleQuoteStringIgnore>{
1283 BEGIN(yyextra->stringContext);
1288<ClassCaptureIndent>{
1292 yyextra->current->program << yytext;
1297 yyextra->current->program << yytext;
1298 BEGIN(TripleComment);
1302 yyextra->current->program << yytext;
1303 BEGIN(TripleComment);
1305 {STARTDOCSYMS}[#]* {
1307 BEGIN(SpecialComment);
1312 yyextra->current->program << yytext;
1315 yyextra->bodyEntry = yyextra->current;
1316 DBG_CTX((stderr,
"setting indent %d\n",yyextra->curIndent));
1322 ""/({NONEMPTY}|{EXPCHAR}) {
1326 yyextra->current->program << yytext;
1335 ":"{B}{IDENTIFIER} {
1336 yyextra->startInit =
FALSE;
1337 yyextra->current->type =
substitute(yytext,
":",
"");
1339 {STARTDOCSYMS}"<"/.* {
1341 yyextra->packageCommentAllowed =
FALSE;
1343 yyextra->docBlockContext = VariableEnd;
1344 BEGIN(SpecialComment);
1347 BEGIN( VariableEnd );
1351 BEGIN( VariableEnd );
1357 yyextra->current->initializer << *yytext;
1358 if (yyextra->atomStart==*yytext)
1360 yyextra->atomCount++;
1364 yyextra->current->initializer << *yytext;
1365 if (yyextra->atomEnd==*yytext)
1367 yyextra->atomCount--;
1369 if (yyextra->atomCount==0)
1371 yyextra->startInit =
FALSE;
1372 BEGIN(yyextra->atomContext);
1376 yyextra->specialBlock =
FALSE;
1377 yyextra->current->program << yytext;
1379 BEGIN(TripleComment);
1383 yyextra->specialBlock =
FALSE;
1384 yyextra->current->program << yytext;
1386 BEGIN(TripleComment);
1389 yyextra->stringContext=YY_START;
1390 yyextra->current->initializer <<
"'";
1391 yyextra->copyString=&yyextra->current->initializer;
1392 BEGIN( SingleQuoteString );
1395 yyextra->stringContext=YY_START;
1396 yyextra->current->initializer <<
"\"";
1397 yyextra->copyString=&yyextra->current->initializer;
1398 BEGIN( DoubleQuoteString );
1401 yyextra->current->initializer << yytext;
1404 yyextra->current->initializer << *yytext;
1407 yyextra->current->initializer << *yytext;
std::string_view stripWhiteSpace(std::string_view s)
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trai...
1432 {ENDTRIDOUBLEQUOTE} |
1433 {ENDTRISINGLEQUOTE} {
1435 if (yyextra->doubleQuote==(yytext[0]==
'"'))
1437 if (yyextra->specialBlock)
1439 QCString actualDoc=yyextra->docBlock;
1440 if (!yyextra->docBlockSpecial)
1445 actualDoc.
prepend(
"@iverbatim\n");
1446 actualDoc.
append(
"@endiverbatim ");
1452 else if (yyextra->packageCommentAllowed)
1454 QCString actualDoc=yyextra->docBlock;
1455 if (!yyextra->docBlockSpecial)
1460 actualDoc.
prepend(
"@iverbatim\n");
1461 actualDoc.
append(
"@endiverbatim ");
1464 if (yyextra->moduleScope.startsWith(
"__") && yyextra->moduleScope.endsWith(
"__"))
1466 actualDoc.
prepend(
"\\namespace \\"+yyextra->moduleScope+
" ");
1470 actualDoc.
prepend(
"\\namespace "+yyextra->moduleScope+
" ");
1474 if ((yyextra->docBlockContext==ClassBody ) ||
1475 yyextra->docBlockContext==FunctionBody)
1477 yyextra->current->program << yyextra->docBlock;
1478 yyextra->current->program << yytext;
1485 BEGIN(yyextra->docBlockContext);
1489 yyextra->docBlock += yytext;
1491 yyextra->packageCommentAllowed =
FALSE;
QCString & prepend(const char *s)
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString & append(char c)
void stripIndentationVerbatim(QCString &doc, const int indentationLevel, bool skipFirstLine)
1496 if (yyextra->firstPass && yyextra->docBlockSpecial && yyleng >= yyextra->curIndent)
1497 yyextra->docBlock += yytext + yyextra->curIndent;
1499 yyextra->docBlock += yytext;
1502 yyextra->docBlock += yytext;
1506 yyextra->docBlock += yytext;
1508 {CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
1509 yyextra->fileName = &yytext[6];
1510 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
1511 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
1512 yyextra->docBlock+=yytext;
1514 {CMD}"ifile"{B}+{FILEMASK} {
1515 yyextra->fileName = &yytext[6];
1516 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
1517 yyextra->docBlock+=yytext;
1519 {CMD}"iline"{LINENR}/[\n\.] |
1520 {CMD}"iline"{LINENR}{B} {
1525 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1529 yyextra->yyLineNr = nr;
1531 yyextra->docBlock+=yytext;
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
1533 ({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
1534 yyextra->docBlock+=yytext;
1537 yyextra->docBlock += yytext;
1540 yyextra->docBlock += yytext;
1548 yyextra->docBlock+=
'\n';
1549 yyextra->docBrief =
FALSE;
1552 {CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
1553 yyextra->fileName = &yytext[6];
1554 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
1555 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
1556 yyextra->docBlock+=yytext;
1558 {CMD}"ifile"{B}+{FILEMASK} {
1559 yyextra->fileName = &yytext[6];
1560 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
1561 yyextra->docBlock+=yytext;
1563 {CMD}"iline"{LINENR}/[\n\.] |
1564 {CMD}"iline"{LINENR}{B} {
1569 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1573 yyextra->yyLineNr = nr;
1575 yyextra->docBlock+=yytext;
1577 ({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
1578 yyextra->docBlock+=yytext;
1582 int extraSpaces = std::max(0,
static_cast<int>(yyleng-9-yyextra->curIndent-2));
1583 indent.
fill(
' ',extraSpaces);
1585 yyextra->docBlock +=
"\\ilinebr ";
1586 yyextra->docBlock += indent;
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
1589 yyextra->docBlock+=yytext;
1593 if (yyextra->docBlockContext == VariableEnd)
1601 BEGIN(yyextra->docBlockContext);
1604 yyextra->docBlock+=*yytext;
1621 BEGIN(yyextra->stringContext);
1644 BEGIN(yyextra->stringContext);
1655 {ENDTRIDOUBLEQUOTE} |
1656 {ENDTRISINGLEQUOTE} {
1657 *yyextra->copyString << yytext;
1658 if (yyextra->doubleQuote==(yytext[0]==
'"'))
1660 BEGIN(yyextra->stringContext);
1665 ({LONGSTRINGBLOCK}) {
1667 *yyextra->copyString << yytext;
1671 *yyextra->copyString << yytext;
1674 *yyextra->copyString << *yytext;
1680 yyextra->doubleQuote=
TRUE;
1681 yyextra->decoratorCommentStr.str(std::string());
1682 yyextra->copyString=&yyextra->decoratorCommentStr;
1683 yyextra->stringContext=YY_START;
1684 BEGIN(TripleString);
1688 yyextra->doubleQuote=
FALSE;
1689 yyextra->decoratorCommentStr.str(std::string());
1690 yyextra->copyString=&yyextra->decoratorCommentStr;
1691 yyextra->stringContext=YY_START;
1692 BEGIN(TripleString);
1695 yyextra->stringContext=YY_START;
1696 yyextra->decoratorCommentStr.str(std::string());
1697 yyextra->copyString=&yyextra->decoratorCommentStr;
1698 BEGIN( SingleQuoteString );
1701 yyextra->stringContext=YY_START;
1702 yyextra->decoratorCommentStr.str(std::string());
1703 yyextra->copyString=&yyextra->decoratorCommentStr;
1704 BEGIN( DoubleQuoteString );
1707 yyextra->decoratorRound++;
1710 yyextra->decoratorRound--;
1711 if (!yyextra->decoratorRound) BEGIN(
Search );
1753 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1755 const char *p = yyextra->inputString + yyextra->inputPosition;
1756 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1757 yyextra->inputPosition+=c;
1763 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1764 yyextra->protection = Protection::Public;
1765 yyextra->mtype = MethodTypes::Method;
1766 yyextra->isStatic =
FALSE;
1767 yyextra->virt = Specifier::Normal;
1768 yyextra->previous = 0;
1769 yyextra->packageCommentAllowed =
TRUE;
1774 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1776 yyextra->current->protection = yyextra->protection ;
1777 yyextra->current->mtype = yyextra->mtype;
1778 yyextra->current->virt = yyextra->virt;
1779 yyextra->current->isStatic = yyextra->isStatic;
1780 yyextra->current->lang = SrcLangExt::Python;
1781 yyextra->current->type.clear();
1782 yyextra->current->name.clear();
1783 yyextra->current->initializer.clear();
1784 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
1785 yyextra->isStatic =
FALSE;
1790 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1791 if (yyextra->current->name.isEmpty())
1797 if (yyextra->checkDupEntry)
1799 for (
auto &v : yyextra->current_root->children())
1802 if (v->name==yyextra->current->name && v->section==yyextra->current->section)
1804 if (v->doc.isEmpty() && !yyextra->current->doc.isEmpty())
1806 v->doc = yyextra->current->doc;
1807 v->docLine = yyextra->current->docLine;
1808 v->docFile = yyextra->current->docFile;
1810 if (v->brief.isEmpty() && !yyextra->current->brief.isEmpty())
1812 v->brief = yyextra->current->brief;
1813 v->briefLine = yyextra->current->briefLine;
1814 v->briefFile = yyextra->current->briefFile;
1816 if (v->type.isEmpty() && !yyextra->current->type.isEmpty())
1819 v->type = yyextra->current->type;
1828 yyextra->previous = yyextra->current;
1829 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1836 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1838 auto doc = yyextra->current->doc;
1839 auto docLine = yyextra->current->docLine;
1840 auto docFile = yyextra->current->docFile;
1841 auto brief = yyextra->current->brief;
1842 auto briefLine = yyextra->current->briefLine;
1843 auto briefFile = yyextra->current->briefFile;
1845 yyextra->previous = yyextra->current;
1846 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1849 yyextra->current->doc = doc;
1850 yyextra->current->docLine = docLine;
1851 yyextra->current->docFile = docFile;
1852 yyextra->current->brief = brief;
1853 yyextra->current->briefLine = briefLine;
1854 yyextra->current->briefFile = briefFile;
1859 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1860 if (!yyextra->current->name.isEmpty() && yyextra->current->name.at(0)==
'_')
1862 if (yyextra->current->name.at(1)==
'_')
1864 yyextra->current->protection=Protection::Private;
1868 yyextra->current->protection=Protection::Protected;
1875 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1876 yyextra->current->name = name;
1877 yyextra->current->section=EntryType::makeVariable();
1878 yyextra->current->fileName = yyextra->fileName;
1879 yyextra->current->startLine = yyextra->yyLineNr;
1880 yyextra->current->bodyLine = yyextra->yyLineNr;
1881 yyextra->current->type.clear();
1883 yyextra->checkDupEntry =
true;
1888 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1890 if (yyextra->current_root->section.isCompound())
1892 yyextra->current->isStatic =
TRUE;
1899 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1901 if (yyextra->current_root->section.isCompound())
1903 yyextra->current->isStatic =
TRUE;
1910 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1911 if (yyextra->current->name.startsWith(
"__") && yyextra->current->name.endsWith(
"__"))
1915 yyextra->current->protection=Protection::Public;
1932 else if (c==
'\t') col+=tabSize-(col%tabSize);
1940 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1941 auto it = yyextra->packageNameCache.
find(path.
str());
1942 if (it!=yyextra->packageNameCache.end())
1957 scope+=path.
mid(i+1);
1958 yyextra->packageNameCache.emplace(path.
str(),scope.
str());
1974 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1975 QCString item=all ? yyextra->packageName : yyextra->packageName+
"."+yytext;
1977 yyextra->current->fileName = yyextra->fileName;
1979 yyextra->current->section=all ? EntryType::makeUsingDir() :
EntryType::makeUsingDecl();
1980 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1987 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1988 DBG_CTX((stderr,
"yyextra->yyLineNr=%d\n",yyextra->yyLineNr));
1989 for (
const char *p = yytext; *p; ++p)
1991 yyextra->yyLineNr += (*p ==
'\n') ;
1997 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1998 DBG_CTX((stderr,
"yyextra->yyLineNr=%d\n",yyextra->yyLineNr));
1999 yyextra->yyLineNr++;
2005 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2008 yyextra->current->briefFile = yyextra->fileName;
2009 yyextra->current->briefLine = yyextra->yyLineNr;
2013 yyextra->current->docFile = yyextra->fileName;
2014 yyextra->current->docLine = yyextra->yyLineNr;
2020 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2025 yyextra->docBlockInBody=
FALSE;
2027 if (!yyextra->current->doc.isEmpty())
2029 yyextra->current->doc=yyextra->current->doc.stripWhiteSpace()+
"\n\n";
2031 if (yyextra->docBlockInBody && yyextra->previous && !yyextra->previous->doc.isEmpty())
2033 yyextra->previous->doc=yyextra->previous->doc.stripWhiteSpace()+
"\n\n";
2037 bool needsEntry =
false;
2038 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
2039 Markdown markdown(yyextra->fileName,lineNr);
2043 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
2044 while (yyextra->commentScanner.parseCommentBlock(
2045 yyextra->thisParser,
2046 (yyextra->docBlockInBody && yyextra->previous) ? yyextra->previous.get() : yyextra->current.get(),
2050 yyextra->docBlockInBody ?
FALSE : brief,
2051 yyextra->docBlockJavaStyle,
2052 yyextra->docBlockInBody,
2053 yyextra->protection,
2075 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2077 if (yyextra->bodyEntry)
2079 yyextra->bodyEntry->endBodyLine = yyextra->yyLineNr-correction;
2080 yyextra->bodyEntry = 0;
2088 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2089 if (yyextra->copyString) (*yyextra->copyString) << s;
2094 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2095 yyextra->docBlockContext = YY_START;
2096 yyextra->docBlockInBody =
FALSE;
2097 yyextra->docBlockJavaStyle =
TRUE;
2098 yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]==
'!' || !
Config_getBool(PYTHON_DOCSTRING);
2099 yyextra->docBlock.clear();
2100 yyextra->commentIndent = yyextra->curIndent;
2101 yyextra->doubleQuote =
TRUE;
2107 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2108 yyextra->docBlockContext = YY_START;
2109 yyextra->docBlockInBody =
FALSE;
2110 yyextra->docBlockJavaStyle =
TRUE;
2111 yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]==
'!' || !
Config_getBool(PYTHON_DOCSTRING);
2112 yyextra->docBlock.clear();
2113 yyextra->commentIndent = yyextra->curIndent;
2114 yyextra->doubleQuote =
FALSE;
2120 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2121 yyextra->docBlockContext = YY_START;
2122 yyextra->docBlockInBody =
FALSE;
2123 yyextra->docBlockJavaStyle =
TRUE;
2124 yyextra->docBrief =
TRUE;
2125 yyextra->docBlock.clear();
2126 yyextra->commentIndent = yyextra->curIndent;
2132 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2133 yyextra->current->fileName = yyextra->fileName;
2134 yyextra->current->startLine = yyextra->yyLineNr;
2135 yyextra->current->bodyLine = yyextra->yyLineNr;
2136 yyextra->current->section = EntryType::makeFunction();
2137 yyextra->current->lang = SrcLangExt::Python;
2138 yyextra->current->virt = Specifier::Normal;
2139 yyextra->current->isStatic = yyextra->isStatic;
2140 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
2141 yyextra->current->type.clear();
2142 yyextra->current->name.clear();
2143 yyextra->current->args.clear();
2144 yyextra->current->argList.clear();
2145 yyextra->packageCommentAllowed =
FALSE;
2146 yyextra->isStatic=
FALSE;
2152 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2153 yyextra->current->section = EntryType::makeClass();
2154 yyextra->current->argList.clear();
2155 yyextra->current->type +=
"class" ;
2156 yyextra->current->fileName = yyextra->fileName;
2157 yyextra->current->startLine = yyextra->yyLineNr;
2158 yyextra->current->bodyLine = yyextra->yyLineNr;
2159 yyextra->packageCommentAllowed =
FALSE;
2166 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2168 for (
size_t i=0; i<rt->children().size(); ++i)
2170 std::shared_ptr<Entry> ce = rt->children()[i];
2171 if (!ce->program.empty())
2176 yyextra->programStr = ce->program.str();
2177 yyextra->inputString = yyextra->programStr.data();
2178 yyextra->inputPosition = 0;
2179 yyextra->firstPass =
false;
2180 pyscannerYYrestart(
nullptr, yyscanner );
2181 if (ce->section.isCompound())
2183 yyextra->specialBlock =
false;
2184 yyextra->current_root = ce;
2187 else if (ce->parent())
2189 yyextra->current_root = rt;
2192 BEGIN( SearchMemVars );
2194 yyextra->fileName = ce->fileName;
2195 yyextra->yyLineNr = ce->bodyLine ;
2196 yyextra->current = std::make_shared<Entry>();
2199 yyextra->checkDupEntry =
false;
2202 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
2204 pyscannerYYlex(yyscanner) ;
2205 yyextra->lexInit=
TRUE;
2207 yyextra->programStr.clear();
2208 ce->program.str(std::string());
2210 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
2222 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2225 if (fileBuf==
nullptr || fileBuf[0]==
'\0')
return;
2227 yyextra->inputString = fileBuf;
2228 yyextra->inputPosition = 0;
2230 yyextra->protection = Protection::Public;
2231 yyextra->mtype = MethodTypes::Method;
2232 yyextra->isStatic =
false;
2233 yyextra->virt = Specifier::Normal;
2234 yyextra->current_root = rt;
2235 yyextra->specialBlock =
false;
2237 yyextra->yyLineNr = 1 ;
2238 yyextra->fileName = fileName;
2239 yyextra->checkDupEntry =
false;
2240 yyextra->firstPass =
true;
2242 msg(
"Parsing file {}...\n",yyextra->fileName);
2247 if (baseName!=
"__init__")
2249 if (!yyextra->moduleScope.isEmpty())
2251 yyextra->moduleScope+=
"::";
2253 yyextra->moduleScope+=baseName;
2257 QCString scope = yyextra->moduleScope;
2262 pos = scope.
find(
"::",startPos);
2264 if (pos==-1) pos=(int)scope.
length();
2265 yyextra->current = std::make_shared<Entry>();
2267 yyextra->current->name = scope.
left(pos);
2268 yyextra->current->section = EntryType::makeNamespace();
2269 yyextra->current->type =
"namespace";
2270 yyextra->current->fileName = yyextra->fileName;
2271 yyextra->current->startLine = yyextra->yyLineNr;
2272 yyextra->current->bodyLine = yyextra->yyLineNr;
2273 yyextra->current_root = yyextra->current;
2274 rt->moveToSubEntryAndRefresh(yyextra->current);
2275 }
while (pos<(
int)scope.
length());
2279 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
2281 yyextra->current->reset();
2283 pyscannerYYrestart(
nullptr,yyscanner);
2285 pyscannerYYlex(yyscanner);
2286 yyextra->lexInit=
TRUE;
2288 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
2290 yyextra->programStr.clear();
2291 yyextra->current_root->program.str(std::string());
2300 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2304 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
2308 yyextra->specialBlock =
FALSE;
2309 yyextra->packageCommentAllowed =
FALSE;
2312 YY_BUFFER_STATE orgState = YY_CURRENT_BUFFER;
2313 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
2314 const char *orgInputString = yyextra->inputString;
2315 int orgInputPosition = yyextra->inputPosition;
2318 yyextra->inputString = text.
data();
2319 yyextra->inputPosition = 0;
2320 pyscannerYYrestart(
nullptr, yyscanner );
2322 BEGIN( FunctionDec );
2324 pyscannerYYlex(yyscanner);
2325 yyextra->lexInit=
TRUE;
2327 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2328 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
2330 yyextra->current->section = EntryType::makeVariableDoc();
2335 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
2336 yy_switch_to_buffer(orgState, yyscanner);
2338 yyextra->inputString = orgInputString;
2339 yyextra->inputPosition = orgInputPosition;
2354 pyscannerYYlex_init_extra(&
p->state,&
p->yyscanner);
2362 pyscannerYYlex_destroy(
p->yyscanner);
2367 const char *fileBuf,
2368 const std::shared_ptr<Entry> &root,
2371 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
2372 yyextra->thisParser =
this;
2392#include "pyscanner.l.h"
Clang parser object for a single translation unit, which consists of a source file and the directly o...
static bool isFlagSet(const DebugMask mask)
Wrapper class for the Entry type.
Minimal replacement for QFileInfo.
Helper class to process markdown formatted text.
bool needsPreprocessing(const QCString &extension) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
std::unique_ptr< Private > p
~PythonOutlineParser() override
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
int find(char c, int index=0, bool cs=TRUE) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
const std::string & str() const
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
#define Config_getInt(name)
#define Config_getBool(name)
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
QCString stripIndentation(const QCString &s, bool skipFirstLine)