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.
This is an alternative implementation of QCString.
#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})
290MODULE_ID ({ID}".")*{ID}
291LINENR {B}*[1-9][0-9]*
292FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@]
293FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@]
294FILECHARS {FILEICHAR}*{FILEECHAR}+
295HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
296VFILEMASK {FILECHARS}("."{FILECHARS})*
297FILEMASK {VFILEMASK}|{HFILEMASK}
308DCOMMC ("/\*!"|"/\**")
310DCOMMCPP ("/\/!"|"/\/\/")
312DCOMM {DCOMMC}|{DCOMMCPP}
380%x TryFunctionBlockEnd
394%x SkipInterpVerbString
408%x UNOIDLAttributeBlock
435%x SpecializationSingleQuote
436%x SpecializationDoubleQuote
469%x SliceDictionaryName
500<*>"DEPRECATED_ATTRIBUTE" {
501 if (!yyextra->insideObjC) REJECT;
503<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
504 if (!yyextra->insideObjC) REJECT;
505 yyextra->lastDeprecatedContext=YY_START;
506 yyextra->lastStringContext=Deprecated_round;
509<Deprecated_round>")" {
510 BEGIN(yyextra->lastDeprecatedContext);
512<Deprecated_round>{BNopt} {
515<Deprecated_round>. { }
517 yyextra->curlyCount=0;
518 yyextra->needsSemi =
TRUE;
519 BEGIN(SkipCurlyBlock);
522 yyextra->roundCount=0;
523 BEGIN(SkipRoundBlock);
526 ++yyextra->roundCount;
529 if (yyextra->roundCount )
530 --yyextra->roundCount ;
535 ++yyextra->curlyCount ;
538 if( yyextra->curlyCount )
540 --yyextra->curlyCount ;
542 else if (yyextra->needsSemi)
548 BEGIN( FindMembers );
552 if (yyextra->insidePHP)
554 yyextra->lastStringContext=NextSemi;
555 BEGIN(SkipPHPString);
558<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
560 yyextra->lastStringContext=NextSemi;
565 BEGIN( FindMembers );
569 BEGIN( FindMembers );
572 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
576<FindMembers>"<?php" {
577 yyextra->insidePHP =
TRUE;
579<FindMembersPHP>"<?"("php"?) {
580 BEGIN( FindMembers );
582<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
584 BEGIN( FindMembers );
586<FindMembers>"?>"|"</script>" {
587 if (yyextra->insidePHP)
588 BEGIN( FindMembersPHP );
592<FindMembersPHP>[^\n<]+ {
599<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
604<FindMembers>"%{"[^\n]* {
605 if (!yyextra->insideIDL)
609 if (!yyextra->insideIDL)
612<FindMembers>{B}*("properties"){BN}*":"{BN}* {
617<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
622<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
627<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
632<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
637<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
641<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
644<FindMembers>{B}*"internal"{BN}*":"{BN}* {
645 if (yyextra->insideCli)
654<FindMembers>{B}*"protected"{BN}*":"{BN}* {
657<FindMembers>{B}*"private"{BN}*":"{BN}* {
660<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
661 if (!yyextra->insideCpp) REJECT;
665<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
666 if (!yyextra->insideCpp) REJECT;
670<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
671 if (!yyextra->insideCpp) REJECT;
683<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
684<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
685 BEGIN( SkipComment ) ;
687<CppProt>("slots"|"Q_SLOTS") {
690<FindMembers>{B}*"event"{BN}+ {
691 if (yyextra->insideCli)
696 yyextra->current->bodyLine = yyextra->yyLineNr;
697 yyextra->current->bodyColumn = yyextra->yyColNr;
698 yyextra->curlyCount=0;
699 BEGIN( CliPropertyType );
701 else if (yyextra->insideCS)
705 yyextra->current->bodyLine = yyextra->yyLineNr;
706 yyextra->current->bodyColumn = yyextra->yyColNr;
713<FindMembers>{B}*"property"{BN}+ {
714 if (yyextra->insideCli)
719 yyextra->current->bodyLine = yyextra->yyLineNr;
720 yyextra->current->bodyColumn = yyextra->yyColNr;
721 yyextra->curlyCount=0;
722 BEGIN( CliPropertyType );
729<CliPropertyType>{ID} {
731 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
733<CliPropertyType>"[" {
734 yyextra->current->args =
"[";
735 BEGIN( CliPropertyIndex );
737<CliPropertyType>"{" {
738 yyextra->curlyCount=0;
740 BEGIN( CSAccessorDecl );
742<CliPropertyType>";" {
744 BEGIN( FindMembers );
749<CliPropertyType>{B}* {
753 yyextra->current->type += yytext;
755<CliPropertyIndex>"]" {
756 BEGIN( CliPropertyType );
757 yyextra->current->args+=yytext;
760 yyextra->current->args+=yytext;
775<FindMembers>{B}*"@private"{BN}+ {
778<FindMembers>{B}*"@protected"{BN}+ {
781<FindMembers>{B}*"@public"{BN}+ {
784<FindMembers>[\-+]{BN}* {
785 if (!yyextra->insideObjC)
791 yyextra->current->fileName = yyextra->fileName;
792 yyextra->current->startLine = yyextra->yyLineNr;
793 yyextra->current->startColumn = yyextra->yyColNr;
794 yyextra->current->bodyLine = yyextra->yyLineNr;
795 yyextra->current->bodyColumn = yyextra->yyColNr;
796 yyextra->current->section = EntryType::makeFunction();
798 yyextra->insideObjC =
TRUE;
799 yyextra->yyBegColNr = yyextra->yyColNr;
800 yyextra->yyBegLineNr = yyextra->yyLineNr;
803 yyextra->current->isStatic=yytext[0]==
'+';
809 BEGIN( ObjCReturnType );
810 yyextra->current->type.clear();
811 yyextra->roundCount=0;
814 if (yyextra->current->type.isEmpty())
816 yyextra->current->type +=
"id";
818 yyextra->current->name = yytext;
822 yyextra->current->name +=
':';
824 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
827<ObjCReturnType>[^()]* {
828 yyextra->current->type += yytext;
830<ObjCReturnType>"(^)(" {
831 yyextra->current->type += yytext;
832 yyextra->roundCount++;
835 yyextra->current->type += yytext;
836 yyextra->roundCount++;
839 if (yyextra->roundCount<=0)
845 yyextra->current->type += yytext;
846 yyextra->roundCount--;
849<ObjCParams>({ID})?{BN}*":" {
854 yyextra->current->name +=
" :";
858 yyextra->current->name += keyw+
":";
860 if (yyextra->current->argList.back().type.isEmpty())
862 yyextra->current->argList.back().type=
"id";
866 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
868<ObjCParams>{ID}{BN}* {
872<ObjCParams>","{BN}*"..." {
879 yyextra->current->argList.push_back(a);
887 yyextra->roundCount=0;
888 yyextra->current->argList.back().type.clear();
889 BEGIN( ObjCParamType );
892 yyextra->roundCount++;
893 yyextra->current->argList.back().type+=yytext;
895<ObjCParamType>")"/{B}* {
896 if (yyextra->roundCount<=0)
902 yyextra->current->argList.back().type+=yytext;
903 yyextra->roundCount--;
906<ObjCParamType>[^()]* {
909<ObjCMethod,ObjCParams>";" {
910 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
912 yyextra->current->argList.back().type=
"id";
914 if (yyextra->current->argList.empty())
916 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
923<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
928 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
930 yyextra->current->argList.back().type=
"id";
932 if (yyextra->current->argList.empty())
934 yyextra->current->argList.setNoParameters(
TRUE);
940<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
941 if (yyextra->insideSlice)
944 yyextra->current->bodyLine = yyextra->yyLineNr;
945 yyextra->current->bodyColumn = yyextra->yyColNr;
946 yyextra->current->fileName = yyextra->fileName ;
947 yyextra->current->startLine = yyextra->yyLineNr ;
948 yyextra->current->startColumn = yyextra->yyColNr;
949 yyextra->current->args.clear();
950 yyextra->current->section = EntryType::makeTypedef();
951 yyextra->isTypedef =
TRUE;
952 BEGIN( SliceSequence );
957<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
958 if (yyextra->insideSlice)
961 yyextra->current->bodyLine = yyextra->yyLineNr;
962 yyextra->current->bodyColumn = yyextra->yyColNr;
963 yyextra->current->fileName = yyextra->fileName ;
964 yyextra->current->startLine = yyextra->yyLineNr ;
965 yyextra->current->startColumn = yyextra->yyColNr;
966 yyextra->current->args.clear();
967 yyextra->current->section = EntryType::makeTypedef() ;
968 yyextra->isTypedef =
TRUE;
969 BEGIN( SliceDictionary );
974<FindMembers>{BN}{1,80} {
977<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
978 if (yyextra->insideJava)
981 yyextra->lastSkipRoundContext = YY_START;
982 yyextra->roundCount=0;
985 else if (
qstrncmp(yytext,
"@property",9)==0)
988 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
991 BEGIN( ObjCPropAttr );
int qstrncmp(const char *str1, const char *str2, size_t len)
998<ObjCPropAttr>"getter="{ID} {
999 yyextra->current->read = yytext+7;
1001<ObjCPropAttr>"setter="{ID} {
1002 yyextra->current->write = yytext+7;
1004<ObjCPropAttr>"readonly" {
1005 yyextra->current->spec.setWritable(
false);
1007<ObjCPropAttr>"readwrite" {
1009<ObjCPropAttr>"assign" {
1011<ObjCPropAttr>"unsafe_unretained" {
1012 yyextra->current->spec.setAssign(
false);
1013 yyextra->current->spec.setUnretained(
true);
1015<ObjCPropAttr>"retain" {
1016 yyextra->current->spec.setAssign(
false);
1017 yyextra->current->spec.setRetain(
true);
1019<ObjCPropAttr>"copy" {
1020 yyextra->current->spec.setAssign(
false);
1021 yyextra->current->spec.setCopy(
true);
1023<ObjCPropAttr>"weak" {
1024 yyextra->current->spec.setAssign(
false);
1025 yyextra->current->spec.setWeak(
true);
1027<ObjCPropAttr>"strong" {
1028 yyextra->current->spec.setAssign(
false);
1029 yyextra->current->spec.setStrong(
true);
1031<ObjCPropAttr>"nonatomic" {
1032 yyextra->current->spec.setNonAtomic(
true);
1037<FindMembers>"@"{ID}("."{ID})+ {
1038 if (yyextra->insideJava)
1047<FindMembers>"@"{ID} {
1048 if (yyextra->insideJava)
1052 else if (
qstrcmp(yytext,
"@property")==0)
1055 yyextra->current->spec.setWritable(
true).setReadable(
true);
1058 else if (
qstrcmp(yytext,
"@synthesize")==0)
1060 BEGIN( ObjCSkipStatement );
1062 else if (
qstrcmp(yytext,
"@dynamic")==0)
1064 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1071<ObjCSkipStatement>";" {
1074<PackageName>{ID}(("."|"\\"){ID})* {
1075 yyextra->isTypedef=
FALSE;
1077 yyextra->current->name = yytext;
1078 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1079 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1080 yyextra->current->section = EntryType::makeNamespace();
1081 yyextra->current->type =
"namespace" ;
1082 yyextra->current->fileName = yyextra->fileName;
1083 yyextra->current->startLine = yyextra->yyLineNr;
1084 yyextra->current->startColumn = yyextra->yyColNr;
1085 yyextra->current->bodyLine = yyextra->yyLineNr;
1086 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
1090 std::shared_ptr<Entry> tmp = yyextra->current;
1091 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1092 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1097 yyextra->curlyCount=0;
1098 BEGIN( ReadNSBody );
1100<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1101 if (!yyextra->insideCpp) REJECT;
1103 yyextra->current->exported =
true;
1105 BEGIN( ModuleName );
1107<FindMembers>{B}*"module"{BN}*";" {
1108 if (!yyextra->insideCpp) REJECT;
1109 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1112 BEGIN( FindMembers );
1114<FindMembers>{B}*"module"{BN}+ {
1115 if (!yyextra->insideCpp) REJECT;
1117 yyextra->current->exported =
false;
1119 BEGIN( ModuleName );
1121<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1122 if (!yyextra->insideCpp) REJECT;
1123 yyextra->current->exported =
true;
1125 BEGIN( ModuleImport );
1127<FindMembers>{B}*"import"{BN}+ {
1128 if (!yyextra->insideCpp) REJECT;
1130 BEGIN( ModuleImport );
1132<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1134 int i = name.
find(
':');
1140 yyextra->current->exported,
1143 yyextra->current->section = EntryType::makeModuleDoc();
1144 yyextra->isTypedef=
FALSE;
1146 yyextra->current->type +=
" module";
1147 yyextra->current->fileName = yyextra->fileName;
1148 yyextra->current->startLine = yyextra->yyLineNr;
1149 yyextra->current->startColumn = yyextra->yyColNr;
1150 yyextra->current->bodyLine = yyextra->yyLineNr;
1151 yyextra->current->bodyColumn = yyextra->yyColNr;
1152 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
1155<ModuleName>{MODULE_ID} {
1159 yyextra->current->exported,
1161 yyextra->current->section = EntryType::makeModuleDoc();
1162 yyextra->isTypedef=
FALSE;
1164 yyextra->current->type +=
" module";
1165 yyextra->current->fileName = yyextra->fileName;
1166 yyextra->current->startLine = yyextra->yyLineNr;
1167 yyextra->current->startColumn = yyextra->yyColNr;
1168 yyextra->current->bodyLine = yyextra->yyLineNr;
1169 yyextra->current->bodyColumn = yyextra->yyColNr;
1170 yyextra->current->name = yytext;
1173<ModuleName>":"{BN}+"private" {
1174 yyextra->current->exported = yyextra->exported =
false;
1177<ModuleName>";" { unput(
';');
1182<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1188<ModuleImport>"<"[^>\n]*">" {
1194<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1196 int i = name.
find(
':');
1202 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1206<ModuleImport>{MODULE_ID} {
1210 yyextra->current->exported);
1213<ModuleImport>";" { BEGIN(FindMembers); }
1214<ModuleImport>\n {
lineCount(yyscanner); }
1216<FindMembers>{B}*"export"{BN}+"{" {
1217 yyextra->current->exported = yyextra->exported =
true;
1219<FindMembers>{B}*"export"{BN}+ {
1220 if (!yyextra->insideCpp) REJECT;
1221 yyextra->current->exported=
true;
1223<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1224 yyextra->current->type +=
" initonly ";
1225 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1228<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1229 yyextra->current->isStatic =
TRUE;
1232<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1233 yyextra->current->isStatic =
TRUE;
1236<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1237 yyextra->current->isStatic =
FALSE;
1238 yyextra->current->explicitExternal =
TRUE;
1241<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1243 yyextra->current->type +=
" const ";
1244 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1252<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1253 yyextra->current->type +=
" virtual ";
1257<FindMembers>{B}*"constexpr"{BN}+ {
1258 if (yyextra->insideCpp)
1260 yyextra->current->spec.setConstExpr(
true);
1264<FindMembers>{B}*"consteval"{BN}+ {
1265 if (yyextra->insideCpp)
1267 yyextra->current->spec.setConstEval(
true);
1271<FindMembers>{B}*"constinit"{BN}+ {
1272 if (yyextra->insideCpp)
1274 yyextra->current->spec.setConstInit(
true);
1278<FindMembers>{B}*"published"{BN}+ {
1279 if (yyextra->insideIDL)
1282 yyextra->current->spec.setPublished(
true);
1289<FindMembers>{B}*"sealed"{BN}+ {
1290 if (yyextra->insideCS)
1292 yyextra->current->spec.setSealed(
true);
1299<FindMembers>{B}*"abstract"{BN}+ {
1300 if (yyextra->insidePHP || yyextra->insideCS)
1302 yyextra->current->spec.setAbstract(
true);
1306 if (yyextra->insideCpp) REJECT;
1307 yyextra->current->type +=
" abstract ";
1308 if (!yyextra->insideJava)
1314 yyextra->current->spec.setAbstract(
true);
1319<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1320 yyextra->current->spec.setInline(
true);
1323<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1324 yyextra->current->spec.setMutable(
true);
1327<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1328 yyextra->current->spec.setExplicit(
true);
1331<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1332 yyextra->current->spec.setLocal(
true);
1335<FindMembers>{B}*"@required"{BN}+ {
1336 yyextra->current->spec.setOptional(
false).setRequired(
true);
1339<FindMembers>{B}*"@optional"{BN}+ {
1340 yyextra->current->spec.setRequired(
false).setOptional(
true);
1348<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1349<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1350 yyextra->isTypedef=
FALSE;
1351 yyextra->current->section = EntryType::makeNamespace();
1352 yyextra->current->type =
"namespace" ;
1353 yyextra->current->fileName = yyextra->fileName;
1354 yyextra->current->startLine = yyextra->yyLineNr;
1355 yyextra->current->startColumn = yyextra->yyColNr;
1356 yyextra->current->bodyLine = yyextra->yyLineNr;
1357 yyextra->current->bodyColumn = yyextra->yyColNr;
1359 if (yyextra->insidePHP)
1361 BEGIN( PackageName );
1365 BEGIN( CompoundName );
1368<FindMembers>{B}*"module"{BN}+ {
1370 if (yyextra->insideIDL || yyextra->insideSlice)
1372 yyextra->isTypedef=
FALSE;
1373 yyextra->current->section = EntryType::makeNamespace();
1374 yyextra->current->type =
"module" ;
1375 yyextra->current->fileName = yyextra->fileName;
1376 yyextra->current->startLine = yyextra->yyLineNr;
1377 yyextra->current->startColumn = yyextra->yyColNr;
1378 yyextra->current->bodyLine = yyextra->yyLineNr;
1379 yyextra->current->bodyColumn = yyextra->yyColNr;
1380 BEGIN( CompoundName );
1382 else if (yyextra->insideD)
1393<FindMembers>{B}*"library"{BN}+ {
1395 if (yyextra->insideIDL)
1397 yyextra->isTypedef=
FALSE;
1398 yyextra->current->section = EntryType::makeNamespace();
1399 yyextra->current->type =
"library" ;
1400 yyextra->current->fileName = yyextra->fileName;
1401 yyextra->current->startLine = yyextra->yyLineNr;
1402 yyextra->current->startColumn = yyextra->yyColNr;
1403 yyextra->current->bodyLine = yyextra->yyLineNr;
1404 yyextra->current->bodyColumn = yyextra->yyColNr;
1405 BEGIN( CompoundName );
1413<FindMembers>{B}*"constants"{BN}+ {
1415 if (yyextra->insideIDL)
1417 yyextra->isTypedef=
FALSE;
1418 yyextra->current->section = EntryType::makeNamespace();
1419 yyextra->current->type =
"constants";
1420 yyextra->current->fileName = yyextra->fileName;
1421 yyextra->current->startLine = yyextra->yyLineNr;
1422 yyextra->current->startColumn = yyextra->yyColNr;
1423 yyextra->current->bodyLine = yyextra->yyLineNr;
1424 yyextra->current->bodyColumn = yyextra->yyColNr;
1425 BEGIN( CompoundName );
1433<FindMembers>{BN}*("service"){BN}+ {
1435 if (yyextra->insideIDL)
1437 yyextra->isTypedef=
FALSE;
1438 yyextra->current->section = EntryType::makeClass();
1442 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1444 yyextra->current->type +=
" service " ;
1445 yyextra->current->fileName = yyextra->fileName;
1446 yyextra->current->startLine = yyextra->yyLineNr;
1447 yyextra->current->bodyLine = yyextra->yyLineNr;
1448 yyextra->current->bodyColumn = yyextra->yyColNr;
1449 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1457<FindMembers>{BN}*("singleton"){BN}+ {
1459 if (yyextra->insideIDL)
1461 yyextra->isTypedef=
FALSE;
1462 yyextra->current->section = EntryType::makeClass();
1464 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1465 setPublished(spec.isPublished());
1467 yyextra->current->type +=
" singleton " ;
1468 yyextra->current->fileName = yyextra->fileName;
1469 yyextra->current->startLine = yyextra->yyLineNr;
1470 yyextra->current->bodyLine = yyextra->yyLineNr;
1471 yyextra->current->bodyColumn = yyextra->yyColNr;
1472 BEGIN( CompoundName );
1480<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1482 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1484 yyextra->isTypedef=
FALSE;
1485 yyextra->current->section = EntryType::makeClass();
1487 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1489 setOptional(spec.isOptional()).
1490 setPublished(spec.isPublished()).
1491 setLocal(spec.isLocal());
1493 yyextra->current->type +=
" interface" ;
1494 yyextra->current->fileName = yyextra->fileName;
1495 yyextra->current->startLine = yyextra->yyLineNr;
1496 yyextra->current->startColumn = yyextra->yyColNr;
1497 yyextra->current->bodyLine = yyextra->yyLineNr;
1498 yyextra->current->bodyColumn = yyextra->yyColNr;
1500 BEGIN( CompoundName );
1508<FindMembers>{B}*"@implementation"{BN}+ {
1510 yyextra->isTypedef=
FALSE;
1511 yyextra->current->section = EntryType::makeObjcImpl();
1513 yyextra->insideObjC =
TRUE;
1516 yyextra->current->type +=
" implementation" ;
1517 yyextra->current->fileName = yyextra->fileName;
1518 yyextra->current->startLine = yyextra->yyLineNr;
1519 yyextra->current->bodyLine = yyextra->yyLineNr;
1520 yyextra->current->bodyColumn = yyextra->yyColNr;
1521 BEGIN( CompoundName );
1523<FindMembers>{B}*"@interface"{BN}+ {
1525 yyextra->isTypedef=
FALSE;
1526 yyextra->current->section = EntryType::makeClass();
1527 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1528 if (!yyextra->insideJava)
1531 yyextra->insideObjC =
TRUE;
1535 yyextra->current->type +=
" interface" ;
1536 yyextra->current->fileName = yyextra->fileName;
1537 yyextra->current->startLine = yyextra->yyLineNr;
1538 yyextra->current->startColumn = yyextra->yyColNr;
1539 yyextra->current->bodyLine = yyextra->yyLineNr;
1540 yyextra->current->bodyColumn = yyextra->yyColNr;
1541 BEGIN( CompoundName );
1543<FindMembers>{B}*"@protocol"{BN}+ {
1545 yyextra->isTypedef=
FALSE;
1546 yyextra->current->section = EntryType::makeClass();
1549 yyextra->insideObjC =
TRUE;
1552 yyextra->current->type +=
" protocol" ;
1553 yyextra->current->fileName = yyextra->fileName;
1554 yyextra->current->startLine = yyextra->yyLineNr;
1555 yyextra->current->startColumn = yyextra->yyColNr;
1556 yyextra->current->bodyLine = yyextra->yyLineNr;
1557 yyextra->current->bodyColumn = yyextra->yyColNr;
1558 BEGIN( CompoundName );
1560<FindMembers>{B}*"exception"{BN}+ {
1561 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1562 yyextra->isTypedef=
FALSE;
1563 yyextra->current->section = EntryType::makeClass();
1566 yyextra->current->spec =
TypeSpecifier().setException(
true).
1567 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1569 yyextra->current->type +=
" exception" ;
1570 yyextra->current->fileName = yyextra->fileName;
1571 yyextra->current->startLine = yyextra->yyLineNr;
1572 yyextra->current->startColumn = yyextra->yyColNr;
1573 yyextra->current->bodyLine = yyextra->yyLineNr;
1574 yyextra->current->bodyColumn = yyextra->yyColNr;
1576 BEGIN( CompoundName );
1578<FindMembers>"@class" |
1579<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1580<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1582 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1583 bool isConst=decl.
find(
"const")!=-1;
1584 bool isVolatile=decl.
find(
"volatile")!=-1;
1585 yyextra->current->section = EntryType::makeClass();
1587 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1590 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1592 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1594 yyextra->current->spec.setLocal(
true);
1598 yyextra->current->type +=
" const";
1600 else if (isVolatile)
1602 yyextra->current->type +=
" volatile";
1604 yyextra->current->type +=
" class" ;
1605 yyextra->current->fileName = yyextra->fileName;
1606 yyextra->current->startLine = yyextra->yyLineNr;
1607 yyextra->current->startColumn = yyextra->yyColNr;
1608 yyextra->current->bodyLine = yyextra->yyLineNr;
1609 yyextra->current->bodyColumn = yyextra->yyColNr;
1613 yyextra->insideObjC =
TRUE;
1616 if (yytext[yyleng-1]==
'{') unput(
'{');
1617 BEGIN( CompoundName ) ;
1619<FindMembers>{B}*"value class{" |
1620<FindMembers>{B}*"value class"{BN}+ {
1621 yyextra->isTypedef=
FALSE;
1622 yyextra->current->section = EntryType::makeClass();
1625 yyextra->current->type +=
" value class" ;
1626 yyextra->current->fileName = yyextra->fileName;
1627 yyextra->current->startLine = yyextra->yyLineNr;
1628 yyextra->current->startColumn = yyextra->yyColNr;
1629 yyextra->current->bodyLine = yyextra->yyLineNr;
1630 yyextra->current->bodyColumn = yyextra->yyColNr;
1632 if (yytext[yyleng-1]==
'{') unput(
'{');
1633 BEGIN( CompoundName ) ;
1635<FindMembers>{B}*"ref class{" |
1636<FindMembers>{B}*"ref class"{BN}+ {
1637 yyextra->isTypedef=
FALSE;
1638 yyextra->current->section = EntryType::makeClass();
1641 yyextra->current->type +=
" ref class" ;
1642 yyextra->current->fileName = yyextra->fileName;
1643 yyextra->current->startLine = yyextra->yyLineNr;
1644 yyextra->current->startColumn = yyextra->yyColNr;
1645 yyextra->current->bodyLine = yyextra->yyLineNr;
1646 yyextra->current->bodyColumn = yyextra->yyColNr;
1648 if (yytext[yyleng-1]==
'{') unput(
'{');
1649 BEGIN( CompoundName ) ;
1651<FindMembers>{B}*"interface class{" |
1652<FindMembers>{B}*"interface class"{BN}+ {
1653 yyextra->isTypedef=
FALSE;
1654 yyextra->current->section = EntryType::makeClass();
1655 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1657 yyextra->current->type +=
" interface class" ;
1658 yyextra->current->fileName = yyextra->fileName;
1659 yyextra->current->startLine = yyextra->yyLineNr;
1660 yyextra->current->startColumn = yyextra->yyColNr;
1661 yyextra->current->bodyLine = yyextra->yyLineNr;
1662 yyextra->current->bodyColumn = yyextra->yyColNr;
1664 if (yytext[yyleng-1]==
'{') unput(
'{');
1665 BEGIN( CompoundName ) ;
1667<FindMembers>{B}*"coclass"{BN}+ {
1668 if (yyextra->insideIDL)
1670 yyextra->isTypedef=
FALSE;
1671 yyextra->current->section = EntryType::makeClass();
1673 yyextra->current->type +=
" coclass" ;
1674 yyextra->current->fileName = yyextra->fileName;
1675 yyextra->current->startLine = yyextra->yyLineNr;
1676 yyextra->current->startColumn = yyextra->yyColNr;
1677 yyextra->current->bodyLine = yyextra->yyLineNr;
1678 yyextra->current->bodyColumn = yyextra->yyColNr;
1680 BEGIN( CompoundName ) ;
1685 yyextra->current->name = yytext;
1686 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1690<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1691<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1692 if (yyextra->insideJava) REJECT;
1694 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1695 bool isConst=decl.
find(
"const")!=-1;
1696 bool isVolatile=decl.
find(
"volatile")!=-1;
1697 yyextra->current->section = EntryType::makeClass() ;
1701 setPublished(spec.isPublished()).
1702 setInline(spec.isInline()).
1703 setLocal(spec.isLocal());
1709 yyextra->current->type +=
" const";
1711 else if (isVolatile)
1713 yyextra->current->type +=
" volatile";
1715 yyextra->current->type +=
" struct" ;
1716 yyextra->current->fileName = yyextra->fileName;
1717 yyextra->current->startLine = yyextra->yyLineNr;
1718 yyextra->current->startColumn = yyextra->yyColNr;
1719 yyextra->current->bodyLine = yyextra->yyLineNr;
1720 yyextra->current->bodyColumn = yyextra->yyColNr;
1722 if (yytext[yyleng-1]==
'{') unput(
'{');
1723 BEGIN( CompoundName ) ;
1725<FindMembers>{B}*"value struct{" |
1726<FindMembers>{B}*"value struct"{BN}+ {
1727 yyextra->isTypedef=
FALSE;
1728 yyextra->current->section = EntryType::makeClass();
1729 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1731 yyextra->current->type +=
" value struct" ;
1732 yyextra->current->fileName = yyextra->fileName;
1733 yyextra->current->startLine = yyextra->yyLineNr;
1734 yyextra->current->startColumn = yyextra->yyColNr;
1735 yyextra->current->bodyLine = yyextra->yyLineNr;
1736 yyextra->current->bodyColumn = yyextra->yyColNr;
1738 if (yytext[yyleng-1]==
'{') unput(
'{');
1739 BEGIN( CompoundName ) ;
1741<FindMembers>{B}*"ref struct{" |
1742<FindMembers>{B}*"ref struct"{BN}+ {
1743 yyextra->isTypedef=
FALSE;
1744 yyextra->current->section = EntryType::makeClass();
1745 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1747 yyextra->current->type +=
" ref struct" ;
1748 yyextra->current->fileName = yyextra->fileName;
1749 yyextra->current->startLine = yyextra->yyLineNr;
1750 yyextra->current->startColumn = yyextra->yyColNr;
1751 yyextra->current->bodyLine = yyextra->yyLineNr;
1752 yyextra->current->bodyColumn = yyextra->yyColNr;
1754 if (yytext[yyleng-1]==
'{') unput(
'{');
1755 BEGIN( CompoundName ) ;
1757<FindMembers>{B}*"interface struct{" |
1758<FindMembers>{B}*"interface struct"{BN}+ {
1759 yyextra->isTypedef=
FALSE;
1760 yyextra->current->section = EntryType::makeClass();
1761 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1763 yyextra->current->type +=
" interface struct";
1764 yyextra->current->fileName = yyextra->fileName;
1765 yyextra->current->startLine = yyextra->yyLineNr;
1766 yyextra->current->startColumn = yyextra->yyColNr;
1767 yyextra->current->bodyLine = yyextra->yyLineNr;
1768 yyextra->current->bodyColumn = yyextra->yyColNr;
1770 if (yytext[yyleng-1]==
'{') unput(
'{');
1771 BEGIN( CompoundName ) ;
1773<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1774<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1775 if (yyextra->insideJava) REJECT;
1777 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1778 bool isConst=decl.
find(
"const")!=-1;
1779 bool isVolatile=decl.
find(
"volatile")!=-1;
1780 yyextra->current->section = EntryType::makeClass();
1787 yyextra->current->type +=
" const";
1789 else if (isVolatile)
1791 yyextra->current->type +=
" volatile";
1793 yyextra->current->type +=
" union" ;
1794 yyextra->current->fileName = yyextra->fileName;
1795 yyextra->current->startLine = yyextra->yyLineNr;
1796 yyextra->current->startColumn = yyextra->yyColNr;
1797 yyextra->current->bodyLine = yyextra->yyLineNr;
1798 yyextra->current->bodyColumn = yyextra->yyColNr;
1800 if (yytext[yyleng-1]==
'{') unput(
'{');
1801 BEGIN( CompoundName ) ;
1803<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1804<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1806 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1807 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1808 bool isEnumSytruct = text.
find(
"struct")!=-1;
1809 if (yyextra->insideJava)
1811 yyextra->current->section = EntryType::makeClass();
1817 yyextra->current->section = EntryType::makeEnum() ;
1820 yyextra->current->type +=
" enum";
1823 yyextra->current->spec.setStrong(
true);
1827 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1829 yyextra->current->fileName = yyextra->fileName;
1830 yyextra->current->startLine = yyextra->yyLineNr;
1831 yyextra->current->startColumn = yyextra->yyColNr;
1832 yyextra->current->bodyLine = yyextra->yyLineNr;
1833 yyextra->current->bodyColumn = yyextra->yyColNr;
1835 if (yytext[yyleng-1]==
'{') unput(
'{');
1836 BEGIN( CompoundName ) ;
1838<FindMembers>{B}*"concept"{BN}+ {
1839 if (yyextra->insideJava) REJECT;
1840 yyextra->isTypedef=
FALSE;
1841 yyextra->current->section = EntryType::makeConcept();
1843 yyextra->current->type +=
" concept";
1844 yyextra->current->fileName = yyextra->fileName;
1845 yyextra->current->startLine = yyextra->yyLineNr;
1846 yyextra->current->startColumn = yyextra->yyColNr;
1847 yyextra->current->bodyLine = yyextra->yyLineNr;
1848 yyextra->current->bodyColumn = yyextra->yyColNr;
1850 BEGIN( ConceptName ) ;
1852<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1854 yyextra->current->name +=
"()";
1855 BEGIN( FindMembers );
1857<Operator>"("{BN}*")"{BNopt}/"(" {
1859 yyextra->current->name += yytext ;
1860 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1861 BEGIN( FindMembers ) ;
1865 BEGIN( FindMembers ) ;
1869 yyextra->current->name += *yytext ;
1871<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1872 if (!yyextra->current->type.startsWith(
"friend "))
1874 yyextra->current->name += yytext;
1878 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1880 BEGIN( FindMembers ) ;
1882<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1885 yyextra->current->tArgLists.
push_back(al);
1886 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1887 yyextra->templateStr=
"<";
1888 yyextra->fullArgString = yyextra->templateStr;
1889 yyextra->copyArgString = &yyextra->templateStr;
1890 yyextra->currentArgumentContext = FindMembers;
1891 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1893<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1894 if (yyextra->insideJava) REJECT;
1896 BEGIN( NSAliasName );
1899 yyextra->aliasName = yytext;
1900 BEGIN( NSAliasArg );
1902<NSAliasArg>({ID}"::")*{ID} {
1904 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1915 BEGIN( FindMembers );
1917<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1919 yyextra->aliasName=yytext;
1922<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1926 yyextra->current->fileName = yyextra->fileName;
1928 yyextra->current->section = EntryType::makeUsingDecl();
1929 yyextra->current_root->copyToSubEntry(yyextra->current);
1931 yyextra->current->section = EntryType::makeUsingDir();
1932 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1934 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1936<PHPUseAs>{BN}+"as"{BN}+ {
1939<PHPUseAs>{PHPUSEKW} {
1943 if (!yyextra->aliasName.isEmpty())
1948 yyextra->aliasName.clear();
const std::string & str() const
1950<PHPUse,PHPUseAs>[,;] {
1960<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1964 yyextra->current->fileName = yyextra->fileName;
1965 yyextra->current->section = EntryType::makeUsingDir();
1966 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1970<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1974 yyextra->current->exported);
1978 yyextra->current->fileName = yyextra->fileName;
1979 if (yyextra->insideD)
1981 yyextra->current->section = EntryType::makeUsingDir();
1986 yyextra->current->section = EntryType::makeUsingDecl();
1988 yyextra->previous = yyextra->current;
1989 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1993<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
1994 if (yyextra->insideJava) REJECT;
1995 yyextra->current->startLine=yyextra->yyLineNr;
1996 yyextra->current->startColumn = yyextra->yyColNr;
2000<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2001<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}) {
2003 yyextra->current->name=yytext;
2004 yyextra->current->fileName = yyextra->fileName;
2005 yyextra->current->section = EntryType::makeUsingDecl();
2006 yyextra->current->startLine = yyextra->yyLineNr;
2007 yyextra->previous = yyextra->current;
2008 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2010 if (yyextra->insideCS)
2015 yyextra->current->name=yytext;
2016 yyextra->current->fileName = yyextra->fileName;
2017 yyextra->current->startLine = yyextra->yyLineNr;
2018 yyextra->current->startColumn = yyextra->yyColNr;
2019 yyextra->current->section = EntryType::makeUsingDir();
2020 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2025<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2027 yyextra->current->fileName = yyextra->fileName;
2028 yyextra->current->section = EntryType::makeUsingDecl();
2029 yyextra->current->startLine = yyextra->yyLineNr;
2030 yyextra->current->bodyLine = yyextra->yyLineNr;
2031 yyextra->current->bodyColumn = yyextra->yyColNr;
2032 yyextra->lastInitializerContext = UsingAlias;
2033 yyextra->initBracketCount=0;
2034 BEGIN(ReadInitializer);
2037 yyextra->current->section = EntryType::makeVariable();
2039 init.stripPrefix(
"class ");
2040 init.stripPrefix(
"struct ");
2042 yyextra->current->type =
"typedef "+
init;
2043 yyextra->current->args.clear();
2044 yyextra->current->spec.setAlias(
true);
2045 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2050 yyextra->current->initializer << yytext;
2053 yyextra->current->initializer << yytext;
2057 yyextra->current->fileName = yyextra->fileName;
2058 yyextra->current->section = EntryType::makeUsingDir();
2059 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2063<Using>";" { BEGIN(FindMembers); }
2064<FindMembers>{SCOPENAME}{BN}*"<>" {
2069<FindMembers>{SCOPENAME}{BNopt}/"<" {
2071 if (yyextra->insideCpp && name==
"import") REJECT;
2072 yyextra->roundCount=0;
2073 yyextra->sharpCount=0;
2076 yyextra->current->name=name;
2082 BEGIN( EndTemplate );
2084<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2085 yyextra->sharpCount=0;
2086 yyextra->roundCount=0;
2094 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...
2097 if (!yyextra->insidePHP)
2103 yyextra->lastHereDocContext = YY_START;
2107<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2108 yyextra->current->name+=yytext;
2112 if (yyextra->roundCount==0)
2115 yyextra->sharpCount++;
2117 yyextra->current->name+=yytext;
2119<ClassTemplSpec,EndTemplate>">=" {
2120 yyextra->current->name+=yytext;
2122<ClassTemplSpec,EndTemplate>(">>") {
2123 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2131 yyextra->current->name+=yytext;
2136 yyextra->current->name+=
'>';
2138 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2144<EndTemplate>">"{BN}*"(" {
2146 yyextra->current->name+=
'>';
2148 --yyextra->sharpCount;
2149 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2151 yyextra->current->bodyLine = yyextra->yyLineNr;
2152 yyextra->current->bodyColumn = yyextra->yyColNr;
2153 yyextra->current->args =
"(";
2154 yyextra->currentArgumentContext = FuncQual;
2155 yyextra->fullArgString = yyextra->current->args;
2156 yyextra->copyArgString = &yyextra->current->args;
2158 BEGIN( ReadFuncArgType ) ;
2162 yyextra->current->name+=
"(";
2163 yyextra->roundCount++;
2166<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2168 yyextra->current->name+=
'>';
2169 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2174<EndTemplate>">"{BNopt}/"::" {
2176 yyextra->current->name+=
'>';
2178 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2180 BEGIN(FindMemberName);
2183<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2184 yyextra->roundCount++;
2186<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2187 if (yyextra->roundCount>0) yyextra->roundCount--;
2190 yyextra->current->name+=*yytext;
2193<FindMembers>"define"{BN}*"("{BN}*["'] {
2194 if (yyextra->insidePHP)
2196 yyextra->current->bodyLine = yyextra->yyLineNr;
2197 yyextra->current->bodyColumn = yyextra->yyColNr;
2204 yyextra->delimiter = yytext;
2205 *yyextra->pCopyHereDocGString << yytext;
2206 BEGIN(CopyHereDocEnd);
2208<CopyHereDoc>"\""{ID}/"\"" {
2209 yyextra->delimiter = &yytext[1];
2210 *yyextra->pCopyHereDocGString << yytext;
2211 BEGIN(CopyHereDocEnd);
2213<CopyHereDoc>"'"{ID}/"'" {
2214 yyextra->delimiter = &yytext[1];
2215 *yyextra->pCopyHereDocGString << yytext;
2216 BEGIN(CopyHereDocEnd);
2219 yyextra->delimiter = yytext;
2222<HereDoc>"\""{ID}/"\"" {
2223 yyextra->delimiter = &yytext[1];
2226<HereDoc>"'"{ID}/"'" {
2227 yyextra->delimiter = &yytext[1];
2231 if (yyextra->delimiter==yytext)
2233 BEGIN(yyextra->lastHereDocContext);
2237<CopyHereDocEnd>^{Bopt}{ID} {
2238 *yyextra->pCopyHereDocGString << yytext;
2241 BEGIN(yyextra->lastHereDocContext);
2246 *yyextra->pCopyHereDocGString << yytext;
2248<CopyHereDocEnd>{ID} {
2249 *yyextra->pCopyHereDocGString << yytext;
2252 *yyextra->pCopyHereDocGString << yytext;
2254<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2256<FindMembers>"Q_PROPERTY" {
2257 yyextra->yyBegLineNr = yyextra->yyLineNr;
2258 yyextra->yyBegColNr = yyextra->yyColNr;
2261 yyextra->current->type.clear();
2271 yyextra->current->name+=yytext;
2274 yyextra->current->type+= yyextra->current->name;
2275 yyextra->current->type+= yytext;
2276 yyextra->current->name=
"";
2278<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2279 yyextra->current->type+= yyextra->current->name;
2280 yyextra->current->name=yytext;
2282<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2283 yyextra->current->spec.setReadable(
true);
2286<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2287 yyextra->current->spec.setWritable(
true);
2290<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2291<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2292<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2293<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2294<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2295<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2296<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2297<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2298<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2299<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2303 yyextra->current->read = yytext;
2307 yyextra->current->write = yytext;
2310<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2311 yyextra->current->name=yytext;
2315<FindMembers>"requires" {
2316 if (yyextra->insideJava) REJECT;
2317 yyextra->current->req.clear();
2318 yyextra->requiresContext = YY_START;
2319 BEGIN(RequiresClause);
2321<RequiresClause>"requires"{BN}*/"{" {
2322 if (yyextra->insideJava) REJECT;
2324 yyextra->current->req+=yytext;
2325 BEGIN( RequiresExpression ) ;
2327<RequiresClause>"requires"{BN}*"(" {
2328 if (yyextra->insideJava) REJECT;
2330 yyextra->current->req+=yytext;
2331 yyextra->lastRoundContext=RequiresExpression;
2332 yyextra->pCopyRoundString=&yyextra->current->req;
2333 yyextra->roundCount=0;
2334 BEGIN( CopyRound ) ;
2336<RequiresExpression>"{" {
2337 yyextra->current->req+=yytext;
2338 yyextra->lastCurlyContext=RequiresClause;
2339 yyextra->pCopyCurlyString=&yyextra->current->req;
2340 yyextra->curlyCount=0;
2341 BEGIN( CopyCurly ) ;
2343<RequiresExpression>\n {
2344 yyextra->current->req+=
' ';
2347<RequiresExpression>. {
2348 yyextra->current->req+=yytext;
2350<RequiresClause>"(" {
2351 yyextra->current->req+=yytext;
2352 yyextra->lastRoundContext=RequiresClause;
2353 yyextra->pCopyRoundString=&yyextra->current->req;
2354 yyextra->roundCount=0;
2355 BEGIN( CopyRound ) ;
2357<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2361 yyextra->current->req+=yytext;
2362 yyextra->lastRoundContext=RequiresClause;
2363 yyextra->pCopyRoundString=&yyextra->current->req;
2364 yyextra->roundCount=0;
2372<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2376 yyextra->current->req+=yytext;
2377 yyextra->lastSharpContext=RequiresClause;
2378 yyextra->pCopySharpString=&yyextra->current->req;
2379 yyextra->sharpCount=0;
2387<RequiresClause>{NOTopt}{SCOPENAME} {
2391 yyextra->current->req=yytext;
2392 BEGIN(yyextra->requiresContext);
2399<RequiresClause>{NOTopt}"::"{ID} {
2401 yyextra->current->req+=yytext;
2403<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2405 yyextra->current->req+=yytext;
2407<RequiresClause>{BN}+ {
2408 yyextra->current->req+=
' ';
2413 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2414 BEGIN(yyextra->requiresContext);
2416<FindMembers,FindMemberName>{SCOPENAME} {
2418 yyextra->yyBegColNr=yyextra->yyColNr;
2419 yyextra->yyBegLineNr=yyextra->yyLineNr;
2421 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2425 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2427 if (yyextra->insideIDL)
2432 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2436 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2441 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2443 BEGIN(IDLUnionCase);
2445 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2447 yyextra->insideTryBlock=
FALSE;
2448 BEGIN(TryFunctionBlock);
2450 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2452 yyextra->lastAlignAsContext = YY_START;
2455 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2457 yyextra->current->type=
"var";
2459 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2461 yyextra->current->type=
"function";
2463 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2467 yyextra->current->name=
"this";
2470 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2473 BEGIN(StaticAssert);
2475 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2479 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2480 yyextra->current->type+=yytext;
2483 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2485 if (yyextra->current->type.isEmpty())
2487 yyextra->current->type =
"optional";
2491 yyextra->current->type +=
" optional";
2493 yyextra->lastModifierContext = YY_START;
2494 BEGIN(SliceOptional);
2498 if (YY_START==FindMembers)
2502 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2503 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2507 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2511 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2515 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2519 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2521 if (YY_START==FindMembers)
2522 yyextra->current->name = yytext;
2524 yyextra->current->name += yytext;
2525 yyextra->current->isStatic =
TRUE;
2529 if (YY_START==FindMembers)
2530 yyextra->current->name = yytext;
2532 yyextra->current->name += yytext;
2533 if (yyextra->current->name.startsWith(
"static "))
2535 yyextra->current->isStatic =
TRUE;
2536 yyextra->current->name= yyextra->current->name.mid(7);
2538 else if (yyextra->current->name.startsWith(
"inline "))
2540 if (yyextra->current->type.isEmpty())
2542 yyextra->current->type=
"inline";
2546 yyextra->current->type+=
"inline ";
2548 yyextra->current->name= yyextra->current->name.mid(7);
2550 else if (yyextra->current->name.startsWith(
"constexpr "))
2552 if (yyextra->current->type.isEmpty())
2554 yyextra->current->type=
"constexpr";
2558 yyextra->current->type+=
"constexpr ";
2560 yyextra->current->name=yyextra->current->name.mid(10);
2562 else if (yyextra->current->name.startsWith(
"consteval "))
2564 if (yyextra->current->type.isEmpty())
2566 yyextra->current->type=
"consteval";
2570 yyextra->current->type+=
"consteval ";
2572 yyextra->current->name=yyextra->current->name.mid(10);
2574 else if (yyextra->current->name.startsWith(
"constinit "))
2576 if (yyextra->current->type.isEmpty())
2578 yyextra->current->type=
"constinit";
2582 yyextra->current->type+=
"constinit ";
2584 yyextra->current->name=yyextra->current->name.mid(10);
2586 else if (yyextra->current->name.startsWith(
"const "))
2588 if (yyextra->current->type.isEmpty())
2590 yyextra->current->type=
"const";
2594 yyextra->current->type+=
"const ";
2596 yyextra->current->name=yyextra->current->name.mid(6);
2598 else if (yyextra->current->name.startsWith(
"volatile "))
2600 if (yyextra->current->type.isEmpty())
2602 yyextra->current->type=
"volatile";
2606 yyextra->current->type+=
"volatile ";
2608 yyextra->current->name=yyextra->current->name.mid(9);
2610 else if (yyextra->current->name.startsWith(
"typedef "))
2612 if (yyextra->current->type.isEmpty())
2614 yyextra->current->type=
"typedef";
2618 yyextra->current->type+=
"typedef ";
2620 yyextra->current->name=yyextra->current->name.mid(8);
2630 yyextra->externLinkage=
FALSE;
2634 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2637 yyextra->lastSkipRoundContext = FindMembers;
2638 yyextra->roundCount=0;
2641<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2647 yyextra->current->type+=yytext;
2648 yyextra->lastRoundContext=FindMembers;
2649 yyextra->pCopyRoundString=&yyextra->current->type;
2650 yyextra->roundCount=0;
2653<DeclType>{BN}+ {
lineCount(yyscanner); }
2658<CSIndexer>"["[^\n\]]*"]" {
2662<FindMembers>[0-9]{ID} {
2665 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2667 yyextra->current->name+=
".";
2671 yyextra->current->name+=yytext;
2673<CppQuote>"("{B}*"\"" {
2674 yyextra->insideCppQuote=
TRUE;
2678<IDLUnionCase>":" { BEGIN(FindMembers); }
2679<IDLUnionCase>\n {
lineCount(yyscanner); }
2681<TryFunctionBlock>\n {
lineCount(yyscanner); }
2682<TryFunctionBlock>"{" {
2683 yyextra->curlyCount=0;
2684 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2688<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2690<TryFunctionBlockEnd>\n { unput(*yytext);
2691 BEGIN( FindMembers );
2693<TryFunctionBlockEnd>. { unput(*yytext);
2694 BEGIN( FindMembers );
2697 yyextra->insideCppQuote=
FALSE;
2700<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2702 yyextra->lastCPPContext = YY_START;
2705<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2706<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2707 if (yyextra->insidePHP)
2709 yyextra->current->bodyLine = yyextra->yyLineNr;
2710 yyextra->current->bodyColumn = yyextra->yyColNr;
2711 yyextra->current->fileName = yyextra->fileName;
2712 yyextra->current->startLine = yyextra->yyLineNr;
2713 yyextra->current->startColumn = yyextra->yyColNr;
2714 yyextra->current->type.clear();
2715 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2716 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2717 yyextra->current->section = EntryType::makeDefine();
2718 yyextra->lastDefineContext = YY_START;
2721<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2722 yyextra->yyLineNr = atoi(&yytext[1]);
2724 yyextra->lastPreLineCtrlContext = YY_START;
2725 if (YY_START==ReadBody ||
2726 YY_START==ReadNSBody ||
2727 YY_START==ReadBodyIntf)
2729 yyextra->current->program << yytext;
2731 BEGIN( PreLineCtrl );
2733<PreLineCtrl>"\""[^\n\"]*"\"" {
2735 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2736 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2737 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2739 yyextra->current->program << yytext;
2743 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2744 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2745 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2747 yyextra->current->program << yytext;
2751 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2752 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2753 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2755 yyextra->current->program << yytext;
2758 BEGIN( yyextra->lastPreLineCtrlContext );
2761<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2762<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2763 BEGIN( yyextra->lastCPPContext) ;
2765<SDefine>{ID}{B}*"(" {
2766 yyextra->current->name = yytext;
2767 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2768 yyextra->current->args =
"(";
2769 yyextra->current->bodyLine = yyextra->yyLineNr;
2770 yyextra->current->bodyColumn = yyextra->yyColNr;
2771 yyextra->currentArgumentContext = DefineEnd;
2772 yyextra->fullArgString=yyextra->current->args;
2773 yyextra->copyArgString=&yyextra->current->args;
2774 BEGIN( ReadFuncArgType ) ;
2789 yyextra->current->bodyLine = yyextra->yyLineNr;
2790 yyextra->current->bodyColumn = yyextra->yyColNr;
2791 yyextra->current->name = yytext;
2798 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2800 BEGIN(yyextra->lastDefineContext);
2804 yyextra->current->fileName = yyextra->fileName;
2805 yyextra->current->startLine = yyextra->yyLineNr;
2806 yyextra->current->startColumn = yyextra->yyColNr;
2807 yyextra->current->type.clear();
2808 yyextra->current->type =
"const";
2812 yyextra->current->initializer.str(
init.str());
2813 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2814 yyextra->current->section = EntryType::makeVariable();
2815 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2820<DefineEnd>\\[\r]?\n {
2822 yyextra->current->endBodyLine = yyextra->yyLineNr;
2825 if (yyextra->insideIDL && yyextra->insideCppQuote)
2831 yyextra->lastStringContext=DefineEnd;
2836<DefinePHP>{ID}["']{BN}*","{BN}* {
2837 yyextra->current->name = yytext;
2838 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2839 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2840 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2841 yyextra->current->bodyLine = yyextra->yyLineNr;
2842 yyextra->current->bodyColumn = yyextra->yyColNr;
2843 yyextra->lastRoundContext = DefinePHPEnd;
2844 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2845 yyextra->roundCount = 0;
2846 BEGIN( GCopyRound );
2850 if (yyextra->insideCli)
2853 yyextra->current->name = yytext ;
2861 yyextra->current->name += yytext ;
2864<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2865 if (yyextra->current->bodyLine==-1)
2867 yyextra->current->bodyLine=yyextra->yyLineNr;
2868 yyextra->current->bodyColumn = yyextra->yyColNr;
2870 yyextra->docBlockContext = YY_START;
2871 yyextra->docBlockInBody =
FALSE;
2872 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2877 yyextra->docBlock.str(indent.
str());
2881 yyextra->docBlockTerm =
';';
2882 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2884 yyextra->current->bitfields =
":"+yyextra->current->args;
2885 yyextra->current->args.clear();
2886 yyextra->current->section = EntryType::makeVariable();
2888 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)
2899<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2900 yyextra->docBlockContext = YY_START;
2901 yyextra->docBlockInBody =
FALSE;
2902 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2907 yyextra->docBlock.str(indent.
str());
2910 yyextra->docBlockTerm =
',';
2911 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2913 yyextra->current->bitfields =
":"+yyextra->current->args;
2914 yyextra->current->args.clear();
2915 yyextra->current->section = EntryType::makeVariable();
2917 if (yytext[yyleng-3]==
'/')
2928<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2929 if (yyextra->current->bodyLine==-1)
2931 yyextra->current->bodyLine=yyextra->yyLineNr;
2932 yyextra->current->bodyColumn = yyextra->yyColNr;
2934 yyextra->docBlockContext = YY_START;
2935 yyextra->docBlockInBody =
FALSE;
2936 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2940 yyextra->docBlock.str(indent.
str());
2943 yyextra->docBlockTerm = 0;
2944 if (yytext[yyleng-3]==
'/')
2956<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2958 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
2961 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
2966 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
2972 if (yytext[2]==
'!' || yytext[2]==
'/')
2974 yyextra->docBlockContext = YY_START;
2975 yyextra->docBlockInBody =
FALSE;
2976 yyextra->docBlockAutoBrief =
FALSE;
2977 yyextra->docBlock.str(std::string());
2978 yyextra->docBlockTerm = 0;
2984 yyextra->lastCContext=YY_START;
2985 BEGIN(SkipCxxComment);
2990 if (yytext[2]==
'!' || yytext[2]==
'*')
2992 yyextra->docBlockContext = YY_START;
2993 yyextra->docBlockInBody =
FALSE;
2994 yyextra->docBlock.str(std::string());
2995 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2997 yyextra->docBlockTerm = 0;
3003 yyextra->lastCContext=YY_START;
3008<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3009 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3010 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3014 if (!yyextra->insideCS) REJECT;
3015 yyextra->current->bodyLine = yyextra->yyLineNr;
3016 yyextra->current->bodyColumn = yyextra->yyColNr;
3017 yyextra->current->initializer.str(yytext);
3018 yyextra->lastInitializerContext = YY_START;
3019 yyextra->initBracketCount=0;
3021 yyextra->current->spec.setGettable(
true);
3022 BEGIN(ReadInitializerPtr);
3025 yyextra->current->bodyLine = yyextra->yyLineNr;
3026 yyextra->current->bodyColumn = yyextra->yyColNr;
3027 yyextra->current->initializer.str(yytext);
3028 yyextra->lastInitializerContext = YY_START;
3029 yyextra->initBracketCount=0;
3030 BEGIN(ReadInitializer);
3032<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3034 yyextra->current->exception +=
" ";
3037<UNOIDLAttributeBlock>"}" {
3038 yyextra->current->exception +=
" }";
3042<ReadInitializer,ReadInitializerPtr>"(" {
3043 yyextra->lastRoundContext=YY_START;
3044 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3045 yyextra->roundCount=0;
3046 yyextra->current->initializer << *yytext;
3049<ReadInitializer,ReadInitializerPtr>"[" {
3050 if (!yyextra->insidePHP) REJECT;
3051 yyextra->lastSquareContext=YY_START;
3052 yyextra->pCopySquareGString=&yyextra->current->initializer;
3053 yyextra->squareCount=0;
3054 yyextra->current->initializer << *yytext;
3057<ReadInitializer,ReadInitializerPtr>"{" {
3058 yyextra->lastCurlyContext=YY_START;
3059 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3060 yyextra->curlyCount=0;
3061 yyextra->current->initializer << *yytext;
3064<ReadInitializer,ReadInitializerPtr>[;,] {
3066 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3068 yyextra->current->fileName = yyextra->fileName;
3069 yyextra->current->startLine = yyextra->yyLineNr;
3070 yyextra->current->startColumn = yyextra->yyColNr;
3071 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3072 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3073 yyextra->current->section = EntryType::makeVariable();
3074 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3078 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3081 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3082 BEGIN(yyextra->lastInitializerContext);
3084 else if (*yytext==
',' && yyextra->initBracketCount==0)
3087 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3088 BEGIN(yyextra->lastInitializerContext);
3092 yyextra->current->initializer << *yytext;
3095<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3096 if (!yyextra->insideCpp)
3102 yyextra->current->initializer << yytext;
3104 yyextra->lastRawStringContext = YY_START;
3105 yyextra->pCopyRawGString = &yyextra->current->initializer;
3110<RawGString>{RAWEND} {
3113 *yyextra->pCopyRawGString << yytext;
3114 BEGIN(yyextra->lastRawStringContext);
3121<RawGString>[^)\n]+ {
3122 *yyextra->pCopyRawGString << yytext;
3125 *yyextra->pCopyRawGString << yytext;
3128 *yyextra->pCopyRawGString << yytext;
3131<RawString>{RAWEND} {
3132 *yyextra->pCopyRawString+=yytext;
3133 yyextra->fullArgString+=yytext;
3136 BEGIN(yyextra->lastRawStringContext);
3140 *yyextra->pCopyRawString += yytext;
3141 yyextra->fullArgString+=yytext;
3144 *yyextra->pCopyRawString += yytext;
3145 yyextra->fullArgString+=yytext;
3148 *yyextra->pCopyRawString += yytext;
3149 yyextra->fullArgString+=yytext;
3152<ReadInitializer,ReadInitializerPtr>\" {
3153 if (yyextra->insideIDL && yyextra->insideCppQuote)
3159 yyextra->lastStringContext=YY_START;
3160 yyextra->current->initializer << yytext;
3161 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3162 yyextra->stopAtInvalidString=
false;
3166<ReadInitializer,ReadInitializerPtr>"->" {
3167 yyextra->current->initializer << yytext;
3169<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3170 yyextra->current->initializer << yytext;
3172<ReadInitializer,ReadInitializerPtr>(">>"|">=") {
3173 yyextra->current->initializer << yytext;
3175<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3176 yyextra->initBracketCount++;
3177 yyextra->current->initializer << *yytext;
3179<ReadInitializer,ReadInitializerPtr>[>\]})] {
3180 yyextra->initBracketCount--;
3183 yyextra->current->endBodyLine=yyextra->yyLineNr;
3185 yyextra->current->initializer << *yytext;
3187<ReadInitializer,ReadInitializerPtr>\' {
3188 if (yyextra->insidePHP)
3190 yyextra->current->initializer << yytext;
3191 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3192 yyextra->lastStringContext=YY_START;
3193 BEGIN(CopyPHPGString);
3197 yyextra->current->initializer << yytext;
3200<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3201 if (yyextra->insidePHP)
3207 yyextra->current->initializer << yytext;
3210<ReadInitializer,ReadInitializerPtr>\n {
3211 yyextra->current->initializer << *yytext;
3214<ReadInitializer,ReadInitializerPtr>"@\"" {
3216 yyextra->current->initializer << yytext;
3217 if (!yyextra->insideCS && !yyextra->insideObjC)
3224 yyextra->lastSkipVerbStringContext=YY_START;
3225 yyextra->pSkipVerbString=&yyextra->current->initializer;
3226 BEGIN(SkipVerbString);
3229<SkipVerbString>[^\n"\\]+ {
3230 *yyextra->pSkipVerbString << yytext;
3232<SkipVerbString>"\\\\" {
3233 if (yyextra->insideCS) REJECT
3234 *yyextra->pSkipVerbString << yytext;
3236<SkipVerbString>"\\\"" {
3237 if (yyextra->insideCS) REJECT
3238 *yyextra->pSkipVerbString << yytext;
3240<SkipVerbString>"\"\"" {
3241 *yyextra->pSkipVerbString << yytext;
3243<SkipVerbString>"\"" {
3244 *yyextra->pSkipVerbString << *yytext;
3245 BEGIN(yyextra->lastSkipVerbStringContext);
3248 *yyextra->pSkipVerbString << *yytext;
3252 *yyextra->pSkipVerbString << *yytext;
3254<ReadInitializer,ReadInitializerPtr>"?>" {
3255 if (yyextra->insidePHP)
3256 BEGIN( FindMembersPHP );
3258 yyextra->current->initializer << yytext;
3260<ReadInitializer,ReadInitializerPtr>. {
3261 yyextra->current->initializer << *yytext;
3265<CopyString,CopyPHPString>\\. {
3266 *yyextra->pCopyQuotedString+=yytext;
3269 *yyextra->pCopyQuotedString+=*yytext;
3270 BEGIN( yyextra->lastStringContext );
3273 *yyextra->pCopyQuotedString+=*yytext;
3274 BEGIN( yyextra->lastStringContext );
3276<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3277 *yyextra->pCopyQuotedString+=yytext;
3279<CopyString,CopyPHPString>\n {
3280 *yyextra->pCopyQuotedString+=*yytext;
3283<CopyString,CopyPHPString>. {
3284 *yyextra->pCopyQuotedString+=*yytext;
3288<CopyGString,CopyPHPGString>\\. {
3289 *yyextra->pCopyQuotedGString << yytext;
3292 *yyextra->pCopyQuotedGString << *yytext;
3293 BEGIN( yyextra->lastStringContext );
3296 *yyextra->pCopyQuotedGString << *yytext;
3297 BEGIN( yyextra->lastStringContext );
3299<CopyGString,CopyPHPGString>"<?php" {
3300 *yyextra->pCopyQuotedGString << yytext;
3301 BEGIN( yyextra->lastStringContext );
3303<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3304 *yyextra->pCopyQuotedGString << yytext;
3306<CopyGString,CopyPHPGString>\n {
3307 *yyextra->pCopyQuotedGString << *yytext;
3308 if (yyextra->stopAtInvalidString)
3310 BEGIN( yyextra->lastStringContext );
3317<CopyGString,CopyPHPGString>. {
3318 *yyextra->pCopyQuotedGString << *yytext;
3323 *yyextra->pCopyRoundString += *yytext;
3324 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3325 yyextra->lastStringContext=YY_START;
3329 *yyextra->pCopyRoundString += *yytext;
3330 yyextra->roundCount++;
3333 *yyextra->pCopyRoundString += *yytext;
3334 if (--yyextra->roundCount<0)
3335 BEGIN(yyextra->lastRoundContext);
3339 *yyextra->pCopyRoundString += *yytext;
3342 if (yyextra->insidePHP)
3344 yyextra->current->initializer << yytext;
3345 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3346 yyextra->lastStringContext=YY_START;
3347 BEGIN(CopyPHPString);
3351 *yyextra->pCopyRoundString += yytext;
3354<CopyRound>{CHARLIT} {
3355 if (yyextra->insidePHP)
3361 *yyextra->pCopyRoundString+=yytext;
3364<CopyRound>[^"'()\n,]+ {
3365 *yyextra->pCopyRoundString+=yytext;
3368 *yyextra->pCopyRoundString+=*yytext;
3373 *yyextra->pCopySharpString += *yytext;
3374 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3375 yyextra->lastStringContext=YY_START;
3379 *yyextra->pCopySharpString += *yytext;
3380 yyextra->sharpCount++;
3383 *yyextra->pCopySharpString += *yytext;
3384 if (--yyextra->sharpCount<0)
3386 BEGIN(yyextra->lastSharpContext);
3391 *yyextra->pCopySharpString += *yytext;
3394 if (yyextra->insidePHP)
3396 yyextra->current->initializer << yytext;
3397 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3398 yyextra->lastStringContext=YY_START;
3399 BEGIN(CopyPHPString);
3403 *yyextra->pCopySharpString += yytext;
3406<CopySharp>{CHARLIT} {
3407 if (yyextra->insidePHP)
3413 *yyextra->pCopySharpString+=yytext;
3416<CopySharp>[^"'<>\n,]+ {
3417 *yyextra->pCopySharpString+=yytext;
3420 *yyextra->pCopySharpString+=*yytext;
3426 *yyextra->pCopyRoundGString << *yytext;
3427 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3428 yyextra->lastStringContext=YY_START;
3432 *yyextra->pCopyRoundGString << *yytext;
3433 yyextra->roundCount++;
3436 *yyextra->pCopyRoundGString << *yytext;
3437 if (--yyextra->roundCount<0)
3438 BEGIN(yyextra->lastRoundContext);
3442 *yyextra->pCopyRoundGString << *yytext;
3445 if (yyextra->insidePHP)
3447 yyextra->current->initializer << yytext;
3448 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3449 yyextra->lastStringContext=YY_START;
3450 BEGIN(CopyPHPGString);
3454 *yyextra->pCopyRoundGString << yytext;
3457<GCopyRound>{CHARLIT} {
3458 if (yyextra->insidePHP)
3464 *yyextra->pCopyRoundGString << yytext;
3468 if (!yyextra->insideCS) REJECT;
3469 *yyextra->pCopyRoundGString << yytext;
3470 yyextra->lastSkipVerbStringContext=YY_START;
3471 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3472 BEGIN(SkipVerbString);
3474<GCopyRound>[^"'()\n\/,R]+ {
3475 *yyextra->pCopyRoundGString << yytext;
3477<GCopyRound>{RAWBEGIN} {
3478 *yyextra->pCopyRoundGString << yytext;
3480 yyextra->lastRawStringContext = YY_START;
3481 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3485 *yyextra->pCopyRoundGString << *yytext;
3490 *yyextra->pCopySquareGString << *yytext;
3491 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3492 yyextra->lastStringContext=YY_START;
3496 *yyextra->pCopySquareGString << *yytext;
3497 if (yyextra->insidePHP)
3499 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3500 yyextra->lastStringContext=YY_START;
3501 BEGIN(CopyPHPGString);
3505 *yyextra->pCopySquareGString << *yytext;
3506 yyextra->squareCount++;
3509 *yyextra->pCopySquareGString << *yytext;
3510 if (--yyextra->squareCount<0)
3511 BEGIN(yyextra->lastSquareContext);
3515 *yyextra->pCopySquareGString << *yytext;
3518 if (yyextra->insidePHP)
3520 yyextra->current->initializer << yytext;
3521 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3522 yyextra->lastStringContext=YY_START;
3523 BEGIN(CopyPHPGString);
3527 *yyextra->pCopySquareGString << yytext;
3530<GCopySquare>{CHARLIT} {
3531 if (yyextra->insidePHP)
3537 *yyextra->pCopySquareGString << yytext;
3540<GCopySquare>[^"'\[\]\n\/,]+ {
3541 *yyextra->pCopySquareGString << yytext;
3544 *yyextra->pCopySquareGString << *yytext;
3549 *yyextra->pCopyCurlyString += *yytext;
3550 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3551 yyextra->lastStringContext=YY_START;
3555 *yyextra->pCopyCurlyString += *yytext;
3556 if (yyextra->insidePHP)
3558 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3559 yyextra->lastStringContext=YY_START;
3560 BEGIN(CopyPHPString);
3564 *yyextra->pCopyCurlyString += *yytext;
3565 yyextra->curlyCount++;
3568 *yyextra->pCopyCurlyString += *yytext;
3569 if (--yyextra->curlyCount<0)
3570 BEGIN(yyextra->lastCurlyContext);
3572<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3578 *yyextra->pCopyCurlyString += yytext;
3581<CopyCurly>[^"'{}\/\n,]+ {
3582 *yyextra->pCopyCurlyString += yytext;
3584<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3587 *yyextra->pCopyCurlyString += *yytext;
3590 *yyextra->pCopyCurlyString += *yytext;
3594<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3596<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3598 int s = line.
find(
' ');
3599 int e = line.
find(
'"',s);
3600 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3601 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3608 *yyextra->pCopyCurlyGString << *yytext;
3609 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3610 yyextra->lastStringContext=YY_START;
3614 *yyextra->pCopyCurlyGString << *yytext;
3615 if (yyextra->insidePHP)
3617 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3618 yyextra->lastStringContext=YY_START;
3619 BEGIN(CopyPHPGString);
3623 *yyextra->pCopyCurlyGString << *yytext;
3624 yyextra->curlyCount++;
3627 *yyextra->pCopyCurlyGString << *yytext;
3628 if (--yyextra->curlyCount<0)
3630 yyextra->current->endBodyLine = yyextra->yyLineNr;
3631 BEGIN(yyextra->lastCurlyContext);
3634<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3640 *yyextra->pCopyCurlyGString << yytext;
3643<GCopyCurly>[^"'{}\/\n,]+ {
3644 *yyextra->pCopyCurlyGString << yytext;
3647 *yyextra->pCopyCurlyGString << yytext;
3649<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3652 *yyextra->pCopyCurlyGString << *yytext;
3655 *yyextra->pCopyCurlyGString << *yytext;
3662 if (yyextra->current->type.isEmpty() &&
3663 yyextra->current->name==
"enum")
3665 yyextra->current->section = EntryType::makeEnum();
3666 yyextra->current->name.clear();
3667 yyextra->current->args.clear();
3668 BEGIN(EnumBaseType);
3672 if (yyextra->current->type.isEmpty())
3675 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3678 yyextra->current->bitfields+=
":";
3682 yyextra->current->bitfields+=*yytext;
3685 yyextra->current->args+=*yytext;
3689 yyextra->current->args+=
' ';
3692 QCString oldType = yyextra->current->type;
3693 if (yyextra->current->bodyLine==-1)
3695 yyextra->current->bodyLine = yyextra->yyLineNr;
3696 yyextra->current->bodyColumn = yyextra->yyColNr;
3698 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3700 yyextra->current->type = yyextra->current->type.mid(3);
3702 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3704 yyextra->current->type.prepend(
"typedef ");
3706 bool isStatic = yyextra->current->isStatic;
3707 Protection prot = yyextra->current->protection;
3708 bool isConcept = yyextra->current->section.isConcept();
3709 bool isModule = yyextra->current->section.isModuleDoc();
3712 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3717 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3720 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3722 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3724 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3725 if (yyextra->current->section.isClass())
3729 yyextra->current->section = EntryType::makeVariable() ;
3730 yyextra->current->fileName = yyextra->fileName;
3731 yyextra->current->startLine = yyextra->yyBegLineNr;
3732 yyextra->current->startColumn = yyextra->yyBegColNr;
3733 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3736 if ( *yytext ==
',')
3738 yyextra->current->isStatic = isStatic;
3739 yyextra->current->protection = prot;
3740 yyextra->current->name.clear();
3741 yyextra->current->args.clear();
3742 yyextra->current->brief.clear();
3743 yyextra->current->doc.clear();
3744 yyextra->current->initializer.str(std::string());
3745 yyextra->current->bitfields.clear();
3752 yyextra->current->bodyLine = -1;
3753 yyextra->current->bodyColumn = 1;
3754 yyextra->current->groups.clear();
3760 if (yyextra->insideSlice)
3762 yyextra->squareCount=1;
3763 yyextra->lastSquareContext = YY_START;
3764 yyextra->current->metaData +=
"[";
3765 BEGIN( SliceMetadata );
3767 else if (!yyextra->insideCS &&
3768 (yyextra->current->name.isEmpty() ||
3769 yyextra->current->name==
"typedef"
3773 yyextra->squareCount=1;
3774 yyextra->lastSquareContext = YY_START;
3775 yyextra->idlAttr.clear();
3776 yyextra->idlProp.clear();
3777 yyextra->current->mtype = yyextra->mtype;
3782 yyextra->odlProp =
true;
3783 yyextra->current->spec.setGettable(
true).setSettable(
true);
3786 BEGIN( IDLAttribute );
3788 else if (yyextra->insideCS &&
3789 yyextra->current->name.isEmpty())
3791 yyextra->squareCount=1;
3792 yyextra->lastSquareContext = YY_START;
3795 yyextra->current->args.clear();
3796 BEGIN( SkipSquare );
3800 yyextra->current->args += yytext ;
3801 yyextra->squareCount=1;
3802 yyextra->externLinkage=
FALSE;
3807 yyextra->squareCount++;
3808 yyextra->current->metaData +=
"[";
3810<SliceMetadata>{BN}* {
3813<SliceMetadata>\"[^\"]*\" {
3814 yyextra->current->metaData += yytext;
3817 yyextra->current->metaData += yytext;
3820 yyextra->current->metaData += yytext;
3821 if (--yyextra->squareCount<=0)
3823 BEGIN (yyextra->lastSquareContext);
3827 yyextra->current->type +=
"(";
3828 yyextra->roundCount++;
3830<SliceOptional>[0-9]+ {
3831 yyextra->current->type += yytext;
3834 yyextra->current->type +=
")";
3835 if(--yyextra->roundCount<=0)
3837 BEGIN (yyextra->lastModifierContext);
3842 if (--yyextra->squareCount<=0)
3846 BEGIN( IDLPropName );
3848 BEGIN( yyextra->lastSquareContext );
3851<IDLAttribute>"propput" {
3856 yyextra->current->spec.setSettable(
true);
3858<IDLAttribute>"propget" {
3863 yyextra->current->spec.setGettable(
true);
3865<IDLAttribute>"property" {
3866 yyextra->current->spec.setProperty(
true);
3868<IDLAttribute>"attribute" {
3869 yyextra->current->spec.setAttribute(
true);
3871<IDLAttribute>"optional" {
3872 yyextra->current->spec.setOptional(
true);
3874<IDLAttribute>"readonly" {
3877 yyextra->current->spec.setSettable(
false);
3881 yyextra->current->spec.setReadonly(
true);
3884<IDLAttribute>"bound" {
3885 yyextra->current->spec.setBound(
true);
3887<IDLAttribute>"removable" {
3888 yyextra->current->spec.setRemovable(
true);
3890<IDLAttribute>"constrained" {
3891 yyextra->current->spec.setConstrained(
true);
3893<IDLAttribute>"transient" {
3894 yyextra->current->spec.setTransient(
true);
3896<IDLAttribute>"maybevoid" {
3897 yyextra->current->spec.setMaybeVoid(
true);
3899<IDLAttribute>"maybedefault" {
3900 yyextra->current->spec.setMaybeDefault(
true);
3902<IDLAttribute>"maybeambiguous" {
3903 yyextra->current->spec.setMaybeAmbiguous(
true);
3907<IDLPropName>{BN}*{ID}{BN}* {
3910 if (yyextra->odlProp)
3912 yyextra->idlProp = yytext;
3915<IDLPropName>{ID}{BN}*"(" {
3916 yyextra->current->name = yytext;
3917 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3918 yyextra->current->startLine = yyextra->yyLineNr;
3919 yyextra->current->startColumn = yyextra->yyColNr;
3922<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3923 if (yyextra->odlProp)
3925 yyextra->idlProp += yytext;
3928<IDLPropName>{ID}{BNopt}/";" {
3929 if (yyextra->odlProp)
3931 yyextra->current->name = yytext;
3932 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3933 yyextra->odlProp =
false;
3938<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3939 yyextra->idlAttr = yytext;
3940 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3943 yyextra->idlProp = yytext;
3945<IDLProp>{BN}*{ID}{BN}*"," {
3946 if (yyextra->current->args.isEmpty())
3947 yyextra->current->args =
"(";
3949 yyextra->current->args +=
", ";
3950 yyextra->current->args += yyextra->idlAttr;
3951 yyextra->current->args +=
" ";
3952 yyextra->current->args += yyextra->idlProp;
3953 yyextra->current->args +=
" ";
3954 yyextra->current->args += yytext;
3955 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
3956 yyextra->idlProp.clear();
3957 yyextra->idlAttr.clear();
3960<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
3964 yyextra->current->fileName = yyextra->fileName;
3965 yyextra->current->type = yyextra->idlProp;
3966 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3967 if (!yyextra->current->args.isEmpty())
3968 yyextra->current->args +=
")";
3969 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3970 yyextra->current->section = EntryType::makeVariable();
3971 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3973 BEGIN( FindMembers );
3978<Array>"]" { yyextra->current->args += *yytext ;
3979 if (--yyextra->squareCount<=0)
3980 BEGIN( FindMembers ) ;
3982<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
3983 if (--yyextra->squareCount<=0)
3984 BEGIN( SFunction ) ;
3986<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
3987 yyextra->squareCount++;
3989<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
3990<SkipSquare>"[" { yyextra->squareCount++; }
3992 if (--yyextra->squareCount<=0)
3993 BEGIN( yyextra->lastSquareContext );
3996 yyextra->lastStringContext=YY_START;
3997 BEGIN( SkipString );
3999<SkipSquare>[^\n\[\]\"]+
4000<FindMembers>"<" {
addType(yyscanner);
4001 yyextra->current->type += yytext ;
4004<Sharp>">" { yyextra->current->type += *yytext ;
4005 if (--yyextra->sharpCount<=0)
4006 BEGIN( FindMembers ) ;
4008<Sharp>"<" { yyextra->current->type += *yytext ;
4009 yyextra->sharpCount++;
4012 yyextra->current->type +=
' ';
4015<Sharp>. { yyextra->current->type += *yytext ; }
4018 yyextra->current->bodyLine = yyextra->yyLineNr;
4019 yyextra->current->bodyColumn = yyextra->yyColNr;
4020 yyextra->current->name = yytext;
4025 yyextra->lastInitializerContext = YY_START;
4026 yyextra->initBracketCount=0;
4027 yyextra->current->initializer.str(
"=");
4028 BEGIN(ReadInitializer);
4031 yyextra->lastInitializerContext = YY_START;
4032 yyextra->initBracketCount=0;
4033 yyextra->current->initializer.str(yytext);
4034 BEGIN(ReadInitializer);
4037 if (yyextra->insideJava)
4039 if (!yyextra->current->name.isEmpty())
4041 yyextra->current->fileName = yyextra->fileName;
4042 yyextra->current->startLine = yyextra->yyLineNr;
4043 yyextra->current->startColumn = yyextra->yyColNr;
4044 if (!yyextra->current_root->spec.isEnum())
4046 yyextra->current->type =
"@";
4048 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4049 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4050 yyextra->current->section = EntryType::makeVariable();
4051 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4055 BEGIN( FindMembers );
4066 if (!yyextra->current->name.isEmpty())
4068 yyextra->current->fileName = yyextra->fileName;
4069 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4071 yyextra->current->startLine = yyextra->current->bodyLine;
4072 yyextra->current->startColumn = yyextra->current->bodyColumn;
4076 yyextra->current->startLine = yyextra->yyLineNr;
4077 yyextra->current->startColumn = yyextra->yyColNr;
4079 if (!yyextra->current_root->spec.isEnum())
4081 yyextra->current->type =
"@";
4083 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4084 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4085 yyextra->current->section = EntryType::makeVariable();
4087 if (!yyextra->insideCS && !yyextra->insideJava &&
4088 !yyextra->current_root->spec.isStrong())
4095 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4097 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4102 yyextra->current->reset();
4107 yyextra->squareCount=1;
4108 yyextra->lastSquareContext = YY_START;
4111<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4112<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4113<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4116 yyextra->current->program << yytext ;
4119<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4120 yyextra->current->program << yytext ;
4121 yyextra->pSkipInterpString = &yyextra->current->program;
4122 yyextra->lastSkipInterpStringContext=YY_START;
4123 BEGIN( SkipInterpString );
4125<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})* {
4126 *yyextra->pSkipInterpString << yytext;
4128<SkipInterpString>\" {
4129 *yyextra->pSkipInterpString << *yytext;
4130 BEGIN( yyextra->lastSkipInterpStringContext );
4133<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4134 yyextra->current->program << yytext ;
4135 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4136 yyextra->lastSkipInterpVerbStringContext=YY_START;
4137 BEGIN( SkipInterpVerbString );
4139<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4140 *yyextra->pSkipInterpVerbString << yytext;
4142<SkipInterpString>"{"[^}]*"}" {
4143 *yyextra->pSkipInterpString << yytext;
4145<SkipInterpVerbString>"{"[^}]*"}" {
4146 *yyextra->pSkipInterpVerbString << yytext;
4148<SkipInterpVerbString>\" {
4149 *yyextra->pSkipInterpVerbString << *yytext;
4150 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4152<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4153<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4154 yyextra->pSkipVerbString = &yyextra->current->program;
4155 yyextra->lastSkipVerbStringContext=YY_START;
4156 BEGIN( SkipVerbString );
4158<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4160 yyextra->current->program << yytext ;
4161 yyextra->pCopyHereDocGString = &yyextra->current->program;
4162 yyextra->lastHereDocContext=YY_START;
4163 BEGIN( CopyHereDoc );
4170<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4171 yyextra->current->program << yytext;
4173 yyextra->lastRawStringContext = YY_START;
4174 yyextra->pCopyRawGString = &yyextra->current->program;
4177<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4178 yyextra->pCopyQuotedGString = &yyextra->current->program;
4179 yyextra->lastStringContext=YY_START;
4180 yyextra->stopAtInvalidString=
false;
4181 BEGIN( CopyGString );
4183<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4184<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4185 yyextra->lastContext = YY_START ;
4188<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4189 ++yyextra->yyLineNr ;
4190 yyextra->lastContext = YY_START ;
4193<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4194 if (!yyextra->insidePHP)
4196 yyextra->current->program << yytext;
4200 yyextra->current->program << yytext;
4201 yyextra->pCopyQuotedGString = &yyextra->current->program;
4202 yyextra->lastStringContext=YY_START;
4203 BEGIN(CopyPHPGString);
4206<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4207 if (yyextra->insidePHP)
4214 yyextra->current->program << yytext;
4217<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4218 ++yyextra->curlyCount ;
4221 yyextra->current->program << yytext ;
4222 --yyextra->curlyCount ;
4224<ReadBody,ReadNSBody>"}" {
4225 if ( yyextra->curlyCount>0 )
4227 yyextra->current->program << yytext ;
4228 --yyextra->curlyCount ;
4232 yyextra->current->endBodyLine = yyextra->yyLineNr;
4233 std::shared_ptr<Entry> original_root = yyextra->current_root;
4234 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4238 QCString doc = yyextra->current->doc;
4239 int docLine = yyextra->current->docLine;
4240 QCString docFile = yyextra->current->docFile;
4241 QCString brief = yyextra->current->brief;
4242 int briefLine = yyextra->current->briefLine;
4243 QCString briefFile = yyextra->current->briefFile;
4245 yyextra->current->doc =
"";
4246 yyextra->current->docLine = 0;
4247 yyextra->current->docFile =
"";
4248 yyextra->current->brief =
"";
4249 yyextra->current->briefLine = 0;
4250 yyextra->current->briefFile =
"";
4251 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4253 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4254 yyextra->current->program.str(std::string());
4255 new_current->name = yyextra->current->name.mid(split_point + 2);
4256 yyextra->current->name = yyextra->current->name.left(split_point);
4257 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4259 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4260 yyextra->current_root = yyextra->current;
4261 yyextra->current = new_current;
4264 yyextra->current->doc = doc;
4265 yyextra->current->docLine = docLine;
4266 yyextra->current->docFile = docFile;
4267 yyextra->current->brief = brief;
4268 yyextra->current->briefLine = briefLine;
4269 yyextra->current->briefFile = briefFile;
4271 QCString &cn = yyextra->current->name;
4272 QCString rn = yyextra->current_root->name;
4278 if (yyextra->isTypedef && cn.
isEmpty())
4281 BEGIN( TypedefName );
4285 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4287 yyextra->current->program <<
',';
4292 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4293 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4295 if (yyextra->insideObjC &&
4296 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4299 BEGIN( ReadBodyIntf ) ;
4303 yyextra->memspecEntry = yyextra->current;
4304 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4305 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4306 if (yyextra->current->section.isNamespace() ||
4307 yyextra->current->spec.isInterface() ||
4308 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4309 yyextra->insideSlice
4312 yyextra->current->reset();
4313 yyextra->current_root = std::move(original_root);
4315 yyextra->memspecEntry.reset();
4316 BEGIN( FindMembers ) ;
4320 static const reg::Ex re(R
"(@\d+$)");
4321 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4322 !
reg::search(yyextra->memspecEntry->name.str(),re))
4325 yyextra->current->doc.clear();
4326 yyextra->current->brief.clear();
4328 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.
4334<ReadBody>"}"{BN}+"typedef"{BN}+ {
4336 if ( yyextra->curlyCount>0 )
4338 yyextra->current->program << yytext ;
4339 --yyextra->curlyCount ;
4343 yyextra->isTypedef =
TRUE;
4344 yyextra->current->endBodyLine = yyextra->yyLineNr;
4345 QCString &cn = yyextra->current->name;
4346 QCString rn = yyextra->current_root->name;
4351 BEGIN( TypedefName );
4354<TypedefName>("const"|"volatile"){BN} {
4356 yyextra->current->type.prepend(yytext);
4359 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4361 yyextra->current->program <<
",";
4363 yyextra->current->name=yytext;
4365 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4366 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4368 if (!yyextra->firstTypedefEntry)
4370 yyextra->firstTypedefEntry = yyextra->current;
4372 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4374 yyextra->isTypedef=
TRUE;
4375 BEGIN(MemberSpecSkip);
4379 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4381 yyextra->current->program <<
',';
4384 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4385 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4386 yyextra->memspecEntry = yyextra->current;
4387 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4390 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4392<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4394 int i=0,l=(int)yyleng,j;
4395 while (i<l && (!
isId(yytext[i]))) i++;
4397 j=yyextra->msName.
find(
"[");
4400 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4401 yyextra->msName=yyextra->msName.left(j);
4406 if (yyextra->firstTypedefEntry)
4408 if (yyextra->firstTypedefEntry->spec.isStruct())
4410 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4412 else if (yyextra->firstTypedefEntry->spec.isUnion())
4414 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4416 else if (yyextra->firstTypedefEntry->section.isEnum())
4418 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4422 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4428 yyextra->current->name = yyextra->msName;
4434 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4440 const Entry *p=yyextra->current.get();
4448 int pi = (i==-1) ? 0 : i+2;
4458 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4462 if (!yyextra->msName.isEmpty()
4468 if (typedefHidesStruct &&
4469 yyextra->isTypedef &&
4470 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4471 yyextra->msType.stripWhiteSpace().isEmpty() &&
4472 yyextra->memspecEntry)
4474 yyextra->memspecEntry->name=yyextra->msName;
4478 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4479 varEntry->lang = yyextra->language;
4480 varEntry->protection = yyextra->current->protection ;
4481 varEntry->mtype = yyextra->current->mtype;
4482 varEntry->virt = yyextra->current->virt;
4483 varEntry->isStatic = yyextra->current->isStatic;
4484 varEntry->section = EntryType::makeVariable();
4485 varEntry->name = yyextra->msName.stripWhiteSpace();
4486 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4487 varEntry->args = yyextra->msArgs;
4488 if (yyextra->isTypedef)
4490 varEntry->type.prepend(
"typedef ");
4493 if (typedefHidesStruct &&
4494 yyextra->isTypedef &&
4495 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4496 yyextra->memspecEntry
4499 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4503 varEntry->type+=yyextra->current->name+yyextra->msType;
4505 varEntry->fileName = yyextra->fileName;
4506 varEntry->startLine = yyextra->yyLineNr;
4507 varEntry->startColumn = yyextra->yyColNr;
4508 varEntry->doc = yyextra->current->doc;
4509 varEntry->brief = yyextra->current->brief;
4510 varEntry->mGrpId = yyextra->current->mGrpId;
4511 varEntry->initializer.str(yyextra->current->initializer.str());
4512 varEntry->groups = yyextra->current->groups;
4513 varEntry->sli = yyextra->current->sli;
4518 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4523 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4525 if (!yyextra->current->doc.isEmpty())
4527 yyextra->memspecEntry->doc += yyextra->current->doc;
4529 if (!yyextra->current->brief.isEmpty())
4531 yyextra->memspecEntry->brief += yyextra->current->brief;
4534 yyextra->msType.clear();
4535 yyextra->msName.clear();
4536 yyextra->msArgs.clear();
4537 yyextra->isTypedef=
FALSE;
4538 yyextra->firstTypedefEntry.reset();
4539 yyextra->memspecEntry.reset();
4540 yyextra->current->reset();
4542 BEGIN( FindMembers );
4546 yyextra->current->doc.clear();
4547 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
4552 yyextra->lastInitializerContext=YY_START;
4553 yyextra->initBracketCount=0;
4554 yyextra->current->initializer.str(yytext);
4555 BEGIN(ReadInitializer);
4566<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4567<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4568<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4571<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4572 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4575 yyextra->insideObjC=
FALSE;
4576 BEGIN( FindMembers );
4578<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4579<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4581<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4582<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4583 if (yyextra->insidePHP)
4589 yyextra->current->bodyLine = yyextra->yyLineNr;
4590 yyextra->current->bodyColumn = yyextra->yyColNr;
4593 yyextra->funcPtrType=yytext;
4594 yyextra->roundCount=0;
4599<FuncPtr>{SCOPENAME} {
4600 yyextra->current->name = yytext;
4603 BEGIN( FuncPtrOperator );
4607 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4609 yyextra->funcPtrType += yyextra->current->name;
4613 BEGIN( EndFuncPtr );
4620<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4621 yyextra->current->name += yytext;
4622 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4625<FuncPtrOperator>\n {
4627 yyextra->current->name += *yytext;
4629<FuncPtrOperator>"(" {
4631 BEGIN( EndFuncPtr );
4634 yyextra->current->name += *yytext;
4636<EndFuncPtr>")"{BNopt}/";" {
4638 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4641<EndFuncPtr>")"{BNopt}/"(" {
4643 if (yyextra->funcPtrType!=
"(")
4645 yyextra->current->type+=yyextra->funcPtrType+
")";
4649<EndFuncPtr>")"{BNopt}/"[" {
4651 yyextra->current->type+=yyextra->funcPtrType;
4652 yyextra->current->args +=
")";
4657 yyextra->current->args += *yytext ;
4660 yyextra->current->bodyLine = yyextra->yyLineNr;
4661 yyextra->current->bodyColumn = yyextra->yyColNr;
4662 yyextra->currentArgumentContext = FuncFuncEnd;
4663 yyextra->fullArgString=yyextra->current->args;
4664 yyextra->copyArgString=&yyextra->current->args;
4665 BEGIN( ReadFuncArgType ) ;
4667<EndFuncPtr>"["[^\n\]]*"]" {
4668 yyextra->funcPtrType+=yytext;
4674 yyextra->current->args += *yytext ;
4675 ++yyextra->roundCount;
4678 yyextra->current->args += *yytext ;
4679 if ( yyextra->roundCount )
4680 --yyextra->roundCount;
4686<FuncFuncEnd>")"{BN}*"(" {
4688 yyextra->current->type+=yyextra->funcPtrType+
")(";
4689 BEGIN(FuncFuncType);
4691<FuncFuncEnd>")"{BNopt}/[;{] {
4693 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4696<FuncFuncEnd>")"{BNopt}/"[" {
4698 yyextra->current->type+=yyextra->funcPtrType;
4699 yyextra->current->args+=
")";
4700 BEGIN(FuncFuncArray);
4703 yyextra->current->args += *yytext;
4706 yyextra->current->type += *yytext;
4707 yyextra->roundCount++;
4710 yyextra->current->type += *yytext;
4711 if (yyextra->roundCount)
4712 --yyextra->roundCount;
4716<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4717<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4719 yyextra->current->type += *yytext;
4721<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4722 if (yyextra->current->type.startsWith(
"typedef") &&
4723 yyextra->current->bodyLine==-1)
4726 yyextra->current->bodyLine = yyextra->yyLineNr;
4727 yyextra->current->bodyColumn = yyextra->yyColNr;
4728 BEGIN( GetCallType );
4730 else if (!yyextra->current->name.isEmpty())
4732 yyextra->current->args = yytext;
4733 yyextra->current->bodyLine = yyextra->yyLineNr;
4734 yyextra->current->bodyColumn = yyextra->yyColNr;
4735 yyextra->currentArgumentContext = FuncQual;
4736 yyextra->fullArgString=yyextra->current->args;
4737 yyextra->copyArgString=&yyextra->current->args;
4738 BEGIN( ReadFuncArgType ) ;
4742<GetCallType>{BN}*{ID}{BN}*"*" {
4745 yyextra->funcPtrType=
"(";
4746 yyextra->funcPtrType+=yytext;
4747 yyextra->roundCount=0;
4751 if (!yyextra->current->name.isEmpty())
4753 yyextra->current->args = yytext;
4754 yyextra->current->bodyLine = yyextra->yyLineNr;
4755 yyextra->current->bodyColumn = yyextra->yyColNr;
4756 yyextra->currentArgumentContext = FuncQual;
4757 yyextra->fullArgString=yyextra->current->args;
4758 yyextra->copyArgString=&yyextra->current->args;
4759 BEGIN( ReadFuncArgType ) ;
4773<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4774 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4775 else yyextra->fullArgString+=yytext;
4777<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4778 yyextra->fullArgString+=yytext;
4780<CopyArgRound>[^\/\n\)\(\"\']+ {
4781 *yyextra->copyArgString+=yytext;
4782 yyextra->fullArgString+=yytext;
4784<CopyArgSquare>[^\/\n\]\[\"\']+ {
4785 *yyextra->copyArgString+=yytext;
4786 yyextra->fullArgString+=yytext;
4788<ReadFuncArgType,ReadTempArgs>{BN}* {
4789 *yyextra->copyArgString+=
" ";
4790 yyextra->fullArgString+=
" ";
4793<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4795 yyextra->lastRawStringContext = YY_START;
4796 yyextra->pCopyRawString = yyextra->copyArgString;
4797 *yyextra->pCopyRawString+=yytext;
4798 yyextra->fullArgString+=yytext;
4801<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4802 *yyextra->copyArgString+=*yytext;
4803 yyextra->fullArgString+=*yytext;
4804 yyextra->lastCopyArgStringContext = YY_START;
4805 BEGIN( CopyArgString );
4807<ReadFuncArgType>"[" {
4808 if (!yyextra->insidePHP) REJECT;
4809 *yyextra->copyArgString+=*yytext;
4810 yyextra->fullArgString+=*yytext;
4811 yyextra->argSquareCount=0;
4812 yyextra->lastCopyArgContext = YY_START;
4813 BEGIN( CopyArgSquare );
4815<ReadFuncArgType,ReadTempArgs>"(" {
4816 *yyextra->copyArgString+=*yytext;
4817 yyextra->fullArgString+=*yytext;
4818 yyextra->argRoundCount=0;
4819 yyextra->lastCopyArgContext = YY_START;
4820 BEGIN( CopyArgRound );
4822<ReadFuncArgType>")" {
4823 *yyextra->copyArgString+=*yytext;
4824 yyextra->fullArgString+=*yytext;
4826 if (yyextra->insideJS)
4837 yyextra->docBackup = yyextra->current->doc;
4838 yyextra->briefBackup = yyextra->current->brief;
4840 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4843<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4844 if (yyextra->currentArgumentContext==DefineEnd)
4848 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4854 BEGIN( yyextra->currentArgumentContext );
4860 yyextra->fullArgString+=yytext;
4861 yyextra->lastCopyArgChar=0;
4862 yyextra->lastCommentInArgContext=YY_START;
4864 BEGIN( CopyArgCommentLine );
4866 BEGIN( CopyArgComment );
4870<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4871<ReadFuncArgType,ReadTempArgs>{CCS} {
4872 yyextra->lastCContext = YY_START;
4873 BEGIN( SkipComment );
4875<ReadFuncArgType,ReadTempArgs>{CPPC} {
4876 yyextra->lastCContext = YY_START;
4877 BEGIN( SkipCxxComment );
4893<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4895 if (yyextra->currentArgumentContext==DefineEnd)
4899 int i;
for (i=(
int)yyleng-1;i>0;i--)
4903 *yyextra->copyArgString+=*yytext;
4904 yyextra->fullArgString+=*yytext;
4907 BEGIN( yyextra->currentArgumentContext );
4913 yyextra->lastCopyArgChar=*yytext;
4916 yyextra->lastCommentInArgContext=YY_START;
4917 yyextra->fullArgString+=text;
4918 if (text.
find(
"//")!=-1)
4919 BEGIN( CopyArgCommentLine );
4921 BEGIN( CopyArgComment );
4924<CopyArgComment>^{B}*"*"+/{BN}+
4925<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4926<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4927 if (yyextra->lastCopyArgChar!=0)
4928 unput(yyextra->lastCopyArgChar);
4929 BEGIN( yyextra->lastCommentInArgContext );
4931<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4933 if (yyextra->lastCopyArgChar!=0)
4934 unput(yyextra->lastCopyArgChar);
4935 BEGIN( yyextra->lastCommentInArgContext );
4937<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4938 yyextra->docBlockName=
"uml";
4939 yyextra->fullArgString+=yytext;
4940 BEGIN(CopyArgVerbatim);
4942<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4943 yyextra->docBlockName=&yytext[1];
4944 yyextra->fullArgString+=yytext;
4945 BEGIN(CopyArgVerbatim);
4947<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
4948 yyextra->docBlockName=&yytext[1];
4949 if (yyextra->docBlockName.at(1)==
'[')
4951 yyextra->docBlockName.at(1)=
']';
4953 if (yyextra->docBlockName.at(1)==
'{')
4955 yyextra->docBlockName.at(1)=
'}';
4957 if (yyextra->docBlockName.at(1)==
'(')
4959 yyextra->docBlockName.at(1)=
')';
4961 yyextra->fullArgString+=yytext;
4962 BEGIN(CopyArgVerbatim);
4964<CopyArgVerbatim>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
4965 yyextra->fullArgString+=yytext;
4966 if (&yytext[4]==yyextra->docBlockName)
4968 yyextra->docBlockName=
"";
4969 BEGIN(CopyArgCommentLine);
4972<CopyArgVerbatim>[\\@]("f$"|"f]"|"f}"|"f)") {
4973 yyextra->fullArgString+=yytext;
4974 if (yyextra->docBlockName==&yytext[1])
4976 yyextra->docBlockName=
"";
4977 BEGIN(CopyArgCommentLine);
4980<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
4981<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
4982<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
4983<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
4984<CopyArgComment>{CMD}("brief"|"short"){B}+ {
4985 warn(yyextra->fileName,yyextra->yyLineNr,
4986 "Ignoring %cbrief command inside argument documentation",*yytext
4988 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
4991 *yyextra->copyArgString+=*yytext;
4992 yyextra->fullArgString+=*yytext;
4993 yyextra->argSharpCount=1;
4994 BEGIN( CopyArgSharp );
4997 *yyextra->copyArgString+=*yytext;
4998 yyextra->fullArgString+=*yytext;
5000 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5001 BEGIN( yyextra->currentArgumentContext );
5004 yyextra->argRoundCount++;
5005 *yyextra->copyArgString+=*yytext;
5006 yyextra->fullArgString+=*yytext;
5009 *yyextra->copyArgString+=*yytext;
5010 yyextra->fullArgString+=*yytext;
5011 if (yyextra->argRoundCount>0)
5012 yyextra->argRoundCount--;
5014 BEGIN( yyextra->lastCopyArgContext );
5017 yyextra->argSquareCount++;
5018 *yyextra->copyArgString+=*yytext;
5019 yyextra->fullArgString+=*yytext;
5022 *yyextra->copyArgString+=*yytext;
5023 yyextra->fullArgString+=*yytext;
5024 if (yyextra->argSquareCount>0)
5025 yyextra->argSquareCount--;
5027 BEGIN( yyextra->lastCopyArgContext );
5030 *yyextra->copyArgString+=*yytext;
5031 yyextra->fullArgString+=*yytext;
5032 yyextra->argRoundCount=0;
5033 yyextra->lastCopyArgContext = YY_START;
5034 BEGIN( CopyArgRound );
5037 yyextra->argSharpCount++;
5039 *yyextra->copyArgString+=*yytext;
5040 yyextra->fullArgString+=*yytext;
5043 *yyextra->copyArgString+=*yytext;
5044 yyextra->fullArgString+=*yytext;
5045 yyextra->argSharpCount--;
5046 if (yyextra->argSharpCount>0)
5052 BEGIN( ReadTempArgs );
5056<CopyArgString,CopyArgPHPString>\\. {
5057 *yyextra->copyArgString+=yytext;
5058 yyextra->fullArgString+=yytext;
5061 *yyextra->copyArgString+=*yytext;
5062 yyextra->fullArgString+=*yytext;
5063 BEGIN( yyextra->lastCopyArgStringContext );
5065<CopyArgPHPString>\' {
5066 *yyextra->copyArgString+=*yytext;
5067 yyextra->fullArgString+=*yytext;
5068 BEGIN( yyextra->lastCopyArgStringContext );
5070<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5071 if (yyextra->insidePHP)
5077 *yyextra->copyArgString+=yytext;
5078 yyextra->fullArgString+=yytext;
5081<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5082 *yyextra->copyArgString+=yytext;
5083 yyextra->fullArgString+=yytext;
5084 if (yyextra->insidePHP)
5086 yyextra->lastCopyArgStringContext=YY_START;
5087 BEGIN(CopyArgPHPString);
5090<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5091 *yyextra->copyArgString+=yytext;
5092 yyextra->fullArgString+=yytext;
5094<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5096 *yyextra->copyArgString+=*yytext;
5097 yyextra->fullArgString+=*yytext;
5099<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5100 *yyextra->copyArgString+=*yytext;
5101 yyextra->fullArgString+=*yytext;
5109<FuncRound>"(" { yyextra->current->args += *yytext ;
5110 ++yyextra->roundCount ;
5112<FuncRound>")" { yyextra->current->args += *yytext ;
5113 if ( yyextra->roundCount )
5114 --yyextra->roundCount ;
5126 if (
qstrcmp(yytext,
";")==0 &&
5127 ((yyextra->insideJS || yyextra->insidePHP) &&
5130 yyextra->current->reset();
5132 BEGIN( FindMembers );
5136 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5139<FuncQual>{BN}*"abstract"{BN}* {
5142 yyextra->current->args +=
" override ";
5144<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5146 yyextra->current->spec.setOverride(
true);
5147 yyextra->current->args +=
" override ";
5150<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5152 yyextra->current->spec.setFinal(
true);
5153 yyextra->current->args +=
" final ";
5156<FuncQual>{BN}*"sealed"{BN}* {
5158 yyextra->current->spec.setSealed(
true);
5159 yyextra->current->args +=
" sealed ";
5161<FuncQual>{BN}*"new"{BN}* {
5163 yyextra->current->spec.setNew(
true);
5164 yyextra->current->args +=
" new ";
5166<FuncQual>{BN}*"const"{BN}* {
5168 yyextra->current->args +=
" const ";
5169 yyextra->current->argList.setConstSpecifier(
TRUE);
5171<FuncQual>{BN}*"volatile"{BN}* {
5173 yyextra->current->args +=
" volatile ";
5174 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5176<FuncQual>{BN}*"noexcept"{BN}* {
5178 yyextra->current->args +=
" noexcept ";
5179 yyextra->current->spec.setNoExcept(
true);
5181<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5183 yyextra->current->args +=
" noexcept(false)";
5185<FuncQual>{BN}*"noexcept"{BN}*"(" {
5187 yyextra->current->args +=
" noexcept(";
5188 yyextra->current->spec.setNoExcept(
true);
5189 yyextra->lastRoundContext=FuncQual;
5190 yyextra->pCopyRoundString=&yyextra->current->args;
5191 yyextra->roundCount=0;
5195 yyextra->current->args +=
" &";
5198<FuncQual>{BN}*"&&" {
5199 yyextra->current->args +=
" &&";
5203<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5205 yyextra->current->args +=
" = 0";
5207 yyextra->current->argList.setPureSpecifier(
TRUE);
5210<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5212 yyextra->current->args +=
" = delete";
5213 yyextra->current->spec.setDelete(
true);
5214 yyextra->current->argList.setIsDeleted(
TRUE);
5217<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5219 yyextra->current->args +=
" = default";
5220 yyextra->current->spec.setDefault(
true);
5223<FuncQual>{BN}*"->"{BN}* {
5225 yyextra->current->argList.setTrailingReturnType(
" -> ");
5226 yyextra->current->args +=
" -> ";
5227 yyextra->roundCount=0;
5228 BEGIN(TrailingReturn);
5230<TrailingReturn>[{;] {
5231 if (yyextra->roundCount>0) REJECT;
5235<TrailingReturn>"requires"{BN}+ {
5236 if (yyextra->insideJava) REJECT;
5237 yyextra->requiresContext = FuncQual;
5238 yyextra->current->req+=
' ';
5239 BEGIN(RequiresClause);
5241<TrailingReturn>"(" {
5242 yyextra->roundCount++;
5243 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5244 yyextra->current->args+=yytext;
5246<TrailingReturn>")" {
5247 if (yyextra->roundCount>0)
5249 yyextra->roundCount--;
5253 warn(yyextra->fileName,yyextra->yyLineNr,
5254 "Found ')' without opening '(' for trailing return type '%s)...'",
5255 qPrint(yyextra->current->argList.trailingReturnType()));
5257 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5258 yyextra->current->args+=yytext;
const char * qPrint(const char *s)
5261 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5262 yyextra->current->args+=yytext;
5266 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5267 yyextra->current->args+=
' ';
5269<FuncRound,FuncFunc>{BN}*","{BN}* {
5271 yyextra->current->args +=
", " ;
5273<FuncQual,FuncRound,FuncFunc>{BN}+ {
5275 yyextra->current->args +=
' ' ;
5277<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5279 yyextra->lastCPPContext = YY_START;
5283 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5290 yyextra->lastInitializerContext=YY_START;
5291 yyextra->initBracketCount=0;
5292 yyextra->current->initializer.str(yytext);
5293 BEGIN(ReadInitializer);
5308 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5311 yyextra->requiresContext = YY_START;
5312 yyextra->current->req+=
' ';
5313 BEGIN(RequiresClause);
5315 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5318 yyextra->current->typeConstr.clear();
5319 yyextra->current->typeConstr.push_back(
Argument());
5320 yyextra->lastCSConstraint = YY_START;
5321 BEGIN( CSConstraintName );
5325 yyextra->current->args = yytext;
5326 yyextra->oldStyleArgType.clear();
5327 BEGIN(OldStyleArgs);
5331 yyextra->current->args += yytext;
5337 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5339 if (yyextra->current->doc!=yyextra->docBackup)
5341 doc=yyextra->current->doc;
5342 yyextra->current->doc=yyextra->docBackup;
5344 if (yyextra->current->brief!=yyextra->briefBackup)
5346 brief=yyextra->current->brief;
5347 yyextra->current->brief=yyextra->briefBackup;
5349 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5350 oldStyleArgName,brief,doc);
5351 yyextra->current->args.clear();
5352 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5354<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5356 if (yyextra->current->argList.empty())
5358 yyextra->current->argList.setNoParameters(
TRUE);
5364<OldStyleArgs>. { yyextra->current->args += *yytext; }
5365<FuncQual,FuncRound,FuncFunc>\" {
5366 if (yyextra->insideIDL && yyextra->insideCppQuote)
5372 yyextra->current->args += *yytext;
5375<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5376<FuncQual>{BN}*"try:" |
5377<FuncQual>{BN}*"try"{BN}+ {
5378 yyextra->insideTryBlock=
TRUE;
5380 if (yytext[yyleng-1]==
':')
5386<FuncQual>{BN}*"throw"{BN}*"(" {
5387 yyextra->current->exception =
" throw (" ;
5388 yyextra->roundCount=0;
5390 BEGIN( ExcpRound ) ;
5392<FuncQual>{BN}*"raises"{BN}*"(" {
5393 yyextra->current->exception =
" raises (" ;
5395 yyextra->roundCount=0;
5396 BEGIN( ExcpRound ) ;
5398<FuncQual>{BN}*"throws"{BN}+ {
5399 yyextra->current->exception =
" throws " ;
5403<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5404 ++yyextra->roundCount ;
5406<ExcpRound>")" { yyextra->current->exception += *yytext ;
5407 if ( yyextra->roundCount )
5408 --yyextra->roundCount ;
5413 yyextra->current->exception += *yytext;
5416 unput(
'{'); BEGIN( FuncQual );
5419 unput(
';'); BEGIN( FuncQual );
5422 yyextra->current->exception +=
' ';
5426 yyextra->current->exception += *yytext;
5428<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5429 yyextra->current->name = yyextra->current->args ;
5430 yyextra->current->args = yytext ;
5431 yyextra->roundCount=0;
5432 BEGIN( FuncRound ) ;
5435 if (!yyextra->insidePHP) BEGIN(SkipInits);
5441 yyextra->current->fileName = yyextra->fileName;
5442 yyextra->current->startLine = yyextra->yyBegLineNr;
5443 yyextra->current->startColumn = yyextra->yyBegColNr;
5444 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5446 std::string type = yyextra->current->type.str();
5450 ti = (int)
match.position();
5454 int di = yyextra->current->type.find(
"decltype(");
5455 if (di!=-1 && di<ti)
5460 int ts=yyextra->current->type.find(
'<');
5461 int te=yyextra->current->type.findRev(
'>');
5464 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5465 bool isFunction = ti==-1 ||
5466 (ts!=-1 && ts<te && ts<ti && ti<te);
5467 bool isVariable = !yyextra->current->type.isEmpty() &&
5468 (!isFunction || startsWithTypedef);
5473 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5478 if (yyextra->isTypedef && !startsWithTypedef)
5480 yyextra->current->type.prepend(
"typedef ");
5482 yyextra->current->section = EntryType::makeVariable() ;
5487 yyextra->current->section = EntryType::makeFunction() ;
5488 yyextra->current->proto = *yytext==
';';
5496 if (yyextra->isTypedef && !startsWithTypedef)
5498 yyextra->current->type.prepend(
"typedef ");
5501 yyextra->current->section = EntryType::makeVariable();
5506 yyextra->current->section = EntryType::makeFunction();
5507 yyextra->current->proto =
TRUE;
5511 if ( yyextra->insidePHP)
5515 yyextra->current->spec.setFinal(
true);
5519 yyextra->current->spec.setAbstract(
true);
5522 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5525 if ( *yytext ==
'{' )
5527 yyextra->lastCurlyContext = FindMembers;
5528 yyextra->curlyCount=0;
5533 BEGIN( FindMembers );
5538 if ( yyextra->insidePHP)
5542 yyextra->previous = yyextra->current;
5543 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5546 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5548 yyextra->current->spec.setOptional(
true).setRequired(
true);
5550 yyextra->lastCurlyContext = FindMembers;
5551 if ( *yytext ==
',' )
5553 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5555 if ( *yytext ==
'{' )
5557 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5559 yyextra->previous->spec.setInline(
true);
5562 yyextra->curlyCount=0;
5563 BEGIN( SkipCurly ) ;
5567 if (!yyextra->previous->section.isVariable())
5568 yyextra->previous->bodyLine=-1;
5569 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...
5573<SkipInits>">"{BN}*"{" {
5575 yyextra->curlyCount=1;
5576 BEGIN(SkipC11Inits);
5578<SkipInits>{ID}{BN}*"{" {
5580 yyextra->curlyCount=1;
5581 BEGIN(SkipC11Inits);
5584 ++yyextra->curlyCount;
5587 if ( --yyextra->curlyCount<=0 )
5592<SkipC11Attribute>"]]" {
5593 BEGIN(yyextra->lastC11AttributeContext);
5601 ++yyextra->curlyCount ;
5603<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5606 if( yyextra->curlyCount )
5608 --yyextra->curlyCount ;
5612 if (!yyextra->current->sli.empty() && yyextra->previous)
5614 yyextra->previous->sli = yyextra->current->sli;
5615 yyextra->current->sli.clear();
5617 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5618 BEGIN( yyextra->lastCurlyContext ) ;
5621<SkipCurly>"}"{BN}*{DCOMM}"<" {
5623 if ( yyextra->curlyCount )
5626 --yyextra->curlyCount ;
5630 yyextra->current->endBodyLine=yyextra->yyLineNr;
5631 yyextra->tempEntry = yyextra->current;
5632 yyextra->current = yyextra->previous;
5634 yyextra->docBlockContext = SkipCurlyEndDoc;
5635 yyextra->docBlockInBody =
FALSE;
5636 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5638 yyextra->docBlock.str(std::string());
5639 yyextra->docBlockTerm =
'}';
5640 if (yytext[yyleng-3]==
'/')
5652<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5653 yyextra->docBlockContext = SkipCurlyEndDoc;
5654 yyextra->docBlockInBody =
FALSE;
5655 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5657 yyextra->docBlock.str(std::string());
5658 yyextra->docBlockTerm =
'}';
5659 if (yytext[yyleng-3]==
'/')
5670<SkipCurlyEndDoc>"}" {
5672 if (yyextra->tempEntry)
5674 yyextra->current = yyextra->tempEntry;
5675 yyextra->tempEntry.reset();
5677 BEGIN( yyextra->lastCurlyContext );
5681 yyextra->lastStringContext=SkipCurly;
5682 BEGIN( SkipString );
5684<SkipCurly>^{B}*"#" {
5685 if (yyextra->insidePHP)
5688 BEGIN( SkipCurlyCpp );
5690<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5694<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5695 if (!yyextra->insidePHP)
5701 yyextra->lastHereDocContext = YY_START;
5705<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5707 yyextra->lastRawStringContext = YY_START;
5708 yyextra->dummyRawString.clear();
5709 yyextra->pCopyRawString = &yyextra->dummyRawString;
5710 *yyextra->pCopyRawString += yytext;
5713<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<\$]+ {
5717<SkipCurly,SkipCurlyCpp>"\$" {}
5721 yyextra->lastCurlyContext = FindMembers;
5724<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5728<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5730 yyextra->lastCContext = YY_START;
5733<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5735 yyextra->lastCContext = YY_START;
5736 BEGIN(SkipCxxComment);
5738<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5739 yyextra->roundCount=0;
5740 yyextra->lastSkipRoundContext=YY_START;
5743<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5744 yyextra->lastStringContext=YY_START;
5745 BEGIN( SkipString );
5748 warn(yyextra->fileName,yyextra->yyLineNr,
5749 "Found ';' while parsing initializer list! "
5750 "(doxygen could be confused by a macro call without semicolon)"
5752 BEGIN( FindMembers );
5754<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5755 if (!yyextra->insidePHP)
5758 yyextra->lastCContext = YY_START;
5759 BEGIN(SkipCxxComment);
5761<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5762 if (!yyextra->insideCS) REJECT;
5765 yyextra->lastSkipVerbStringContext=YY_START;
5766 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5767 yyextra->dummyTextStream.clear();
5768 BEGIN(SkipVerbString);
5770<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5771 if (yyextra->insidePHP) REJECT;
5773<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5774 if (yyextra->insidePHP)
5776 yyextra->lastStringContext=YY_START;
5777 BEGIN(SkipPHPString);
5780<SkipC11Attribute>{ID} {
5783 yyextra->current->spec.setNoDiscard(
true);
5786<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5787<SkipString,SkipPHPString>\\. { }
5789 BEGIN( yyextra->lastStringContext );
5792 BEGIN( yyextra->lastStringContext );
5794<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5795<SkipString,SkipPHPString>\n {
5799<SkipString,SkipPHPString>. { }
5805 yyextra->current->section = EntryType::makeEmpty() ;
5806 yyextra->current->type.clear() ;
5807 yyextra->current->name.clear() ;
5808 yyextra->current->args.clear() ;
5809 yyextra->current->argList.clear();
5810 BEGIN( FindMembers ) ;
5813 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5817 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5821 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5823 if (!yyextra->baseName.isEmpty())
5825 yyextra->current->extends.emplace_back(
5827 yyextra->baseName.clear();
5829 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5834 yyextra->current->section = EntryType::makeEmpty() ;
5835 yyextra->current->type.clear() ;
5836 yyextra->current->name.clear() ;
5837 yyextra->current->args.clear() ;
5838 yyextra->current->argList.clear();
5840 BEGIN( FindMembers ) ;
5842<CompoundName>{SCOPENAME}/{BN}*"<" {
5843 yyextra->sharpCount = 0;
5844 yyextra->current->name = yytext ;
5845 if (yyextra->current->spec.isProtocol())
5847 yyextra->current->name+=
"-p";
5850 yyextra->lastClassTemplSpecContext = ClassVar;
5851 if (yyextra->insideObjC)
5853 BEGIN( ObjCProtocolList );
5855 else if (yyextra->insideCS)
5862 yyextra->roundCount=0;
5863 BEGIN( ClassTemplSpec );
5870 yyextra->current->tArgLists.
push_back(al);
5871 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5872 yyextra->templateStr=
"<";
5873 yyextra->current->name +=
"<";
5874 yyextra->fullArgString = yyextra->templateStr;
5875 yyextra->copyArgString = &yyextra->current->name;
5877 yyextra->currentArgumentContext = ClassVar;
5878 BEGIN( ReadTempArgs );
5880<ObjCProtocolList>"<" {
5881 yyextra->insideProtocolList=
TRUE;
5884<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5885 yyextra->current->name += yytext;
5887 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5890 if (yyextra->current->spec.isProtocol())
5897 BEGIN( yyextra->lastClassTemplSpecContext );
5901<ClassTemplSpec>"<" {
5902 yyextra->current->name += yytext;
5903 if (yyextra->roundCount==0) yyextra->sharpCount++;
5906 yyextra->current->name += yytext;
5908<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5909 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5913 yyextra->current->name =
substitute(yytext,
".",
"::");
5914 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5919 else if (!yyextra->current->tArgLists.empty())
5923 yyextra->current->name = yytext;
5924 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5926 QCString rn = yyextra->current_root->name;
5928 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5932 yyextra->current->spec.setForwardDecl(
true);
5933 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5935 else if (yyextra->insideIDL &&
5936 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
5937 yyextra->current->spec.isInterface()) ||
5938 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
5939 yyextra->current->spec.isService())
5947 yyextra->current->name = yytext;
5948 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5949 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
5952 yyextra->current->spec.setInterface(
false).setService(
false);
5956 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5959 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
5962 yyextra->current->reset();
5964 if (yyextra->insideObjC)
5967 yyextra->insideObjC =
FALSE;
5969 if (yyextra->isTypedef)
5971 yyextra->current->type.prepend(
"typedef");
5973 BEGIN( FindMembers );
Wrapper class for the Entry type.
5976<CompoundName>{SCOPENAME}/{BN}*"(" {
5977 yyextra->current->name = yytext ;
5979 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
5981 yyextra->lastAlignAsContext = YY_START;
5986 if (yyextra->current->spec.isProtocol())
5988 yyextra->current->name +=
"-p";
5993<AlignAs>"(" { yyextra->roundCount=0;
5994 BEGIN( AlignAsEnd );
5998<AlignAsEnd>"(" { yyextra->roundCount++; }
5999<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6001 BEGIN( yyextra->lastAlignAsContext );
6007 yyextra->current->name = yytext ;
6010 yyextra->current->bodyLine = yyextra->yyLineNr;
6011 yyextra->current->bodyColumn = yyextra->yyColNr;
6012 yyextra->current->initializer.str(std::string());
6013 yyextra->lastInitializerContext = FindMembers;
6014 yyextra->initBracketCount=0;
6015 BEGIN(ReadInitializer);
6017<CompoundName>{SCOPENAME}/{BN}*"," {
6019 yyextra->current->reset();
6022<CompoundName>{SCOPENAME} {
6023 yyextra->current->name = yytext ;
6026 if (yyextra->current->spec.isProtocol())
6028 yyextra->current->name +=
"-p";
6030 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6036<CompoundName>{CSSCOPENAME} {
6037 yyextra->current->name =
substitute(yytext,
".",
"::");
6041<ClassVar>{SCOPENAME}{BNopt}/"(" {
6042 if (yyextra->insideIDL &&
qstrncmp(yytext,
"switch",6)==0 && !
isId(yytext[6]))
6045 yyextra->roundCount=0;
6046 BEGIN(SkipUnionSwitch);
6051 yyextra->yyBegColNr=yyextra->yyColNr;
6052 yyextra->yyBegLineNr=yyextra->yyLineNr;
6053 yyextra->current->name = yytext;
6054 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6056 BEGIN( FindMembers );
6060 if (yyextra->isTypedef)
6064 yyextra->current->type.prepend(
"typedef ");
6072<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6073 if (yyextra->insideCli)
6076 yyextra->current->spec.setSealedClass(
true);
6078 yyextra->current->spec.setAbstractClass(
true);
6086<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6087 yyextra->yyBegColNr=yyextra->yyColNr;
6088 yyextra->yyBegLineNr=yyextra->yyLineNr;
6091 if (yyextra->current->section.isEnum())
6093 yyextra->current->section = EntryType::makeVariable() ;
6095 yyextra->current->type +=
' ' ;
6096 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...
6105 yyextra->yyBegColNr=yyextra->yyColNr;
6106 yyextra->yyBegLineNr=yyextra->yyLineNr;
6108 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6111 yyextra->roundCount=0;
6112 BEGIN(SkipUnionSwitch);
6114 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6116 yyextra->current->type.clear();
6119 yyextra->baseName.clear();
6120 BEGIN( BasesProt ) ;
6122 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6124 yyextra->current->typeConstr.clear();
6125 yyextra->current->typeConstr.push_back(
Argument());
6126 yyextra->lastCSConstraint = YY_START;
6127 BEGIN( CSConstraintName );
6129 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6131 yyextra->current->spec.setAbstract(
true);
6133 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6135 yyextra->current->spec.setSealed(
true);
6137 else if (
qstrcmp(yytext,
"final")==0)
6139 yyextra->current->spec.setFinal(
true);
6143 if (yyextra->current->section.isEnum())
6145 yyextra->current->section = EntryType::makeVariable() ;
6147 yyextra->current->type +=
' ' ;
6148 yyextra->current->type += yyextra->current->name ;
6149 yyextra->current->name = yytext ;
6158 if (yyextra->insideObjC && *yytext==
'(')
6160 yyextra->current->name+=
'(';
6163 yyextra->current->spec.setCategory(
true);
6165 BEGIN( ClassCategory );
6171 BEGIN( FindMembers );
6174<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6175<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6176 yyextra->fullArgString.clear();
6177 yyextra->lastCopyArgChar=
'#';
6178 yyextra->lastCommentInArgContext=YY_START;
6180 BEGIN( CopyArgCommentLine );
6182 BEGIN( CopyArgComment );
6184<CSConstraintType,CSConstraintName>"#" {
6185 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6187<CSConstraintType>"=>" {
6192 BEGIN( yyextra->lastCSConstraint );
6194<CSConstraintType>"{" {
6198 BEGIN( yyextra->lastCSConstraint );
6200<CSConstraintType,CSConstraintName>";" {
6203 BEGIN( yyextra->lastCSConstraint );
6205<CSConstraintName>":" {
6206 BEGIN( CSConstraintType );
6208<CSConstraintName>{ID} {
6210 yyextra->current->typeConstr.back().name=yytext;
6212<CSConstraintType>"where" {
6213 yyextra->current->typeConstr.push_back(
Argument());
6214 BEGIN( CSConstraintName );
6216<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6217 if (yyextra->current->typeConstr.back().type.isEmpty())
6220 yyextra->current->typeConstr.back().type=yytext;
6224 QCString name = yyextra->current->typeConstr.back().name;
6225 yyextra->current->typeConstr.push_back(
Argument());
6226 yyextra->current->typeConstr.back().name=name;
6227 yyextra->current->typeConstr.back().type=yytext;
6230<CSConstraintName,CSConstraintType>\n {
6233<CSConstraintName,CSConstraintType>. {
6235<ClassCategory>{ID} {
6236 yyextra->current->name+=yytext;
6238<ClassCategory>")"/{BN}*"{" {
6239 yyextra->current->name+=
')';
6242<ClassCategory>")"/{BN}*"<" {
6243 yyextra->current->name+=
')';
6244 BEGIN( ObjCProtocolList );
6247 yyextra->current->name+=
')';
6248 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6260 if (yyextra->current->section.isVariable())
6262 yyextra->current->bitfields+=
":";
6263 yyextra->current->args.clear();
6266 else if (yyextra->current->section.isEnum())
6269 yyextra->current->args.clear();
6270 BEGIN(EnumBaseType);
6274 yyextra->current->type.clear();
6275 if (yyextra->current->spec.isInterface() ||
6276 yyextra->current->spec.isStruct() ||
6277 yyextra->current->spec.isRef() ||
6278 yyextra->current->spec.isValue() ||
6279 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6289 yyextra->baseName.clear();
6290 BEGIN( BasesProt ) ;
6294 if (yyextra->isTypedef)
6296 yyextra->current->type.prepend(
"typedef");
6298 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6300 yyextra->current->section = EntryType::makeVariable() ;
6302 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6304 yyextra->current->reset();
6311 BEGIN( FindMembers );
6313<Bases,ClassVar>{CPPC}"/"/[^/] {
6314 if (!yyextra->insideObjC)
6321 yyextra->current->program << yytext;
6322 yyextra->current->fileName = yyextra->fileName ;
6323 yyextra->current->startLine = yyextra->yyLineNr ;
6324 yyextra->current->startColumn = yyextra->yyColNr;
6325 yyextra->curlyCount=0;
6326 BEGIN( ReadBodyIntf );
6329<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6330<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6331<Bases,ClassVar>{CPPC}"!" |
6332<Bases,ClassVar>[\-+]{BN}* {
6333 if (!yyextra->insideObjC)
6340 yyextra->current->program << yytext;
6341 yyextra->current->fileName = yyextra->fileName ;
6342 yyextra->current->startLine = yyextra->yyLineNr ;
6343 yyextra->current->startColumn = yyextra->yyColNr;
6344 yyextra->curlyCount=0;
6345 BEGIN( ReadBodyIntf );
6348<CompoundName,ClassVar>{B}*"{"{B}* {
6349 yyextra->current->program.str(std::string());
6350 yyextra->current->fileName = yyextra->fileName ;
6351 yyextra->current->bodyLine = yyextra->yyLineNr;
6352 yyextra->current->bodyColumn = yyextra->yyColNr;
6354 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6356 if (yyextra->current->section.isNamespace())
6360 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6372 yyextra->curlyCount=0;
6373 if (yyextra->current_root &&
6374 !yyextra->current_root->spec.isInterface() &&
6375 (yyextra->current->spec.isInterface() ||
6376 yyextra->current->spec.isProtocol() ||
6377 yyextra->current->spec.isCategory() ||
6378 yyextra->current->section.isObjcImpl()
6383 BEGIN( ReadBodyIntf );
6385 else if (yyextra->current->section.isNamespace())
6387 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6399<BasesProt>{BN} {
lineCount(yyscanner); }
6400<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6401<Bases>"decltype"{BN}*"(" {
6403 yyextra->roundCount=0;
6404 yyextra->lastSkipRoundContext=YY_START;
6407<Bases>("\\")?({ID}"\\")*{ID} {
6408 if (!yyextra->insidePHP)
6417 yyextra->baseName += bn;
6418 yyextra->current->args +=
' ';
6419 yyextra->current->args += yytext;
6422<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6428 yyextra->current->typeConstr.clear();
6429 yyextra->current->typeConstr.push_back(
Argument());
6430 yyextra->lastCSConstraint = YY_START;
6431 BEGIN( CSConstraintName );
6435 yyextra->baseName+=yytext;
6436 yyextra->current->args +=
' ';
6437 yyextra->current->args += yytext;
6440<Bases>{BN}*{ID}("."{ID})* {
6442 yyextra->baseName += name;
6443 yyextra->current->args +=
' ';
6444 yyextra->current->args += name;
6446<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6447 if (!yyextra->insideObjC)
6457<ClassVar,Bases>"@end" {
6465<ClassVar>"<" { yyextra->current->name += *yytext;
6466 yyextra->sharpCount=1;
6467 yyextra->roundCount=0;
6468 yyextra->lastSkipSharpContext = YY_START;
6469 yyextra->specName = &yyextra->current->name;
6470 BEGIN ( Specialization );
6474 yyextra->sharpCount=1;
6475 yyextra->roundCount=0;
6476 yyextra->lastSkipSharpContext = YY_START;
6477 if (yyextra->insideObjC)
6487 yyextra->templateStr = yytext;
6488 yyextra->specName = &yyextra->templateStr;
6489 BEGIN ( Specialization );
6492<Specialization>"<" { *yyextra->specName += *yytext;
6493 if (yyextra->roundCount==0) yyextra->sharpCount++;
6495<Specialization>">" {
6496 *yyextra->specName += *yytext;
6497 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6500 BEGIN(yyextra->lastSkipSharpContext);
6503<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6504<Specialization>"<<" { *yyextra->specName += yytext; }
6505<Specialization>">>"/{B}*"::" {
6510<Specialization>">>" {
6511 if (yyextra->insideCS)
6521 if (yyextra->roundCount>0)
6523 *yyextra->specName += yytext;
6533<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6534<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6535<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6537<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6538<Specialization>"\\'" { *yyextra->specName += *yytext;}
6539<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6540<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6541<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6542<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6543<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6544<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6545<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6546<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6547<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6550 *yyextra->specName += *yytext;
6552<SkipRound>"(" { ++yyextra->roundCount; }
6553<SkipRound>")" {
if (--yyextra->roundCount<0)
6554 BEGIN ( yyextra->lastSkipRoundContext );
6557 yyextra->lastStringContext=SkipRound;
6560<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6561 if (yyextra->insideProtocolList)
6563 yyextra->baseName+=
"-p";
6567 yyextra->current->args +=
',' ;
6570 if (!yyextra->baseName.isEmpty())
6572 yyextra->current->extends.emplace_back(
6573 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6576 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6577 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6578 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6587 yyextra->baseName.clear();
6590 yyextra->insideProtocolList=
FALSE;
6602 if (*yytext==
',' && yyextra->insideObjC)
6604 yyextra->insideProtocolList=
TRUE;
6610 yyextra->current->program.str(std::string());
6611 yyextra->current->fileName = yyextra->fileName ;
6612 yyextra->current->bodyLine = yyextra->yyLineNr;
6613 yyextra->current->bodyColumn = yyextra->yyColNr;
6615 if (!yyextra->baseName.isEmpty())
6616 yyextra->current->extends.emplace_back(
6617 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6619 yyextra->curlyCount=0;
6620 if (yyextra->insideObjC)
6622 BEGIN( ReadBodyIntf );
6629<SkipUnionSwitch>{B}*"(" {
6630 yyextra->roundCount++;
6632<SkipUnionSwitch>")" {
6633 if (--yyextra->roundCount==0)
6638<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6640<Comment>{BN}+ { yyextra->current->program << yytext ;
6643<Comment>{CCS} { yyextra->current->program << yytext ; }
6644<Comment>{CPPC} { yyextra->current->program << yytext ; }
6645<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6646 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6647 yyextra->current->program << yytext ;
6649<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6650 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6651 yyextra->current->program << yytext ;
6653<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6654<Comment>{CCE} { yyextra->current->program << yytext ;
6655 if (!yyextra->insideCode)
6657 yyextra->doxygenComment=
false;
6658 BEGIN( yyextra->lastContext );
6661<Comment>. { yyextra->current->program << *yytext ; }
6663<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6665 if (!yyextra->current->doc.isEmpty())
6667 yyextra->current->doc+=
"\n\n";
6671 yyextra->current->docLine = yyextra->yyLineNr;
6672 yyextra->current->docFile = yyextra->fileName;
6675 yyextra->lastDocContext = YY_START;
6676 if (yyextra->current_root->section.isScope())
6678 yyextra->current->inside = yyextra->current_root->name+
"::";
6680 yyextra->docBlockContext = YY_START;
6681 yyextra->docBlockInBody = YY_START==SkipCurly;
6686 yyextra->docBlock.str(indent.
str());
6688 if (yyextra->docBlockAutoBrief)
6690 yyextra->current->briefLine = yyextra->yyLineNr;
6691 yyextra->current->briefFile = yyextra->fileName;
6696<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6702 yyextra->lastDocContext = YY_START;
6705 if (yyextra->current_root->section.isScope())
6707 yyextra->current->inside = yyextra->current_root->name+
"::";
6709 yyextra->current->docLine = yyextra->yyLineNr;
6710 yyextra->current->docFile = yyextra->fileName;
6711 yyextra->docBlockContext = YY_START;
6712 yyextra->docBlockInBody = YY_START==SkipCurly;
6714 yyextra->docBlockAutoBrief = javadocAutoBrief;
6718 yyextra->docBlock.str(indent.
str());
6720 if (yyextra->docBlockAutoBrief)
6722 yyextra->current->briefLine = yyextra->yyLineNr;
6723 yyextra->current->briefFile = yyextra->fileName;
6730 yyextra->current->program << yytext ;
6731 yyextra->lastContext = YY_START ;
6732 yyextra->doxygenComment=
true;
6736<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6741<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
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;
6768<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6769 yyextra->lastDocContext = YY_START;
6770 if (yyextra->current_root->section.isScope())
6772 yyextra->current->inside = yyextra->current_root->name+
"::";
6774 yyextra->docBlockContext = YY_START;
6775 yyextra->docBlockInBody = YY_START==SkipCurly;
6776 yyextra->docBlockAutoBrief =
FALSE;
6780 yyextra->docBlock.str(indent.
str());
6785<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6786 yyextra->lastDocContext = YY_START;
6787 if (yyextra->current_root->section.isScope())
6789 yyextra->current->inside = yyextra->current_root->name+
"::";
6791 yyextra->docBlockContext = YY_START;
6792 yyextra->docBlockInBody = YY_START==SkipCurly;
6793 yyextra->docBlockAutoBrief =
FALSE;
6796 yyextra->docBlock.str(indent.
str());
6800<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6802 yyextra->externLinkage=
TRUE;
6805 if (yyextra->externLinkage)
6807 yyextra->externLinkage=
FALSE;
6809 else if (yyextra->insideCS &&
6810 !yyextra->current->name.isEmpty() &&
6811 !yyextra->current->type.isEmpty())
6825 yyextra->current->bodyLine = yyextra->yyLineNr;
6826 yyextra->current->bodyColumn = yyextra->yyColNr;
6827 yyextra->curlyCount=0;
6828 BEGIN( CSAccessorDecl );
6830 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6834 yyextra->current->exception =
" {";
6835 BEGIN(UNOIDLAttributeBlock);
6839 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6840 yyextra->current->name.isEmpty()
6844 yyextra->needsSemi =
FALSE;
6845 if (yyextra->current->isStatic)
6847 yyextra->current->name=
"[static initializer]";
6848 yyextra->current->type.clear();
6852 yyextra->current->name=
"[instance initializer]";
6869 yyextra->current->bodyLine = yyextra->yyLineNr;
6870 yyextra->current->bodyColumn = yyextra->yyColNr;
6871 yyextra->current->initializer.str(yytext);
6872 yyextra->lastInitializerContext = YY_START;
6873 yyextra->initBracketCount=1;
6874 BEGIN(ReadInitializer);
6878<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6879<CSAccessorDecl>"}"{B}*"=" {
6881 if (yyextra->curlyCount != 0) REJECT;
6882 yyextra->current->initializer.str(
"=");
6883 yyextra->current->endBodyLine=yyextra->yyLineNr;
6884 yyextra->lastInitializerContext = FindMembers;
6885 BEGIN(ReadInitializer);
6887<CSAccessorDecl>"}" {
6888 if (yyextra->curlyCount)
6890 yyextra->curlyCount--;
6897 yyextra->current->endBodyLine=yyextra->yyLineNr;
6902<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6903<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6904<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6905<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6906<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6907<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6908<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6909<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6910<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6911<CSAccessorDecl>"\"" { BEGIN(CSString);}
6912<CSAccessorDecl>"." {}
6913<CSAccessorDecl>\n {
lineCount(yyscanner); }
6914<CSString>"\"" { BEGIN(CSAccessorDecl);}
6922<SliceSequence>{SCOPENAME} {
6923 if (yyextra->current->spec.isLocal())
6925 yyextra->current->type =
"local ";
6927 yyextra->current->type +=
"sequence<";
6928 yyextra->current->type += yytext;
6929 yyextra->current->type +=
">";
6932<SliceSequence>{BN}*">"{BN}* {
6934 BEGIN(SliceSequenceName);
6937<SliceSequenceName>{ID}{BN}* {
6939 yyextra->current->name = yytext ;
6940 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6943<SliceSequenceName>";" {
6944 yyextra->current->section = EntryType::makeVariable();
6945 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6950<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
6952 if (yyextra->current->spec.isLocal())
6954 yyextra->current->type =
"local ";
6956 yyextra->current->type +=
"dictionary<";
6957 yyextra->current->type += yytext;
6958 yyextra->current->type +=
">";
6959 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
6962<SliceDictionary>{BN}*">"{BN}* {
6964 BEGIN(SliceDictionaryName);
6967<SliceDictionaryName>{ID}{BN}* {
6969 yyextra->current->name = yytext ;
6970 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6973<SliceDictionaryName>";" {
6974 yyextra->current->section = EntryType::makeVariable();
6975 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6985<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
6986 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
6987 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
6990<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
6991 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
6992 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
6994<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
6995 yyextra->docBlock << yytext;
6996 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
6997 BEGIN( yyextra->docBlockContext );
6999<DocLine>{NONLopt}/"\n" {
7000 yyextra->docBlock << yytext;
7001 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7002 BEGIN( yyextra->docBlockContext );
7007<DocBlock>"*"*{CCE} {
7009 BEGIN(yyextra->docBlockContext);
7011<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7014 yyextra->docBlock <<
"\\ilinebr " << indent;
7016<DocBlock>^{B}*"*"+/[^/] {
7019 yyextra->docBlock << indent;
7021<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7024 yyextra->docBlock << indent;
7026<DocBlock>^{B}*({CPPC}){B}* {
7029 yyextra->docBlock << yytext;
7033 yyextra->docBlock << yytext;
7035<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7036 yyextra->docBlock << yytext;
7038<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7039 yyextra->docBlock << yytext;
7040 char blockName[] =
"f$";
7042 if (c==
'[') blockName[1]=
']';
7043 else if (c==
'{') blockName[1]=
'}';
7044 else if (c==
'(') blockName[1]=
')';
7046 BEGIN(DocCopyBlock);
7048<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7049 yyextra->fileName = &yytext[6];
7050 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7051 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7052 yyextra->docBlock << yytext;
7054<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7055 yyextra->fileName = &yytext[6];
7056 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7057 yyextra->docBlock << yytext;
7059<DocBlock>{CMD}"iline"{LINENR}{B} {
7064 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '%s' for iline command",yytext);
7068 yyextra->yyLineNr = nr;
7070 yyextra->docBlock << yytext;
7072<DocBlock>{B}*"<"{PRE}">" {
7073 yyextra->docBlock << yytext;
7075 BEGIN(DocCopyBlock);
7077<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7078 yyextra->docBlock << yytext;
7080 BEGIN(DocCopyBlock);
7082<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
7083 yyextra->docBlock << yytext;
7085 BEGIN(DocCopyBlock);
7087<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7089 yyextra->docBlock <<
"\\ilinebr ";
7090 yyextra->docBlock << pat;
7092 BEGIN(DocCopyBlock);
7094<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7096 yyextra->docBlock << pat;
7098 BEGIN(DocCopyBlock);
7100<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7101<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7102<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7104 yyextra->docBlock <<
"\\ilinebr ";
7105 yyextra->docBlock << pat;
7107 BEGIN(DocCopyBlock);
7109<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7110<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7111<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7113 yyextra->docBlock << pat;
7115 BEGIN(DocCopyBlock);
7117<DocBlock>{B}*"<"{CODE}">" {
7118 if (yyextra->insideCS)
7120 yyextra->docBlock << yytext;
7122 BEGIN(DocCopyBlock);
7129<DocBlock>[^@*~\/\\\n]+ {
7130 yyextra->docBlock << yytext;
7134 yyextra->docBlock << *yytext;
7137 yyextra->docBlock << *yytext;
7142<DocCopyBlock>"</"{PRE}">" {
7147 yyextra->docBlock << yytext;
7149<DocCopyBlock>"</"{CODE}">" {
7154 yyextra->docBlock << yytext;
7156<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7161 yyextra->docBlock << yytext;
7163<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7168 yyextra->docBlock << yytext;
7170<DocCopyBlock>^{B}*"*"+/{BN}+ {
7171 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7179 yyextra->docBlock << indent;
7182<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7183 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7187 yyextra->docBlock << indent;
7194<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7195 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7199 yyextra->docBlock << indent+
"*";
7206<DocCopyBlock>^{B}*"*"+/{BN}* {
7207 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7210 if (yyextra->nestedComment>0)
7213 yyextra->docBlock << indent+
"*";
7218 yyextra->docBlock << indent;
7226<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7232 yyextra->docBlock << pat;
7234<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7240 yyextra->docBlock << pat;
7242<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7243 yyextra->docBlock << yytext;
7246 yyextra->docBlock << yytext;
7247 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7251 yyextra->lastStringContext=YY_START;
7252 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7253 yyextra->stopAtInvalidString=
true;
7257<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7260 yyextra->nestedComment++;
7262 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7264 yyextra->nestedComment--;
7266 yyextra->docBlock << yytext;
7269 yyextra->docBlock << *yytext;
7273 yyextra->docBlock << *yytext;
7275<DocCopyBlock><<EOF>> {
7276 warn(yyextra->fileName,yyextra->yyLineNr,
7277 "reached end of file while inside a '%s' block!"
7278 " The command that should end the block seems to be missing!",
7279 qPrint(yyextra->docBlockName));
7286<Prototype>"operator"{B}*"("{B}*")" {
7287 yyextra->current->name+=yytext;
7290 yyextra->current->args+=*yytext;
7291 yyextra->currentArgumentContext = PrototypeQual;
7292 yyextra->fullArgString = yyextra->current->args;
7293 yyextra->copyArgString = &yyextra->current->args;
7294 BEGIN( ReadFuncArgType ) ;
7296<Prototype>"("({ID}"::")*({B}*[&*])+ {
7297 if (yyextra->insidePHP)
7303 yyextra->current->type+=yyextra->current->name+yytext;
7304 yyextra->current->name.clear();
7305 BEGIN( PrototypePtr );
7308<PrototypePtr>{SCOPENAME} {
7309 yyextra->current->name+=yytext;
7312 yyextra->current->args+=*yytext;
7313 yyextra->currentArgumentContext = PrototypeQual;
7314 yyextra->fullArgString = yyextra->current->args;
7315 yyextra->copyArgString = &yyextra->current->args;
7316 BEGIN( ReadFuncArgType ) ;
7319 yyextra->current->type+=
')';
7323 yyextra->current->name+=yytext;
7326 BEGIN( PrototypeSkipLine);
7328<PrototypeQual>{B}*"const"{B}* {
7329 yyextra->current->args +=
" const ";
7330 yyextra->current->argList.setConstSpecifier(
TRUE);
7332<PrototypeQual>{B}*"volatile"{B}* {
7333 yyextra->current->args +=
" volatile ";
7334 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7336<PrototypeQual>{B}*"="{B}*"0"{B}* {
7337 yyextra->current->args +=
" = 0";
7339 yyextra->current->argList.setPureSpecifier(
TRUE);
7341<PrototypeQual>"throw"{B}*"(" {
7342 yyextra->current->exception =
"throw(";
7343 BEGIN(PrototypeExc);
7346 yyextra->current->exception +=
')';
7347 BEGIN(PrototypeQual);
7350 yyextra->current->exception += *yytext;
7353 yyextra->current->args += *yytext;
7356 yyextra->current->name += *yytext;
7358<PrototypeSkipLine>. {
7364<SkipCxxComment>.*"\\\n" {
7365 if (yyextra->insideCS)
7374<SkipCxxComment>{ANYopt}/\n {
7375 BEGIN( yyextra->lastCContext ) ;
7377<SkipComment>[^\*\n]+
7382 if (!yyextra->insideCpp) REJECT;
7383 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7384 yyextra->lastC11AttributeContext = YY_START;
7385 BEGIN( SkipC11Attribute );
7390 if (yyextra->insideIDL && yyextra->insideCppQuote)
7394 else if (yyextra->insidePHP)
7396 yyextra->lastStringContext=YY_START;
7401 if (!yyextra->insidePHP)
7403 yyextra->lastCPPContext = YY_START;
7408 yyextra->lastCContext = YY_START ;
7409 BEGIN( SkipCxxComment ) ;
7413 if (!yyextra->insidePHP)
7415 yyextra->lastCContext = YY_START ;
7416 BEGIN( SkipCxxComment ) ;
7419 if (yyextra->insidePHP)
7421 yyextra->lastStringContext=YY_START;
7422 BEGIN(SkipPHPString);
7426 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7428 if (yyextra->current->type.isEmpty())
7430 if (yyextra->current->name.isEmpty())
7431 yyextra->current->name=
"?";
7433 yyextra->current->name+=
"?";
7437 yyextra->current->type+=
"?";
7441<*>"}" { yyextra->exported=
false; }
7443<SkipComment>{CPPC}|{CCS}
7444<*>{CCS} { yyextra->lastCContext = YY_START ;
7445 BEGIN( SkipComment ) ;
7447<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7449 yyextra->lastCContext = YY_START ;
7450 BEGIN( SkipCxxComment ) ;
7453 if (yyextra->insideCS && yyextra->fakeNS)
7457 BEGIN ( ReadNSBody);
7469 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7471 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7473 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7483 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7484 yyextra->outerScopeEntries.clear();
7485 yyextra->baseName.clear();
7488 yyextra->sharpCount = 0;
7489 yyextra->roundCount = 0;
7490 yyextra->curlyCount = 0;
7492 yyextra->isStatic =
FALSE;
7495 yyextra->isTypedef =
FALSE;
7496 yyextra->insideTryBlock =
FALSE;
7497 yyextra->insideFormula =
FALSE;
7498 yyextra->insideCode=
FALSE;
7500 yyextra->previous = 0;
7501 yyextra->firstTypedefEntry.reset();
7502 yyextra->memspecEntry.reset();
7507 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7508 if (yyextra->insideJava)
7512 yyextra->current->protection = yyextra->protection;
7513 yyextra->current->exported = yyextra->exported ;
7514 yyextra->current->mtype = yyextra->mtype;
7515 yyextra->current->virt = yyextra->virt;
7516 yyextra->current->isStatic = yyextra->isStatic;
7517 yyextra->current->lang = yyextra->language;
7519 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7520 yyextra->isTypedef=
FALSE;
7528 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7529 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7531 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7537 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7540 for (p = yytext ; *p ; ++p )
7544 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7548 yyextra->column+=tabSize - (yyextra->column%tabSize);
7552 yyextra->column++,yyextra->yyColNr++;
7560 int col=startIndent;
7566 if (c==
'\t') col+=tabSize-(col%tabSize);
7567 else if (c==
'\n') col=0;
7576 int i = text.
find(
'"');
7589 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7590 yyextra->current->protection = yyextra->protection = prot;
7592 yyextra->current->type.clear();
7593 yyextra->current->name.clear();
7594 yyextra->current->args.clear();
7595 yyextra->current->argList.clear();
7601 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7602 size_t tl=yyextra->current->type.length();
7603 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7605 yyextra->current->type +=
' ' ;
7607 yyextra->current->type += yyextra->current->name;
7608 yyextra->current->name.clear() ;
7609 tl=yyextra->current->type.length();
7610 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7612 yyextra->current->type +=
' ' ;
7614 yyextra->current->type += yyextra->current->args ;
7615 yyextra->current->args.clear() ;
7616 yyextra->current->argList.clear();
7623 if (s==
nullptr || *s==0)
return name;
7625 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7637 bool funcPtr = i>0 && type[i-1]==
')';
7639 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7640 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7641 return type.
left(i);
7647 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7650 yyextra->docBlock <<
"\\iskip";
7652 yyextra->docBlockName=blockName;
7653 yyextra->fencedSize=fencedSize;
7654 yyextra->nestedComment=0;
7660 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7661 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7665 yyextra->docBlock <<
"\\endiskip";
7667 yyextra->docBlockName=
"";
7687 int i=name.
find(
"operator");
7688 if (i==-1)
return FALSE;
7698 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7720 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7721 if (yyextra->current_root->section.isScope())
7724 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7726 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7728 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7738 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7739 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7740 if (yyextra->current->argList.empty())
return FALSE;
7741 for (
const Argument &a : yyextra->current->argList)
7752 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7753 if (yyextra->insideJava)
7757 if (text.
find(
"protected")!=-1)
7759 else if (text.
find(
"private")!=-1)
7761 else if (text.
find(
"package")!=-1)
7769 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7770 int si =
static_cast<int>(yyextra->current->args.length());
7771 if (yyextra->oldStyleArgType.isEmpty())
7773 std::string args = yyextra->current->args.str();
7774 static const reg::Ex re(R
"(\([^)]*\).*)");
7780 bi1=(int)match.position();
7781 size_t secondMatchStart = match.position()+match.length();
7784 bi2=(int)match.position();
7788 if (bi1!=-1 && bi2!=-1)
7791 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7793 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7794 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7796 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7797 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7798 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7803 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7806 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7807 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7809 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7810 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7816 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7819 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7823 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7824 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7837 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7840 oldStyleArgPtr=yyextra->current->args.
left(j);
7859 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7860 for (
Argument &a : yyextra->current->argList)
7869 a.
docs=brief+
"\n\n"+docs;
7901 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7904 yyextra->current->briefFile = yyextra->fileName;
7905 yyextra->current->briefLine = yyextra->yyLineNr;
7909 yyextra->current->docFile = yyextra->fileName;
7910 yyextra->current->docLine = yyextra->yyLineNr;
7918 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7919 if (yyextra->tempEntry==0)
7924 yyextra->previous = yyextra->current;
7925 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7929 yyextra->previous = yyextra->current;
7930 yyextra->current = yyextra->tempEntry;
7931 yyextra->tempEntry.reset();
7938 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7941 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
7942 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
7945 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
7946 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
7948 docEntry->inbodyFile = yyextra->fileName;
7949 docEntry->inbodyLine = lineNr;
7953 bool needsEntry=
FALSE;
7955 Markdown markdown(yyextra->fileName,lineNr);
7958 while (yyextra->commentScanner.parseCommentBlock(
7959 yyextra->thisParser,
7960 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
7964 yyextra->docBlockInBody ?
FALSE : brief,
7965 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
7966 yyextra->docBlockInBody,
7967 yyextra->protection,
7978 QCString docFile = yyextra->current->docFile;
7980 yyextra->current->docFile = docFile;
7981 yyextra->current->docLine = lineNr;
7989 if (yyextra->docBlockTerm)
7991 unput(yyextra->docBlockTerm);
7992 yyextra->docBlockTerm=0;
7999 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8010 QCString orgDoc = yyextra->current->doc;
8011 QCString orgBrief = yyextra->current->brief;
8012 int orgDocLine = yyextra->current->docLine;
8013 int orgBriefLine = yyextra->current->briefLine;
8015 yyextra->current->doc.
clear();
8016 yyextra->current->brief.clear();
8019 int lineNr = orgDocLine;
8021 Markdown markdown(yyextra->fileName,lineNr);
8024 while (yyextra->commentScanner.parseCommentBlock(
8025 yyextra->thisParser,
8026 yyextra->current.get(),
8033 yyextra->protection,
8042 if (needsEntry)
newEntry(yyscanner);
8048 a.
docs = yyextra->current->doc;
8051 yyextra->current->doc = orgDoc;
8052 yyextra->current->brief = orgBrief;
8053 yyextra->current->docLine = orgDocLine;
8054 yyextra->current->briefLine = orgBriefLine;
8065 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8066 for (
const auto &ce : rt->children())
8068 if (!ce->program.empty())
8072 yyextra->padCount=0;
8075 yyextra->programStr = ce->program.str();
8076 yyextra->inputString = yyextra->programStr.data();
8077 yyextra->inputPosition = 0;
8078 if (ce->section.isEnum() || ce->spec.isEnum())
8079 BEGIN( FindFields ) ;
8081 BEGIN( FindMembers ) ;
8082 yyextra->current_root = ce;
8083 yyextra->fileName = ce->fileName;
8085 yyextra->yyLineNr = ce->bodyLine;
8086 yyextra->yyColNr = ce->bodyColumn;
8089 yyextra->current = std::make_shared<Entry>();
8090 yyextra->isStatic =
FALSE;
8095 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8097 ce->groups = rt->groups;
8100 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8102 if ( ce->section.isClass() )
8104 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8108 else if (yyextra->insideJava)
8112 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8128 else if (ce->section.isEnum() )
8130 yyextra->current->protection = yyextra->protection = ce->protection;
8132 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8134 if (ce->section.isNamespace() )
8136 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8138 yyextra->current->protection = yyextra->protection = ce->protection;
8139 yyextra->current->exported = yyextra->exported =
false;
8141 else if (ce->section.isNamespace() )
8144 yyextra->current->exported = yyextra->exported = ce->exported;
8149 yyextra->current->exported = yyextra->exported =
false;
8159 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8161 scannerYYlex(yyscanner);
8162 yyextra->lexInit=
TRUE;
8165 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8167 yyextra->programStr.clear();
8168 ce->program.str(std::string());
8184 const char *fileBuf,
8185 const std::shared_ptr<Entry> &rt,
8189 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8192 yyextra->inputString = fileBuf;
8193 yyextra->inputPosition = 0;
8194 yyextra->column = 0;
8195 scannerYYrestart(
nullptr,yyscanner);
8200 yyextra->isStatic =
FALSE;
8201 yyextra->exported =
false;
8203 yyextra->current_root = rt;
8204 yyextra->yyLineNr = 1 ;
8205 yyextra->yyBegLineNr = 1;
8206 yyextra->yyBegColNr = 0;
8207 yyextra->anonCount = 0;
8208 yyextra->anonNSCount = 0;
8209 yyextra->fileName = fileName;
8210 yyextra->clangParser = clangParser;
8212 rt->lang = yyextra->language;
8213 msg(
"Parsing file %s...\n",
qPrint(yyextra->fileName));
8215 yyextra->current_root = rt;
8217 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8218 yyextra->current = std::make_shared<Entry>();
8223 yyextra->current->name = yyextra->fileName;
8224 yyextra->current->section = sec;
8225 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8227 yyextra->current->reset();
8229 if ( yyextra->insidePHP )
8231 BEGIN( FindMembersPHP );
8233 else if ( yyextra->insideJava )
8235 yyextra->current->name=
"java::lang";
8236 yyextra->current->fileName = yyextra->fileName;
8237 yyextra->current->section = EntryType::makeUsingDir();
8238 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8240 BEGIN( FindMembers );
8244 BEGIN( FindMembers );
8247 scannerYYlex(yyscanner);
8248 yyextra->lexInit=
TRUE;
8250 if (YY_START==Comment)
8252 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8256 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8258 yyextra->programStr.clear();
8259 rt->program.str(std::string());
8263 yyextra->anonNSCount++;
8266 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8269 parent->moveToSubEntryAndKeep(child);
8271 yyextra->outerScopeEntries.clear();
8280 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8283 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8286 if (!yyextra->current)
8291 const char *orgInputString;
8292 int orgInputPosition;
8293 YY_BUFFER_STATE orgState;
8296 orgState = YY_CURRENT_BUFFER;
8297 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8298 orgInputString = yyextra->inputString;
8299 orgInputPosition = yyextra->inputPosition;
8302 yyextra->inputString = text.
data();
8303 yyextra->inputPosition = 0;
8304 yyextra->column = 0;
8305 scannerYYrestart(
nullptr, yyscanner);
8307 scannerYYlex(yyscanner);
8308 yyextra->lexInit=
TRUE;
8310 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8311 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8313 yyextra->current->section = EntryType::makeVariableDoc();
8317 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8318 yy_switch_to_buffer(orgState, yyscanner);
8319 yyextra->inputString = orgInputString;
8320 yyextra->inputPosition = orgInputPosition;
8336 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8344 scannerYYlex_destroy(
p->yyscanner);
8348 const char *fileBuf,
8349 const std::shared_ptr<Entry> &root,
8353 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8354 yyextra->thisParser =
this;
8358 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8364 QCString fe=extension.
lower();
8367 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8368 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8379#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...
Clang parser object for a single translation unit, which consists of a source file and the directly o...
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)