15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
61#define YY_NO_UNISTD_H 1
221static inline int computeIndent(
const char *s,
int startIndent);
254#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
#define lineCount(s, len)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static QCString extractBeginRawStringDelimiter(const char *str)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void setContext(yyscan_t yyscanner)
static QCString stripQuotes(const char *s)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static void initParser(yyscan_t yyscanner)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static const char * stateToString(int state)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
static QCString extractEndRawStringDelimiter(const char *str)
void fixArgumentListForJavaScript(ArgumentList &al)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
static int computeIndent(const char *s, int startIndent)
static bool startOfRequiresExpression(const QCString &req)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static const char * getLexerFILE()
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
static void addType(yyscan_t yyscanner)
static void initEntry(yyscan_t yyscanner)
TextStream * pSkipInterpString
QCString * pCopyRoundString
int lastCopyArgStringContext
std::shared_ptr< Entry > firstTypedefEntry
int lastDeprecatedContext
bool insideJS
processing JavaScript code?
OutlineParserInterface * thisParser
std::shared_ptr< Entry > tempEntry
std::shared_ptr< Entry > memspecEntry
TextStream * pCopySquareGString
int lastInitializerContext
std::shared_ptr< Entry > previous
int lastPreLineCtrlContext
ClangTUParser * clangParser
bool insideCS
processing C# code?
ArgumentList * currentArgumentList
TextStream * pCopyCurlyGString
int lastCommentInArgContext
std::vector< std::pair< Entry *, std::shared_ptr< Entry > > > outerScopeEntries
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
int lastC11AttributeContext
QCString * pCopyQuotedString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
QCString * pCopyCurlyString
CommentScanner commentScanner
bool insideIDL
processing IDL code?
bool insideSlice
processing Slice code?
TextStream * pCopyHereDocGString
bool insideObjC
processing Objective C code?
bool insideCli
processing C++/CLI code?
int currentArgumentContext
int lastSkipVerbStringContext
QCString * pCopyRawString
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
QCString * pCopySharpString
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
MethodTypes
Kind of method.
Protection
Protection level of members.
SrcLangExt
Language as given by extension.
Specifier
Virtualness of a member.
A bunch of utility functions.
269NOTopt (("!"{BNopt})|("not"{BN}+))?
271HEXDIGIT ({DIGIT}|[a-f]|[A-F])
272ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
273SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
274TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
275CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
278CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
279PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
280PHPUSEKW ("public"|"private"|"protected")
281IDLATTR ("["[^\]]*"]"){BN}*
282TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
283RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
284RAWEND ")"[^ \t\(\)\\]{0,16}\"
285ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
286ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
287LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
288BITOP "&"|"|"|"^"|"<<"|">>"|"~"
289OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
290FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
291MODULE_ID ({ID}".")*{ID}
292LINENR {B}*[1-9][0-9]*
293FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@]
294FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@]
295FILECHARS {FILEICHAR}*{FILEECHAR}+
296HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
297VFILEMASK {FILECHARS}("."{FILECHARS})*
298FILEMASK {VFILEMASK}|{HFILEMASK}
309DCOMMC ("/\*!"|"/\**")
311DCOMMCPP ("/\/!"|"/\/\/")
313DCOMM {DCOMMC}|{DCOMMCPP}
381%x TryFunctionBlockEnd
396%x SkipInterpVerbString
410%x UNOIDLAttributeBlock
437%x SpecializationSingleQuote
438%x SpecializationDoubleQuote
471%x SliceDictionaryName
502<*>"DEPRECATED_ATTRIBUTE" {
503 if (!yyextra->insideObjC) REJECT;
505<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
506 if (!yyextra->insideObjC) REJECT;
507 yyextra->lastDeprecatedContext=YY_START;
508 yyextra->lastStringContext=Deprecated_round;
511<Deprecated_round>")" {
512 BEGIN(yyextra->lastDeprecatedContext);
514<Deprecated_round>{BNopt} {
517<Deprecated_round>. { }
519 yyextra->curlyCount=0;
520 yyextra->needsSemi =
TRUE;
521 BEGIN(SkipCurlyBlock);
524 yyextra->roundCount=0;
525 BEGIN(SkipRoundBlock);
528 ++yyextra->roundCount;
531 if (yyextra->roundCount )
532 --yyextra->roundCount ;
537 ++yyextra->curlyCount ;
540 if( yyextra->curlyCount )
542 --yyextra->curlyCount ;
544 else if (yyextra->needsSemi)
550 BEGIN( FindMembers );
554 if (yyextra->insidePHP)
556 yyextra->lastStringContext=NextSemi;
557 BEGIN(SkipPHPString);
560<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
562 yyextra->lastStringContext=NextSemi;
567 BEGIN( FindMembers );
571 BEGIN( FindMembers );
574 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
578<FindMembers>"<?php" {
579 yyextra->insidePHP =
TRUE;
581<FindMembersPHP>"<?"("php"?) {
582 BEGIN( FindMembers );
584<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
586 BEGIN( FindMembers );
588<FindMembers>"?>"|"</script>" {
589 if (yyextra->insidePHP)
590 BEGIN( FindMembersPHP );
594<FindMembersPHP>[^\n<]+ {
601<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
606<FindMembers>"%{"[^\n]* {
607 if (!yyextra->insideIDL)
611 if (!yyextra->insideIDL)
614<FindMembers>{B}*("properties"){BN}*":"{BN}* {
619<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
624<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
629<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
634<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
639<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
643<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
646<FindMembers>{B}*"internal"{BN}*":"{BN}* {
647 if (yyextra->insideCli)
656<FindMembers>{B}*"protected"{BN}*":"{BN}* {
659<FindMembers>{B}*"private"{BN}*":"{BN}* {
662<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
663 if (!yyextra->insideCpp) REJECT;
667<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
668 if (!yyextra->insideCpp) REJECT;
672<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
673 if (!yyextra->insideCpp) REJECT;
685<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
686<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
687 BEGIN( SkipComment ) ;
689<CppProt>("slots"|"Q_SLOTS") {
692<FindMembers>{B}*"event"{BN}+ {
693 if (yyextra->insideCli)
698 yyextra->current->bodyLine = yyextra->yyLineNr;
699 yyextra->current->bodyColumn = yyextra->yyColNr;
700 yyextra->curlyCount=0;
701 BEGIN( CliPropertyType );
703 else if (yyextra->insideCS)
707 yyextra->current->bodyLine = yyextra->yyLineNr;
708 yyextra->current->bodyColumn = yyextra->yyColNr;
715<FindMembers>{B}*"property"{BN}+ {
716 if (yyextra->insideCli)
721 yyextra->current->bodyLine = yyextra->yyLineNr;
722 yyextra->current->bodyColumn = yyextra->yyColNr;
723 yyextra->curlyCount=0;
724 BEGIN( CliPropertyType );
731<CliPropertyType>{ID} {
733 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
735<CliPropertyType>"[" {
736 yyextra->current->args =
"[";
737 BEGIN( CliPropertyIndex );
739<CliPropertyType>"{" {
740 yyextra->curlyCount=0;
742 BEGIN( CSAccessorDecl );
744<CliPropertyType>";" {
746 BEGIN( FindMembers );
751<CliPropertyType>{B}* {
755 yyextra->current->type += yytext;
757<CliPropertyIndex>"]" {
758 BEGIN( CliPropertyType );
759 yyextra->current->args+=yytext;
762 yyextra->current->args+=yytext;
777<FindMembers>{B}*"@private"{BN}+ {
780<FindMembers>{B}*"@protected"{BN}+ {
783<FindMembers>{B}*"@public"{BN}+ {
786<FindMembers>[\-+]{BN}* {
787 if (!yyextra->insideObjC)
793 yyextra->current->fileName = yyextra->fileName;
794 yyextra->current->startLine = yyextra->yyLineNr;
795 yyextra->current->startColumn = yyextra->yyColNr;
796 yyextra->current->bodyLine = yyextra->yyLineNr;
797 yyextra->current->bodyColumn = yyextra->yyColNr;
798 yyextra->current->section = EntryType::makeFunction();
800 yyextra->insideObjC =
TRUE;
801 yyextra->yyBegColNr = yyextra->yyColNr;
802 yyextra->yyBegLineNr = yyextra->yyLineNr;
805 yyextra->current->isStatic=yytext[0]==
'+';
811 BEGIN( ObjCReturnType );
812 yyextra->current->type.clear();
813 yyextra->roundCount=0;
816 if (yyextra->current->type.isEmpty())
818 yyextra->current->type +=
"id";
820 yyextra->current->name = yytext;
824 yyextra->current->name +=
':';
826 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
829<ObjCReturnType>[^()]* {
830 yyextra->current->type += yytext;
832<ObjCReturnType>"(^)(" {
833 yyextra->current->type += yytext;
834 yyextra->roundCount++;
837 yyextra->current->type += yytext;
838 yyextra->roundCount++;
841 if (yyextra->roundCount<=0)
847 yyextra->current->type += yytext;
848 yyextra->roundCount--;
851<ObjCParams>({ID})?{BN}*":" {
856 yyextra->current->name +=
" :";
860 yyextra->current->name += keyw+
":";
862 if (yyextra->current->argList.back().type.isEmpty())
864 yyextra->current->argList.back().type=
"id";
868 yyextra->current->argList.push_back(a);
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
QCString left(size_t len) const
870<ObjCParams>{ID}{BN}* {
874<ObjCParams>","{BN}*"..." {
881 yyextra->current->argList.push_back(a);
889 yyextra->roundCount=0;
890 yyextra->current->argList.back().type.clear();
891 BEGIN( ObjCParamType );
894 yyextra->roundCount++;
895 yyextra->current->argList.back().type+=yytext;
897<ObjCParamType>")"/{B}* {
898 if (yyextra->roundCount<=0)
904 yyextra->current->argList.back().type+=yytext;
905 yyextra->roundCount--;
908<ObjCParamType>[^()]* {
911<ObjCMethod,ObjCParams>";" {
912 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
914 yyextra->current->argList.back().type=
"id";
916 if (yyextra->current->argList.empty())
918 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
925<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
930 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
932 yyextra->current->argList.back().type=
"id";
934 if (yyextra->current->argList.empty())
936 yyextra->current->argList.setNoParameters(
TRUE);
942<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
943 if (yyextra->insideSlice)
946 yyextra->current->bodyLine = yyextra->yyLineNr;
947 yyextra->current->bodyColumn = yyextra->yyColNr;
948 yyextra->current->fileName = yyextra->fileName ;
949 yyextra->current->startLine = yyextra->yyLineNr ;
950 yyextra->current->startColumn = yyextra->yyColNr;
951 yyextra->current->args.clear();
952 yyextra->current->section = EntryType::makeTypedef();
953 yyextra->isTypedef =
TRUE;
954 BEGIN( SliceSequence );
959<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
960 if (yyextra->insideSlice)
963 yyextra->current->bodyLine = yyextra->yyLineNr;
964 yyextra->current->bodyColumn = yyextra->yyColNr;
965 yyextra->current->fileName = yyextra->fileName ;
966 yyextra->current->startLine = yyextra->yyLineNr ;
967 yyextra->current->startColumn = yyextra->yyColNr;
968 yyextra->current->args.clear();
969 yyextra->current->section = EntryType::makeTypedef() ;
970 yyextra->isTypedef =
TRUE;
971 BEGIN( SliceDictionary );
976<FindMembers>{BN}{1,80} {
979<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
980 if (yyextra->insideJava)
983 yyextra->lastSkipRoundContext = YY_START;
984 yyextra->roundCount=0;
987 else if (
qstrncmp(yytext,
"@property",9)==0)
990 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
993 BEGIN( ObjCPropAttr );
int qstrncmp(const char *str1, const char *str2, size_t len)
1000<ObjCPropAttr>"getter="{ID} {
1001 yyextra->current->read = yytext+7;
1003<ObjCPropAttr>"setter="{ID} {
1004 yyextra->current->write = yytext+7;
1006<ObjCPropAttr>"readonly" {
1007 yyextra->current->spec.setWritable(
false);
1009<ObjCPropAttr>"readwrite" {
1011<ObjCPropAttr>"assign" {
1013<ObjCPropAttr>"unsafe_unretained" {
1014 yyextra->current->spec.setAssign(
false);
1015 yyextra->current->spec.setUnretained(
true);
1017<ObjCPropAttr>"retain" {
1018 yyextra->current->spec.setAssign(
false);
1019 yyextra->current->spec.setRetain(
true);
1021<ObjCPropAttr>"copy" {
1022 yyextra->current->spec.setAssign(
false);
1023 yyextra->current->spec.setCopy(
true);
1025<ObjCPropAttr>"weak" {
1026 yyextra->current->spec.setAssign(
false);
1027 yyextra->current->spec.setWeak(
true);
1029<ObjCPropAttr>"strong" {
1030 yyextra->current->spec.setAssign(
false);
1031 yyextra->current->spec.setStrong(
true);
1033<ObjCPropAttr>"nonatomic" {
1034 yyextra->current->spec.setNonAtomic(
true);
1039<FindMembers>"@"{ID}("."{ID})+ {
1040 if (yyextra->insideJava)
1049<FindMembers>"@"{ID} {
1050 if (yyextra->insideJava)
1054 else if (
qstrcmp(yytext,
"@property")==0)
1057 yyextra->current->spec.setWritable(
true).setReadable(
true);
1060 else if (
qstrcmp(yytext,
"@synthesize")==0)
1062 BEGIN( ObjCSkipStatement );
1064 else if (
qstrcmp(yytext,
"@dynamic")==0)
1066 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1073<ObjCSkipStatement>";" {
1076<PackageName>{ID}(("."|"\\"){ID})* {
1077 yyextra->isTypedef=
FALSE;
1079 yyextra->current->name = yytext;
1080 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1081 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1082 yyextra->current->section = EntryType::makeNamespace();
1083 yyextra->current->type =
"namespace" ;
1084 yyextra->current->fileName = yyextra->fileName;
1085 yyextra->current->startLine = yyextra->yyLineNr;
1086 yyextra->current->startColumn = yyextra->yyColNr;
1087 yyextra->current->bodyLine = yyextra->yyLineNr;
1088 yyextra->current->bodyColumn = yyextra->yyColNr;
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
1092 std::shared_ptr<Entry> tmp = yyextra->current;
1093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1094 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1099 yyextra->curlyCount=0;
1100 BEGIN( ReadNSBody );
1102<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1103 if (!yyextra->insideCpp) REJECT;
1105 yyextra->current->exported =
true;
1107 BEGIN( ModuleName );
1109<FindMembers>{B}*"module"{BN}*";" {
1110 if (!yyextra->insideCpp) REJECT;
1111 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1114 BEGIN( FindMembers );
1116<FindMembers>{B}*"module"{BN}+ {
1117 if (!yyextra->insideCpp) REJECT;
1119 yyextra->current->exported =
false;
1121 BEGIN( ModuleName );
1123<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1124 if (!yyextra->insideCpp) REJECT;
1125 yyextra->current->exported =
true;
1127 BEGIN( ModuleImport );
1129<FindMembers>{B}*"import"{BN}+ {
1130 if (!yyextra->insideCpp) REJECT;
1132 BEGIN( ModuleImport );
1134<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1136 int i = name.
find(
':');
1142 yyextra->current->exported,
1145 yyextra->current->section = EntryType::makeModuleDoc();
1146 yyextra->isTypedef=
FALSE;
1148 yyextra->current->type +=
" module";
1149 yyextra->current->fileName = yyextra->fileName;
1150 yyextra->current->startLine = yyextra->yyLineNr;
1151 yyextra->current->startColumn = yyextra->yyColNr;
1152 yyextra->current->bodyLine = yyextra->yyLineNr;
1153 yyextra->current->bodyColumn = yyextra->yyColNr;
1154 yyextra->current->name = name+
":"+partition;
static ModuleManager & instance()
void createModuleDef(const QCString &fileName, int line, int column, bool exported, const QCString &moduleName, const QCString &partitionName=QCString())
int find(char c, int index=0, bool cs=TRUE) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
1157<ModuleName>{MODULE_ID} {
1161 yyextra->current->exported,
1163 yyextra->current->section = EntryType::makeModuleDoc();
1164 yyextra->isTypedef=
FALSE;
1166 yyextra->current->type +=
" module";
1167 yyextra->current->fileName = yyextra->fileName;
1168 yyextra->current->startLine = yyextra->yyLineNr;
1169 yyextra->current->startColumn = yyextra->yyColNr;
1170 yyextra->current->bodyLine = yyextra->yyLineNr;
1171 yyextra->current->bodyColumn = yyextra->yyColNr;
1172 yyextra->current->name = yytext;
1175<ModuleName>":"{BN}+"private" {
1176 yyextra->current->exported = yyextra->exported =
false;
1179<ModuleName>";" { unput(
';');
1184<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1190<ModuleImport>"<"[^>\n]*">" {
1196<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1198 int i = name.
find(
':');
1204 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1208<ModuleImport>{MODULE_ID} {
1212 yyextra->current->exported);
1215<ModuleImport>";" { BEGIN(FindMembers); }
1216<ModuleImport>\n {
lineCount(yyscanner); }
1218<FindMembers>{B}*"export"{BN}+"{" {
1219 yyextra->current->exported = yyextra->exported =
true;
1221<FindMembers>{B}*"export"{BN}+ {
1222 if (!yyextra->insideCpp) REJECT;
1223 yyextra->current->exported=
true;
1225<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1226 yyextra->current->type +=
" initonly ";
1227 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1230<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1231 yyextra->current->isStatic =
TRUE;
1234<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1235 yyextra->current->isStatic =
TRUE;
1238<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1239 yyextra->current->isStatic =
FALSE;
1240 yyextra->current->explicitExternal =
TRUE;
1243<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1245 yyextra->current->type +=
" const ";
1246 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1254<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1255 yyextra->current->type +=
" virtual ";
1259<FindMembers>{B}*"constexpr"{BN}+ {
1260 if (yyextra->insideCpp)
1262 yyextra->current->spec.setConstExpr(
true);
1266<FindMembers>{B}*"consteval"{BN}+ {
1267 if (yyextra->insideCpp)
1269 yyextra->current->spec.setConstEval(
true);
1273<FindMembers>{B}*"constinit"{BN}+ {
1274 if (yyextra->insideCpp)
1276 yyextra->current->spec.setConstInit(
true);
1280<FindMembers>{B}*"published"{BN}+ {
1281 if (yyextra->insideIDL)
1284 yyextra->current->spec.setPublished(
true);
1291<FindMembers>{B}*"sealed"{BN}+ {
1292 if (yyextra->insideCS)
1294 yyextra->current->spec.setSealed(
true);
1301<FindMembers>{B}*"abstract"{BN}+ {
1302 if (yyextra->insidePHP || yyextra->insideCS)
1304 yyextra->current->spec.setAbstract(
true);
1308 if (yyextra->insideCpp) REJECT;
1309 yyextra->current->type +=
" abstract ";
1310 if (!yyextra->insideJava)
1316 yyextra->current->spec.setAbstract(
true);
1321<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1322 yyextra->current->spec.setInline(
true);
1325<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1326 yyextra->current->spec.setMutable(
true);
1329<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1330 yyextra->current->spec.setExplicit(
true);
1333<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1334 yyextra->current->spec.setLocal(
true);
1337<FindMembers>{B}*"@required"{BN}+ {
1338 yyextra->current->spec.setOptional(
false).setRequired(
true);
1341<FindMembers>{B}*"@optional"{BN}+ {
1342 yyextra->current->spec.setRequired(
false).setOptional(
true);
1350<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1351<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1352 yyextra->isTypedef=
FALSE;
1353 yyextra->current->section = EntryType::makeNamespace();
1354 yyextra->current->type =
"namespace" ;
1355 yyextra->current->fileName = yyextra->fileName;
1356 yyextra->current->startLine = yyextra->yyLineNr;
1357 yyextra->current->startColumn = yyextra->yyColNr;
1358 yyextra->current->bodyLine = yyextra->yyLineNr;
1359 yyextra->current->bodyColumn = yyextra->yyColNr;
1361 if (yyextra->insidePHP)
1363 BEGIN( PackageName );
1367 BEGIN( CompoundName );
1370<FindMembers>{B}*"module"{BN}+ {
1372 if (yyextra->insideIDL || yyextra->insideSlice)
1374 yyextra->isTypedef=
FALSE;
1375 yyextra->current->section = EntryType::makeNamespace();
1376 yyextra->current->type =
"module" ;
1377 yyextra->current->fileName = yyextra->fileName;
1378 yyextra->current->startLine = yyextra->yyLineNr;
1379 yyextra->current->startColumn = yyextra->yyColNr;
1380 yyextra->current->bodyLine = yyextra->yyLineNr;
1381 yyextra->current->bodyColumn = yyextra->yyColNr;
1382 BEGIN( CompoundName );
1384 else if (yyextra->insideD)
1395<FindMembers>{B}*"library"{BN}+ {
1397 if (yyextra->insideIDL)
1399 yyextra->isTypedef=
FALSE;
1400 yyextra->current->section = EntryType::makeNamespace();
1401 yyextra->current->type =
"library" ;
1402 yyextra->current->fileName = yyextra->fileName;
1403 yyextra->current->startLine = yyextra->yyLineNr;
1404 yyextra->current->startColumn = yyextra->yyColNr;
1405 yyextra->current->bodyLine = yyextra->yyLineNr;
1406 yyextra->current->bodyColumn = yyextra->yyColNr;
1407 BEGIN( CompoundName );
1415<FindMembers>{B}*"constants"{BN}+ {
1417 if (yyextra->insideIDL)
1419 yyextra->isTypedef=
FALSE;
1420 yyextra->current->section = EntryType::makeNamespace();
1421 yyextra->current->type =
"constants";
1422 yyextra->current->fileName = yyextra->fileName;
1423 yyextra->current->startLine = yyextra->yyLineNr;
1424 yyextra->current->startColumn = yyextra->yyColNr;
1425 yyextra->current->bodyLine = yyextra->yyLineNr;
1426 yyextra->current->bodyColumn = yyextra->yyColNr;
1427 BEGIN( CompoundName );
1435<FindMembers>{BN}*("service"){BN}+ {
1437 if (yyextra->insideIDL)
1439 yyextra->isTypedef=
FALSE;
1440 yyextra->current->section = EntryType::makeClass();
1444 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1446 yyextra->current->type +=
" service " ;
1447 yyextra->current->fileName = yyextra->fileName;
1448 yyextra->current->startLine = yyextra->yyLineNr;
1449 yyextra->current->bodyLine = yyextra->yyLineNr;
1450 yyextra->current->bodyColumn = yyextra->yyColNr;
1451 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1459<FindMembers>{BN}*("singleton"){BN}+ {
1461 if (yyextra->insideIDL)
1463 yyextra->isTypedef=
FALSE;
1464 yyextra->current->section = EntryType::makeClass();
1466 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1467 setPublished(spec.isPublished());
1469 yyextra->current->type +=
" singleton " ;
1470 yyextra->current->fileName = yyextra->fileName;
1471 yyextra->current->startLine = yyextra->yyLineNr;
1472 yyextra->current->bodyLine = yyextra->yyLineNr;
1473 yyextra->current->bodyColumn = yyextra->yyColNr;
1474 BEGIN( CompoundName );
1482<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1484 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1486 yyextra->isTypedef=
FALSE;
1487 yyextra->current->section = EntryType::makeClass();
1489 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1491 setOptional(spec.isOptional()).
1492 setPublished(spec.isPublished()).
1493 setLocal(spec.isLocal());
1495 yyextra->current->type +=
" interface" ;
1496 yyextra->current->fileName = yyextra->fileName;
1497 yyextra->current->startLine = yyextra->yyLineNr;
1498 yyextra->current->startColumn = yyextra->yyColNr;
1499 yyextra->current->bodyLine = yyextra->yyLineNr;
1500 yyextra->current->bodyColumn = yyextra->yyColNr;
1502 BEGIN( CompoundName );
1510<FindMembers>{B}*"@implementation"{BN}+ {
1512 yyextra->isTypedef=
FALSE;
1513 yyextra->current->section = EntryType::makeObjcImpl();
1515 yyextra->insideObjC =
TRUE;
1518 yyextra->current->type +=
" implementation" ;
1519 yyextra->current->fileName = yyextra->fileName;
1520 yyextra->current->startLine = yyextra->yyLineNr;
1521 yyextra->current->bodyLine = yyextra->yyLineNr;
1522 yyextra->current->bodyColumn = yyextra->yyColNr;
1523 BEGIN( CompoundName );
1525<FindMembers>{B}*"@interface"{BN}+ {
1527 yyextra->isTypedef=
FALSE;
1528 yyextra->current->section = EntryType::makeClass();
1529 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1530 if (!yyextra->insideJava)
1533 yyextra->insideObjC =
TRUE;
1537 yyextra->current->type +=
" interface" ;
1538 yyextra->current->fileName = yyextra->fileName;
1539 yyextra->current->startLine = yyextra->yyLineNr;
1540 yyextra->current->startColumn = yyextra->yyColNr;
1541 yyextra->current->bodyLine = yyextra->yyLineNr;
1542 yyextra->current->bodyColumn = yyextra->yyColNr;
1543 BEGIN( CompoundName );
1545<FindMembers>{B}*"@protocol"{BN}+ {
1547 yyextra->isTypedef=
FALSE;
1548 yyextra->current->section = EntryType::makeClass();
1551 yyextra->insideObjC =
TRUE;
1554 yyextra->current->type +=
" protocol" ;
1555 yyextra->current->fileName = yyextra->fileName;
1556 yyextra->current->startLine = yyextra->yyLineNr;
1557 yyextra->current->startColumn = yyextra->yyColNr;
1558 yyextra->current->bodyLine = yyextra->yyLineNr;
1559 yyextra->current->bodyColumn = yyextra->yyColNr;
1560 BEGIN( CompoundName );
1562<FindMembers>{B}*"exception"{BN}+ {
1563 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1564 yyextra->isTypedef=
FALSE;
1565 yyextra->current->section = EntryType::makeClass();
1568 yyextra->current->spec =
TypeSpecifier().setException(
true).
1569 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1571 yyextra->current->type +=
" exception" ;
1572 yyextra->current->fileName = yyextra->fileName;
1573 yyextra->current->startLine = yyextra->yyLineNr;
1574 yyextra->current->startColumn = yyextra->yyColNr;
1575 yyextra->current->bodyLine = yyextra->yyLineNr;
1576 yyextra->current->bodyColumn = yyextra->yyColNr;
1578 BEGIN( CompoundName );
1580<FindMembers>"@class" |
1581<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1582<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1584 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1585 bool isConst=decl.
find(
"const")!=-1;
1586 bool isVolatile=decl.
find(
"volatile")!=-1;
1587 yyextra->current->section = EntryType::makeClass();
1589 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1592 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1594 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1596 yyextra->current->spec.setLocal(
true);
1600 yyextra->current->type +=
" const";
1602 else if (isVolatile)
1604 yyextra->current->type +=
" volatile";
1606 yyextra->current->type +=
" class" ;
1607 yyextra->current->fileName = yyextra->fileName;
1608 yyextra->current->startLine = yyextra->yyLineNr;
1609 yyextra->current->startColumn = yyextra->yyColNr;
1610 yyextra->current->bodyLine = yyextra->yyLineNr;
1611 yyextra->current->bodyColumn = yyextra->yyColNr;
1615 yyextra->insideObjC =
TRUE;
1618 if (yytext[yyleng-1]==
'{') unput(
'{');
1619 BEGIN( CompoundName ) ;
1621<FindMembers>{B}*"value class{" |
1622<FindMembers>{B}*"value class"{BN}+ {
1623 yyextra->isTypedef=
FALSE;
1624 yyextra->current->section = EntryType::makeClass();
1627 yyextra->current->type +=
" value class" ;
1628 yyextra->current->fileName = yyextra->fileName;
1629 yyextra->current->startLine = yyextra->yyLineNr;
1630 yyextra->current->startColumn = yyextra->yyColNr;
1631 yyextra->current->bodyLine = yyextra->yyLineNr;
1632 yyextra->current->bodyColumn = yyextra->yyColNr;
1634 if (yytext[yyleng-1]==
'{') unput(
'{');
1635 BEGIN( CompoundName ) ;
1637<FindMembers>{B}*"ref class{" |
1638<FindMembers>{B}*"ref class"{BN}+ {
1639 yyextra->isTypedef=
FALSE;
1640 yyextra->current->section = EntryType::makeClass();
1643 yyextra->current->type +=
" ref class" ;
1644 yyextra->current->fileName = yyextra->fileName;
1645 yyextra->current->startLine = yyextra->yyLineNr;
1646 yyextra->current->startColumn = yyextra->yyColNr;
1647 yyextra->current->bodyLine = yyextra->yyLineNr;
1648 yyextra->current->bodyColumn = yyextra->yyColNr;
1650 if (yytext[yyleng-1]==
'{') unput(
'{');
1651 BEGIN( CompoundName ) ;
1653<FindMembers>{B}*"interface class{" |
1654<FindMembers>{B}*"interface class"{BN}+ {
1655 yyextra->isTypedef=
FALSE;
1656 yyextra->current->section = EntryType::makeClass();
1657 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1659 yyextra->current->type +=
" interface class" ;
1660 yyextra->current->fileName = yyextra->fileName;
1661 yyextra->current->startLine = yyextra->yyLineNr;
1662 yyextra->current->startColumn = yyextra->yyColNr;
1663 yyextra->current->bodyLine = yyextra->yyLineNr;
1664 yyextra->current->bodyColumn = yyextra->yyColNr;
1666 if (yytext[yyleng-1]==
'{') unput(
'{');
1667 BEGIN( CompoundName ) ;
1669<FindMembers>{B}*"coclass"{BN}+ {
1670 if (yyextra->insideIDL)
1672 yyextra->isTypedef=
FALSE;
1673 yyextra->current->section = EntryType::makeClass();
1675 yyextra->current->type +=
" coclass" ;
1676 yyextra->current->fileName = yyextra->fileName;
1677 yyextra->current->startLine = yyextra->yyLineNr;
1678 yyextra->current->startColumn = yyextra->yyColNr;
1679 yyextra->current->bodyLine = yyextra->yyLineNr;
1680 yyextra->current->bodyColumn = yyextra->yyColNr;
1682 BEGIN( CompoundName ) ;
1687 yyextra->current->name = yytext;
1688 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1692<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1693<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1694 if (yyextra->insideJava) REJECT;
1696 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1697 bool isConst=decl.
find(
"const")!=-1;
1698 bool isVolatile=decl.
find(
"volatile")!=-1;
1699 yyextra->current->section = EntryType::makeClass() ;
1703 setPublished(spec.isPublished()).
1704 setInline(spec.isInline()).
1705 setLocal(spec.isLocal());
1711 yyextra->current->type +=
" const";
1713 else if (isVolatile)
1715 yyextra->current->type +=
" volatile";
1717 yyextra->current->type +=
" struct" ;
1718 yyextra->current->fileName = yyextra->fileName;
1719 yyextra->current->startLine = yyextra->yyLineNr;
1720 yyextra->current->startColumn = yyextra->yyColNr;
1721 yyextra->current->bodyLine = yyextra->yyLineNr;
1722 yyextra->current->bodyColumn = yyextra->yyColNr;
1724 if (yytext[yyleng-1]==
'{') unput(
'{');
1725 BEGIN( CompoundName ) ;
1727<FindMembers>{B}*"value struct{" |
1728<FindMembers>{B}*"value struct"{BN}+ {
1729 yyextra->isTypedef=
FALSE;
1730 yyextra->current->section = EntryType::makeClass();
1731 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1733 yyextra->current->type +=
" value struct" ;
1734 yyextra->current->fileName = yyextra->fileName;
1735 yyextra->current->startLine = yyextra->yyLineNr;
1736 yyextra->current->startColumn = yyextra->yyColNr;
1737 yyextra->current->bodyLine = yyextra->yyLineNr;
1738 yyextra->current->bodyColumn = yyextra->yyColNr;
1740 if (yytext[yyleng-1]==
'{') unput(
'{');
1741 BEGIN( CompoundName ) ;
1743<FindMembers>{B}*"ref struct{" |
1744<FindMembers>{B}*"ref struct"{BN}+ {
1745 yyextra->isTypedef=
FALSE;
1746 yyextra->current->section = EntryType::makeClass();
1747 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1749 yyextra->current->type +=
" ref struct" ;
1750 yyextra->current->fileName = yyextra->fileName;
1751 yyextra->current->startLine = yyextra->yyLineNr;
1752 yyextra->current->startColumn = yyextra->yyColNr;
1753 yyextra->current->bodyLine = yyextra->yyLineNr;
1754 yyextra->current->bodyColumn = yyextra->yyColNr;
1756 if (yytext[yyleng-1]==
'{') unput(
'{');
1757 BEGIN( CompoundName ) ;
1759<FindMembers>{B}*"interface struct{" |
1760<FindMembers>{B}*"interface struct"{BN}+ {
1761 yyextra->isTypedef=
FALSE;
1762 yyextra->current->section = EntryType::makeClass();
1763 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1765 yyextra->current->type +=
" interface struct";
1766 yyextra->current->fileName = yyextra->fileName;
1767 yyextra->current->startLine = yyextra->yyLineNr;
1768 yyextra->current->startColumn = yyextra->yyColNr;
1769 yyextra->current->bodyLine = yyextra->yyLineNr;
1770 yyextra->current->bodyColumn = yyextra->yyColNr;
1772 if (yytext[yyleng-1]==
'{') unput(
'{');
1773 BEGIN( CompoundName ) ;
1775<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1776<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1777 if (yyextra->insideJava) REJECT;
1779 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1780 bool isConst=decl.
find(
"const")!=-1;
1781 bool isVolatile=decl.
find(
"volatile")!=-1;
1782 yyextra->current->section = EntryType::makeClass();
1789 yyextra->current->type +=
" const";
1791 else if (isVolatile)
1793 yyextra->current->type +=
" volatile";
1795 yyextra->current->type +=
" union" ;
1796 yyextra->current->fileName = yyextra->fileName;
1797 yyextra->current->startLine = yyextra->yyLineNr;
1798 yyextra->current->startColumn = yyextra->yyColNr;
1799 yyextra->current->bodyLine = yyextra->yyLineNr;
1800 yyextra->current->bodyColumn = yyextra->yyColNr;
1802 if (yytext[yyleng-1]==
'{') unput(
'{');
1803 BEGIN( CompoundName ) ;
1805<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1806<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1808 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1809 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1810 bool isEnumSytruct = text.
find(
"struct")!=-1;
1811 if (yyextra->insideJava)
1813 yyextra->current->section = EntryType::makeClass();
1819 yyextra->current->section = EntryType::makeEnum() ;
1822 yyextra->current->type +=
" enum";
1825 yyextra->current->spec.setStrong(
true);
1829 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1831 yyextra->current->fileName = yyextra->fileName;
1832 yyextra->current->startLine = yyextra->yyLineNr;
1833 yyextra->current->startColumn = yyextra->yyColNr;
1834 yyextra->current->bodyLine = yyextra->yyLineNr;
1835 yyextra->current->bodyColumn = yyextra->yyColNr;
1837 if (yytext[yyleng-1]==
'{') unput(
'{');
1838 BEGIN( CompoundName ) ;
1840<FindMembers>{B}*"concept"{BN}+ {
1841 if (yyextra->insideJava) REJECT;
1842 yyextra->isTypedef=
FALSE;
1843 yyextra->current->section = EntryType::makeConcept();
1845 yyextra->current->type +=
" concept";
1846 yyextra->current->fileName = yyextra->fileName;
1847 yyextra->current->startLine = yyextra->yyLineNr;
1848 yyextra->current->startColumn = yyextra->yyColNr;
1849 yyextra->current->bodyLine = yyextra->yyLineNr;
1850 yyextra->current->bodyColumn = yyextra->yyColNr;
1852 BEGIN( ConceptName ) ;
1854<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1856 yyextra->current->name +=
"()";
1857 BEGIN( FindMembers );
1859<Operator>"("{BN}*")"{BNopt}/"(" {
1861 yyextra->current->name += yytext ;
1862 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1863 BEGIN( FindMembers ) ;
1867 BEGIN( FindMembers ) ;
1871 yyextra->current->name += *yytext ;
1873<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1874 if (!yyextra->current->type.startsWith(
"friend "))
1876 yyextra->current->name += yytext;
1880 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1882 BEGIN( FindMembers ) ;
1884<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1887 yyextra->current->tArgLists.
push_back(al);
1888 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1889 yyextra->templateStr=
"<";
1890 yyextra->fullArgString = yyextra->templateStr;
1891 yyextra->copyArgString = &yyextra->templateStr;
1892 yyextra->currentArgumentContext = FindMembers;
1893 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1895<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1896 if (yyextra->insideJava) REJECT;
1898 BEGIN( NSAliasName );
1901 yyextra->aliasName = yytext;
1902 BEGIN( NSAliasArg );
1904<NSAliasArg>({ID}"::")*{ID} {
1906 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1917 BEGIN( FindMembers );
1919<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1921 yyextra->aliasName=yytext;
1924<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1928 yyextra->current->fileName = yyextra->fileName;
1930 yyextra->current->section = EntryType::makeUsingDecl();
1931 yyextra->current_root->copyToSubEntry(yyextra->current);
1933 yyextra->current->section = EntryType::makeUsingDir();
1934 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1936 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1938<PHPUseAs>{BN}+"as"{BN}+ {
1941<PHPUseAs>{PHPUSEKW} {
1945 if (!yyextra->aliasName.isEmpty())
1950 yyextra->aliasName.clear();
const std::string & str() const
1952<PHPUse,PHPUseAs>[,;] {
1962<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1966 yyextra->current->fileName = yyextra->fileName;
1973 yyextra->current->section = EntryType::makeUsingDir();
1974 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
static FileNameLinkedMap * inputNameLinkedMap
A model of a file symbol.
virtual void addIncludeDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
1978<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1982 yyextra->current->fileName = yyextra->fileName;
1994 if (yyextra->insideD)
1996 yyextra->current->section = EntryType::makeUsingDir();
2001 yyextra->current->section = EntryType::makeUsingDecl();
2003 yyextra->previous = yyextra->current;
2004 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2008<IDLImport>"\""[^"]*"\"" {
2009 QCString fileName(&yytext[1],yyleng-2);
2025<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2026 if (yyextra->insideJava) REJECT;
2027 yyextra->current->startLine=yyextra->yyLineNr;
2028 yyextra->current->startColumn = yyextra->yyColNr;
2032<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2033<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2035 yyextra->current->name=yytext;
2036 yyextra->current->fileName = yyextra->fileName;
2037 yyextra->current->section = EntryType::makeUsingDecl();
2038 yyextra->current->startLine = yyextra->yyLineNr;
2039 yyextra->previous = yyextra->current;
2040 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2042 if (yyextra->insideCS)
2047 yyextra->current->name=yytext;
2048 yyextra->current->fileName = yyextra->fileName;
2049 yyextra->current->startLine = yyextra->yyLineNr;
2050 yyextra->current->startColumn = yyextra->yyColNr;
2051 yyextra->current->section = EntryType::makeUsingDir();
2052 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2057<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2059 yyextra->current->fileName = yyextra->fileName;
2060 yyextra->current->section = EntryType::makeUsingDecl();
2061 yyextra->current->startLine = yyextra->yyLineNr;
2062 yyextra->current->bodyLine = yyextra->yyLineNr;
2063 yyextra->current->bodyColumn = yyextra->yyColNr;
2064 yyextra->lastInitializerContext = UsingAlias;
2065 yyextra->initBracketCount=0;
2066 BEGIN(ReadInitializer);
2069 yyextra->current->section = EntryType::makeVariable();
2071 init.stripPrefix(
"class ");
2072 init.stripPrefix(
"struct ");
2074 yyextra->current->type =
"typedef "+
init;
2075 yyextra->current->args.clear();
2076 yyextra->current->spec.setAlias(
true);
2077 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2082 yyextra->current->initializer << yytext;
2085 yyextra->current->initializer << yytext;
2089 yyextra->current->fileName = yyextra->fileName;
2090 yyextra->current->section = EntryType::makeUsingDir();
2091 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2095<Using>";" { BEGIN(FindMembers); }
2096<FindMembers>{SCOPENAME}{BN}*"<>" {
2101<FindMembers>{SCOPENAME}{BNopt}/"<" {
2103 if (yyextra->insideCpp && name==
"import") REJECT;
2104 yyextra->roundCount=0;
2105 yyextra->sharpCount=0;
2108 yyextra->current->name=name;
2114 BEGIN( EndTemplate );
2116<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2117 yyextra->sharpCount=0;
2118 yyextra->roundCount=0;
2126 BEGIN( EndTemplate );
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...
2129 if (!yyextra->insidePHP)
2135 yyextra->lastHereDocContext = YY_START;
2139<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2140 yyextra->current->name+=yytext;
2144 if (yyextra->roundCount==0)
2147 yyextra->sharpCount++;
2149 yyextra->current->name+=yytext;
2151<ClassTemplSpec,EndTemplate>">=" {
2152 yyextra->current->name+=yytext;
2154<ClassTemplSpec,EndTemplate>(">>") {
2155 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2163 yyextra->current->name+=yytext;
2168 yyextra->current->name+=
'>';
2170 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2172 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2177<EndTemplate>">"{BN}*"(" {
2179 yyextra->current->name+=
'>';
2181 if (yyextra->roundCount==0)
2183 --yyextra->sharpCount;
2185 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2187 yyextra->current->bodyLine = yyextra->yyLineNr;
2188 yyextra->current->bodyColumn = yyextra->yyColNr;
2189 yyextra->current->args =
"(";
2190 yyextra->currentArgumentContext = FuncQual;
2191 yyextra->fullArgString = yyextra->current->args;
2192 yyextra->copyArgString = &yyextra->current->args;
2194 BEGIN( ReadFuncArgType ) ;
2198 yyextra->current->name+=
"(";
2199 yyextra->roundCount++;
2202<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2204 yyextra->current->name+=
'>';
2205 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2210<EndTemplate>">"{BNopt}/"::" {
2212 yyextra->current->name+=
'>';
2214 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2216 BEGIN(FindMemberName);
2219<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2220 yyextra->roundCount++;
2222<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2223 if (yyextra->roundCount>0) yyextra->roundCount--;
2226 yyextra->current->name+=*yytext;
2229<FindMembers>"define"{BN}*"("{BN}*["'] {
2230 if (yyextra->insidePHP)
2232 yyextra->current->bodyLine = yyextra->yyLineNr;
2233 yyextra->current->bodyColumn = yyextra->yyColNr;
2240 yyextra->delimiter = yytext;
2241 *yyextra->pCopyHereDocGString << yytext;
2242 BEGIN(CopyHereDocEnd);
2244<CopyHereDoc>"\""{ID}/"\"" {
2245 yyextra->delimiter = &yytext[1];
2246 *yyextra->pCopyHereDocGString << yytext;
2247 BEGIN(CopyHereDocEnd);
2249<CopyHereDoc>"'"{ID}/"'" {
2250 yyextra->delimiter = &yytext[1];
2251 *yyextra->pCopyHereDocGString << yytext;
2252 BEGIN(CopyHereDocEnd);
2255 yyextra->delimiter = yytext;
2258<HereDoc>"\""{ID}/"\"" {
2259 yyextra->delimiter = &yytext[1];
2262<HereDoc>"'"{ID}/"'" {
2263 yyextra->delimiter = &yytext[1];
2267 if (yyextra->delimiter==yytext)
2269 BEGIN(yyextra->lastHereDocContext);
2273<CopyHereDocEnd>^{Bopt}{ID} {
2274 *yyextra->pCopyHereDocGString << yytext;
2277 BEGIN(yyextra->lastHereDocContext);
2282 *yyextra->pCopyHereDocGString << yytext;
2284<CopyHereDocEnd>{ID} {
2285 *yyextra->pCopyHereDocGString << yytext;
2288 *yyextra->pCopyHereDocGString << yytext;
2290<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2292<FindMembers>"Q_PROPERTY" {
2293 yyextra->yyBegLineNr = yyextra->yyLineNr;
2294 yyextra->yyBegColNr = yyextra->yyColNr;
2297 yyextra->current->type.clear();
2307 yyextra->current->name+=yytext;
2310 yyextra->current->type+= yyextra->current->name;
2311 yyextra->current->type+= yytext;
2312 yyextra->current->name=
"";
2314<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2315 yyextra->current->type+= yyextra->current->name;
2316 yyextra->current->name=yytext;
2318<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2319 yyextra->current->spec.setReadable(
true);
2322<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2323 yyextra->current->spec.setWritable(
true);
2326<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2327<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2328<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2329<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2330<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2335<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2339 yyextra->current->read = yytext;
2343 yyextra->current->write = yytext;
2346<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2347 yyextra->current->name=yytext;
2351<FindMembers>"requires" {
2352 if (yyextra->insideJava) REJECT;
2353 yyextra->current->req.clear();
2354 yyextra->requiresContext = YY_START;
2355 BEGIN(RequiresClause);
2357<RequiresClause>"requires"{BN}*/"{" {
2358 if (yyextra->insideJava) REJECT;
2360 yyextra->current->req+=yytext;
2361 BEGIN( RequiresExpression ) ;
2363<RequiresClause>"requires"{BN}*"(" {
2364 if (yyextra->insideJava) REJECT;
2366 yyextra->current->req+=yytext;
2367 yyextra->lastRoundContext=RequiresExpression;
2368 yyextra->pCopyRoundString=&yyextra->current->req;
2369 yyextra->roundCount=0;
2370 BEGIN( CopyRound ) ;
2372<RequiresExpression>"{" {
2373 yyextra->current->req+=yytext;
2374 yyextra->lastCurlyContext=RequiresClause;
2375 yyextra->pCopyCurlyString=&yyextra->current->req;
2376 yyextra->curlyCount=0;
2377 BEGIN( CopyCurly ) ;
2379<RequiresExpression>\n {
2380 yyextra->current->req+=
' ';
2383<RequiresExpression>. {
2384 yyextra->current->req+=yytext;
2386<RequiresClause>"(" {
2387 yyextra->current->req+=yytext;
2388 yyextra->lastRoundContext=RequiresClause;
2389 yyextra->pCopyRoundString=&yyextra->current->req;
2390 yyextra->roundCount=0;
2391 BEGIN( CopyRound ) ;
2393<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2397 yyextra->current->req+=yytext;
2398 yyextra->lastRoundContext=RequiresClause;
2399 yyextra->pCopyRoundString=&yyextra->current->req;
2400 yyextra->roundCount=0;
2408<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2412 yyextra->current->req+=yytext;
2413 yyextra->lastSharpContext=RequiresClause;
2414 yyextra->pCopySharpString=&yyextra->current->req;
2415 yyextra->sharpCount=0;
2423<RequiresClause>{NOTopt}{SCOPENAME} {
2427 yyextra->current->req=yytext;
2428 BEGIN(yyextra->requiresContext);
2435<RequiresClause>{NOTopt}"::"{ID} {
2437 yyextra->current->req+=yytext;
2439<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2441 yyextra->current->req+=yytext;
2443<RequiresClause>{BN}+ {
2444 yyextra->current->req+=
' ';
2449 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2450 BEGIN(yyextra->requiresContext);
2452<FindMembers,FindMemberName>{SCOPENAME} {
2454 yyextra->yyBegColNr=yyextra->yyColNr;
2455 yyextra->yyBegLineNr=yyextra->yyLineNr;
2457 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2461 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2463 if (yyextra->insideIDL)
2468 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2472 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2477 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2479 BEGIN(IDLUnionCase);
2481 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2483 yyextra->insideTryBlock=
FALSE;
2484 BEGIN(TryFunctionBlock);
2486 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2488 yyextra->lastAlignAsContext = YY_START;
2491 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2493 yyextra->current->type=
"var";
2495 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2497 yyextra->current->type=
"function";
2499 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2503 yyextra->current->name=
"this";
2506 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2509 BEGIN(StaticAssert);
2511 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2515 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2516 yyextra->current->type+=yytext;
2519 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2521 if (yyextra->current->type.isEmpty())
2523 yyextra->current->type =
"optional";
2527 yyextra->current->type +=
" optional";
2529 yyextra->lastModifierContext = YY_START;
2530 BEGIN(SliceOptional);
2534 if (YY_START==FindMembers)
2538 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2539 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2543 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2547 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2551 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2555 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2557 if (YY_START==FindMembers)
2558 yyextra->current->name = yytext;
2560 yyextra->current->name += yytext;
2561 yyextra->current->isStatic =
TRUE;
2565 if (YY_START==FindMembers)
2566 yyextra->current->name = yytext;
2568 yyextra->current->name += yytext;
2569 if (yyextra->current->name.startsWith(
"static "))
2571 yyextra->current->isStatic =
TRUE;
2572 yyextra->current->name= yyextra->current->name.mid(7);
2574 else if (yyextra->current->name.startsWith(
"inline "))
2576 if (yyextra->current->type.isEmpty())
2578 yyextra->current->type=
"inline";
2582 yyextra->current->type+=
"inline ";
2584 yyextra->current->name= yyextra->current->name.mid(7);
2586 else if (yyextra->current->name.startsWith(
"constexpr "))
2588 if (yyextra->current->type.isEmpty())
2590 yyextra->current->type=
"constexpr";
2594 yyextra->current->type+=
"constexpr ";
2596 yyextra->current->name=yyextra->current->name.mid(10);
2598 else if (yyextra->current->name.startsWith(
"consteval "))
2600 if (yyextra->current->type.isEmpty())
2602 yyextra->current->type=
"consteval";
2606 yyextra->current->type+=
"consteval ";
2608 yyextra->current->name=yyextra->current->name.mid(10);
2610 else if (yyextra->current->name.startsWith(
"constinit "))
2612 if (yyextra->current->type.isEmpty())
2614 yyextra->current->type=
"constinit";
2618 yyextra->current->type+=
"constinit ";
2620 yyextra->current->name=yyextra->current->name.mid(10);
2622 else if (yyextra->current->name.startsWith(
"const "))
2624 if (yyextra->current->type.isEmpty())
2626 yyextra->current->type=
"const";
2630 yyextra->current->type+=
"const ";
2632 yyextra->current->name=yyextra->current->name.mid(6);
2634 else if (yyextra->current->name.startsWith(
"volatile "))
2636 if (yyextra->current->type.isEmpty())
2638 yyextra->current->type=
"volatile";
2642 yyextra->current->type+=
"volatile ";
2644 yyextra->current->name=yyextra->current->name.mid(9);
2646 else if (yyextra->current->name.startsWith(
"typedef "))
2648 if (yyextra->current->type.isEmpty())
2650 yyextra->current->type=
"typedef";
2654 yyextra->current->type+=
"typedef ";
2656 yyextra->current->name=yyextra->current->name.mid(8);
2666 yyextra->externLinkage=
FALSE;
2670 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2673 yyextra->lastSkipRoundContext = FindMembers;
2674 yyextra->roundCount=0;
2677<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2683 yyextra->current->type+=yytext;
2684 yyextra->lastRoundContext=FindMembers;
2685 yyextra->pCopyRoundString=&yyextra->current->type;
2686 yyextra->roundCount=0;
2689<DeclType>{BN}+ {
lineCount(yyscanner); }
2694<CSIndexer>"["[^\n\]]*"]" {
2698<FindMembers>[0-9]{ID} {
2701 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2703 yyextra->current->name+=
".";
2707 yyextra->current->name+=yytext;
2709<CppQuote>"("{B}*"\"" {
2710 yyextra->insideCppQuote=
TRUE;
2714<IDLUnionCase>":" { BEGIN(FindMembers); }
2715<IDLUnionCase>\n {
lineCount(yyscanner); }
2717<TryFunctionBlock>\n {
lineCount(yyscanner); }
2718<TryFunctionBlock>"{" {
2719 yyextra->curlyCount=0;
2720 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2724<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2726<TryFunctionBlockEnd>\n { unput(*yytext);
2727 BEGIN( FindMembers );
2729<TryFunctionBlockEnd>. { unput(*yytext);
2730 BEGIN( FindMembers );
2733 yyextra->insideCppQuote=
FALSE;
2736<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2738 yyextra->lastCPPContext = YY_START;
2741<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2742<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2743 if (yyextra->insidePHP)
2745 yyextra->current->bodyLine = yyextra->yyLineNr;
2746 yyextra->current->bodyColumn = yyextra->yyColNr;
2747 yyextra->current->fileName = yyextra->fileName;
2748 yyextra->current->startLine = yyextra->yyLineNr;
2749 yyextra->current->startColumn = yyextra->yyColNr;
2750 yyextra->current->type.clear();
2751 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2752 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2753 yyextra->current->section = EntryType::makeDefine();
2754 yyextra->lastDefineContext = YY_START;
2757<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2758 yyextra->yyLineNr = atoi(&yytext[1]);
2760 yyextra->lastPreLineCtrlContext = YY_START;
2761 if (YY_START==ReadBody ||
2762 YY_START==ReadNSBody ||
2763 YY_START==ReadBodyIntf)
2765 yyextra->current->program << yytext;
2767 BEGIN( PreLineCtrl );
2769<PreLineCtrl>"\""[^\n\"]*"\"" {
2771 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2772 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2773 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2775 yyextra->current->program << yytext;
2779 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2780 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2781 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2783 yyextra->current->program << yytext;
2787 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2788 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2789 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2791 yyextra->current->program << yytext;
2794 BEGIN( yyextra->lastPreLineCtrlContext );
2797<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2798<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2799 BEGIN( yyextra->lastCPPContext) ;
2801<SDefine>{ID}{B}*"(" {
2802 yyextra->current->name = yytext;
2803 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2804 yyextra->current->args =
"(";
2805 yyextra->current->bodyLine = yyextra->yyLineNr;
2806 yyextra->current->bodyColumn = yyextra->yyColNr;
2807 yyextra->currentArgumentContext = DefineEnd;
2808 yyextra->fullArgString=yyextra->current->args;
2809 yyextra->copyArgString=&yyextra->current->args;
2810 BEGIN( ReadFuncArgType ) ;
2825 yyextra->current->bodyLine = yyextra->yyLineNr;
2826 yyextra->current->bodyColumn = yyextra->yyColNr;
2827 yyextra->current->name = yytext;
2834 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2836 BEGIN(yyextra->lastDefineContext);
2840 yyextra->current->fileName = yyextra->fileName;
2841 yyextra->current->startLine = yyextra->yyLineNr;
2842 yyextra->current->startColumn = yyextra->yyColNr;
2843 yyextra->current->type.clear();
2844 yyextra->current->type =
"const";
2848 yyextra->current->initializer.str(
init.str());
2849 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2850 yyextra->current->section = EntryType::makeVariable();
2851 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2856<DefineEnd>\\[\r]?\n {
2858 yyextra->current->endBodyLine = yyextra->yyLineNr;
2861 if (yyextra->insideIDL && yyextra->insideCppQuote)
2867 yyextra->lastStringContext=DefineEnd;
2872<DefinePHP>{ID}["']{BN}*","{BN}* {
2873 yyextra->current->name = yytext;
2874 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2875 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2876 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2877 yyextra->current->bodyLine = yyextra->yyLineNr;
2878 yyextra->current->bodyColumn = yyextra->yyColNr;
2879 yyextra->lastRoundContext = DefinePHPEnd;
2880 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2881 yyextra->roundCount = 0;
2882 BEGIN( GCopyRound );
2886 if (yyextra->insideCli)
2889 yyextra->current->name = yytext ;
2897 yyextra->current->name += yytext ;
2900<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2901 if (yyextra->current->bodyLine==-1)
2903 yyextra->current->bodyLine=yyextra->yyLineNr;
2904 yyextra->current->bodyColumn = yyextra->yyColNr;
2906 yyextra->docBlockContext = YY_START;
2907 yyextra->docBlockInBody =
FALSE;
2908 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2913 yyextra->docBlock.str(indent.
str());
2917 yyextra->docBlockTerm =
';';
2918 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2920 yyextra->current->bitfields =
":"+yyextra->current->args;
2921 yyextra->current->args.clear();
2922 yyextra->current->section = EntryType::makeVariable();
2924 if (yytext[yyleng-3]==
'/')
void fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
2935<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2936 yyextra->docBlockContext = YY_START;
2937 yyextra->docBlockInBody =
FALSE;
2938 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2943 yyextra->docBlock.str(indent.
str());
2946 yyextra->docBlockTerm =
',';
2947 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2949 yyextra->current->bitfields =
":"+yyextra->current->args;
2950 yyextra->current->args.clear();
2951 yyextra->current->section = EntryType::makeVariable();
2953 if (yytext[yyleng-3]==
'/')
2964<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2965 if (yyextra->current->bodyLine==-1)
2967 yyextra->current->bodyLine=yyextra->yyLineNr;
2968 yyextra->current->bodyColumn = yyextra->yyColNr;
2970 yyextra->docBlockContext = YY_START;
2971 yyextra->docBlockInBody =
FALSE;
2972 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2976 yyextra->docBlock.str(indent.
str());
2979 yyextra->docBlockTerm = 0;
2980 if (yytext[yyleng-3]==
'/')
2992<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2994 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
2997 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3002 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3008 if (yytext[2]==
'!' || yytext[2]==
'/')
3010 yyextra->docBlockContext = YY_START;
3011 yyextra->docBlockInBody =
FALSE;
3012 yyextra->docBlockAutoBrief =
FALSE;
3013 yyextra->docBlock.str(std::string());
3014 yyextra->docBlockTerm = 0;
3020 yyextra->lastCContext=YY_START;
3021 BEGIN(SkipCxxComment);
3026 if (yytext[2]==
'!' || yytext[2]==
'*')
3028 yyextra->docBlockContext = YY_START;
3029 yyextra->docBlockInBody =
FALSE;
3030 yyextra->docBlock.str(std::string());
3031 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3033 yyextra->docBlockTerm = 0;
3039 yyextra->lastCContext=YY_START;
3044<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3045 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3046 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3050 if (!yyextra->insideCS) REJECT;
3051 yyextra->current->bodyLine = yyextra->yyLineNr;
3052 yyextra->current->bodyColumn = yyextra->yyColNr;
3053 yyextra->current->initializer.str(yytext);
3054 yyextra->lastInitializerContext = YY_START;
3055 yyextra->initBracketCount=0;
3057 yyextra->current->spec.setGettable(
true);
3058 BEGIN(ReadInitializerPtr);
3061 yyextra->current->bodyLine = yyextra->yyLineNr;
3062 yyextra->current->bodyColumn = yyextra->yyColNr;
3063 yyextra->current->initializer.str(yytext);
3064 yyextra->lastInitializerContext = YY_START;
3065 yyextra->initBracketCount=0;
3066 BEGIN(ReadInitializer);
3068<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3070 yyextra->current->exception +=
" ";
3073<UNOIDLAttributeBlock>"}" {
3074 yyextra->current->exception +=
" }";
3078<ReadInitializer,ReadInitializerPtr>"(" {
3079 yyextra->lastRoundContext=YY_START;
3080 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3081 yyextra->roundCount=0;
3082 yyextra->current->initializer << *yytext;
3085<ReadInitializer,ReadInitializerPtr>"[" {
3086 if (!yyextra->insidePHP) REJECT;
3087 yyextra->lastSquareContext=YY_START;
3088 yyextra->pCopySquareGString=&yyextra->current->initializer;
3089 yyextra->squareCount=0;
3090 yyextra->current->initializer << *yytext;
3093<ReadInitializer,ReadInitializerPtr>"{" {
3094 yyextra->lastCurlyContext=YY_START;
3095 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3096 yyextra->curlyCount=0;
3097 yyextra->current->initializer << *yytext;
3100<ReadInitializer,ReadInitializerPtr>[;,] {
3102 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3104 yyextra->current->fileName = yyextra->fileName;
3105 yyextra->current->startLine = yyextra->yyLineNr;
3106 yyextra->current->startColumn = yyextra->yyColNr;
3107 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3108 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3109 yyextra->current->section = EntryType::makeVariable();
3110 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3114 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3117 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3118 BEGIN(yyextra->lastInitializerContext);
3120 else if (*yytext==
',' && yyextra->initBracketCount==0)
3123 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3124 BEGIN(yyextra->lastInitializerContext);
3128 yyextra->current->initializer << *yytext;
3131<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3132 if (!yyextra->insideCpp)
3138 yyextra->current->initializer << yytext;
3140 yyextra->lastRawStringContext = YY_START;
3141 yyextra->pCopyRawGString = &yyextra->current->initializer;
3146<RawGString>{RAWEND} {
3149 *yyextra->pCopyRawGString << yytext;
3150 BEGIN(yyextra->lastRawStringContext);
3157<RawGString>[^)\n]+ {
3158 *yyextra->pCopyRawGString << yytext;
3161 *yyextra->pCopyRawGString << yytext;
3164 *yyextra->pCopyRawGString << yytext;
3167<RawString>{RAWEND} {
3168 *yyextra->pCopyRawString+=yytext;
3169 yyextra->fullArgString+=yytext;
3172 BEGIN(yyextra->lastRawStringContext);
3176 *yyextra->pCopyRawString += yytext;
3177 yyextra->fullArgString+=yytext;
3180 *yyextra->pCopyRawString += yytext;
3181 yyextra->fullArgString+=yytext;
3184 *yyextra->pCopyRawString += yytext;
3185 yyextra->fullArgString+=yytext;
3188<ReadInitializer,ReadInitializerPtr>\" {
3189 if (yyextra->insideIDL && yyextra->insideCppQuote)
3195 yyextra->lastStringContext=YY_START;
3196 yyextra->current->initializer << yytext;
3197 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3198 yyextra->stopAtInvalidString=
false;
3202<ReadInitializer,ReadInitializerPtr>"->" {
3203 yyextra->current->initializer << yytext;
3205<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3206 yyextra->current->initializer << yytext;
3208<ReadInitializer,ReadInitializerPtr>(">>"|">=") {
3209 yyextra->current->initializer << yytext;
3211<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3212 yyextra->initBracketCount++;
3213 yyextra->current->initializer << *yytext;
3215<ReadInitializer,ReadInitializerPtr>[>\]})] {
3216 yyextra->initBracketCount--;
3219 yyextra->current->endBodyLine=yyextra->yyLineNr;
3221 yyextra->current->initializer << *yytext;
3223<ReadInitializer,ReadInitializerPtr>\' {
3224 if (yyextra->insidePHP)
3226 yyextra->current->initializer << yytext;
3227 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3228 yyextra->lastStringContext=YY_START;
3229 BEGIN(CopyPHPGString);
3233 yyextra->current->initializer << yytext;
3236<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3237 if (yyextra->insidePHP)
3243 yyextra->current->initializer << yytext;
3246<ReadInitializer,ReadInitializerPtr>\n {
3247 yyextra->current->initializer << *yytext;
3250<ReadInitializer,ReadInitializerPtr>"@\"" {
3252 yyextra->current->initializer << yytext;
3253 if (!yyextra->insideCS && !yyextra->insideObjC)
3260 yyextra->lastSkipVerbStringContext=YY_START;
3261 yyextra->pSkipVerbString=&yyextra->current->initializer;
3262 BEGIN(SkipVerbString);
3265<SkipVerbString>[^\n"\\]+ {
3266 *yyextra->pSkipVerbString << yytext;
3268<SkipVerbString>"\\\\" {
3269 if (yyextra->insideCS) REJECT
3270 *yyextra->pSkipVerbString << yytext;
3272<SkipVerbString>"\\\"" {
3273 if (yyextra->insideCS) REJECT
3274 *yyextra->pSkipVerbString << yytext;
3276<SkipVerbString>"\"\"" {
3277 *yyextra->pSkipVerbString << yytext;
3279<SkipVerbString>"\"" {
3280 *yyextra->pSkipVerbString << *yytext;
3281 BEGIN(yyextra->lastSkipVerbStringContext);
3284 *yyextra->pSkipVerbString << *yytext;
3288 *yyextra->pSkipVerbString << *yytext;
3290<ReadInitializer,ReadInitializerPtr>"?>" {
3291 if (yyextra->insidePHP)
3292 BEGIN( FindMembersPHP );
3294 yyextra->current->initializer << yytext;
3296<ReadInitializer,ReadInitializerPtr>. {
3297 yyextra->current->initializer << *yytext;
3301<CopyString,CopyPHPString>\\. {
3302 *yyextra->pCopyQuotedString+=yytext;
3305 *yyextra->pCopyQuotedString+=*yytext;
3306 BEGIN( yyextra->lastStringContext );
3309 *yyextra->pCopyQuotedString+=*yytext;
3310 BEGIN( yyextra->lastStringContext );
3312<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3313 *yyextra->pCopyQuotedString+=yytext;
3315<CopyString,CopyPHPString>\n {
3316 *yyextra->pCopyQuotedString+=*yytext;
3319<CopyString,CopyPHPString>. {
3320 *yyextra->pCopyQuotedString+=*yytext;
3324<CopyGString,CopyPHPGString>\\. {
3325 *yyextra->pCopyQuotedGString << yytext;
3328 *yyextra->pCopyQuotedGString << *yytext;
3329 BEGIN( yyextra->lastStringContext );
3332 *yyextra->pCopyQuotedGString << *yytext;
3333 BEGIN( yyextra->lastStringContext );
3335<CopyGString,CopyPHPGString>"<?php" {
3336 *yyextra->pCopyQuotedGString << yytext;
3337 BEGIN( yyextra->lastStringContext );
3339<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3340 *yyextra->pCopyQuotedGString << yytext;
3342<CopyGString,CopyPHPGString>\n {
3343 *yyextra->pCopyQuotedGString << *yytext;
3344 if (yyextra->stopAtInvalidString)
3346 BEGIN( yyextra->lastStringContext );
3353<CopyGString,CopyPHPGString>. {
3354 *yyextra->pCopyQuotedGString << *yytext;
3359 *yyextra->pCopyRoundString += *yytext;
3360 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3361 yyextra->lastStringContext=YY_START;
3365 *yyextra->pCopyRoundString += *yytext;
3366 yyextra->roundCount++;
3369 *yyextra->pCopyRoundString += *yytext;
3370 if (--yyextra->roundCount<0)
3371 BEGIN(yyextra->lastRoundContext);
3375 *yyextra->pCopyRoundString += *yytext;
3378 if (yyextra->insidePHP)
3380 yyextra->current->initializer << yytext;
3381 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3382 yyextra->lastStringContext=YY_START;
3383 BEGIN(CopyPHPString);
3387 *yyextra->pCopyRoundString += yytext;
3390<CopyRound>{CHARLIT} {
3391 if (yyextra->insidePHP)
3397 *yyextra->pCopyRoundString+=yytext;
3400<CopyRound>[^"'()\n,]+ {
3401 *yyextra->pCopyRoundString+=yytext;
3404 *yyextra->pCopyRoundString+=*yytext;
3409 *yyextra->pCopySharpString += *yytext;
3410 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3411 yyextra->lastStringContext=YY_START;
3415 *yyextra->pCopySharpString += *yytext;
3416 yyextra->sharpCount++;
3419 *yyextra->pCopySharpString += *yytext;
3420 if (--yyextra->sharpCount<0)
3422 BEGIN(yyextra->lastSharpContext);
3427 *yyextra->pCopySharpString += *yytext;
3430 if (yyextra->insidePHP)
3432 yyextra->current->initializer << yytext;
3433 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3434 yyextra->lastStringContext=YY_START;
3435 BEGIN(CopyPHPString);
3439 *yyextra->pCopySharpString += yytext;
3442<CopySharp>{CHARLIT} {
3443 if (yyextra->insidePHP)
3449 *yyextra->pCopySharpString+=yytext;
3452<CopySharp>[^"'<>\n,]+ {
3453 *yyextra->pCopySharpString+=yytext;
3456 *yyextra->pCopySharpString+=*yytext;
3462 *yyextra->pCopyRoundGString << *yytext;
3463 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3464 yyextra->lastStringContext=YY_START;
3468 *yyextra->pCopyRoundGString << *yytext;
3469 yyextra->roundCount++;
3472 *yyextra->pCopyRoundGString << *yytext;
3473 if (--yyextra->roundCount<0)
3474 BEGIN(yyextra->lastRoundContext);
3478 *yyextra->pCopyRoundGString << *yytext;
3481 if (yyextra->insidePHP)
3483 yyextra->current->initializer << yytext;
3484 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3485 yyextra->lastStringContext=YY_START;
3486 BEGIN(CopyPHPGString);
3490 *yyextra->pCopyRoundGString << yytext;
3493<GCopyRound>{CHARLIT} {
3494 if (yyextra->insidePHP)
3500 *yyextra->pCopyRoundGString << yytext;
3504 if (!yyextra->insideCS) REJECT;
3505 *yyextra->pCopyRoundGString << yytext;
3506 yyextra->lastSkipVerbStringContext=YY_START;
3507 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3508 BEGIN(SkipVerbString);
3510<GCopyRound>[^"'()\n\/,R]+ {
3511 *yyextra->pCopyRoundGString << yytext;
3513<GCopyRound>{RAWBEGIN} {
3514 *yyextra->pCopyRoundGString << yytext;
3516 yyextra->lastRawStringContext = YY_START;
3517 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3521 *yyextra->pCopyRoundGString << *yytext;
3526 *yyextra->pCopySquareGString << *yytext;
3527 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3528 yyextra->lastStringContext=YY_START;
3532 *yyextra->pCopySquareGString << *yytext;
3533 if (yyextra->insidePHP)
3535 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3536 yyextra->lastStringContext=YY_START;
3537 BEGIN(CopyPHPGString);
3541 *yyextra->pCopySquareGString << *yytext;
3542 yyextra->squareCount++;
3545 *yyextra->pCopySquareGString << *yytext;
3546 if (--yyextra->squareCount<0)
3547 BEGIN(yyextra->lastSquareContext);
3551 *yyextra->pCopySquareGString << *yytext;
3554 if (yyextra->insidePHP)
3556 yyextra->current->initializer << yytext;
3557 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3558 yyextra->lastStringContext=YY_START;
3559 BEGIN(CopyPHPGString);
3563 *yyextra->pCopySquareGString << yytext;
3566<GCopySquare>{CHARLIT} {
3567 if (yyextra->insidePHP)
3573 *yyextra->pCopySquareGString << yytext;
3576<GCopySquare>[^"'\[\]\n\/,]+ {
3577 *yyextra->pCopySquareGString << yytext;
3580 *yyextra->pCopySquareGString << *yytext;
3585 *yyextra->pCopyCurlyString += *yytext;
3586 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3587 yyextra->lastStringContext=YY_START;
3591 *yyextra->pCopyCurlyString += *yytext;
3592 if (yyextra->insidePHP)
3594 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3595 yyextra->lastStringContext=YY_START;
3596 BEGIN(CopyPHPString);
3600 *yyextra->pCopyCurlyString += *yytext;
3601 yyextra->curlyCount++;
3604 *yyextra->pCopyCurlyString += *yytext;
3605 if (--yyextra->curlyCount<0)
3606 BEGIN(yyextra->lastCurlyContext);
3608<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3614 *yyextra->pCopyCurlyString += yytext;
3617<CopyCurly>[^"'{}\/\n,]+ {
3618 *yyextra->pCopyCurlyString += yytext;
3620<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3623 *yyextra->pCopyCurlyString += *yytext;
3626 *yyextra->pCopyCurlyString += *yytext;
3630<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3632<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3634 int s = line.
find(
' ');
3635 int e = line.
find(
'"',s);
3636 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3637 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3644 *yyextra->pCopyCurlyGString << *yytext;
3645 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3646 yyextra->lastStringContext=YY_START;
3650 *yyextra->pCopyCurlyGString << *yytext;
3651 if (yyextra->insidePHP)
3653 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3654 yyextra->lastStringContext=YY_START;
3655 BEGIN(CopyPHPGString);
3659 *yyextra->pCopyCurlyGString << *yytext;
3660 yyextra->curlyCount++;
3663 *yyextra->pCopyCurlyGString << *yytext;
3664 if (--yyextra->curlyCount<0)
3666 yyextra->current->endBodyLine = yyextra->yyLineNr;
3667 BEGIN(yyextra->lastCurlyContext);
3670<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3676 *yyextra->pCopyCurlyGString << yytext;
3679<GCopyCurly>[^"'{}\/\n,]+ {
3680 *yyextra->pCopyCurlyGString << yytext;
3683 *yyextra->pCopyCurlyGString << yytext;
3685<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3688 *yyextra->pCopyCurlyGString << *yytext;
3691 *yyextra->pCopyCurlyGString << *yytext;
3698 if (yyextra->current->type.isEmpty() &&
3699 yyextra->current->name==
"enum")
3701 yyextra->current->section = EntryType::makeEnum();
3702 yyextra->current->name.clear();
3703 yyextra->current->args.clear();
3704 BEGIN(EnumBaseType);
3708 if (yyextra->current->type.isEmpty())
3711 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3714 yyextra->current->bitfields+=
":";
3718 yyextra->current->bitfields+=*yytext;
3721 yyextra->current->args+=*yytext;
3725 yyextra->current->args+=
' ';
3728 QCString oldType = yyextra->current->type;
3729 if (yyextra->current->bodyLine==-1)
3731 yyextra->current->bodyLine = yyextra->yyLineNr;
3732 yyextra->current->bodyColumn = yyextra->yyColNr;
3734 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3736 yyextra->current->type = yyextra->current->type.mid(3);
3738 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3740 yyextra->current->type.prepend(
"typedef ");
3742 bool isStatic = yyextra->current->isStatic;
3743 Protection prot = yyextra->current->protection;
3744 bool isConcept = yyextra->current->section.isConcept();
3745 bool isModule = yyextra->current->section.isModuleDoc();
3748 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3753 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3756 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3758 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3760 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3761 if (yyextra->current->section.isClass())
3765 yyextra->current->section = EntryType::makeVariable() ;
3766 yyextra->current->fileName = yyextra->fileName;
3767 yyextra->current->startLine = yyextra->yyBegLineNr;
3768 yyextra->current->startColumn = yyextra->yyBegColNr;
3769 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3772 if ( *yytext ==
',')
3774 yyextra->current->isStatic = isStatic;
3775 yyextra->current->protection = prot;
3776 yyextra->current->name.clear();
3777 yyextra->current->args.clear();
3778 yyextra->current->brief.clear();
3779 yyextra->current->doc.clear();
3780 yyextra->current->initializer.str(std::string());
3781 yyextra->current->bitfields.clear();
3788 yyextra->current->bodyLine = -1;
3789 yyextra->current->bodyColumn = 1;
3790 yyextra->current->groups.clear();
3796 if (yyextra->insideSlice)
3798 yyextra->squareCount=1;
3799 yyextra->lastSquareContext = YY_START;
3800 yyextra->current->metaData +=
"[";
3801 BEGIN( SliceMetadata );
3803 else if (!yyextra->insideCS &&
3804 (yyextra->current->name.isEmpty() ||
3805 yyextra->current->name==
"typedef"
3809 yyextra->squareCount=1;
3810 yyextra->lastSquareContext = YY_START;
3811 yyextra->idlAttr.clear();
3812 yyextra->idlProp.clear();
3813 yyextra->current->mtype = yyextra->mtype;
3818 yyextra->odlProp =
true;
3819 yyextra->current->spec.setGettable(
true).setSettable(
true);
3822 BEGIN( IDLAttribute );
3824 else if (yyextra->insideCS &&
3825 yyextra->current->name.isEmpty())
3827 yyextra->squareCount=1;
3828 yyextra->lastSquareContext = YY_START;
3831 yyextra->current->args.clear();
3832 BEGIN( SkipSquare );
3836 yyextra->current->args += yytext ;
3837 yyextra->squareCount=1;
3838 yyextra->externLinkage=
FALSE;
3843 yyextra->squareCount++;
3844 yyextra->current->metaData +=
"[";
3846<SliceMetadata>{BN}* {
3849<SliceMetadata>\"[^\"]*\" {
3850 yyextra->current->metaData += yytext;
3853 yyextra->current->metaData += yytext;
3856 yyextra->current->metaData += yytext;
3857 if (--yyextra->squareCount<=0)
3859 BEGIN (yyextra->lastSquareContext);
3863 yyextra->current->type +=
"(";
3864 yyextra->roundCount++;
3866<SliceOptional>[0-9]+ {
3867 yyextra->current->type += yytext;
3870 yyextra->current->type +=
")";
3871 if(--yyextra->roundCount<=0)
3873 BEGIN (yyextra->lastModifierContext);
3878 if (--yyextra->squareCount<=0)
3882 BEGIN( IDLPropName );
3884 BEGIN( yyextra->lastSquareContext );
3887<IDLAttribute>"propput" {
3892 yyextra->current->spec.setSettable(
true);
3894<IDLAttribute>"propget" {
3899 yyextra->current->spec.setGettable(
true);
3901<IDLAttribute>"property" {
3902 yyextra->current->spec.setProperty(
true);
3904<IDLAttribute>"attribute" {
3905 yyextra->current->spec.setAttribute(
true);
3907<IDLAttribute>"optional" {
3908 yyextra->current->spec.setOptional(
true);
3910<IDLAttribute>"readonly" {
3913 yyextra->current->spec.setSettable(
false);
3917 yyextra->current->spec.setReadonly(
true);
3920<IDLAttribute>"bound" {
3921 yyextra->current->spec.setBound(
true);
3923<IDLAttribute>"removable" {
3924 yyextra->current->spec.setRemovable(
true);
3926<IDLAttribute>"constrained" {
3927 yyextra->current->spec.setConstrained(
true);
3929<IDLAttribute>"transient" {
3930 yyextra->current->spec.setTransient(
true);
3932<IDLAttribute>"maybevoid" {
3933 yyextra->current->spec.setMaybeVoid(
true);
3935<IDLAttribute>"maybedefault" {
3936 yyextra->current->spec.setMaybeDefault(
true);
3938<IDLAttribute>"maybeambiguous" {
3939 yyextra->current->spec.setMaybeAmbiguous(
true);
3943<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3946 if (yyextra->odlProp)
3948 yyextra->idlProp = yytext;
3951<IDLPropName>{ID}{BN}*"(" {
3952 yyextra->current->name = yytext;
3953 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3954 yyextra->current->startLine = yyextra->yyLineNr;
3955 yyextra->current->startColumn = yyextra->yyColNr;
3958<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3959 if (yyextra->odlProp)
3961 yyextra->idlProp += yytext;
3964<IDLPropName>{ID}{BNopt}/";" {
3965 if (yyextra->odlProp)
3967 yyextra->current->name = yytext;
3968 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3969 yyextra->odlProp =
false;
3974<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3975 yyextra->idlAttr = yytext;
3976 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3979 yyextra->idlProp = yytext;
3981<IDLProp>{BN}*{ID}{BN}*"," {
3982 if (yyextra->current->args.isEmpty())
3983 yyextra->current->args =
"(";
3985 yyextra->current->args +=
", ";
3986 yyextra->current->args += yyextra->idlAttr;
3987 yyextra->current->args +=
" ";
3988 yyextra->current->args += yyextra->idlProp;
3989 yyextra->current->args +=
" ";
3990 yyextra->current->args += yytext;
3991 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
3992 yyextra->idlProp.clear();
3993 yyextra->idlAttr.clear();
3996<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4000 yyextra->current->fileName = yyextra->fileName;
4001 yyextra->current->type = yyextra->idlProp;
4002 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4003 if (!yyextra->current->args.isEmpty())
4004 yyextra->current->args +=
")";
4005 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4006 yyextra->current->section = EntryType::makeVariable();
4007 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4009 BEGIN( FindMembers );
4014<Array>"]" { yyextra->current->args += *yytext ;
4015 if (--yyextra->squareCount<=0)
4016 BEGIN( FindMembers ) ;
4018<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4019 if (--yyextra->squareCount<=0)
4020 BEGIN( SFunction ) ;
4022<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4023 yyextra->squareCount++;
4025<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4026<SkipSquare>"[" { yyextra->squareCount++; }
4028 if (--yyextra->squareCount<=0)
4029 BEGIN( yyextra->lastSquareContext );
4032 yyextra->lastStringContext=YY_START;
4033 BEGIN( SkipString );
4035<SkipSquare>[^\n\[\]\"]+
4036<FindMembers>"<" {
addType(yyscanner);
4037 yyextra->current->type += yytext ;
4040<Sharp>">" { yyextra->current->type += *yytext ;
4041 if (--yyextra->sharpCount<=0)
4042 BEGIN( FindMembers ) ;
4044<Sharp>"<" { yyextra->current->type += *yytext ;
4045 yyextra->sharpCount++;
4048 yyextra->current->type +=
' ';
4051<Sharp>. { yyextra->current->type += *yytext ; }
4054 yyextra->current->bodyLine = yyextra->yyLineNr;
4055 yyextra->current->bodyColumn = yyextra->yyColNr;
4056 yyextra->current->name = yytext;
4061 yyextra->lastInitializerContext = YY_START;
4062 yyextra->initBracketCount=0;
4063 yyextra->current->initializer.str(
"=");
4064 BEGIN(ReadInitializer);
4067 yyextra->lastInitializerContext = YY_START;
4068 yyextra->initBracketCount=0;
4069 yyextra->current->initializer.str(yytext);
4070 BEGIN(ReadInitializer);
4073 if (yyextra->insideJava)
4075 if (!yyextra->current->name.isEmpty())
4077 yyextra->current->fileName = yyextra->fileName;
4078 yyextra->current->startLine = yyextra->yyLineNr;
4079 yyextra->current->startColumn = yyextra->yyColNr;
4080 if (!yyextra->current_root->spec.isEnum())
4082 yyextra->current->type =
"@";
4084 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4085 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4086 yyextra->current->section = EntryType::makeVariable();
4087 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4091 BEGIN( FindMembers );
4102 if (!yyextra->current->name.isEmpty())
4104 yyextra->current->fileName = yyextra->fileName;
4105 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4107 yyextra->current->startLine = yyextra->current->bodyLine;
4108 yyextra->current->startColumn = yyextra->current->bodyColumn;
4112 yyextra->current->startLine = yyextra->yyLineNr;
4113 yyextra->current->startColumn = yyextra->yyColNr;
4115 if (!yyextra->current_root->spec.isEnum())
4117 yyextra->current->type =
"@";
4119 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4120 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4121 yyextra->current->section = EntryType::makeVariable();
4123 if (!yyextra->insideCS && !yyextra->insideJava &&
4124 !yyextra->current_root->spec.isStrong())
4131 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4133 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4138 yyextra->current->reset();
4143 yyextra->squareCount=1;
4144 yyextra->lastSquareContext = YY_START;
4147<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4148<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4149<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4152 yyextra->current->program << yytext ;
4155<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4156 yyextra->current->program << yytext ;
4157 yyextra->pSkipInterpString = &yyextra->current->program;
4158 yyextra->lastSkipInterpStringContext=YY_START;
4159 BEGIN( SkipInterpString );
4161<SkipInterpString>([^"\\{}\x000D\x000A\x0085\x2028\x2029]|"{{"|"}}"|"\\'"|"\\\""|"\\\\"|"\\0"|"\\a"|"\\b"|"\\f"|"\\n"|"\\r"|"\\t"|"\\v"|"\\x"{HEXDIGIT}{HEXDIGIT}?{HEXDIGIT}?{HEXDIGIT}?|"\\"[uU]{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT})* {
4162 *yyextra->pSkipInterpString << yytext;
4164<SkipInterpString>\" {
4165 *yyextra->pSkipInterpString << *yytext;
4166 BEGIN( yyextra->lastSkipInterpStringContext );
4169<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4170 yyextra->current->program << yytext ;
4171 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4172 yyextra->lastSkipInterpVerbStringContext=YY_START;
4173 BEGIN( SkipInterpVerbString );
4175<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4176 *yyextra->pSkipInterpVerbString << yytext;
4178<SkipInterpString>"{"[^}]*"}" {
4179 *yyextra->pSkipInterpString << yytext;
4181<SkipInterpVerbString>"{"[^}]*"}" {
4182 *yyextra->pSkipInterpVerbString << yytext;
4184<SkipInterpVerbString>\" {
4185 *yyextra->pSkipInterpVerbString << *yytext;
4186 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4188<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4189<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4190 yyextra->pSkipVerbString = &yyextra->current->program;
4191 yyextra->lastSkipVerbStringContext=YY_START;
4192 BEGIN( SkipVerbString );
4194<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4196 yyextra->current->program << yytext ;
4197 yyextra->pCopyHereDocGString = &yyextra->current->program;
4198 yyextra->lastHereDocContext=YY_START;
4199 BEGIN( CopyHereDoc );
4206<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4207 yyextra->current->program << yytext;
4209 yyextra->lastRawStringContext = YY_START;
4210 yyextra->pCopyRawGString = &yyextra->current->program;
4213<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4214 yyextra->pCopyQuotedGString = &yyextra->current->program;
4215 yyextra->lastStringContext=YY_START;
4216 yyextra->stopAtInvalidString=
false;
4217 BEGIN( CopyGString );
4219<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4220<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4221 yyextra->lastContext = YY_START ;
4224<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4225 ++yyextra->yyLineNr ;
4226 yyextra->lastContext = YY_START ;
4229<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4230 if (!yyextra->insidePHP)
4232 yyextra->current->program << yytext;
4236 yyextra->current->program << yytext;
4237 yyextra->pCopyQuotedGString = &yyextra->current->program;
4238 yyextra->lastStringContext=YY_START;
4239 BEGIN(CopyPHPGString);
4242<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4243 if (yyextra->insidePHP)
4250 yyextra->current->program << yytext;
4253<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4254 ++yyextra->curlyCount ;
4257 yyextra->current->program << yytext ;
4258 --yyextra->curlyCount ;
4260<ReadBody,ReadNSBody>"}" {
4261 if ( yyextra->curlyCount>0 )
4263 yyextra->current->program << yytext ;
4264 --yyextra->curlyCount ;
4268 yyextra->current->endBodyLine = yyextra->yyLineNr;
4269 std::shared_ptr<Entry> original_root = yyextra->current_root;
4270 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4274 QCString doc = yyextra->current->doc;
4275 int docLine = yyextra->current->docLine;
4276 QCString docFile = yyextra->current->docFile;
4277 QCString brief = yyextra->current->brief;
4278 int briefLine = yyextra->current->briefLine;
4279 QCString briefFile = yyextra->current->briefFile;
4281 yyextra->current->doc =
"";
4282 yyextra->current->docLine = 0;
4283 yyextra->current->docFile =
"";
4284 yyextra->current->brief =
"";
4285 yyextra->current->briefLine = 0;
4286 yyextra->current->briefFile =
"";
4287 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4289 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4290 yyextra->current->program.str(std::string());
4291 new_current->name = yyextra->current->name.mid(split_point + 2);
4292 yyextra->current->name = yyextra->current->name.left(split_point);
4293 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4295 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4296 yyextra->current_root = yyextra->current;
4297 yyextra->current = new_current;
4300 yyextra->current->doc = doc;
4301 yyextra->current->docLine = docLine;
4302 yyextra->current->docFile = docFile;
4303 yyextra->current->brief = brief;
4304 yyextra->current->briefLine = briefLine;
4305 yyextra->current->briefFile = briefFile;
4307 QCString &cn = yyextra->current->name;
4308 QCString rn = yyextra->current_root->name;
4314 if (yyextra->isTypedef && cn.
isEmpty())
4317 BEGIN( TypedefName );
4321 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4323 yyextra->current->program <<
',';
4328 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4329 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4331 if (yyextra->insideObjC &&
4332 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4335 BEGIN( ReadBodyIntf ) ;
4339 yyextra->memspecEntry = yyextra->current;
4340 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4341 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4342 if (yyextra->current->section.isNamespace() ||
4343 yyextra->current->spec.isInterface() ||
4344 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4345 yyextra->insideSlice
4348 yyextra->current->reset();
4349 yyextra->current_root = std::move(original_root);
4351 yyextra->memspecEntry.reset();
4352 BEGIN( FindMembers ) ;
4356 static const reg::Ex re(R
"(@\d+$)");
4357 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4358 !
reg::search(yyextra->memspecEntry->name.str(),re))
4361 yyextra->current->doc.clear();
4362 yyextra->current->brief.clear();
4364 BEGIN( MemberSpec ) ;
Class representing a regular expression.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
4370<ReadBody>"}"{BN}+"typedef"{BN}+ {
4372 if ( yyextra->curlyCount>0 )
4374 yyextra->current->program << yytext ;
4375 --yyextra->curlyCount ;
4379 yyextra->isTypedef =
TRUE;
4380 yyextra->current->endBodyLine = yyextra->yyLineNr;
4381 QCString &cn = yyextra->current->name;
4382 QCString rn = yyextra->current_root->name;
4387 BEGIN( TypedefName );
4390<TypedefName>("const"|"volatile"){BN} {
4392 yyextra->current->type.prepend(yytext);
4395 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4397 yyextra->current->program <<
",";
4399 yyextra->current->name=yytext;
4401 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4402 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4404 if (!yyextra->firstTypedefEntry)
4406 yyextra->firstTypedefEntry = yyextra->current;
4408 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4410 yyextra->isTypedef=
TRUE;
4411 BEGIN(MemberSpecSkip);
4415 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4417 yyextra->current->program <<
',';
4420 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4421 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4422 yyextra->memspecEntry = yyextra->current;
4423 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4426 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4428<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4430 int i=0,l=(int)yyleng,j;
4431 while (i<l && (!
isId(yytext[i]))) i++;
4433 j=yyextra->msName.
find(
"[");
4436 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4437 yyextra->msName=yyextra->msName.left(j);
4442 if (yyextra->firstTypedefEntry)
4444 if (yyextra->firstTypedefEntry->spec.isStruct())
4446 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4448 else if (yyextra->firstTypedefEntry->spec.isUnion())
4450 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4452 else if (yyextra->firstTypedefEntry->section.isEnum())
4454 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4458 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4464 yyextra->current->name = yyextra->msName;
4470 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4476 const Entry *p=yyextra->current.get();
4484 int pi = (i==-1) ? 0 : i+2;
4494 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4498 if (!yyextra->msName.isEmpty()
4504 if (typedefHidesStruct &&
4505 yyextra->isTypedef &&
4506 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4507 yyextra->msType.stripWhiteSpace().isEmpty() &&
4508 yyextra->memspecEntry)
4510 yyextra->memspecEntry->name=yyextra->msName;
4514 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4515 varEntry->lang = yyextra->language;
4516 varEntry->protection = yyextra->current->protection ;
4517 varEntry->mtype = yyextra->current->mtype;
4518 varEntry->virt = yyextra->current->virt;
4519 varEntry->isStatic = yyextra->current->isStatic;
4520 varEntry->section = EntryType::makeVariable();
4521 varEntry->name = yyextra->msName.stripWhiteSpace();
4522 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4523 varEntry->args = yyextra->msArgs;
4524 if (yyextra->isTypedef)
4526 varEntry->type.prepend(
"typedef ");
4529 if (typedefHidesStruct &&
4530 yyextra->isTypedef &&
4531 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4532 yyextra->memspecEntry
4535 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4539 varEntry->type+=yyextra->current->name+yyextra->msType;
4541 varEntry->fileName = yyextra->fileName;
4542 varEntry->startLine = yyextra->yyLineNr;
4543 varEntry->startColumn = yyextra->yyColNr;
4544 varEntry->doc = yyextra->current->doc;
4545 varEntry->brief = yyextra->current->brief;
4546 varEntry->mGrpId = yyextra->current->mGrpId;
4547 varEntry->initializer.str(yyextra->current->initializer.str());
4548 varEntry->groups = yyextra->current->groups;
4549 varEntry->sli = yyextra->current->sli;
4554 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4559 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4561 if (!yyextra->current->doc.isEmpty())
4563 yyextra->memspecEntry->doc += yyextra->current->doc;
4565 if (!yyextra->current->brief.isEmpty())
4567 yyextra->memspecEntry->brief += yyextra->current->brief;
4570 yyextra->msType.clear();
4571 yyextra->msName.clear();
4572 yyextra->msArgs.clear();
4573 yyextra->isTypedef=
FALSE;
4574 yyextra->firstTypedefEntry.reset();
4575 yyextra->memspecEntry.reset();
4576 yyextra->current->reset();
4578 BEGIN( FindMembers );
4582 yyextra->current->doc.clear();
4583 yyextra->current->brief.clear();
Represents an unstructured piece of information, about an entity found in the sources.
EntryType section
entry type (see Sections);
ENTRY_TYPES bool isCompound() const
char & at(size_t i)
Returns a reference to the character at index i.
int findRev(char c, int index=-1, bool cs=TRUE) const
4588 yyextra->lastInitializerContext=YY_START;
4589 yyextra->initBracketCount=0;
4590 yyextra->current->initializer.str(yytext);
4591 BEGIN(ReadInitializer);
4602<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4603<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4604<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4607<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4608 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4611 yyextra->insideObjC=
FALSE;
4612 BEGIN( FindMembers );
4614<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4615<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4617<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4618<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4619 if (yyextra->insidePHP)
4625 yyextra->current->bodyLine = yyextra->yyLineNr;
4626 yyextra->current->bodyColumn = yyextra->yyColNr;
4629 yyextra->funcPtrType=yytext;
4630 yyextra->roundCount=0;
4635<FuncPtr>{SCOPENAME} {
4636 yyextra->current->name = yytext;
4639 BEGIN( FuncPtrOperator );
4643 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4645 yyextra->funcPtrType += yyextra->current->name;
4649 BEGIN( EndFuncPtr );
4656<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4657 yyextra->current->name += yytext;
4658 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4661<FuncPtrOperator>\n {
4663 yyextra->current->name += *yytext;
4665<FuncPtrOperator>"(" {
4667 BEGIN( EndFuncPtr );
4670 yyextra->current->name += *yytext;
4672<EndFuncPtr>")"{BNopt}/";" {
4674 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4677<EndFuncPtr>")"{BNopt}/"(" {
4679 if (yyextra->funcPtrType!=
"(")
4681 yyextra->current->type+=yyextra->funcPtrType+
")";
4685<EndFuncPtr>")"{BNopt}/"[" {
4687 yyextra->current->type+=yyextra->funcPtrType;
4688 yyextra->current->args +=
")";
4693 yyextra->current->args += *yytext ;
4696 yyextra->current->bodyLine = yyextra->yyLineNr;
4697 yyextra->current->bodyColumn = yyextra->yyColNr;
4698 yyextra->currentArgumentContext = FuncFuncEnd;
4699 yyextra->fullArgString=yyextra->current->args;
4700 yyextra->copyArgString=&yyextra->current->args;
4701 BEGIN( ReadFuncArgType ) ;
4703<EndFuncPtr>"["[^\n\]]*"]" {
4704 yyextra->funcPtrType+=yytext;
4710 yyextra->current->args += *yytext ;
4711 ++yyextra->roundCount;
4714 yyextra->current->args += *yytext ;
4715 if ( yyextra->roundCount )
4716 --yyextra->roundCount;
4722<FuncFuncEnd>")"{BN}*"(" {
4724 yyextra->current->type+=yyextra->funcPtrType+
")(";
4725 BEGIN(FuncFuncType);
4727<FuncFuncEnd>")"{BNopt}/[;{] {
4729 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4732<FuncFuncEnd>")"{BNopt}/"[" {
4734 yyextra->current->type+=yyextra->funcPtrType;
4735 yyextra->current->args+=
")";
4736 BEGIN(FuncFuncArray);
4739 yyextra->current->args += *yytext;
4742 yyextra->current->type += *yytext;
4743 yyextra->roundCount++;
4746 yyextra->current->type += *yytext;
4747 if (yyextra->roundCount)
4748 --yyextra->roundCount;
4752<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4753<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4755 yyextra->current->type += *yytext;
4757<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4758 if (yyextra->current->type.startsWith(
"typedef") &&
4759 yyextra->current->bodyLine==-1)
4762 yyextra->current->bodyLine = yyextra->yyLineNr;
4763 yyextra->current->bodyColumn = yyextra->yyColNr;
4764 BEGIN( GetCallType );
4766 else if (!yyextra->current->name.isEmpty())
4768 yyextra->current->args = yytext;
4769 yyextra->current->bodyLine = yyextra->yyLineNr;
4770 yyextra->current->bodyColumn = yyextra->yyColNr;
4771 yyextra->currentArgumentContext = FuncQual;
4772 yyextra->fullArgString=yyextra->current->args;
4773 yyextra->copyArgString=&yyextra->current->args;
4774 BEGIN( ReadFuncArgType ) ;
4778<GetCallType>{BN}*{ID}{BN}*"*" {
4781 yyextra->funcPtrType=
"(";
4782 yyextra->funcPtrType+=yytext;
4783 yyextra->roundCount=0;
4787 if (!yyextra->current->name.isEmpty())
4789 yyextra->current->args = yytext;
4790 yyextra->current->bodyLine = yyextra->yyLineNr;
4791 yyextra->current->bodyColumn = yyextra->yyColNr;
4792 yyextra->currentArgumentContext = FuncQual;
4793 yyextra->fullArgString=yyextra->current->args;
4794 yyextra->copyArgString=&yyextra->current->args;
4795 BEGIN( ReadFuncArgType ) ;
4809<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4810 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4811 else yyextra->fullArgString+=yytext;
4813<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4814 yyextra->fullArgString+=yytext;
4816<CopyArgRound>[^\/\n\)\(\"\']+ {
4817 *yyextra->copyArgString+=yytext;
4818 yyextra->fullArgString+=yytext;
4820<CopyArgSquare>[^\/\n\]\[\"\']+ {
4821 *yyextra->copyArgString+=yytext;
4822 yyextra->fullArgString+=yytext;
4824<ReadFuncArgType,ReadTempArgs>{BN}* {
4825 *yyextra->copyArgString+=
" ";
4826 yyextra->fullArgString+=
" ";
4829<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4831 yyextra->lastRawStringContext = YY_START;
4832 yyextra->pCopyRawString = yyextra->copyArgString;
4833 *yyextra->pCopyRawString+=yytext;
4834 yyextra->fullArgString+=yytext;
4837<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4838 *yyextra->copyArgString+=*yytext;
4839 yyextra->fullArgString+=*yytext;
4840 yyextra->lastCopyArgStringContext = YY_START;
4841 BEGIN( CopyArgString );
4843<ReadFuncArgType>"[" {
4844 if (!yyextra->insidePHP) REJECT;
4845 *yyextra->copyArgString+=*yytext;
4846 yyextra->fullArgString+=*yytext;
4847 yyextra->argSquareCount=0;
4848 yyextra->lastCopyArgContext = YY_START;
4849 BEGIN( CopyArgSquare );
4851<ReadFuncArgType,ReadTempArgs>"(" {
4852 *yyextra->copyArgString+=*yytext;
4853 yyextra->fullArgString+=*yytext;
4854 yyextra->argRoundCount=0;
4855 yyextra->lastCopyArgContext = YY_START;
4856 BEGIN( CopyArgRound );
4858<ReadFuncArgType>")" {
4859 *yyextra->copyArgString+=*yytext;
4860 yyextra->fullArgString+=*yytext;
4862 if (yyextra->insideJS)
4873 yyextra->docBackup = yyextra->current->doc;
4874 yyextra->briefBackup = yyextra->current->brief;
4876 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4879<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4880 if (yyextra->currentArgumentContext==DefineEnd)
4884 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4890 BEGIN( yyextra->currentArgumentContext );
4896 yyextra->fullArgString+=yytext;
4897 yyextra->lastCopyArgChar=0;
4898 yyextra->lastCommentInArgContext=YY_START;
4900 BEGIN( CopyArgCommentLine );
4902 BEGIN( CopyArgComment );
4906<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4907<ReadFuncArgType,ReadTempArgs>{CCS} {
4908 yyextra->lastCContext = YY_START;
4909 BEGIN( SkipComment );
4911<ReadFuncArgType,ReadTempArgs>{CPPC} {
4912 yyextra->lastCContext = YY_START;
4913 BEGIN( SkipCxxComment );
4929<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4931 if (yyextra->currentArgumentContext==DefineEnd)
4935 int i;
for (i=(
int)yyleng-1;i>0;i--)
4939 *yyextra->copyArgString+=*yytext;
4940 yyextra->fullArgString+=*yytext;
4943 BEGIN( yyextra->currentArgumentContext );
4949 yyextra->lastCopyArgChar=*yytext;
4952 yyextra->lastCommentInArgContext=YY_START;
4953 yyextra->fullArgString+=text;
4954 if (text.
find(
"//")!=-1)
4955 BEGIN( CopyArgCommentLine );
4957 BEGIN( CopyArgComment );
4960<CopyArgComment>^{B}*"*"+/{BN}+
4961<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4962<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4963 if (yyextra->lastCopyArgChar!=0)
4964 unput(yyextra->lastCopyArgChar);
4965 BEGIN( yyextra->lastCommentInArgContext );
4967<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4969 if (yyextra->lastCopyArgChar!=0)
4970 unput(yyextra->lastCopyArgChar);
4971 BEGIN( yyextra->lastCommentInArgContext );
4973<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4974 yyextra->docBlockName=
"uml";
4975 yyextra->fullArgString+=yytext;
4976 BEGIN(CopyArgVerbatim);
4978<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4979 yyextra->docBlockName=&yytext[1];
4980 yyextra->fullArgString+=yytext;
4981 BEGIN(CopyArgVerbatim);
4983<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
4984 yyextra->docBlockName=&yytext[1];
4985 if (yyextra->docBlockName.at(1)==
'[')
4987 yyextra->docBlockName.at(1)=
']';
4989 if (yyextra->docBlockName.at(1)==
'{')
4991 yyextra->docBlockName.at(1)=
'}';
4993 if (yyextra->docBlockName.at(1)==
'(')
4995 yyextra->docBlockName.at(1)=
')';
4997 yyextra->fullArgString+=yytext;
4998 BEGIN(CopyArgVerbatim);
5000<CopyArgVerbatim>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5001 yyextra->fullArgString+=yytext;
5002 if (&yytext[4]==yyextra->docBlockName)
5004 yyextra->docBlockName=
"";
5005 BEGIN(CopyArgCommentLine);
5008<CopyArgVerbatim>[\\@]("f$"|"f]"|"f}"|"f)") {
5009 yyextra->fullArgString+=yytext;
5010 if (yyextra->docBlockName==&yytext[1])
5012 yyextra->docBlockName=
"";
5013 BEGIN(CopyArgCommentLine);
5016<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5017<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5018<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5019<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5020<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5021 warn(yyextra->fileName,yyextra->yyLineNr,
5022 "Ignoring %cbrief command inside argument documentation",*yytext
5024 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5027 *yyextra->copyArgString+=*yytext;
5028 yyextra->fullArgString+=*yytext;
5029 yyextra->argSharpCount=1;
5030 BEGIN( CopyArgSharp );
5033 *yyextra->copyArgString+=*yytext;
5034 yyextra->fullArgString+=*yytext;
5036 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5037 BEGIN( yyextra->currentArgumentContext );
5040 yyextra->argRoundCount++;
5041 *yyextra->copyArgString+=*yytext;
5042 yyextra->fullArgString+=*yytext;
5045 *yyextra->copyArgString+=*yytext;
5046 yyextra->fullArgString+=*yytext;
5047 if (yyextra->argRoundCount>0)
5048 yyextra->argRoundCount--;
5050 BEGIN( yyextra->lastCopyArgContext );
5053 yyextra->argSquareCount++;
5054 *yyextra->copyArgString+=*yytext;
5055 yyextra->fullArgString+=*yytext;
5058 *yyextra->copyArgString+=*yytext;
5059 yyextra->fullArgString+=*yytext;
5060 if (yyextra->argSquareCount>0)
5061 yyextra->argSquareCount--;
5063 BEGIN( yyextra->lastCopyArgContext );
5066 *yyextra->copyArgString+=*yytext;
5067 yyextra->fullArgString+=*yytext;
5068 yyextra->argRoundCount=0;
5069 yyextra->lastCopyArgContext = YY_START;
5070 BEGIN( CopyArgRound );
5073 yyextra->argSharpCount++;
5075 *yyextra->copyArgString+=*yytext;
5076 yyextra->fullArgString+=*yytext;
5079 *yyextra->copyArgString+=*yytext;
5080 yyextra->fullArgString+=*yytext;
5081 yyextra->argSharpCount--;
5082 if (yyextra->argSharpCount>0)
5088 BEGIN( ReadTempArgs );
5092<CopyArgString,CopyArgPHPString>\\. {
5093 *yyextra->copyArgString+=yytext;
5094 yyextra->fullArgString+=yytext;
5097 *yyextra->copyArgString+=*yytext;
5098 yyextra->fullArgString+=*yytext;
5099 BEGIN( yyextra->lastCopyArgStringContext );
5101<CopyArgPHPString>\' {
5102 *yyextra->copyArgString+=*yytext;
5103 yyextra->fullArgString+=*yytext;
5104 BEGIN( yyextra->lastCopyArgStringContext );
5106<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5107 if (yyextra->insidePHP)
5113 *yyextra->copyArgString+=yytext;
5114 yyextra->fullArgString+=yytext;
5117<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5118 *yyextra->copyArgString+=yytext;
5119 yyextra->fullArgString+=yytext;
5120 if (yyextra->insidePHP)
5122 yyextra->lastCopyArgStringContext=YY_START;
5123 BEGIN(CopyArgPHPString);
5126<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5127 *yyextra->copyArgString+=yytext;
5128 yyextra->fullArgString+=yytext;
5130<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5132 *yyextra->copyArgString+=*yytext;
5133 yyextra->fullArgString+=*yytext;
5135<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5136 *yyextra->copyArgString+=yytext;
5137 yyextra->fullArgString+=yytext;
5139<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5140 *yyextra->copyArgString+=*yytext;
5141 yyextra->fullArgString+=*yytext;
5149<FuncRound>"(" { yyextra->current->args += *yytext ;
5150 ++yyextra->roundCount ;
5152<FuncRound>")" { yyextra->current->args += *yytext ;
5153 if ( yyextra->roundCount )
5154 --yyextra->roundCount ;
5166 if (
qstrcmp(yytext,
";")==0 &&
5167 ((yyextra->insideJS || yyextra->insidePHP) &&
5170 yyextra->current->reset();
5172 BEGIN( FindMembers );
5176 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5179<FuncQual>{BN}*"abstract"{BN}* {
5182 yyextra->current->args +=
" override ";
5184<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5186 yyextra->current->spec.setOverride(
true);
5187 yyextra->current->args +=
" override ";
5190<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5192 yyextra->current->spec.setFinal(
true);
5193 yyextra->current->args +=
" final ";
5196<FuncQual>{BN}*"sealed"{BN}* {
5198 yyextra->current->spec.setSealed(
true);
5199 yyextra->current->args +=
" sealed ";
5201<FuncQual>{BN}*"new"{BN}* {
5203 yyextra->current->spec.setNew(
true);
5204 yyextra->current->args +=
" new ";
5206<FuncQual>{BN}*"const"{BN}* {
5208 yyextra->current->args +=
" const ";
5209 yyextra->current->argList.setConstSpecifier(
TRUE);
5211<FuncQual>{BN}*"volatile"{BN}* {
5213 yyextra->current->args +=
" volatile ";
5214 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5216<FuncQual>{BN}*"noexcept"{BN}* {
5218 yyextra->current->args +=
" noexcept ";
5219 yyextra->current->spec.setNoExcept(
true);
5221<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5223 yyextra->current->args +=
" noexcept(false)";
5225<FuncQual>{BN}*"noexcept"{BN}*"(" {
5227 yyextra->current->args +=
" noexcept(";
5228 yyextra->current->spec.setNoExcept(
true);
5229 yyextra->lastRoundContext=FuncQual;
5230 yyextra->pCopyRoundString=&yyextra->current->args;
5231 yyextra->roundCount=0;
5235 yyextra->current->args +=
" &";
5238<FuncQual>{BN}*"&&" {
5239 yyextra->current->args +=
" &&";
5243<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5245 yyextra->current->args +=
" = 0";
5247 yyextra->current->argList.setPureSpecifier(
TRUE);
5250<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5252 yyextra->current->args +=
" = delete";
5253 yyextra->current->spec.setDelete(
true);
5254 yyextra->current->argList.setIsDeleted(
TRUE);
5257<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5259 yyextra->current->args +=
" = default";
5260 yyextra->current->spec.setDefault(
true);
5263<FuncQual>{BN}*"->"{BN}* {
5265 yyextra->current->argList.setTrailingReturnType(
" -> ");
5266 yyextra->current->args +=
" -> ";
5267 yyextra->roundCount=0;
5268 BEGIN(TrailingReturn);
5270<TrailingReturn>[{;] {
5271 if (yyextra->roundCount>0) REJECT;
5275<TrailingReturn>"requires"{BN}+ {
5276 if (yyextra->insideJava) REJECT;
5277 yyextra->requiresContext = FuncQual;
5278 yyextra->current->req+=
' ';
5279 BEGIN(RequiresClause);
5281<TrailingReturn>"(" {
5282 yyextra->roundCount++;
5283 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5284 yyextra->current->args+=yytext;
5286<TrailingReturn>")" {
5287 if (yyextra->roundCount>0)
5289 yyextra->roundCount--;
5293 warn(yyextra->fileName,yyextra->yyLineNr,
5294 "Found ')' without opening '(' for trailing return type '%s)...'",
5295 qPrint(yyextra->current->argList.trailingReturnType()));
5297 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5298 yyextra->current->args+=yytext;
const char * qPrint(const char *s)
5301 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5302 yyextra->current->args+=yytext;
5306 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5307 yyextra->current->args+=
' ';
5309<FuncRound,FuncFunc>{BN}*","{BN}* {
5311 yyextra->current->args +=
", " ;
5313<FuncQual,FuncRound,FuncFunc>{BN}+ {
5315 yyextra->current->args +=
' ' ;
5317<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5319 yyextra->lastCPPContext = YY_START;
5323 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5330 yyextra->lastInitializerContext=YY_START;
5331 yyextra->initBracketCount=0;
5332 yyextra->current->initializer.str(yytext);
5333 BEGIN(ReadInitializer);
5348 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5351 yyextra->requiresContext = YY_START;
5352 yyextra->current->req+=
' ';
5353 BEGIN(RequiresClause);
5355 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5358 yyextra->current->typeConstr.clear();
5359 yyextra->current->typeConstr.push_back(
Argument());
5360 yyextra->lastCSConstraint = YY_START;
5361 BEGIN( CSConstraintName );
5365 yyextra->current->args = yytext;
5366 yyextra->oldStyleArgType.clear();
5367 BEGIN(OldStyleArgs);
5371 yyextra->current->args += yytext;
5377 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5379 if (yyextra->current->doc!=yyextra->docBackup)
5381 doc=yyextra->current->doc;
5382 yyextra->current->doc=yyextra->docBackup;
5384 if (yyextra->current->brief!=yyextra->briefBackup)
5386 brief=yyextra->current->brief;
5387 yyextra->current->brief=yyextra->briefBackup;
5389 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5390 oldStyleArgName,brief,doc);
5391 yyextra->current->args.clear();
5392 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5394<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5396 if (yyextra->current->argList.empty())
5398 yyextra->current->argList.setNoParameters(
TRUE);
5404<OldStyleArgs>. { yyextra->current->args += *yytext; }
5405<FuncQual,FuncRound,FuncFunc>\" {
5406 if (yyextra->insideIDL && yyextra->insideCppQuote)
5412 yyextra->current->args += *yytext;
5415<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5416<FuncQual>{BN}*"try:" |
5417<FuncQual>{BN}*"try"{BN}+ {
5418 yyextra->insideTryBlock=
TRUE;
5420 if (yytext[yyleng-1]==
':')
5426<FuncQual>{BN}*"throw"{BN}*"(" {
5427 yyextra->current->exception =
" throw (" ;
5428 yyextra->roundCount=0;
5430 BEGIN( ExcpRound ) ;
5432<FuncQual>{BN}*"raises"{BN}*"(" {
5433 yyextra->current->exception =
" raises (" ;
5435 yyextra->roundCount=0;
5436 BEGIN( ExcpRound ) ;
5438<FuncQual>{BN}*"throws"{BN}+ {
5439 yyextra->current->exception =
" throws " ;
5443<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5444 ++yyextra->roundCount ;
5446<ExcpRound>")" { yyextra->current->exception += *yytext ;
5447 if ( yyextra->roundCount )
5448 --yyextra->roundCount ;
5453 yyextra->current->exception += *yytext;
5456 unput(
'{'); BEGIN( FuncQual );
5459 unput(
';'); BEGIN( FuncQual );
5462 yyextra->current->exception +=
' ';
5466 yyextra->current->exception += *yytext;
5468<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5469 yyextra->current->name = yyextra->current->args ;
5470 yyextra->current->args = yytext ;
5471 yyextra->roundCount=0;
5472 BEGIN( FuncRound ) ;
5475 if (!yyextra->insidePHP) BEGIN(SkipInits);
5481 yyextra->current->fileName = yyextra->fileName;
5482 yyextra->current->startLine = yyextra->yyBegLineNr;
5483 yyextra->current->startColumn = yyextra->yyBegColNr;
5484 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5486 std::string type = yyextra->current->type.str();
5490 ti = (int)
match.position();
5494 int di = yyextra->current->type.find(
"decltype(");
5495 if (di!=-1 && di<ti)
5500 int ts=yyextra->current->type.find(
'<');
5501 int te=yyextra->current->type.findRev(
'>');
5504 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5505 bool isFunction = ti==-1 ||
5506 (ts!=-1 && ts<te && ts<ti && ti<te);
5507 bool isVariable = !yyextra->current->type.isEmpty() &&
5508 (!isFunction || startsWithTypedef);
5513 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5518 if (yyextra->isTypedef && !startsWithTypedef)
5520 yyextra->current->type.prepend(
"typedef ");
5522 yyextra->current->section = EntryType::makeVariable() ;
5527 yyextra->current->section = EntryType::makeFunction() ;
5528 yyextra->current->proto = *yytext==
';';
5536 if (yyextra->isTypedef && !startsWithTypedef)
5538 yyextra->current->type.prepend(
"typedef ");
5541 yyextra->current->section = EntryType::makeVariable();
5546 yyextra->current->section = EntryType::makeFunction();
5547 yyextra->current->proto =
TRUE;
5551 if ( yyextra->insidePHP)
5555 yyextra->current->spec.setFinal(
true);
5559 yyextra->current->spec.setAbstract(
true);
5562 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5565 if ( *yytext ==
'{' )
5567 yyextra->lastCurlyContext = FindMembers;
5568 yyextra->curlyCount=0;
5573 BEGIN( FindMembers );
5578 if ( yyextra->insidePHP)
5582 yyextra->previous = yyextra->current;
5583 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5586 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5588 yyextra->current->spec.setOptional(
true).setRequired(
true);
5590 yyextra->lastCurlyContext = FindMembers;
5591 if ( *yytext ==
',' )
5593 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5595 if ( *yytext ==
'{' )
5597 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5599 yyextra->previous->spec.setInline(
true);
5602 yyextra->curlyCount=0;
5603 BEGIN( SkipCurly ) ;
5607 if (!yyextra->previous->section.isVariable())
5608 yyextra->previous->bodyLine=-1;
5609 BEGIN( FindMembers ) ;
Object representing the matching results.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
5613<SkipInits>">"{BN}*"{" {
5615 yyextra->curlyCount=1;
5616 BEGIN(SkipC11Inits);
5618<SkipInits>{ID}{BN}*"{" {
5620 yyextra->curlyCount=1;
5621 BEGIN(SkipC11Inits);
5624 ++yyextra->curlyCount;
5627 if ( --yyextra->curlyCount<=0 )
5632<SkipC11Attribute>"]]" {
5633 BEGIN(yyextra->lastC11AttributeContext);
5641 ++yyextra->curlyCount ;
5643<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5646 if( yyextra->curlyCount )
5648 --yyextra->curlyCount ;
5652 if (!yyextra->current->sli.empty() && yyextra->previous)
5654 yyextra->previous->sli = yyextra->current->sli;
5655 yyextra->current->sli.clear();
5657 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5658 BEGIN( yyextra->lastCurlyContext ) ;
5661<SkipCurly>"}"{BN}*{DCOMM}"<" {
5663 if ( yyextra->curlyCount )
5666 --yyextra->curlyCount ;
5670 yyextra->current->endBodyLine=yyextra->yyLineNr;
5671 yyextra->tempEntry = yyextra->current;
5672 yyextra->current = yyextra->previous;
5674 yyextra->docBlockContext = SkipCurlyEndDoc;
5675 yyextra->docBlockInBody =
FALSE;
5676 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5678 yyextra->docBlock.str(std::string());
5679 yyextra->docBlockTerm =
'}';
5680 if (yytext[yyleng-3]==
'/')
5692<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5693 yyextra->docBlockContext = SkipCurlyEndDoc;
5694 yyextra->docBlockInBody =
FALSE;
5695 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5697 yyextra->docBlock.str(std::string());
5698 yyextra->docBlockTerm =
'}';
5699 if (yytext[yyleng-3]==
'/')
5710<SkipCurlyEndDoc>"}" {
5712 if (yyextra->tempEntry)
5714 yyextra->current = yyextra->tempEntry;
5715 yyextra->tempEntry.reset();
5717 BEGIN( yyextra->lastCurlyContext );
5721 yyextra->lastStringContext=SkipCurly;
5722 BEGIN( SkipString );
5724<SkipCurly>^{B}*"#" {
5725 if (yyextra->insidePHP)
5728 BEGIN( SkipCurlyCpp );
5730<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5734<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5735 if (!yyextra->insidePHP)
5741 yyextra->lastHereDocContext = YY_START;
5745<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5747 yyextra->lastRawStringContext = YY_START;
5748 yyextra->dummyRawString.clear();
5749 yyextra->pCopyRawString = &yyextra->dummyRawString;
5750 *yyextra->pCopyRawString += yytext;
5753<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<\$]+ {
5757<SkipCurly,SkipCurlyCpp>"\$" {}
5761 yyextra->lastCurlyContext = FindMembers;
5764<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5768<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5770 yyextra->lastCContext = YY_START;
5773<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5775 yyextra->lastCContext = YY_START;
5776 BEGIN(SkipCxxComment);
5778<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5779 yyextra->roundCount=0;
5780 yyextra->lastSkipRoundContext=YY_START;
5783<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5784 yyextra->lastStringContext=YY_START;
5785 BEGIN( SkipString );
5788 warn(yyextra->fileName,yyextra->yyLineNr,
5789 "Found ';' while parsing initializer list! "
5790 "(doxygen could be confused by a macro call without semicolon)"
5792 BEGIN( FindMembers );
5794<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5795 if (!yyextra->insidePHP)
5798 yyextra->lastCContext = YY_START;
5799 BEGIN(SkipCxxComment);
5801<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5802 if (!yyextra->insideCS) REJECT;
5805 yyextra->lastSkipVerbStringContext=YY_START;
5806 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5807 yyextra->dummyTextStream.clear();
5808 BEGIN(SkipVerbString);
5810<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5811 if (yyextra->insidePHP) REJECT;
5813<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5814 if (yyextra->insidePHP)
5816 yyextra->lastStringContext=YY_START;
5817 BEGIN(SkipPHPString);
5820<SkipC11Attribute>{ID} {
5823 yyextra->current->spec.setNoDiscard(
true);
5826<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5827<SkipString,SkipPHPString>\\. { }
5829 BEGIN( yyextra->lastStringContext );
5832 BEGIN( yyextra->lastStringContext );
5834<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5835<SkipString,SkipPHPString>\n {
5839<SkipString,SkipPHPString>. { }
5845 yyextra->current->section = EntryType::makeEmpty() ;
5846 yyextra->current->type.clear() ;
5847 yyextra->current->name.clear() ;
5848 yyextra->current->args.clear() ;
5849 yyextra->current->argList.clear();
5850 BEGIN( FindMembers ) ;
5853 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5857 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5861 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5863 if (!yyextra->baseName.isEmpty())
5865 yyextra->current->extends.emplace_back(
5867 yyextra->baseName.clear();
5869 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5874 yyextra->current->section = EntryType::makeEmpty() ;
5875 yyextra->current->type.clear() ;
5876 yyextra->current->name.clear() ;
5877 yyextra->current->args.clear() ;
5878 yyextra->current->argList.clear();
5880 BEGIN( FindMembers ) ;
5882<CompoundName>{SCOPENAME}/{BN}*"<" {
5883 yyextra->sharpCount = 0;
5884 yyextra->current->name = yytext ;
5885 if (yyextra->current->spec.isProtocol())
5887 yyextra->current->name+=
"-p";
5890 yyextra->lastClassTemplSpecContext = ClassVar;
5891 if (yyextra->insideObjC)
5893 BEGIN( ObjCProtocolList );
5895 else if (yyextra->insideCS)
5902 yyextra->roundCount=0;
5903 BEGIN( ClassTemplSpec );
5910 yyextra->current->tArgLists.
push_back(al);
5911 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5912 yyextra->templateStr=
"<";
5913 yyextra->current->name +=
"<";
5914 yyextra->fullArgString = yyextra->templateStr;
5915 yyextra->copyArgString = &yyextra->current->name;
5917 yyextra->currentArgumentContext = ClassVar;
5918 BEGIN( ReadTempArgs );
5920<ObjCProtocolList>"<" {
5921 yyextra->insideProtocolList=
TRUE;
5924<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5925 yyextra->current->name += yytext;
5927 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5930 if (yyextra->current->spec.isProtocol())
5937 BEGIN( yyextra->lastClassTemplSpecContext );
5941<ClassTemplSpec>"<" {
5942 yyextra->current->name += yytext;
5943 if (yyextra->roundCount==0) yyextra->sharpCount++;
5946 yyextra->current->name += yytext;
5948<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5949 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5953 yyextra->current->name =
substitute(yytext,
".",
"::");
5954 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5959 else if (!yyextra->current->tArgLists.empty())
5963 yyextra->current->name = yytext;
5964 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5966 QCString rn = yyextra->current_root->name;
5968 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5972 yyextra->current->spec.setForwardDecl(
true);
5973 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5975 else if (yyextra->insideIDL &&
5976 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
5977 yyextra->current->spec.isInterface()) ||
5978 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
5979 yyextra->current->spec.isService())
5987 yyextra->current->name = yytext;
5988 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5989 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
5992 yyextra->current->spec.setInterface(
false).setService(
false);
5996 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5999 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6002 yyextra->current->reset();
6004 if (yyextra->insideObjC)
6007 yyextra->insideObjC =
FALSE;
6009 if (yyextra->isTypedef)
6011 yyextra->current->type.prepend(
"typedef");
6013 BEGIN( FindMembers );
Wrapper class for the Entry type.
6016<CompoundName>{SCOPENAME}/{BN}*"(" {
6017 yyextra->current->name = yytext ;
6019 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6021 yyextra->lastAlignAsContext = YY_START;
6026 if (yyextra->current->spec.isProtocol())
6028 yyextra->current->name +=
"-p";
6033<AlignAs>"(" { yyextra->roundCount=0;
6034 BEGIN( AlignAsEnd );
6038<AlignAsEnd>"(" { yyextra->roundCount++; }
6039<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6041 BEGIN( yyextra->lastAlignAsContext );
6047 yyextra->current->name = yytext ;
6050 yyextra->current->bodyLine = yyextra->yyLineNr;
6051 yyextra->current->bodyColumn = yyextra->yyColNr;
6052 yyextra->current->initializer.str(std::string());
6053 yyextra->lastInitializerContext = FindMembers;
6054 yyextra->initBracketCount=0;
6055 BEGIN(ReadInitializer);
6057<CompoundName>{SCOPENAME}/{BN}*"," {
6059 yyextra->current->reset();
6062<CompoundName>{SCOPENAME} {
6063 yyextra->current->name = yytext ;
6066 if (yyextra->current->spec.isProtocol())
6068 yyextra->current->name +=
"-p";
6070 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6076<CompoundName>{CSSCOPENAME} {
6077 yyextra->current->name =
substitute(yytext,
".",
"::");
6081<ClassVar>{SCOPENAME}{BNopt}/"(" {
6082 if (yyextra->insideIDL &&
qstrncmp(yytext,
"switch",6)==0 && !
isId(yytext[6]))
6085 yyextra->roundCount=0;
6086 BEGIN(SkipUnionSwitch);
6091 yyextra->yyBegColNr=yyextra->yyColNr;
6092 yyextra->yyBegLineNr=yyextra->yyLineNr;
6093 yyextra->current->name = yytext;
6094 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6096 BEGIN( FindMembers );
6100 if (yyextra->isTypedef)
6104 yyextra->current->type.prepend(
"typedef ");
6112<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6113 if (yyextra->insideCli)
6116 yyextra->current->spec.setSealedClass(
true);
6118 yyextra->current->spec.setAbstractClass(
true);
6126<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6127 yyextra->yyBegColNr=yyextra->yyColNr;
6128 yyextra->yyBegLineNr=yyextra->yyLineNr;
6131 if (yyextra->current->section.isEnum())
6133 yyextra->current->section = EntryType::makeVariable() ;
6135 yyextra->current->type +=
' ' ;
6136 yyextra->current->type += yyextra->current->name ;
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6145 yyextra->yyBegColNr=yyextra->yyColNr;
6146 yyextra->yyBegLineNr=yyextra->yyLineNr;
6148 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6151 yyextra->roundCount=0;
6152 BEGIN(SkipUnionSwitch);
6154 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6156 yyextra->current->type.clear();
6159 yyextra->baseName.clear();
6160 BEGIN( BasesProt ) ;
6162 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6164 yyextra->current->typeConstr.clear();
6165 yyextra->current->typeConstr.push_back(
Argument());
6166 yyextra->lastCSConstraint = YY_START;
6167 BEGIN( CSConstraintName );
6169 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6171 yyextra->current->spec.setAbstract(
true);
6173 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6175 yyextra->current->spec.setSealed(
true);
6177 else if (
qstrcmp(yytext,
"final")==0)
6179 yyextra->current->spec.setFinal(
true);
6183 if (yyextra->current->section.isEnum())
6185 yyextra->current->section = EntryType::makeVariable() ;
6187 yyextra->current->type +=
' ' ;
6188 yyextra->current->type += yyextra->current->name ;
6189 yyextra->current->name = yytext ;
6198 if (yyextra->insideObjC && *yytext==
'(')
6200 yyextra->current->name+=
'(';
6203 yyextra->current->spec.setCategory(
true);
6205 BEGIN( ClassCategory );
6211 BEGIN( FindMembers );
6214<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6215<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6216 yyextra->fullArgString.clear();
6217 yyextra->lastCopyArgChar=
'#';
6218 yyextra->lastCommentInArgContext=YY_START;
6220 BEGIN( CopyArgCommentLine );
6222 BEGIN( CopyArgComment );
6224<CSConstraintType,CSConstraintName>"#" {
6225 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6227<CSConstraintType>"=>" {
6232 BEGIN( yyextra->lastCSConstraint );
6234<CSConstraintType>"{" {
6238 BEGIN( yyextra->lastCSConstraint );
6240<CSConstraintType,CSConstraintName>";" {
6243 BEGIN( yyextra->lastCSConstraint );
6245<CSConstraintName>":" {
6246 BEGIN( CSConstraintType );
6248<CSConstraintName>{ID} {
6250 yyextra->current->typeConstr.back().name=yytext;
6252<CSConstraintType>"where" {
6253 yyextra->current->typeConstr.push_back(
Argument());
6254 BEGIN( CSConstraintName );
6256<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6257 if (yyextra->current->typeConstr.back().type.isEmpty())
6260 yyextra->current->typeConstr.back().type=yytext;
6264 QCString name = yyextra->current->typeConstr.back().name;
6265 yyextra->current->typeConstr.push_back(
Argument());
6266 yyextra->current->typeConstr.back().name=name;
6267 yyextra->current->typeConstr.back().type=yytext;
6270<CSConstraintName,CSConstraintType>\n {
6273<CSConstraintName,CSConstraintType>. {
6275<ClassCategory>{ID} {
6276 yyextra->current->name+=yytext;
6278<ClassCategory>")"/{BN}*"{" {
6279 yyextra->current->name+=
')';
6282<ClassCategory>")"/{BN}*"<" {
6283 yyextra->current->name+=
')';
6284 BEGIN( ObjCProtocolList );
6287 yyextra->current->name+=
')';
6288 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6300 if (yyextra->current->section.isVariable())
6302 yyextra->current->bitfields+=
":";
6303 yyextra->current->args.clear();
6306 else if (yyextra->current->section.isEnum())
6309 yyextra->current->args.clear();
6310 BEGIN(EnumBaseType);
6314 yyextra->current->type.clear();
6315 if (yyextra->current->spec.isInterface() ||
6316 yyextra->current->spec.isStruct() ||
6317 yyextra->current->spec.isRef() ||
6318 yyextra->current->spec.isValue() ||
6319 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6329 yyextra->baseName.clear();
6330 BEGIN( BasesProt ) ;
6334 if (yyextra->isTypedef)
6336 yyextra->current->type.prepend(
"typedef");
6338 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6340 yyextra->current->section = EntryType::makeVariable() ;
6342 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6344 yyextra->current->reset();
6351 BEGIN( FindMembers );
6353<Bases,ClassVar>{CPPC}"/"/[^/] {
6354 if (!yyextra->insideObjC)
6361 yyextra->current->program << yytext;
6362 yyextra->current->fileName = yyextra->fileName ;
6363 yyextra->current->startLine = yyextra->yyLineNr ;
6364 yyextra->current->startColumn = yyextra->yyColNr;
6365 yyextra->curlyCount=0;
6366 BEGIN( ReadBodyIntf );
6369<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6370<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6371<Bases,ClassVar>{CPPC}"!" |
6372<Bases,ClassVar>[\-+]{BN}* {
6373 if (!yyextra->insideObjC)
6380 yyextra->current->program << yytext;
6381 yyextra->current->fileName = yyextra->fileName ;
6382 yyextra->current->startLine = yyextra->yyLineNr ;
6383 yyextra->current->startColumn = yyextra->yyColNr;
6384 yyextra->curlyCount=0;
6385 BEGIN( ReadBodyIntf );
6388<CompoundName,ClassVar>{B}*"{"{B}* {
6389 yyextra->current->program.str(std::string());
6390 yyextra->current->fileName = yyextra->fileName ;
6391 yyextra->current->bodyLine = yyextra->yyLineNr;
6392 yyextra->current->bodyColumn = yyextra->yyColNr;
6394 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6396 if (yyextra->current->section.isNamespace())
6400 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6412 yyextra->curlyCount=0;
6413 if (yyextra->current_root &&
6414 !yyextra->current_root->spec.isInterface() &&
6415 (yyextra->current->spec.isInterface() ||
6416 yyextra->current->spec.isProtocol() ||
6417 yyextra->current->spec.isCategory() ||
6418 yyextra->current->section.isObjcImpl()
6423 BEGIN( ReadBodyIntf );
6425 else if (yyextra->current->section.isNamespace())
6427 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6439<BasesProt>{BN} {
lineCount(yyscanner); }
6440<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6441<Bases>"decltype"{BN}*"(" {
6443 yyextra->roundCount=0;
6444 yyextra->lastSkipRoundContext=YY_START;
6447<Bases>("\\")?({ID}"\\")*{ID} {
6448 if (!yyextra->insidePHP)
6457 yyextra->baseName += bn;
6458 yyextra->current->args +=
' ';
6459 yyextra->current->args += yytext;
6462<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6468 yyextra->current->typeConstr.clear();
6469 yyextra->current->typeConstr.push_back(
Argument());
6470 yyextra->lastCSConstraint = YY_START;
6471 BEGIN( CSConstraintName );
6475 yyextra->baseName+=yytext;
6476 yyextra->current->args +=
' ';
6477 yyextra->current->args += yytext;
6480<Bases>{BN}*{ID}("."{ID})* {
6482 yyextra->baseName += name;
6483 yyextra->current->args +=
' ';
6484 yyextra->current->args += name;
6486<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6487 if (!yyextra->insideObjC)
6497<ClassVar,Bases>"@end" {
6505<ClassVar>"<" { yyextra->current->name += *yytext;
6506 yyextra->sharpCount=1;
6507 yyextra->roundCount=0;
6508 yyextra->lastSkipSharpContext = YY_START;
6509 yyextra->specName = &yyextra->current->name;
6510 BEGIN ( Specialization );
6514 yyextra->sharpCount=1;
6515 yyextra->roundCount=0;
6516 yyextra->lastSkipSharpContext = YY_START;
6517 if (yyextra->insideObjC)
6527 yyextra->templateStr = yytext;
6528 yyextra->specName = &yyextra->templateStr;
6529 BEGIN ( Specialization );
6532<Specialization>"<" { *yyextra->specName += *yytext;
6533 if (yyextra->roundCount==0) yyextra->sharpCount++;
6535<Specialization>">" {
6536 *yyextra->specName += *yytext;
6537 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6540 BEGIN(yyextra->lastSkipSharpContext);
6543<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6544<Specialization>"<<" { *yyextra->specName += yytext; }
6545<Specialization>">>"/{B}*"::" {
6550<Specialization>">>" {
6551 if (yyextra->insideCS)
6561 if (yyextra->roundCount>0)
6563 *yyextra->specName += yytext;
6573<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6574<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6575<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6577<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6578<Specialization>"\\'" { *yyextra->specName += *yytext;}
6579<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6580<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6581<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6582<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6583<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6584<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6585<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6586<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6587<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6590 *yyextra->specName += *yytext;
6592<SkipRound>"(" { ++yyextra->roundCount; }
6593<SkipRound>")" {
if (--yyextra->roundCount<0)
6594 BEGIN ( yyextra->lastSkipRoundContext );
6597 yyextra->lastStringContext=SkipRound;
6600<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6601 if (yyextra->insideProtocolList)
6603 yyextra->baseName+=
"-p";
6607 yyextra->current->args +=
',' ;
6610 if (!yyextra->baseName.isEmpty())
6612 yyextra->current->extends.emplace_back(
6613 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6616 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6617 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6618 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6627 yyextra->baseName.clear();
6630 yyextra->insideProtocolList=
FALSE;
6642 if (*yytext==
',' && yyextra->insideObjC)
6644 yyextra->insideProtocolList=
TRUE;
6650 yyextra->current->program.str(std::string());
6651 yyextra->current->fileName = yyextra->fileName ;
6652 yyextra->current->bodyLine = yyextra->yyLineNr;
6653 yyextra->current->bodyColumn = yyextra->yyColNr;
6655 if (!yyextra->baseName.isEmpty())
6656 yyextra->current->extends.emplace_back(
6657 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6659 yyextra->curlyCount=0;
6660 if (yyextra->insideObjC)
6662 BEGIN( ReadBodyIntf );
6669<SkipUnionSwitch>{B}*"(" {
6670 yyextra->roundCount++;
6672<SkipUnionSwitch>")" {
6673 if (--yyextra->roundCount==0)
6678<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6680<Comment>{BN}+ { yyextra->current->program << yytext ;
6683<Comment>{CCS} { yyextra->current->program << yytext ; }
6684<Comment>{CPPC} { yyextra->current->program << yytext ; }
6685<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6686 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6687 yyextra->current->program << yytext ;
6689<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6690 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6691 yyextra->current->program << yytext ;
6693<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6694<Comment>{CCE} { yyextra->current->program << yytext ;
6695 if (!yyextra->insideCode)
6697 yyextra->doxygenComment=
false;
6698 BEGIN( yyextra->lastContext );
6701<Comment>. { yyextra->current->program << *yytext ; }
6703<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6705 if (!yyextra->current->doc.isEmpty())
6707 yyextra->current->doc+=
"\n\n";
6711 yyextra->current->docLine = yyextra->yyLineNr;
6712 yyextra->current->docFile = yyextra->fileName;
6715 yyextra->lastDocContext = YY_START;
6716 if (yyextra->current_root->section.isScope())
6718 yyextra->current->inside = yyextra->current_root->name+
"::";
6720 yyextra->docBlockContext = YY_START;
6721 yyextra->docBlockInBody = YY_START==SkipCurly;
6726 yyextra->docBlock.str(indent.
str());
6728 if (yyextra->docBlockAutoBrief)
6730 yyextra->current->briefLine = yyextra->yyLineNr;
6731 yyextra->current->briefFile = yyextra->fileName;
6736<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6742 yyextra->lastDocContext = YY_START;
6745 if (yyextra->current_root->section.isScope())
6747 yyextra->current->inside = yyextra->current_root->name+
"::";
6749 yyextra->current->docLine = yyextra->yyLineNr;
6750 yyextra->current->docFile = yyextra->fileName;
6751 yyextra->docBlockContext = YY_START;
6752 yyextra->docBlockInBody = YY_START==SkipCurly;
6754 yyextra->docBlockAutoBrief = javadocAutoBrief;
6758 yyextra->docBlock.str(indent.
str());
6760 if (yyextra->docBlockAutoBrief)
6762 yyextra->current->briefLine = yyextra->yyLineNr;
6763 yyextra->current->briefFile = yyextra->fileName;
6770 yyextra->current->program << yytext ;
6771 yyextra->lastContext = YY_START ;
6772 yyextra->doxygenComment=
true;
6776<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6781<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6782 yyextra->lastDocContext = YY_START;
6785 if (yyextra->current_root->section.isScope())
6787 yyextra->current->inside = yyextra->current_root->name+
"::";
6789 yyextra->current->docLine = yyextra->yyLineNr;
6790 yyextra->current->docFile = yyextra->fileName;
6791 yyextra->docBlockContext = YY_START;
6792 yyextra->docBlockInBody = YY_START==SkipCurly;
6794 yyextra->docBlockAutoBrief = javadocAutoBrief;
6798 yyextra->docBlock.str(indent.
str());
6800 if (yyextra->docBlockAutoBrief)
6802 yyextra->current->briefLine = yyextra->yyLineNr;
6803 yyextra->current->briefFile = yyextra->fileName;
6808<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6809 yyextra->lastDocContext = YY_START;
6810 if (yyextra->current_root->section.isScope())
6812 yyextra->current->inside = yyextra->current_root->name+
"::";
6814 yyextra->docBlockContext = YY_START;
6815 yyextra->docBlockInBody = YY_START==SkipCurly;
6816 yyextra->docBlockAutoBrief =
FALSE;
6820 yyextra->docBlock.str(indent.
str());
6825<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6826 yyextra->lastDocContext = YY_START;
6827 if (yyextra->current_root->section.isScope())
6829 yyextra->current->inside = yyextra->current_root->name+
"::";
6831 yyextra->docBlockContext = YY_START;
6832 yyextra->docBlockInBody = YY_START==SkipCurly;
6833 yyextra->docBlockAutoBrief =
FALSE;
6836 yyextra->docBlock.str(indent.
str());
6840<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6842 yyextra->externLinkage=
TRUE;
6845 if (yyextra->externLinkage)
6847 yyextra->externLinkage=
FALSE;
6849 else if (yyextra->insideCS &&
6850 !yyextra->current->name.isEmpty() &&
6851 !yyextra->current->type.isEmpty())
6865 yyextra->current->bodyLine = yyextra->yyLineNr;
6866 yyextra->current->bodyColumn = yyextra->yyColNr;
6867 yyextra->curlyCount=0;
6868 BEGIN( CSAccessorDecl );
6870 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6874 yyextra->current->exception =
" {";
6875 BEGIN(UNOIDLAttributeBlock);
6879 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6880 yyextra->current->name.isEmpty()
6884 yyextra->needsSemi =
FALSE;
6885 if (yyextra->current->isStatic)
6887 yyextra->current->name=
"[static initializer]";
6888 yyextra->current->type.clear();
6892 yyextra->current->name=
"[instance initializer]";
6909 yyextra->current->bodyLine = yyextra->yyLineNr;
6910 yyextra->current->bodyColumn = yyextra->yyColNr;
6911 yyextra->current->initializer.str(yytext);
6912 yyextra->lastInitializerContext = YY_START;
6913 yyextra->initBracketCount=1;
6914 BEGIN(ReadInitializer);
6918<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6919<CSAccessorDecl>"}"{B}*"=" {
6921 if (yyextra->curlyCount != 0) REJECT;
6922 yyextra->current->initializer.str(
"=");
6923 yyextra->current->endBodyLine=yyextra->yyLineNr;
6924 yyextra->lastInitializerContext = FindMembers;
6925 BEGIN(ReadInitializer);
6927<CSAccessorDecl>"}" {
6928 if (yyextra->curlyCount)
6930 yyextra->curlyCount--;
6937 yyextra->current->endBodyLine=yyextra->yyLineNr;
6942<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6943<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6944<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6945<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6946<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6947<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6948<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6949<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6950<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6951<CSAccessorDecl>"\"" { BEGIN(CSString);}
6952<CSAccessorDecl>"." {}
6953<CSAccessorDecl>\n {
lineCount(yyscanner); }
6954<CSString>"\"" { BEGIN(CSAccessorDecl);}
6962<SliceSequence>{SCOPENAME} {
6963 if (yyextra->current->spec.isLocal())
6965 yyextra->current->type =
"local ";
6967 yyextra->current->type +=
"sequence<";
6968 yyextra->current->type += yytext;
6969 yyextra->current->type +=
">";
6972<SliceSequence>{BN}*">"{BN}* {
6974 BEGIN(SliceSequenceName);
6977<SliceSequenceName>{ID}{BN}* {
6979 yyextra->current->name = yytext ;
6980 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6983<SliceSequenceName>";" {
6984 yyextra->current->section = EntryType::makeVariable();
6985 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6990<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
6992 if (yyextra->current->spec.isLocal())
6994 yyextra->current->type =
"local ";
6996 yyextra->current->type +=
"dictionary<";
6997 yyextra->current->type += yytext;
6998 yyextra->current->type +=
">";
6999 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7002<SliceDictionary>{BN}*">"{BN}* {
7004 BEGIN(SliceDictionaryName);
7007<SliceDictionaryName>{ID}{BN}* {
7009 yyextra->current->name = yytext ;
7010 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7013<SliceDictionaryName>";" {
7014 yyextra->current->section = EntryType::makeVariable();
7015 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7025<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7026 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7027 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7030<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7031 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7032 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7034<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7035 yyextra->docBlock << yytext;
7036 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7037 BEGIN( yyextra->docBlockContext );
7039<DocLine>{NONLopt}/"\n" {
7040 yyextra->docBlock << yytext;
7041 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7042 BEGIN( yyextra->docBlockContext );
7047<DocBlock>"*"*{CCE} {
7049 BEGIN(yyextra->docBlockContext);
7051<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7054 yyextra->docBlock <<
"\\ilinebr " << indent;
7056<DocBlock>^{B}*"*"+/[^/] {
7059 yyextra->docBlock << indent;
7061<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7064 yyextra->docBlock << indent;
7066<DocBlock>^{B}*({CPPC}){B}* {
7069 yyextra->docBlock << yytext;
7073 yyextra->docBlock << yytext;
7075<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7076 yyextra->docBlock << yytext;
7078<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7079 yyextra->docBlock << yytext;
7080 char blockName[] =
"f$";
7082 if (c==
'[') blockName[1]=
']';
7083 else if (c==
'{') blockName[1]=
'}';
7084 else if (c==
'(') blockName[1]=
')';
7086 BEGIN(DocCopyBlock);
7088<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7089 yyextra->fileName = &yytext[6];
7090 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7091 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7092 yyextra->docBlock << yytext;
7094<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7095 yyextra->fileName = &yytext[6];
7096 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7097 yyextra->docBlock << yytext;
7099<DocBlock>{CMD}"iline"{LINENR}{B} {
7104 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '%s' for iline command",yytext);
7108 yyextra->yyLineNr = nr;
7110 yyextra->docBlock << yytext;
7112<DocBlock>{B}*"<"{PRE}">" {
7113 yyextra->docBlock << yytext;
7115 BEGIN(DocCopyBlock);
7117<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7118 yyextra->docBlock << yytext;
7120 BEGIN(DocCopyBlock);
7122<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
7123 yyextra->docBlock << yytext;
7125 BEGIN(DocCopyBlock);
7127<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7129 yyextra->docBlock <<
"\\ilinebr ";
7130 yyextra->docBlock << pat;
7132 BEGIN(DocCopyBlock);
7134<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7136 yyextra->docBlock << pat;
7138 BEGIN(DocCopyBlock);
7140<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7141<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7142<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7144 yyextra->docBlock <<
"\\ilinebr ";
7145 yyextra->docBlock << pat;
7147 BEGIN(DocCopyBlock);
7149<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7150<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7151<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7153 yyextra->docBlock << pat;
7155 BEGIN(DocCopyBlock);
7157<DocBlock>{B}*"<"{CODE}">" {
7158 if (yyextra->insideCS)
7160 yyextra->docBlock << yytext;
7162 BEGIN(DocCopyBlock);
7169<DocBlock>[^@*~\/\\\n]+ {
7170 yyextra->docBlock << yytext;
7174 yyextra->docBlock << *yytext;
7177 yyextra->docBlock << *yytext;
7182<DocCopyBlock>"</"{PRE}">" {
7187 yyextra->docBlock << yytext;
7189<DocCopyBlock>"</"{CODE}">" {
7194 yyextra->docBlock << yytext;
7196<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7201 yyextra->docBlock << yytext;
7203<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7208 yyextra->docBlock << yytext;
7210<DocCopyBlock>^{B}*"*"+/{BN}+ {
7211 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7219 yyextra->docBlock << indent;
7222<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7223 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7227 yyextra->docBlock << indent;
7234<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7235 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7239 yyextra->docBlock << indent+
"*";
7246<DocCopyBlock>^{B}*"*"+/{BN}* {
7247 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7250 if (yyextra->nestedComment>0)
7253 yyextra->docBlock << indent+
"*";
7258 yyextra->docBlock << indent;
7266<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7272 yyextra->docBlock << pat;
7274<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7280 yyextra->docBlock << pat;
7282<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7283 yyextra->docBlock << yytext;
7286 yyextra->docBlock << yytext;
7287 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7291 yyextra->lastStringContext=YY_START;
7292 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7293 yyextra->stopAtInvalidString=
true;
7297<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7300 yyextra->nestedComment++;
7302 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7304 yyextra->nestedComment--;
7306 yyextra->docBlock << yytext;
7309 yyextra->docBlock << *yytext;
7313 yyextra->docBlock << *yytext;
7315<DocCopyBlock><<EOF>> {
7316 warn(yyextra->fileName,yyextra->yyLineNr,
7317 "reached end of file while inside a '%s' block!"
7318 " The command that should end the block seems to be missing!",
7319 qPrint(yyextra->docBlockName));
7326<Prototype>"operator"{B}*"("{B}*")" {
7327 yyextra->current->name+=yytext;
7330 yyextra->current->args+=*yytext;
7331 yyextra->currentArgumentContext = PrototypeQual;
7332 yyextra->fullArgString = yyextra->current->args;
7333 yyextra->copyArgString = &yyextra->current->args;
7334 BEGIN( ReadFuncArgType ) ;
7336<Prototype>"("({ID}"::")*({B}*[&*])+ {
7337 if (yyextra->insidePHP)
7343 yyextra->current->type+=yyextra->current->name+yytext;
7344 yyextra->current->name.clear();
7345 BEGIN( PrototypePtr );
7348<PrototypePtr>{SCOPENAME} {
7349 yyextra->current->name+=yytext;
7352 yyextra->current->args+=*yytext;
7353 yyextra->currentArgumentContext = PrototypeQual;
7354 yyextra->fullArgString = yyextra->current->args;
7355 yyextra->copyArgString = &yyextra->current->args;
7356 BEGIN( ReadFuncArgType ) ;
7359 yyextra->current->type+=
')';
7363 yyextra->current->name+=yytext;
7366 BEGIN( PrototypeSkipLine);
7368<PrototypeQual>{B}*"const"{B}* {
7369 yyextra->current->args +=
" const ";
7370 yyextra->current->argList.setConstSpecifier(
TRUE);
7372<PrototypeQual>{B}*"volatile"{B}* {
7373 yyextra->current->args +=
" volatile ";
7374 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7376<PrototypeQual>{B}*"="{B}*"0"{B}* {
7377 yyextra->current->args +=
" = 0";
7379 yyextra->current->argList.setPureSpecifier(
TRUE);
7381<PrototypeQual>"throw"{B}*"(" {
7382 yyextra->current->exception =
"throw(";
7383 BEGIN(PrototypeExc);
7386 yyextra->current->exception +=
')';
7387 BEGIN(PrototypeQual);
7390 yyextra->current->exception += *yytext;
7393 yyextra->current->args += *yytext;
7396 yyextra->current->name += *yytext;
7398<PrototypeSkipLine>. {
7404<SkipCxxComment>.*"\\\n" {
7405 if (yyextra->insideCS)
7414<SkipCxxComment>{ANYopt}/\n {
7415 BEGIN( yyextra->lastCContext ) ;
7417<SkipComment>[^\*\n]+
7422 if (!yyextra->insideCpp) REJECT;
7423 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7424 yyextra->lastC11AttributeContext = YY_START;
7425 BEGIN( SkipC11Attribute );
7430 if (yyextra->insideIDL && yyextra->insideCppQuote)
7434 else if (yyextra->insidePHP)
7436 yyextra->lastStringContext=YY_START;
7441 if (!yyextra->insidePHP)
7443 yyextra->lastCPPContext = YY_START;
7448 yyextra->lastCContext = YY_START ;
7449 BEGIN( SkipCxxComment ) ;
7453 if (!yyextra->insidePHP)
7455 yyextra->lastCContext = YY_START ;
7456 BEGIN( SkipCxxComment ) ;
7459 if (yyextra->insidePHP)
7461 yyextra->lastStringContext=YY_START;
7462 BEGIN(SkipPHPString);
7466 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7468 if (yyextra->current->type.isEmpty())
7470 if (yyextra->current->name.isEmpty())
7471 yyextra->current->name=
"?";
7473 yyextra->current->name+=
"?";
7477 yyextra->current->type+=
"?";
7481<*>"}" { yyextra->exported=
false; }
7483<SkipComment>{CPPC}|{CCS}
7484<*>{CCS} { yyextra->lastCContext = YY_START ;
7485 BEGIN( SkipComment ) ;
7487<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7489 yyextra->lastCContext = YY_START ;
7490 BEGIN( SkipCxxComment ) ;
7493 if (yyextra->insideCS && yyextra->fakeNS)
7497 BEGIN ( ReadNSBody);
7509 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7511 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7513 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7523 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7524 yyextra->outerScopeEntries.clear();
7525 yyextra->baseName.clear();
7528 yyextra->sharpCount = 0;
7529 yyextra->roundCount = 0;
7530 yyextra->curlyCount = 0;
7532 yyextra->isStatic =
FALSE;
7535 yyextra->isTypedef =
FALSE;
7536 yyextra->insideTryBlock =
FALSE;
7537 yyextra->insideFormula =
FALSE;
7538 yyextra->insideCode=
FALSE;
7540 yyextra->previous = 0;
7541 yyextra->firstTypedefEntry.reset();
7542 yyextra->memspecEntry.reset();
7547 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7548 if (yyextra->insideJava)
7552 yyextra->current->protection = yyextra->protection;
7553 yyextra->current->exported = yyextra->exported ;
7554 yyextra->current->mtype = yyextra->mtype;
7555 yyextra->current->virt = yyextra->virt;
7556 yyextra->current->isStatic = yyextra->isStatic;
7557 yyextra->current->lang = yyextra->language;
7559 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7560 yyextra->isTypedef=
FALSE;
7568 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7569 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7571 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7577 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7580 for (p = yytext ; *p ; ++p )
7584 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7588 yyextra->column+=tabSize - (yyextra->column%tabSize);
7592 yyextra->column++,yyextra->yyColNr++;
7600 int col=startIndent;
7606 if (c==
'\t') col+=tabSize-(col%tabSize);
7607 else if (c==
'\n') col=0;
7616 int i = text.
find(
'"');
7629 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7630 yyextra->current->protection = yyextra->protection = prot;
7632 yyextra->current->type.clear();
7633 yyextra->current->name.clear();
7634 yyextra->current->args.clear();
7635 yyextra->current->argList.clear();
7641 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7642 size_t tl=yyextra->current->type.length();
7643 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7645 yyextra->current->type +=
' ' ;
7647 yyextra->current->type += yyextra->current->name;
7648 yyextra->current->name.clear() ;
7649 tl=yyextra->current->type.length();
7650 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7652 yyextra->current->type +=
' ' ;
7654 yyextra->current->type += yyextra->current->args ;
7655 yyextra->current->args.clear() ;
7656 yyextra->current->argList.clear();
7663 if (s==
nullptr || *s==0)
return name;
7665 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7677 bool funcPtr = i>0 && type[i-1]==
')';
7679 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7680 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7681 return type.
left(i);
7687 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7690 yyextra->docBlock <<
"\\iskip";
7692 yyextra->docBlockName=blockName;
7693 yyextra->fencedSize=fencedSize;
7694 yyextra->nestedComment=0;
7700 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7701 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7705 yyextra->docBlock <<
"\\endiskip";
7707 yyextra->docBlockName=
"";
7727 int i=name.
find(
"operator");
7728 if (i==-1)
return FALSE;
7738 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7760 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7761 if (yyextra->current_root->section.isScope())
7764 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7766 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7768 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7778 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7779 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7780 if (yyextra->current->argList.empty())
return FALSE;
7781 for (
const Argument &a : yyextra->current->argList)
7792 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7793 if (yyextra->insideJava)
7797 if (text.
find(
"protected")!=-1)
7799 else if (text.
find(
"private")!=-1)
7801 else if (text.
find(
"package")!=-1)
7809 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7810 int si =
static_cast<int>(yyextra->current->args.length());
7811 if (yyextra->oldStyleArgType.isEmpty())
7813 std::string args = yyextra->current->args.str();
7814 static const reg::Ex re(R
"(\([^)]*\).*)");
7820 bi1=(int)match.position();
7821 size_t secondMatchStart = match.position()+match.length();
7824 bi2=(int)match.position();
7828 if (bi1!=-1 && bi2!=-1)
7831 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7833 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7834 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7836 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7837 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7838 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7843 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7846 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7847 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7849 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7850 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7856 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7859 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7863 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7864 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7877 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7880 oldStyleArgPtr=yyextra->current->args.
left(j);
7899 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7900 for (
Argument &a : yyextra->current->argList)
7909 a.
docs=brief+
"\n\n"+docs;
7941 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7944 yyextra->current->briefFile = yyextra->fileName;
7945 yyextra->current->briefLine = yyextra->yyLineNr;
7949 yyextra->current->docFile = yyextra->fileName;
7950 yyextra->current->docLine = yyextra->yyLineNr;
7958 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7959 if (yyextra->tempEntry==0)
7964 yyextra->previous = yyextra->current;
7965 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7969 yyextra->previous = yyextra->current;
7970 yyextra->current = yyextra->tempEntry;
7971 yyextra->tempEntry.reset();
7978 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7981 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
7982 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
7985 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
7986 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
7988 docEntry->inbodyFile = yyextra->fileName;
7989 docEntry->inbodyLine = lineNr;
7993 bool needsEntry=
FALSE;
7995 Markdown markdown(yyextra->fileName,lineNr);
7998 while (yyextra->commentScanner.parseCommentBlock(
7999 yyextra->thisParser,
8000 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8004 yyextra->docBlockInBody ?
FALSE : brief,
8005 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8006 yyextra->docBlockInBody,
8007 yyextra->protection,
8018 QCString docFile = yyextra->current->docFile;
8020 yyextra->current->docFile = docFile;
8021 yyextra->current->docLine = lineNr;
8029 if (yyextra->docBlockTerm)
8031 unput(yyextra->docBlockTerm);
8032 yyextra->docBlockTerm=0;
8039 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8050 QCString orgDoc = yyextra->current->doc;
8051 QCString orgBrief = yyextra->current->brief;
8052 int orgDocLine = yyextra->current->docLine;
8053 int orgBriefLine = yyextra->current->briefLine;
8055 yyextra->current->doc.
clear();
8056 yyextra->current->brief.clear();
8059 int lineNr = orgDocLine;
8061 Markdown markdown(yyextra->fileName,lineNr);
8064 while (yyextra->commentScanner.parseCommentBlock(
8065 yyextra->thisParser,
8066 yyextra->current.get(),
8073 yyextra->protection,
8082 if (needsEntry)
newEntry(yyscanner);
8088 a.
docs = yyextra->current->doc;
8091 yyextra->current->doc = orgDoc;
8092 yyextra->current->brief = orgBrief;
8093 yyextra->current->docLine = orgDocLine;
8094 yyextra->current->briefLine = orgBriefLine;
8105 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8106 for (
const auto &ce : rt->children())
8108 if (!ce->program.empty())
8112 yyextra->padCount=0;
8115 yyextra->programStr = ce->program.str();
8116 yyextra->inputString = yyextra->programStr.data();
8117 yyextra->inputPosition = 0;
8118 if (ce->section.isEnum() || ce->spec.isEnum())
8119 BEGIN( FindFields ) ;
8121 BEGIN( FindMembers ) ;
8122 yyextra->current_root = ce;
8123 yyextra->fileName = ce->fileName;
8125 yyextra->yyLineNr = ce->bodyLine;
8126 yyextra->yyColNr = ce->bodyColumn;
8129 yyextra->current = std::make_shared<Entry>();
8130 yyextra->isStatic =
FALSE;
8135 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8137 ce->groups = rt->groups;
8140 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8142 if ( ce->section.isClass() )
8144 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8148 else if (yyextra->insideJava)
8152 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8168 else if (ce->section.isEnum() )
8170 yyextra->current->protection = yyextra->protection = ce->protection;
8172 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8174 if (ce->section.isNamespace() )
8176 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8178 yyextra->current->protection = yyextra->protection = ce->protection;
8179 yyextra->current->exported = yyextra->exported =
false;
8181 else if (ce->section.isNamespace() )
8184 yyextra->current->exported = yyextra->exported = ce->exported;
8189 yyextra->current->exported = yyextra->exported =
false;
8199 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8201 scannerYYlex(yyscanner);
8202 yyextra->lexInit=
TRUE;
8205 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8207 yyextra->programStr.clear();
8208 ce->program.str(std::string());
8224 const char *fileBuf,
8225 const std::shared_ptr<Entry> &rt,
8229 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8232 yyextra->inputString = fileBuf;
8233 yyextra->inputPosition = 0;
8234 yyextra->column = 0;
8235 scannerYYrestart(
nullptr,yyscanner);
8240 yyextra->isStatic =
FALSE;
8241 yyextra->exported =
false;
8243 yyextra->current_root = rt;
8244 yyextra->yyLineNr = 1 ;
8245 yyextra->yyBegLineNr = 1;
8246 yyextra->yyBegColNr = 0;
8247 yyextra->anonCount = 0;
8248 yyextra->anonNSCount = 0;
8249 yyextra->fileName = fileName;
8250 yyextra->clangParser = clangParser;
8252 rt->lang = yyextra->language;
8253 msg(
"Parsing file %s...\n",
qPrint(yyextra->fileName));
8255 yyextra->current_root = rt;
8257 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8258 yyextra->current = std::make_shared<Entry>();
8263 yyextra->current->name = yyextra->fileName;
8264 yyextra->current->section = sec;
8265 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8267 yyextra->current->reset();
8269 if ( yyextra->insidePHP )
8271 BEGIN( FindMembersPHP );
8273 else if ( yyextra->insideJava )
8275 yyextra->current->name=
"java::lang";
8276 yyextra->current->fileName = yyextra->fileName;
8277 yyextra->current->section = EntryType::makeUsingDir();
8278 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8280 BEGIN( FindMembers );
8284 BEGIN( FindMembers );
8287 scannerYYlex(yyscanner);
8288 yyextra->lexInit=
TRUE;
8290 if (YY_START==Comment)
8292 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8296 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8298 yyextra->programStr.clear();
8299 rt->program.str(std::string());
8303 yyextra->anonNSCount++;
8306 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8309 parent->moveToSubEntryAndKeep(child);
8311 yyextra->outerScopeEntries.clear();
8320 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8323 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8326 if (!yyextra->current)
8331 const char *orgInputString;
8332 int orgInputPosition;
8333 YY_BUFFER_STATE orgState;
8336 orgState = YY_CURRENT_BUFFER;
8337 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8338 orgInputString = yyextra->inputString;
8339 orgInputPosition = yyextra->inputPosition;
8342 yyextra->inputString = text.
data();
8343 yyextra->inputPosition = 0;
8344 yyextra->column = 0;
8345 scannerYYrestart(
nullptr, yyscanner);
8347 scannerYYlex(yyscanner);
8348 yyextra->lexInit=
TRUE;
8350 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8351 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8353 yyextra->current->section = EntryType::makeVariableDoc();
8357 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8358 yy_switch_to_buffer(orgState, yyscanner);
8359 yyextra->inputString = orgInputString;
8360 yyextra->inputPosition = orgInputPosition;
8376 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8384 scannerYYlex_destroy(
p->yyscanner);
8388 const char *fileBuf,
8389 const std::shared_ptr<Entry> &root,
8393 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8394 yyextra->thisParser =
this;
8398 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8407 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8408 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8419#include "scanner.l.h"
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.
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
std::unique_ptr< Private > p
~COutlineParser() override
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...
static bool isFlagSet(const DebugMask mask)
Helper class to process markdown formatted text.
QCString process(const QCString &input, int &startNewlines, bool fromParseInput=false)
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
void msg(const char *fmt,...)
QCString trunc(const QCString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
EntryType guessSection(const QCString &name)
QCString stripIndentation(const QCString &s)