15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
62#define YY_NO_UNISTD_H 1
223static inline int computeIndent(
const char *s,
int startIndent);
254#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
#define lineCount(s, len)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static 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 void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
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)
void fixArgumentListForJavaScript(ArgumentList &al)
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)
Some helper functions for std::string.
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?
A bunch of utility functions.
269NOTopt (("!"{BNopt})|("not"{BN}+))?
271HEXDIGIT ({DIGIT}|[a-f]|[A-F])
272ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
273SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
274TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
275CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
278CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
279PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
280PHPUSEKW ("public"|"private"|"protected")
281IDLATTR ("["[^\]]*"]"){BN}*
282TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
283RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
284RAWEND ")"[^ \t\(\)\\]{0,16}\"
285ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
286ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
287LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
288BITOP "&"|"|"|"^"|"<<"|">>"|"~"
289OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
290FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
291MODULE_ID ({ID}".")*{ID}
292LINENR {B}*[1-9][0-9]*
293FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
294FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
295FILECHARS {FILEICHAR}*{FILEECHAR}+
296HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
297VFILEMASK {FILECHARS}("."{FILECHARS})*
298FILEMASK {VFILEMASK}|{HFILEMASK}
309DCOMMC ("/\*!"|"/\**")
311DCOMMCPP ("/\/!"|"/\/\/")
313DCOMM {DCOMMC}|{DCOMMCPP}
381%x TryFunctionBlockEnd
396%x SkipInterpVerbString
410%x UNOIDLAttributeBlock
437%x SpecializationSingleQuote
438%x SpecializationDoubleQuote
471%x SliceDictionaryName
502<*>"DEPRECATED_ATTRIBUTE" {
503 if (!yyextra->insideObjC) REJECT;
505<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
506 if (!yyextra->insideObjC) REJECT;
507 yyextra->lastDeprecatedContext=YY_START;
508 yyextra->lastStringContext=Deprecated_round;
511<Deprecated_round>")" {
512 BEGIN(yyextra->lastDeprecatedContext);
514<Deprecated_round>{BNopt} {
517<Deprecated_round>. { }
519 yyextra->curlyCount=0;
520 yyextra->needsSemi =
TRUE;
521 BEGIN(SkipCurlyBlock);
524 yyextra->roundCount=0;
525 BEGIN(SkipRoundBlock);
528 ++yyextra->roundCount;
531 if (yyextra->roundCount )
532 --yyextra->roundCount ;
537 ++yyextra->curlyCount ;
540 if( yyextra->curlyCount )
542 --yyextra->curlyCount ;
544 else if (yyextra->needsSemi)
550 BEGIN( FindMembers );
554 if (yyextra->insidePHP)
556 yyextra->lastStringContext=NextSemi;
557 BEGIN(SkipPHPString);
560<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
562 yyextra->lastStringContext=NextSemi;
567 BEGIN( FindMembers );
571 BEGIN( FindMembers );
574 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
578<FindMembers>"<?php" {
579 yyextra->insidePHP =
TRUE;
581<FindMembersPHP>"<?"("php"?) {
582 BEGIN( FindMembers );
584<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
586 BEGIN( FindMembers );
588<FindMembers>"?>"|"</script>" {
589 if (yyextra->insidePHP)
590 BEGIN( FindMembersPHP );
594<FindMembersPHP>[^\n<]+ {
601<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
606<FindMembers>"%{"[^\n]* {
607 if (!yyextra->insideIDL)
611 if (!yyextra->insideIDL)
614<FindMembers>{B}*("properties"){BN}*":"{BN}* {
616 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
619<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
621 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
624<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
626 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
629<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
631 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
634<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
636 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
639<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
641 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
643<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
646<FindMembers>{B}*"internal"{BN}*":"{BN}* {
647 if (yyextra->insideCli)
656<FindMembers>{B}*"protected"{BN}*":"{BN}* {
659<FindMembers>{B}*"private"{BN}*":"{BN}* {
662<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
663 if (!yyextra->insideCpp) REJECT;
667<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
668 if (!yyextra->insideCpp) REJECT;
672<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
673 if (!yyextra->insideCpp) REJECT;
685<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
686<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
687 BEGIN( SkipComment ) ;
689<CppProt>("slots"|"Q_SLOTS") {
690 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
692<FindMembers>{B}*"event"{BN}+ {
693 if (yyextra->insideCli)
697 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
698 yyextra->current->bodyLine = yyextra->yyLineNr;
699 yyextra->current->bodyColumn = yyextra->yyColNr;
700 yyextra->curlyCount=0;
701 BEGIN( CliPropertyType );
703 else if (yyextra->insideCS)
706 yyextra->current->mtype = MethodTypes::Event;
707 yyextra->current->bodyLine = yyextra->yyLineNr;
708 yyextra->current->bodyColumn = yyextra->yyColNr;
715<FindMembers>{B}*"property"{BN}+ {
716 if (yyextra->insideCli)
720 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
721 yyextra->current->bodyLine = yyextra->yyLineNr;
722 yyextra->current->bodyColumn = yyextra->yyColNr;
723 yyextra->curlyCount=0;
724 BEGIN( CliPropertyType );
731<CliPropertyType>{ID} {
733 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
735<CliPropertyType>"[" {
736 yyextra->current->args =
"[";
737 BEGIN( CliPropertyIndex );
739<CliPropertyType>"{" {
740 yyextra->curlyCount=0;
742 BEGIN( CSAccessorDecl );
744<CliPropertyType>";" {
746 BEGIN( FindMembers );
751<CliPropertyType>{B}* {
755 yyextra->current->type += yytext;
757<CliPropertyIndex>"]" {
758 BEGIN( CliPropertyType );
759 yyextra->current->args+=yytext;
762 yyextra->current->args+=yytext;
777<FindMembers>{B}*"@private"{BN}+ {
780<FindMembers>{B}*"@protected"{BN}+ {
783<FindMembers>{B}*"@public"{BN}+ {
786<FindMembers>[\-+]{BN}* {
787 if (!yyextra->insideObjC)
793 yyextra->current->fileName = yyextra->fileName;
794 yyextra->current->startLine = yyextra->yyLineNr;
795 yyextra->current->startColumn = yyextra->yyColNr;
796 yyextra->current->bodyLine = yyextra->yyLineNr;
797 yyextra->current->bodyColumn = yyextra->yyColNr;
798 yyextra->current->section = EntryType::makeFunction();
799 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
800 yyextra->insideObjC =
TRUE;
801 yyextra->yyBegColNr = yyextra->yyColNr;
802 yyextra->yyBegLineNr = yyextra->yyLineNr;
803 yyextra->current->virt = Specifier::Virtual;
805 yyextra->current->isStatic=yytext[0]==
'+';
811 BEGIN( ObjCReturnType );
812 yyextra->current->type.clear();
813 yyextra->roundCount=0;
816 if (yyextra->current->type.isEmpty())
818 yyextra->current->type +=
"id";
820 yyextra->current->name = yytext;
824 yyextra->current->name +=
':';
826 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
829<ObjCReturnType>[^()]* {
830 yyextra->current->type += yytext;
832<ObjCReturnType>"(^)(" {
833 yyextra->current->type += yytext;
834 yyextra->roundCount++;
837 yyextra->current->type += yytext;
838 yyextra->roundCount++;
841 if (yyextra->roundCount<=0)
847 yyextra->current->type += yytext;
848 yyextra->roundCount--;
851<ObjCParams>({ID})?{BN}*":" {
856 yyextra->current->name +=
" :";
860 yyextra->current->name += keyw+
":";
862 if (yyextra->current->argList.back().type.isEmpty())
864 yyextra->current->argList.back().type=
"id";
868 yyextra->current->argList.push_back(a);
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
QCString left(size_t len) const
870<ObjCParams>{ID}{BN}* {
874<ObjCParams>","{BN}*"..." {
881 yyextra->current->argList.push_back(a);
889 yyextra->roundCount=0;
890 yyextra->current->argList.back().type.clear();
891 BEGIN( ObjCParamType );
894 yyextra->roundCount++;
895 yyextra->current->argList.back().type+=yytext;
897<ObjCParamType>")"/{B}* {
898 if (yyextra->roundCount<=0)
904 yyextra->current->argList.back().type+=yytext;
905 yyextra->roundCount--;
908<ObjCParamType>[^()]* {
911<ObjCMethod,ObjCParams>";" {
912 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
914 yyextra->current->argList.back().type=
"id";
916 if (yyextra->current->argList.empty())
918 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
925<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
930 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
932 yyextra->current->argList.back().type=
"id";
934 if (yyextra->current->argList.empty())
936 yyextra->current->argList.setNoParameters(
TRUE);
942<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
943 if (yyextra->insideSlice)
946 yyextra->current->bodyLine = yyextra->yyLineNr;
947 yyextra->current->bodyColumn = yyextra->yyColNr;
948 yyextra->current->fileName = yyextra->fileName ;
949 yyextra->current->startLine = yyextra->yyLineNr ;
950 yyextra->current->startColumn = yyextra->yyColNr;
951 yyextra->current->args.clear();
952 yyextra->current->section = EntryType::makeTypedef();
953 yyextra->isTypedef =
TRUE;
954 BEGIN( SliceSequence );
959<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
960 if (yyextra->insideSlice)
963 yyextra->current->bodyLine = yyextra->yyLineNr;
964 yyextra->current->bodyColumn = yyextra->yyColNr;
965 yyextra->current->fileName = yyextra->fileName ;
966 yyextra->current->startLine = yyextra->yyLineNr ;
967 yyextra->current->startColumn = yyextra->yyColNr;
968 yyextra->current->args.clear();
969 yyextra->current->section = EntryType::makeTypedef() ;
970 yyextra->isTypedef =
TRUE;
971 BEGIN( SliceDictionary );
976<FindMembers>{BN}{1,80} {
979<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
980 if (yyextra->insideJava)
983 yyextra->lastSkipRoundContext = YY_START;
984 yyextra->roundCount=0;
989 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
990 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
991 yyextra->current->protection = Protection::Public ;
993 BEGIN( ObjCPropAttr );
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
1000<ObjCPropAttr>"getter="{ID} {
1001 yyextra->current->read = yytext+7;
1003<ObjCPropAttr>"setter="{ID} {
1004 yyextra->current->write = yytext+7;
1006<ObjCPropAttr>"readonly" {
1007 yyextra->current->spec.setWritable(
false);
1009<ObjCPropAttr>"readwrite" {
1011<ObjCPropAttr>"assign" {
1013<ObjCPropAttr>"unsafe_unretained" {
1014 yyextra->current->spec.setAssign(
false);
1015 yyextra->current->spec.setUnretained(
true);
1017<ObjCPropAttr>"retain" {
1018 yyextra->current->spec.setAssign(
false);
1019 yyextra->current->spec.setRetain(
true);
1021<ObjCPropAttr>"copy" {
1022 yyextra->current->spec.setAssign(
false);
1023 yyextra->current->spec.setCopy(
true);
1025<ObjCPropAttr>"weak" {
1026 yyextra->current->spec.setAssign(
false);
1027 yyextra->current->spec.setWeak(
true);
1029<ObjCPropAttr>"strong" {
1030 yyextra->current->spec.setAssign(
false);
1031 yyextra->current->spec.setStrong(
true);
1033<ObjCPropAttr>"nonatomic" {
1034 yyextra->current->spec.setNonAtomic(
true);
1039<FindMembers>"@"{ID}("."{ID})+ {
1040 if (yyextra->insideJava)
1049<FindMembers>"@"{ID} {
1050 if (yyextra->insideJava)
1054 else if (
qstrcmp(yytext,
"@property")==0)
1056 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1057 yyextra->current->spec.setWritable(
true).setReadable(
true);
1058 yyextra->current->protection = Protection::Public ;
1060 else if (
qstrcmp(yytext,
"@synthesize")==0)
1062 BEGIN( ObjCSkipStatement );
1064 else if (
qstrcmp(yytext,
"@dynamic")==0)
1066 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1073<ObjCSkipStatement>";" {
1076<PackageName>{ID}(("."|"\\"){ID})* {
1077 yyextra->isTypedef=
FALSE;
1079 yyextra->current->name = yytext;
1080 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1081 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1082 yyextra->current->section = EntryType::makeNamespace();
1083 yyextra->current->type =
"namespace" ;
1084 yyextra->current->fileName = yyextra->fileName;
1085 yyextra->current->startLine = yyextra->yyLineNr;
1086 yyextra->current->startColumn = yyextra->yyColNr;
1087 yyextra->current->bodyLine = yyextra->yyLineNr;
1088 yyextra->current->bodyColumn = yyextra->yyColNr;
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
1092 std::shared_ptr<Entry> tmp = yyextra->current;
1093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1094 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1099 yyextra->curlyCount=0;
1100 BEGIN( ReadNSBody );
1102<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1103 if (!yyextra->insideCpp) REJECT;
1105 yyextra->current->exported =
true;
1107 BEGIN( ModuleName );
1109<FindMembers>{B}*"module"{BN}*";" {
1110 if (!yyextra->insideCpp) REJECT;
1111 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1114 BEGIN( FindMembers );
1116<FindMembers>{B}*"module"{BN}+ {
1117 if (!yyextra->insideCpp) REJECT;
1119 yyextra->current->exported =
false;
1121 BEGIN( ModuleName );
1123<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1124 if (!yyextra->insideCpp) REJECT;
1125 yyextra->current->exported =
true;
1127 BEGIN( ModuleImport );
1129<FindMembers>{B}*"import"{BN}+ {
1130 if (!yyextra->insideCpp) REJECT;
1132 BEGIN( ModuleImport );
1134<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1136 int i = name.
find(
':');
1142 yyextra->current->exported,
1145 yyextra->current->section = EntryType::makeModuleDoc();
1146 yyextra->isTypedef=
FALSE;
1148 yyextra->current->type +=
" module";
1149 yyextra->current->fileName = yyextra->fileName;
1150 yyextra->current->startLine = yyextra->yyLineNr;
1151 yyextra->current->startColumn = yyextra->yyColNr;
1152 yyextra->current->bodyLine = yyextra->yyLineNr;
1153 yyextra->current->bodyColumn = yyextra->yyColNr;
1154 yyextra->current->name = name+
":"+partition;
static ModuleManager & instance()
void createModuleDef(const QCString &fileName, int line, int column, bool exported, const QCString &moduleName, const QCString &partitionName=QCString())
int find(char c, int index=0, bool cs=TRUE) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
1157<ModuleName>{MODULE_ID} {
1161 yyextra->current->exported,
1163 yyextra->current->section = EntryType::makeModuleDoc();
1164 yyextra->isTypedef=
FALSE;
1166 yyextra->current->type +=
" module";
1167 yyextra->current->fileName = yyextra->fileName;
1168 yyextra->current->startLine = yyextra->yyLineNr;
1169 yyextra->current->startColumn = yyextra->yyColNr;
1170 yyextra->current->bodyLine = yyextra->yyLineNr;
1171 yyextra->current->bodyColumn = yyextra->yyColNr;
1172 yyextra->current->name = yytext;
1175<ModuleName>":"{BN}+"private" {
1176 yyextra->current->exported = yyextra->exported =
false;
1179<ModuleName>";" { unput(
';');
1184<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1190<ModuleImport>"<"[^>\n]*">" {
1196<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1198 int i = name.
find(
':');
1204 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1208<ModuleImport>{MODULE_ID} {
1212 yyextra->current->exported);
1215<ModuleImport>";" { BEGIN(FindMembers); }
1216<ModuleImport>\n {
lineCount(yyscanner); }
1218<FindMembers>{B}*"export"{BN}+"{" {
1219 yyextra->current->exported = yyextra->exported =
true;
1221<FindMembers>{B}*"export"{BN}+ {
1222 if (!yyextra->insideCpp) REJECT;
1223 yyextra->current->exported=
true;
1225<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1226 yyextra->current->type +=
" initonly ";
1227 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1230<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1231 yyextra->current->isStatic =
TRUE;
1234<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1235 yyextra->current->isStatic =
TRUE;
1238<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1239 yyextra->current->isStatic =
FALSE;
1240 yyextra->current->explicitExternal =
TRUE;
1243<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1245 yyextra->current->type +=
" const ";
1246 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1254<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1255 yyextra->current->type +=
" virtual ";
1256 yyextra->current->virt = Specifier::Virtual;
1259<FindMembers>{B}*"constexpr"{BN}+ {
1260 if (yyextra->insideCpp)
1262 yyextra->current->spec.setConstExpr(
true);
1266<FindMembers>{B}*"consteval"{BN}+ {
1267 if (yyextra->insideCpp)
1269 yyextra->current->spec.setConstEval(
true);
1273<FindMembers>{B}*"constinit"{BN}+ {
1274 if (yyextra->insideCpp)
1276 yyextra->current->spec.setConstInit(
true);
1280<FindMembers>{B}*"published"{BN}+ {
1281 if (yyextra->insideIDL)
1284 yyextra->current->spec.setPublished(
true);
1291<FindMembers>{B}*"sealed"{BN}+ {
1292 if (yyextra->insideCS)
1294 yyextra->current->spec.setSealed(
true);
1301<FindMembers>{B}*"abstract"{BN}+ {
1302 if (yyextra->insidePHP || yyextra->insideCS)
1304 yyextra->current->spec.setAbstract(
true);
1308 if (yyextra->insideCpp) REJECT;
1309 yyextra->current->type +=
" abstract ";
1310 if (!yyextra->insideJava)
1312 yyextra->current->virt = Specifier::Pure;
1316 yyextra->current->spec.setAbstract(
true);
1321<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1322 yyextra->current->spec.setInline(
true);
1325<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1326 yyextra->current->spec.setMutable(
true);
1329<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1330 yyextra->current->spec.setExplicit(
true);
1333<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1334 yyextra->current->spec.setLocal(
true);
1337<FindMembers>{B}*"@required"{BN}+ {
1338 yyextra->current->spec.setOptional(
false).setRequired(
true);
1341<FindMembers>{B}*"@optional"{BN}+ {
1342 yyextra->current->spec.setRequired(
false).setOptional(
true);
1350<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1351<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1352 yyextra->isTypedef=
FALSE;
1353 yyextra->current->section = EntryType::makeNamespace();
1354 yyextra->current->type =
"namespace" ;
1355 yyextra->current->fileName = yyextra->fileName;
1356 yyextra->current->startLine = yyextra->yyLineNr;
1357 yyextra->current->startColumn = yyextra->yyColNr;
1358 yyextra->current->bodyLine = yyextra->yyLineNr;
1359 yyextra->current->bodyColumn = yyextra->yyColNr;
1361 if (yyextra->insidePHP)
1363 BEGIN( PackageName );
1367 BEGIN( CompoundName );
1370<FindMembers>{B}*"module"{BN}+ {
1372 if (yyextra->insideIDL || yyextra->insideSlice)
1374 yyextra->isTypedef=
FALSE;
1375 yyextra->current->section = EntryType::makeNamespace();
1376 yyextra->current->type =
"module" ;
1377 yyextra->current->fileName = yyextra->fileName;
1378 yyextra->current->startLine = yyextra->yyLineNr;
1379 yyextra->current->startColumn = yyextra->yyColNr;
1380 yyextra->current->bodyLine = yyextra->yyLineNr;
1381 yyextra->current->bodyColumn = yyextra->yyColNr;
1382 BEGIN( CompoundName );
1384 else if (yyextra->insideD)
1395<FindMembers>{B}*"library"{BN}+ {
1397 if (yyextra->insideIDL)
1399 yyextra->isTypedef=
FALSE;
1400 yyextra->current->section = EntryType::makeNamespace();
1401 yyextra->current->type =
"library" ;
1402 yyextra->current->fileName = yyextra->fileName;
1403 yyextra->current->startLine = yyextra->yyLineNr;
1404 yyextra->current->startColumn = yyextra->yyColNr;
1405 yyextra->current->bodyLine = yyextra->yyLineNr;
1406 yyextra->current->bodyColumn = yyextra->yyColNr;
1407 BEGIN( CompoundName );
1415<FindMembers>{B}*"constants"{BN}+ {
1417 if (yyextra->insideIDL)
1419 yyextra->isTypedef=
FALSE;
1420 yyextra->current->section = EntryType::makeNamespace();
1421 yyextra->current->type =
"constants";
1422 yyextra->current->fileName = yyextra->fileName;
1423 yyextra->current->startLine = yyextra->yyLineNr;
1424 yyextra->current->startColumn = yyextra->yyColNr;
1425 yyextra->current->bodyLine = yyextra->yyLineNr;
1426 yyextra->current->bodyColumn = yyextra->yyColNr;
1427 BEGIN( CompoundName );
1435<FindMembers>{BN}*("service"){BN}+ {
1437 if (yyextra->insideIDL)
1439 yyextra->isTypedef=
FALSE;
1440 yyextra->current->section = EntryType::makeClass();
1444 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1446 yyextra->current->type +=
" service " ;
1447 yyextra->current->fileName = yyextra->fileName;
1448 yyextra->current->startLine = yyextra->yyLineNr;
1449 yyextra->current->bodyLine = yyextra->yyLineNr;
1450 yyextra->current->bodyColumn = yyextra->yyColNr;
1451 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1459<FindMembers>{BN}*("singleton"){BN}+ {
1461 if (yyextra->insideIDL)
1463 yyextra->isTypedef=
FALSE;
1464 yyextra->current->section = EntryType::makeClass();
1466 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1467 setPublished(spec.isPublished());
1469 yyextra->current->type +=
" singleton " ;
1470 yyextra->current->fileName = yyextra->fileName;
1471 yyextra->current->startLine = yyextra->yyLineNr;
1472 yyextra->current->bodyLine = yyextra->yyLineNr;
1473 yyextra->current->bodyColumn = yyextra->yyColNr;
1474 BEGIN( CompoundName );
1482<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1484 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1486 yyextra->isTypedef=
FALSE;
1487 yyextra->current->section = EntryType::makeClass();
1489 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1491 setOptional(spec.isOptional()).
1492 setPublished(spec.isPublished()).
1493 setLocal(spec.isLocal());
1495 yyextra->current->type +=
" interface" ;
1496 yyextra->current->fileName = yyextra->fileName;
1497 yyextra->current->startLine = yyextra->yyLineNr;
1498 yyextra->current->startColumn = yyextra->yyColNr;
1499 yyextra->current->bodyLine = yyextra->yyLineNr;
1500 yyextra->current->bodyColumn = yyextra->yyColNr;
1502 BEGIN( CompoundName );
1510<FindMembers>{B}*"@implementation"{BN}+ {
1512 yyextra->isTypedef=
FALSE;
1513 yyextra->current->section = EntryType::makeObjcImpl();
1514 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1515 yyextra->insideObjC =
TRUE;
1516 yyextra->current->protection = yyextra->protection = Protection::Public ;
1518 yyextra->current->type +=
" implementation" ;
1519 yyextra->current->fileName = yyextra->fileName;
1520 yyextra->current->startLine = yyextra->yyLineNr;
1521 yyextra->current->bodyLine = yyextra->yyLineNr;
1522 yyextra->current->bodyColumn = yyextra->yyColNr;
1523 BEGIN( CompoundName );
1525<FindMembers>{B}*"@interface"{BN}+ {
1527 yyextra->isTypedef=
FALSE;
1528 yyextra->current->section = EntryType::makeClass();
1529 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1530 if (!yyextra->insideJava)
1532 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1533 yyextra->insideObjC =
TRUE;
1535 yyextra->current->protection = yyextra->protection = Protection::Public ;
1537 yyextra->current->type +=
" interface" ;
1538 yyextra->current->fileName = yyextra->fileName;
1539 yyextra->current->startLine = yyextra->yyLineNr;
1540 yyextra->current->startColumn = yyextra->yyColNr;
1541 yyextra->current->bodyLine = yyextra->yyLineNr;
1542 yyextra->current->bodyColumn = yyextra->yyColNr;
1543 BEGIN( CompoundName );
1545<FindMembers>{B}*"@protocol"{BN}+ {
1547 yyextra->isTypedef=
FALSE;
1548 yyextra->current->section = EntryType::makeClass();
1550 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1551 yyextra->insideObjC =
TRUE;
1552 yyextra->current->protection = yyextra->protection = Protection::Public ;
1554 yyextra->current->type +=
" protocol" ;
1555 yyextra->current->fileName = yyextra->fileName;
1556 yyextra->current->startLine = yyextra->yyLineNr;
1557 yyextra->current->startColumn = yyextra->yyColNr;
1558 yyextra->current->bodyLine = yyextra->yyLineNr;
1559 yyextra->current->bodyColumn = yyextra->yyColNr;
1560 BEGIN( CompoundName );
1562<FindMembers>{B}*"exception"{BN}+ {
1563 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1564 yyextra->isTypedef=
FALSE;
1565 yyextra->current->section = EntryType::makeClass();
1568 yyextra->current->spec =
TypeSpecifier().setException(
true).
1569 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1571 yyextra->current->type +=
" exception" ;
1572 yyextra->current->fileName = yyextra->fileName;
1573 yyextra->current->startLine = yyextra->yyLineNr;
1574 yyextra->current->startColumn = yyextra->yyColNr;
1575 yyextra->current->bodyLine = yyextra->yyLineNr;
1576 yyextra->current->bodyColumn = yyextra->yyColNr;
1578 BEGIN( CompoundName );
1580<FindMembers>"@class" |
1581<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1582<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1584 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1585 bool isConst=decl.
find(
"const")!=-1;
1586 bool isVolatile=decl.
find(
"volatile")!=-1;
1587 yyextra->current->section = EntryType::makeClass();
1589 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1592 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1594 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1596 yyextra->current->spec.setLocal(
true);
1600 yyextra->current->type +=
" const";
1602 else if (isVolatile)
1604 yyextra->current->type +=
" volatile";
1606 yyextra->current->type +=
" class" ;
1607 yyextra->current->fileName = yyextra->fileName;
1608 yyextra->current->startLine = yyextra->yyLineNr;
1609 yyextra->current->startColumn = yyextra->yyColNr;
1610 yyextra->current->bodyLine = yyextra->yyLineNr;
1611 yyextra->current->bodyColumn = yyextra->yyColNr;
1614 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1615 yyextra->insideObjC =
TRUE;
1618 if (yytext[yyleng-1]==
'{') unput(
'{');
1619 BEGIN( CompoundName ) ;
1621<FindMembers>{B}*"value class{" |
1622<FindMembers>{B}*"value class"{BN}+ {
1623 yyextra->isTypedef=
FALSE;
1624 yyextra->current->section = EntryType::makeClass();
1627 yyextra->current->type +=
" value class" ;
1628 yyextra->current->fileName = yyextra->fileName;
1629 yyextra->current->startLine = yyextra->yyLineNr;
1630 yyextra->current->startColumn = yyextra->yyColNr;
1631 yyextra->current->bodyLine = yyextra->yyLineNr;
1632 yyextra->current->bodyColumn = yyextra->yyColNr;
1634 if (yytext[yyleng-1]==
'{') unput(
'{');
1635 BEGIN( CompoundName ) ;
1637<FindMembers>{B}*"ref class{" |
1638<FindMembers>{B}*"ref class"{BN}+ {
1639 yyextra->isTypedef=
FALSE;
1640 yyextra->current->section = EntryType::makeClass();
1643 yyextra->current->type +=
" ref class" ;
1644 yyextra->current->fileName = yyextra->fileName;
1645 yyextra->current->startLine = yyextra->yyLineNr;
1646 yyextra->current->startColumn = yyextra->yyColNr;
1647 yyextra->current->bodyLine = yyextra->yyLineNr;
1648 yyextra->current->bodyColumn = yyextra->yyColNr;
1650 if (yytext[yyleng-1]==
'{') unput(
'{');
1651 BEGIN( CompoundName ) ;
1653<FindMembers>{B}*"interface class{" |
1654<FindMembers>{B}*"interface class"{BN}+ {
1655 yyextra->isTypedef=
FALSE;
1656 yyextra->current->section = EntryType::makeClass();
1657 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1659 yyextra->current->type +=
" interface class" ;
1660 yyextra->current->fileName = yyextra->fileName;
1661 yyextra->current->startLine = yyextra->yyLineNr;
1662 yyextra->current->startColumn = yyextra->yyColNr;
1663 yyextra->current->bodyLine = yyextra->yyLineNr;
1664 yyextra->current->bodyColumn = yyextra->yyColNr;
1666 if (yytext[yyleng-1]==
'{') unput(
'{');
1667 BEGIN( CompoundName ) ;
1669<FindMembers>{B}*"coclass"{BN}+ {
1670 if (yyextra->insideIDL)
1672 yyextra->isTypedef=
FALSE;
1673 yyextra->current->section = EntryType::makeClass();
1675 yyextra->current->type +=
" coclass" ;
1676 yyextra->current->fileName = yyextra->fileName;
1677 yyextra->current->startLine = yyextra->yyLineNr;
1678 yyextra->current->startColumn = yyextra->yyColNr;
1679 yyextra->current->bodyLine = yyextra->yyLineNr;
1680 yyextra->current->bodyColumn = yyextra->yyColNr;
1682 BEGIN( CompoundName ) ;
1687 yyextra->current->name = yytext;
1688 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1692<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1693<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1694 if (yyextra->insideJava) REJECT;
1696 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1697 bool isConst=decl.
find(
"const")!=-1;
1698 bool isVolatile=decl.
find(
"volatile")!=-1;
1699 yyextra->current->section = EntryType::makeClass() ;
1703 setPublished(spec.isPublished()).
1704 setInline(spec.isInline()).
1705 setLocal(spec.isLocal());
1711 yyextra->current->type +=
" const";
1713 else if (isVolatile)
1715 yyextra->current->type +=
" volatile";
1717 yyextra->current->type +=
" struct" ;
1718 yyextra->current->fileName = yyextra->fileName;
1719 yyextra->current->startLine = yyextra->yyLineNr;
1720 yyextra->current->startColumn = yyextra->yyColNr;
1721 yyextra->current->bodyLine = yyextra->yyLineNr;
1722 yyextra->current->bodyColumn = yyextra->yyColNr;
1724 if (yytext[yyleng-1]==
'{') unput(
'{');
1725 BEGIN( CompoundName ) ;
1727<FindMembers>{B}*"value struct{" |
1728<FindMembers>{B}*"value struct"{BN}+ {
1729 yyextra->isTypedef=
FALSE;
1730 yyextra->current->section = EntryType::makeClass();
1731 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1733 yyextra->current->type +=
" value struct" ;
1734 yyextra->current->fileName = yyextra->fileName;
1735 yyextra->current->startLine = yyextra->yyLineNr;
1736 yyextra->current->startColumn = yyextra->yyColNr;
1737 yyextra->current->bodyLine = yyextra->yyLineNr;
1738 yyextra->current->bodyColumn = yyextra->yyColNr;
1740 if (yytext[yyleng-1]==
'{') unput(
'{');
1741 BEGIN( CompoundName ) ;
1743<FindMembers>{B}*"ref struct{" |
1744<FindMembers>{B}*"ref struct"{BN}+ {
1745 yyextra->isTypedef=
FALSE;
1746 yyextra->current->section = EntryType::makeClass();
1747 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1749 yyextra->current->type +=
" ref struct" ;
1750 yyextra->current->fileName = yyextra->fileName;
1751 yyextra->current->startLine = yyextra->yyLineNr;
1752 yyextra->current->startColumn = yyextra->yyColNr;
1753 yyextra->current->bodyLine = yyextra->yyLineNr;
1754 yyextra->current->bodyColumn = yyextra->yyColNr;
1756 if (yytext[yyleng-1]==
'{') unput(
'{');
1757 BEGIN( CompoundName ) ;
1759<FindMembers>{B}*"interface struct{" |
1760<FindMembers>{B}*"interface struct"{BN}+ {
1761 yyextra->isTypedef=
FALSE;
1762 yyextra->current->section = EntryType::makeClass();
1763 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1765 yyextra->current->type +=
" interface struct";
1766 yyextra->current->fileName = yyextra->fileName;
1767 yyextra->current->startLine = yyextra->yyLineNr;
1768 yyextra->current->startColumn = yyextra->yyColNr;
1769 yyextra->current->bodyLine = yyextra->yyLineNr;
1770 yyextra->current->bodyColumn = yyextra->yyColNr;
1772 if (yytext[yyleng-1]==
'{') unput(
'{');
1773 BEGIN( CompoundName ) ;
1775<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1776<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1777 if (yyextra->insideJava) REJECT;
1779 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1780 bool isConst=decl.
find(
"const")!=-1;
1781 bool isVolatile=decl.
find(
"volatile")!=-1;
1782 yyextra->current->section = EntryType::makeClass();
1789 yyextra->current->type +=
" const";
1791 else if (isVolatile)
1793 yyextra->current->type +=
" volatile";
1795 yyextra->current->type +=
" union" ;
1796 yyextra->current->fileName = yyextra->fileName;
1797 yyextra->current->startLine = yyextra->yyLineNr;
1798 yyextra->current->startColumn = yyextra->yyColNr;
1799 yyextra->current->bodyLine = yyextra->yyLineNr;
1800 yyextra->current->bodyColumn = yyextra->yyColNr;
1802 if (yytext[yyleng-1]==
'{') unput(
'{');
1803 BEGIN( CompoundName ) ;
1805<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1806<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1808 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1809 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1810 bool isEnumSytruct = text.
find(
"struct")!=-1;
1811 if (yyextra->insideJava)
1813 yyextra->current->section = EntryType::makeClass();
1819 yyextra->current->section = EntryType::makeEnum() ;
1822 yyextra->current->type +=
" enum";
1825 yyextra->current->spec.setStrong(
true);
1829 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1831 yyextra->current->fileName = yyextra->fileName;
1832 yyextra->current->startLine = yyextra->yyLineNr;
1833 yyextra->current->startColumn = yyextra->yyColNr;
1834 yyextra->current->bodyLine = yyextra->yyLineNr;
1835 yyextra->current->bodyColumn = yyextra->yyColNr;
1837 if (yytext[yyleng-1]==
'{') unput(
'{');
1838 BEGIN( CompoundName ) ;
1840<FindMembers>{B}*"concept"{BN}+ {
1841 if (yyextra->insideJava) REJECT;
1842 yyextra->isTypedef=
FALSE;
1843 yyextra->current->section = EntryType::makeConcept();
1845 yyextra->current->type +=
" concept";
1846 yyextra->current->fileName = yyextra->fileName;
1847 yyextra->current->startLine = yyextra->yyLineNr;
1848 yyextra->current->startColumn = yyextra->yyColNr;
1849 yyextra->current->bodyLine = yyextra->yyLineNr;
1850 yyextra->current->bodyColumn = yyextra->yyColNr;
1852 BEGIN( ConceptName ) ;
1854<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1856 yyextra->current->name +=
"()";
1857 BEGIN( FindMembers );
1859<Operator>"("{BN}*")"{BNopt}/"(" {
1861 yyextra->current->name += yytext ;
1862 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1863 BEGIN( FindMembers ) ;
1867 BEGIN( FindMembers ) ;
1871 yyextra->current->name += *yytext ;
1873<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1874 if (!yyextra->current->type.startsWith(
"friend "))
1876 yyextra->current->name += yytext;
1880 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1882 BEGIN( FindMembers ) ;
1884<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1887 yyextra->current->tArgLists.
push_back(al);
1888 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1889 yyextra->templateStr=
"<";
1890 yyextra->fullArgString = yyextra->templateStr;
1891 yyextra->copyArgString = &yyextra->templateStr;
1892 yyextra->currentArgumentContext = FindMembers;
1893 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1895<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1896 if (yyextra->insideJava) REJECT;
1898 BEGIN( NSAliasName );
1901 yyextra->aliasName = yytext;
1902 BEGIN( NSAliasArg );
1904<NSAliasArg>({ID}"::")*{ID} {
1906 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1917 BEGIN( FindMembers );
1919<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1921 yyextra->aliasName=yytext;
1924<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1928 yyextra->current->fileName = yyextra->fileName;
1930 yyextra->current->section = EntryType::makeUsingDecl();
1931 yyextra->current_root->copyToSubEntry(yyextra->current);
1933 yyextra->current->section = EntryType::makeUsingDir();
1934 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1936 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1938<PHPUseAs>{BN}+"as"{BN}+ {
1941<PHPUseAs>{PHPUSEKW} {
1945 if (!yyextra->aliasName.isEmpty())
1950 yyextra->aliasName.clear();
const std::string & str() const
1952<PHPUse,PHPUseAs>[,;] {
1962<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1966 yyextra->current->fileName = yyextra->fileName;
1973 yyextra->current->section = EntryType::makeUsingDir();
1974 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
static FileNameLinkedMap * inputNameLinkedMap
A model of a file symbol.
virtual void addIncludeDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
1978<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1982 yyextra->current->fileName = yyextra->fileName;
1994 if (yyextra->insideD)
1996 yyextra->current->section = EntryType::makeUsingDir();
2001 yyextra->current->section = EntryType::makeUsingDecl();
2003 yyextra->previous = yyextra->current;
2004 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2008<IDLImport>"\""[^"]*"\"" {
2009 QCString fileName(&yytext[1],yyleng-2);
2025<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2026 if (yyextra->insideJava) REJECT;
2027 yyextra->current->startLine=yyextra->yyLineNr;
2028 yyextra->current->startColumn = yyextra->yyColNr;
2032<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2033<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2035 yyextra->current->name=yytext;
2036 yyextra->current->fileName = yyextra->fileName;
2037 yyextra->current->section = EntryType::makeUsingDecl();
2038 yyextra->current->startLine = yyextra->yyLineNr;
2039 yyextra->previous = yyextra->current;
2040 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2042 if (yyextra->insideCS)
2047 yyextra->current->name=yytext;
2048 yyextra->current->fileName = yyextra->fileName;
2049 yyextra->current->startLine = yyextra->yyLineNr;
2050 yyextra->current->startColumn = yyextra->yyColNr;
2051 yyextra->current->section = EntryType::makeUsingDir();
2052 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2057<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2059 yyextra->current->fileName = yyextra->fileName;
2060 yyextra->current->section = EntryType::makeUsingDecl();
2061 yyextra->current->startLine = yyextra->yyLineNr;
2062 yyextra->current->bodyLine = yyextra->yyLineNr;
2063 yyextra->current->bodyColumn = yyextra->yyColNr;
2064 yyextra->lastInitializerContext = UsingAlias;
2065 yyextra->sharpCount=0;
2066 yyextra->initBracketCount=0;
2068 BEGIN(ReadInitializer);
2071 yyextra->current->section = EntryType::makeVariable();
2073 init.stripPrefix(
"class ");
2074 init.stripPrefix(
"struct ");
2076 yyextra->current->type =
"typedef "+
init;
2077 yyextra->current->args.clear();
2078 yyextra->current->spec.setAlias(
true);
2079 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2084 yyextra->current->initializer << yytext;
2087 yyextra->current->initializer << yytext;
2091 yyextra->current->fileName = yyextra->fileName;
2092 yyextra->current->section = EntryType::makeUsingDir();
2093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2097<Using>";" { BEGIN(FindMembers); }
2098<FindMembers>{SCOPENAME}{BN}*"<>" {
2103<FindMembers>{SCOPENAME}{BNopt}/"<" {
2105 if (yyextra->insideCpp && name==
"import") REJECT;
2106 yyextra->roundCount=0;
2107 yyextra->sharpCount=0;
2110 yyextra->current->name=name;
2116 BEGIN( EndTemplate );
2118<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2119 yyextra->sharpCount=0;
2120 yyextra->roundCount=0;
2128 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...
2131 if (!yyextra->insidePHP)
2137 yyextra->lastHereDocContext = YY_START;
2141<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2142 yyextra->current->name+=yytext;
2146 if (yyextra->roundCount==0)
2149 yyextra->sharpCount++;
2151 yyextra->current->name+=yytext;
2153<ClassTemplSpec,EndTemplate>">=" {
2154 yyextra->current->name+=yytext;
2156<ClassTemplSpec,EndTemplate>(">>") {
2157 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2165 yyextra->current->name+=yytext;
2170 yyextra->current->name+=
'>';
2172 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2174 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2179<EndTemplate>">"{BN}*"(" {
2181 yyextra->current->name+=
'>';
2183 if (yyextra->roundCount==0)
2185 --yyextra->sharpCount;
2187 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2189 yyextra->current->bodyLine = yyextra->yyLineNr;
2190 yyextra->current->bodyColumn = yyextra->yyColNr;
2191 yyextra->current->args =
"(";
2192 yyextra->currentArgumentContext = FuncQual;
2193 yyextra->fullArgString = yyextra->current->args;
2194 yyextra->copyArgString = &yyextra->current->args;
2196 BEGIN( ReadFuncArgType ) ;
2200 yyextra->current->name+=
"(";
2201 yyextra->roundCount++;
2204<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2206 yyextra->current->name+=
'>';
2207 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2212<EndTemplate>">"{BNopt}/"::" {
2214 yyextra->current->name+=
'>';
2216 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2218 BEGIN(FindMemberName);
2221<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2222 yyextra->roundCount++;
2224<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2225 if (yyextra->roundCount>0) yyextra->roundCount--;
2228 yyextra->current->name+=*yytext;
2231<FindMembers>"define"{BN}*"("{BN}*["'] {
2232 if (yyextra->insidePHP)
2234 yyextra->current->bodyLine = yyextra->yyLineNr;
2235 yyextra->current->bodyColumn = yyextra->yyColNr;
2242 yyextra->delimiter = yytext;
2243 *yyextra->pCopyHereDocGString << yytext;
2244 BEGIN(CopyHereDocEnd);
2246<CopyHereDoc>"\""{ID}/"\"" {
2247 yyextra->delimiter = &yytext[1];
2248 *yyextra->pCopyHereDocGString << yytext;
2249 BEGIN(CopyHereDocEnd);
2251<CopyHereDoc>"'"{ID}/"'" {
2252 yyextra->delimiter = &yytext[1];
2253 *yyextra->pCopyHereDocGString << yytext;
2254 BEGIN(CopyHereDocEnd);
2257 yyextra->delimiter = yytext;
2260<HereDoc>"\""{ID}/"\"" {
2261 yyextra->delimiter = &yytext[1];
2264<HereDoc>"'"{ID}/"'" {
2265 yyextra->delimiter = &yytext[1];
2269 if (yyextra->delimiter==yytext)
2271 BEGIN(yyextra->lastHereDocContext);
2275<CopyHereDocEnd>^{Bopt}{ID} {
2276 *yyextra->pCopyHereDocGString << yytext;
2279 BEGIN(yyextra->lastHereDocContext);
2284 *yyextra->pCopyHereDocGString << yytext;
2286<CopyHereDocEnd>{ID} {
2287 *yyextra->pCopyHereDocGString << yytext;
2290 *yyextra->pCopyHereDocGString << yytext;
2292<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2294<FindMembers>"Q_PROPERTY" {
2295 yyextra->yyBegLineNr = yyextra->yyLineNr;
2296 yyextra->yyBegColNr = yyextra->yyColNr;
2297 yyextra->current->protection = Protection::Public ;
2298 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2299 yyextra->current->type.clear();
2309 yyextra->current->name+=yytext;
2312 yyextra->current->type+= yyextra->current->name;
2313 yyextra->current->type+= yytext;
2314 yyextra->current->name=
"";
2316<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2317 yyextra->current->type+= yyextra->current->name;
2318 yyextra->current->name=yytext;
2320<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2321 yyextra->current->spec.setReadable(
true);
2324<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2325 yyextra->current->spec.setWritable(
true);
2328<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2329<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2330<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2335<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2336<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2337<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2341 yyextra->current->read = yytext;
2345 yyextra->current->write = yytext;
2348<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2349 yyextra->current->name=yytext;
2353<FindMembers>"requires" {
2354 if (yyextra->insideJava) REJECT;
2355 yyextra->current->req.clear();
2356 yyextra->requiresContext = YY_START;
2357 BEGIN(RequiresClause);
2359<RequiresClause>"requires"{BN}*/"{" {
2360 if (yyextra->insideJava) REJECT;
2362 yyextra->current->req+=yytext;
2363 BEGIN( RequiresExpression ) ;
2365<RequiresClause>"requires"{BN}*"(" {
2366 if (yyextra->insideJava) REJECT;
2368 yyextra->current->req+=yytext;
2369 yyextra->lastRoundContext=RequiresExpression;
2370 yyextra->pCopyRoundString=&yyextra->current->req;
2371 yyextra->roundCount=0;
2372 BEGIN( CopyRound ) ;
2374<RequiresExpression>"{" {
2375 yyextra->current->req+=yytext;
2376 yyextra->lastCurlyContext=RequiresClause;
2377 yyextra->pCopyCurlyString=&yyextra->current->req;
2378 yyextra->curlyCount=0;
2379 BEGIN( CopyCurly ) ;
2381<RequiresExpression>\n {
2382 yyextra->current->req+=
' ';
2385<RequiresExpression>. {
2386 yyextra->current->req+=yytext;
2388<RequiresClause>"(" {
2389 yyextra->current->req+=yytext;
2390 yyextra->lastRoundContext=RequiresClause;
2391 yyextra->pCopyRoundString=&yyextra->current->req;
2392 yyextra->roundCount=0;
2393 BEGIN( CopyRound ) ;
2395<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2399 yyextra->current->req+=yytext;
2400 yyextra->lastRoundContext=RequiresClause;
2401 yyextra->pCopyRoundString=&yyextra->current->req;
2402 yyextra->roundCount=0;
2410<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2414 yyextra->current->req+=yytext;
2415 yyextra->lastSharpContext=RequiresClause;
2416 yyextra->pCopySharpString=&yyextra->current->req;
2417 yyextra->sharpCount=0;
2425<RequiresClause>{NOTopt}{SCOPENAME} {
2429 yyextra->current->req=yytext;
2430 BEGIN(yyextra->requiresContext);
2437<RequiresClause>{NOTopt}"::"{ID} {
2439 yyextra->current->req+=yytext;
2441<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2443 yyextra->current->req+=yytext;
2445<RequiresClause>{BN}+ {
2446 yyextra->current->req+=
' ';
2451 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2452 BEGIN(yyextra->requiresContext);
2454<FindMembers,FindMemberName>{SCOPENAME} {
2456 yyextra->yyBegColNr=yyextra->yyColNr;
2457 yyextra->yyBegLineNr=yyextra->yyLineNr;
2459 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2463 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2465 if (yyextra->insideIDL)
2470 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2474 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2479 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2481 BEGIN(IDLUnionCase);
2483 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2485 yyextra->insideTryBlock=
FALSE;
2486 BEGIN(TryFunctionBlock);
2488 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2490 yyextra->lastAlignAsContext = YY_START;
2493 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2495 yyextra->current->type=
"var";
2497 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2499 yyextra->current->type=
"function";
2501 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2505 yyextra->current->name=
"this";
2508 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2511 BEGIN(StaticAssert);
2513 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2517 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2518 yyextra->current->type+=yytext;
2521 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2523 if (yyextra->current->type.isEmpty())
2525 yyextra->current->type =
"optional";
2529 yyextra->current->type +=
" optional";
2531 yyextra->lastModifierContext = YY_START;
2532 BEGIN(SliceOptional);
2536 if (YY_START==FindMembers)
2540 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2541 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2543 yyextra->current->protection = Protection::Public;
2545 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2547 yyextra->current->protection = Protection::Protected;
2549 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2551 yyextra->current->protection = Protection::Package;
2553 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2555 yyextra->current->protection = Protection::Private;
2557 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2559 if (YY_START==FindMembers)
2560 yyextra->current->name = yytext;
2562 yyextra->current->name += yytext;
2563 yyextra->current->isStatic =
TRUE;
2567 if (YY_START==FindMembers)
2568 yyextra->current->name = yytext;
2570 yyextra->current->name += yytext;
2571 if (yyextra->current->name.startsWith(
"static "))
2573 yyextra->current->isStatic =
TRUE;
2574 yyextra->current->name= yyextra->current->name.mid(7);
2576 else if (yyextra->current->name.startsWith(
"inline "))
2578 if (yyextra->current->type.isEmpty())
2580 yyextra->current->type=
"inline";
2584 yyextra->current->type+=
"inline ";
2586 yyextra->current->name= yyextra->current->name.mid(7);
2588 else if (yyextra->current->name.startsWith(
"constexpr "))
2590 if (yyextra->current->type.isEmpty())
2592 yyextra->current->type=
"constexpr";
2596 yyextra->current->type+=
"constexpr ";
2598 yyextra->current->name=yyextra->current->name.mid(10);
2600 else if (yyextra->current->name.startsWith(
"consteval "))
2602 if (yyextra->current->type.isEmpty())
2604 yyextra->current->type=
"consteval";
2608 yyextra->current->type+=
"consteval ";
2610 yyextra->current->name=yyextra->current->name.mid(10);
2612 else if (yyextra->current->name.startsWith(
"constinit "))
2614 if (yyextra->current->type.isEmpty())
2616 yyextra->current->type=
"constinit";
2620 yyextra->current->type+=
"constinit ";
2622 yyextra->current->name=yyextra->current->name.mid(10);
2624 else if (yyextra->current->name.startsWith(
"const "))
2626 if (yyextra->current->type.isEmpty())
2628 yyextra->current->type=
"const";
2632 yyextra->current->type+=
"const ";
2634 yyextra->current->name=yyextra->current->name.mid(6);
2636 else if (yyextra->current->name.startsWith(
"volatile "))
2638 if (yyextra->current->type.isEmpty())
2640 yyextra->current->type=
"volatile";
2644 yyextra->current->type+=
"volatile ";
2646 yyextra->current->name=yyextra->current->name.mid(9);
2648 else if (yyextra->current->name.startsWith(
"typedef "))
2650 if (yyextra->current->type.isEmpty())
2652 yyextra->current->type=
"typedef";
2656 yyextra->current->type+=
"typedef ";
2658 yyextra->current->name=yyextra->current->name.mid(8);
2668 yyextra->externLinkage=
FALSE;
2672 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2675 yyextra->lastSkipRoundContext = FindMembers;
2676 yyextra->roundCount=0;
2679<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2685 yyextra->current->type+=yytext;
2686 yyextra->lastRoundContext=FindMembers;
2687 yyextra->pCopyRoundString=&yyextra->current->type;
2688 yyextra->roundCount=0;
2691<DeclType>{BN}+ {
lineCount(yyscanner); }
2696<CSIndexer>"["[^\n\]]*"]" {
2700<FindMembers>[0-9]{ID} {
2703 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2705 yyextra->current->name+=
".";
2709 yyextra->current->name+=yytext;
2711<CppQuote>"("{B}*"\"" {
2712 yyextra->insideCppQuote=
TRUE;
2716<IDLUnionCase>":" { BEGIN(FindMembers); }
2717<IDLUnionCase>\n {
lineCount(yyscanner); }
2719<TryFunctionBlock>\n {
lineCount(yyscanner); }
2720<TryFunctionBlock>"{" {
2721 yyextra->curlyCount=0;
2722 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2726<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2728<TryFunctionBlockEnd>\n { unput(*yytext);
2729 BEGIN( FindMembers );
2731<TryFunctionBlockEnd>. { unput(*yytext);
2732 BEGIN( FindMembers );
2735 yyextra->insideCppQuote=
FALSE;
2738<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2740 yyextra->lastCPPContext = YY_START;
2743<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2744<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2745 if (yyextra->insidePHP)
2747 yyextra->current->bodyLine = yyextra->yyLineNr;
2748 yyextra->current->bodyColumn = yyextra->yyColNr;
2749 yyextra->current->fileName = yyextra->fileName;
2750 yyextra->current->startLine = yyextra->yyLineNr;
2751 yyextra->current->startColumn = yyextra->yyColNr;
2752 yyextra->current->type.clear();
2753 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2754 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2755 yyextra->current->section = EntryType::makeDefine();
2756 yyextra->lastDefineContext = YY_START;
2759<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2760 yyextra->yyLineNr = atoi(&yytext[1]);
2762 yyextra->lastPreLineCtrlContext = YY_START;
2763 if (YY_START==ReadBody ||
2764 YY_START==ReadNSBody ||
2765 YY_START==ReadBodyIntf)
2767 yyextra->current->program << yytext;
2769 BEGIN( PreLineCtrl );
2771<PreLineCtrl>"\""[^\n\"]*"\"" {
2773 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2774 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2775 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2777 yyextra->current->program << yytext;
2781 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2782 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2783 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2785 yyextra->current->program << yytext;
2789 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2790 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2791 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2793 yyextra->current->program << yytext;
2796 BEGIN( yyextra->lastPreLineCtrlContext );
2799<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2800<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2801 BEGIN( yyextra->lastCPPContext) ;
2803<SDefine>{ID}{B}*"(" {
2804 yyextra->current->name = yytext;
2805 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2806 yyextra->current->args =
"(";
2807 yyextra->current->bodyLine = yyextra->yyLineNr;
2808 yyextra->current->bodyColumn = yyextra->yyColNr;
2809 yyextra->currentArgumentContext = DefineEnd;
2810 yyextra->fullArgString=yyextra->current->args;
2811 yyextra->copyArgString=&yyextra->current->args;
2812 BEGIN( ReadFuncArgType ) ;
2827 yyextra->current->bodyLine = yyextra->yyLineNr;
2828 yyextra->current->bodyColumn = yyextra->yyColNr;
2829 yyextra->current->name = yytext;
2836 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2838 BEGIN(yyextra->lastDefineContext);
2842 yyextra->current->fileName = yyextra->fileName;
2843 yyextra->current->startLine = yyextra->yyLineNr;
2844 yyextra->current->startColumn = yyextra->yyColNr;
2845 yyextra->current->type.clear();
2846 yyextra->current->type =
"const";
2850 yyextra->current->initializer.str(
init.str());
2851 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2852 yyextra->current->section = EntryType::makeVariable();
2853 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2858<DefineEnd>\\[\r]?\n {
2860 yyextra->current->endBodyLine = yyextra->yyLineNr;
2863 if (yyextra->insideIDL && yyextra->insideCppQuote)
2869 yyextra->lastStringContext=DefineEnd;
2874<DefinePHP>{ID}["']{BN}*","{BN}* {
2875 yyextra->current->name = yytext;
2876 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2877 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2878 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2879 yyextra->current->bodyLine = yyextra->yyLineNr;
2880 yyextra->current->bodyColumn = yyextra->yyColNr;
2881 yyextra->lastRoundContext = DefinePHPEnd;
2882 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2883 yyextra->roundCount = 0;
2884 BEGIN( GCopyRound );
2888 if (yyextra->insideCli)
2891 yyextra->current->name = yytext ;
2899 yyextra->current->name += yytext ;
2902<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2903 if (yyextra->current->bodyLine==-1)
2905 yyextra->current->bodyLine=yyextra->yyLineNr;
2906 yyextra->current->bodyColumn = yyextra->yyColNr;
2908 yyextra->docBlockContext = YY_START;
2909 yyextra->docBlockInBody =
FALSE;
2910 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2915 yyextra->docBlock.str(indent.
str());
2919 yyextra->docBlockTerm =
';';
2920 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2922 yyextra->current->bitfields =
":"+yyextra->current->args;
2923 yyextra->current->args.clear();
2924 yyextra->current->section = EntryType::makeVariable();
2926 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)
2937<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2938 yyextra->docBlockContext = YY_START;
2939 yyextra->docBlockInBody =
FALSE;
2940 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2945 yyextra->docBlock.str(indent.
str());
2948 yyextra->docBlockTerm =
',';
2949 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2951 yyextra->current->bitfields =
":"+yyextra->current->args;
2952 yyextra->current->args.clear();
2953 yyextra->current->section = EntryType::makeVariable();
2955 if (yytext[yyleng-3]==
'/')
2966<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2967 if (yyextra->current->bodyLine==-1)
2969 yyextra->current->bodyLine=yyextra->yyLineNr;
2970 yyextra->current->bodyColumn = yyextra->yyColNr;
2972 yyextra->docBlockContext = YY_START;
2973 yyextra->docBlockInBody =
FALSE;
2974 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2978 yyextra->docBlock.str(indent.
str());
2981 yyextra->docBlockTerm = 0;
2982 if (yytext[yyleng-3]==
'/')
2994<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2996 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
2999 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3004 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3010 if (yytext[2]==
'!' || yytext[2]==
'/')
3012 yyextra->docBlockContext = YY_START;
3013 yyextra->docBlockInBody =
FALSE;
3014 yyextra->docBlockAutoBrief =
FALSE;
3015 yyextra->docBlock.str(std::string());
3016 yyextra->docBlockTerm = 0;
3022 yyextra->lastCContext=YY_START;
3023 BEGIN(SkipCxxComment);
3028 if (yytext[2]==
'!' || yytext[2]==
'*')
3030 yyextra->docBlockContext = YY_START;
3031 yyextra->docBlockInBody =
FALSE;
3032 yyextra->docBlock.str(std::string());
3033 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3035 yyextra->docBlockTerm = 0;
3041 yyextra->lastCContext=YY_START;
3046<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3047 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3048 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3052 if (!yyextra->insideCS) REJECT;
3053 yyextra->current->bodyLine = yyextra->yyLineNr;
3054 yyextra->current->bodyColumn = yyextra->yyColNr;
3055 yyextra->current->initializer.str(yytext);
3056 yyextra->lastInitializerContext = YY_START;
3057 yyextra->sharpCount=0;
3058 yyextra->initBracketCount=0;
3059 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3060 yyextra->current->spec.setGettable(
true);
3061 BEGIN(ReadInitializerPtr);
3064 yyextra->current->bodyLine = yyextra->yyLineNr;
3065 yyextra->current->bodyColumn = yyextra->yyColNr;
3066 yyextra->current->initializer.str(yytext);
3067 yyextra->lastInitializerContext = YY_START;
3068 yyextra->sharpCount=0;
3069 yyextra->initBracketCount=0;
3070 BEGIN(ReadInitializer);
3072<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3074 yyextra->current->exception +=
" ";
3077<UNOIDLAttributeBlock>"}" {
3078 yyextra->current->exception +=
" }";
3082<ReadInitializer,ReadInitializerPtr>"(" {
3083 yyextra->lastRoundContext=YY_START;
3084 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3085 yyextra->roundCount=0;
3086 yyextra->current->initializer << *yytext;
3089<ReadInitializer,ReadInitializerPtr>"[" {
3090 if (!yyextra->insidePHP) REJECT;
3091 yyextra->lastSquareContext=YY_START;
3092 yyextra->pCopySquareGString=&yyextra->current->initializer;
3093 yyextra->squareCount=0;
3094 yyextra->current->initializer << *yytext;
3097<ReadInitializer,ReadInitializerPtr>"{" {
3098 yyextra->lastCurlyContext=YY_START;
3099 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3100 yyextra->curlyCount=0;
3101 yyextra->current->initializer << *yytext;
3104<ReadInitializer,ReadInitializerPtr>[;,] {
3106 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3108 yyextra->current->fileName = yyextra->fileName;
3109 yyextra->current->startLine = yyextra->yyLineNr;
3110 yyextra->current->startColumn = yyextra->yyColNr;
3111 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3112 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3113 yyextra->current->section = EntryType::makeVariable();
3114 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3118 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3121 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3122 BEGIN(yyextra->lastInitializerContext);
3124 else if (*yytext==
',' && yyextra->initBracketCount==0)
3127 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3128 BEGIN(yyextra->lastInitializerContext);
3132 yyextra->current->initializer << *yytext;
3135<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3136 if (!yyextra->insideCpp)
3142 yyextra->current->initializer << yytext;
3144 yyextra->lastRawStringContext = YY_START;
3145 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3150<RawGString>{RAWEND} {
3153 *yyextra->pCopyRawGString << yytext;
3154 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3161<RawGString>[^)\n]+ {
3162 *yyextra->pCopyRawGString << yytext;
3165 *yyextra->pCopyRawGString << yytext;
3168 *yyextra->pCopyRawGString << yytext;
3171<RawString>{RAWEND} {
3172 *yyextra->pCopyRawString+=yytext;
3173 yyextra->fullArgString+=yytext;
3176 BEGIN(yyextra->lastRawStringContext);
3180 *yyextra->pCopyRawString += yytext;
3181 yyextra->fullArgString+=yytext;
3184 *yyextra->pCopyRawString += yytext;
3185 yyextra->fullArgString+=yytext;
3188 *yyextra->pCopyRawString += yytext;
3189 yyextra->fullArgString+=yytext;
3192<ReadInitializer,ReadInitializerPtr>\" {
3193 if (yyextra->insideIDL && yyextra->insideCppQuote)
3199 yyextra->lastStringContext=YY_START;
3200 yyextra->current->initializer << yytext;
3201 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3202 yyextra->stopAtInvalidString=
false;
3206<ReadInitializer,ReadInitializerPtr>"->" {
3207 yyextra->current->initializer << yytext;
3209<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3210 yyextra->current->initializer << yytext;
3212<ReadInitializer,ReadInitializerPtr>(">>") {
3213 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3216 yyextra->initBracketCount-=2;
3217 yyextra->sharpCount-=2;
3219 yyextra->current->initializer << yytext;
3221<ReadInitializer,ReadInitializerPtr>(">=") {
3222 yyextra->current->initializer << yytext;
3224<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3225 yyextra->initBracketCount++;
3226 yyextra->sharpCount++;
3227 yyextra->current->initializer << *yytext;
3229<ReadInitializer,ReadInitializerPtr>[>\]})] {
3230 yyextra->initBracketCount--;
3231 yyextra->sharpCount--;
3234 yyextra->current->endBodyLine=yyextra->yyLineNr;
3236 yyextra->current->initializer << *yytext;
3238<ReadInitializer,ReadInitializerPtr>\' {
3239 if (yyextra->insidePHP)
3241 yyextra->current->initializer << yytext;
3242 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3243 yyextra->lastStringContext=YY_START;
3244 BEGIN(CopyPHPGString);
3248 yyextra->current->initializer << yytext;
3251<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3252 if (yyextra->insidePHP)
3258 yyextra->current->initializer << yytext;
3261<ReadInitializer,ReadInitializerPtr>\n {
3262 yyextra->current->initializer << *yytext;
3265<ReadInitializer,ReadInitializerPtr>"@\"" {
3267 yyextra->current->initializer << yytext;
3268 if (!yyextra->insideCS && !yyextra->insideObjC)
3275 yyextra->lastSkipVerbStringContext=YY_START;
3276 yyextra->pSkipVerbString=&yyextra->current->initializer;
3277 BEGIN(SkipVerbString);
3280<SkipVerbString>[^\n"\\]+ {
3281 *yyextra->pSkipVerbString << yytext;
3283<SkipVerbString>"\\\\" {
3284 if (yyextra->insideCS) REJECT
3285 *yyextra->pSkipVerbString << yytext;
3287<SkipVerbString>"\\\"" {
3288 if (yyextra->insideCS) REJECT
3289 *yyextra->pSkipVerbString << yytext;
3291<SkipVerbString>"\"\"" {
3292 *yyextra->pSkipVerbString << yytext;
3294<SkipVerbString>"\"" {
3295 *yyextra->pSkipVerbString << *yytext;
3296 BEGIN(yyextra->lastSkipVerbStringContext);
3299 *yyextra->pSkipVerbString << *yytext;
3303 *yyextra->pSkipVerbString << *yytext;
3305<ReadInitializer,ReadInitializerPtr>"?>" {
3306 if (yyextra->insidePHP)
3307 BEGIN( FindMembersPHP );
3309 yyextra->current->initializer << yytext;
3311<ReadInitializer,ReadInitializerPtr>. {
3312 yyextra->current->initializer << *yytext;
3316<CopyString,CopyPHPString>\\. {
3317 *yyextra->pCopyQuotedString+=yytext;
3320 *yyextra->pCopyQuotedString+=*yytext;
3321 BEGIN( yyextra->lastStringContext );
3324 *yyextra->pCopyQuotedString+=*yytext;
3325 BEGIN( yyextra->lastStringContext );
3327<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3328 *yyextra->pCopyQuotedString+=yytext;
3330<CopyString,CopyPHPString>\n {
3331 *yyextra->pCopyQuotedString+=*yytext;
3334<CopyString,CopyPHPString>. {
3335 *yyextra->pCopyQuotedString+=*yytext;
3339<CopyGString,CopyPHPGString>\\. {
3340 *yyextra->pCopyQuotedGString << yytext;
3343 *yyextra->pCopyQuotedGString << *yytext;
3344 BEGIN( yyextra->lastStringContext );
3347 *yyextra->pCopyQuotedGString << *yytext;
3348 BEGIN( yyextra->lastStringContext );
3350<CopyGString,CopyPHPGString>"<?php" {
3351 *yyextra->pCopyQuotedGString << yytext;
3352 BEGIN( yyextra->lastStringContext );
3354<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3355 *yyextra->pCopyQuotedGString << yytext;
3357<CopyGString,CopyPHPGString>\n {
3358 *yyextra->pCopyQuotedGString << *yytext;
3359 if (yyextra->stopAtInvalidString)
3361 BEGIN( yyextra->lastStringContext );
3368<CopyGString,CopyPHPGString>. {
3369 *yyextra->pCopyQuotedGString << *yytext;
3374 *yyextra->pCopyRoundString += *yytext;
3375 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3376 yyextra->lastStringContext=YY_START;
3380 *yyextra->pCopyRoundString += *yytext;
3381 yyextra->roundCount++;
3384 *yyextra->pCopyRoundString += *yytext;
3385 if (--yyextra->roundCount<0)
3386 BEGIN(yyextra->lastRoundContext);
3390 *yyextra->pCopyRoundString += *yytext;
3393 if (yyextra->insidePHP)
3395 yyextra->current->initializer << yytext;
3396 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3397 yyextra->lastStringContext=YY_START;
3398 BEGIN(CopyPHPString);
3402 *yyextra->pCopyRoundString += yytext;
3405<CopyRound>{CHARLIT} {
3406 if (yyextra->insidePHP)
3412 *yyextra->pCopyRoundString+=yytext;
3415<CopyRound>[^"'()\n,]+ {
3416 *yyextra->pCopyRoundString+=yytext;
3419 *yyextra->pCopyRoundString+=*yytext;
3424 *yyextra->pCopySharpString += *yytext;
3425 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3426 yyextra->lastStringContext=YY_START;
3430 *yyextra->pCopySharpString += *yytext;
3431 yyextra->sharpCount++;
3434 *yyextra->pCopySharpString += *yytext;
3435 if (--yyextra->sharpCount<0)
3437 BEGIN(yyextra->lastSharpContext);
3442 *yyextra->pCopySharpString += *yytext;
3445 if (yyextra->insidePHP)
3447 yyextra->current->initializer << yytext;
3448 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3449 yyextra->lastStringContext=YY_START;
3450 BEGIN(CopyPHPString);
3454 *yyextra->pCopySharpString += yytext;
3457<CopySharp>{CHARLIT} {
3458 if (yyextra->insidePHP)
3464 *yyextra->pCopySharpString+=yytext;
3467<CopySharp>[^"'<>\n,]+ {
3468 *yyextra->pCopySharpString+=yytext;
3471 *yyextra->pCopySharpString+=*yytext;
3477 *yyextra->pCopyRoundGString << *yytext;
3478 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3479 yyextra->lastStringContext=YY_START;
3483 *yyextra->pCopyRoundGString << *yytext;
3484 yyextra->roundCount++;
3487 *yyextra->pCopyRoundGString << *yytext;
3488 if (--yyextra->roundCount<0)
3489 BEGIN(yyextra->lastRoundContext);
3493 *yyextra->pCopyRoundGString << *yytext;
3496 if (yyextra->insidePHP)
3498 yyextra->current->initializer << yytext;
3499 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3500 yyextra->lastStringContext=YY_START;
3501 BEGIN(CopyPHPGString);
3505 *yyextra->pCopyRoundGString << yytext;
3508<GCopyRound>{CHARLIT} {
3509 if (yyextra->insidePHP)
3515 *yyextra->pCopyRoundGString << yytext;
3519 if (!yyextra->insideCS) REJECT;
3520 *yyextra->pCopyRoundGString << yytext;
3521 yyextra->lastSkipVerbStringContext=YY_START;
3522 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3523 BEGIN(SkipVerbString);
3525<GCopyRound>[^"'()\n\/,R]+ {
3526 *yyextra->pCopyRoundGString << yytext;
3528<GCopyRound>{RAWBEGIN} {
3529 *yyextra->pCopyRoundGString << yytext;
3531 yyextra->lastRawStringContext = YY_START;
3532 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3536 *yyextra->pCopyRoundGString << *yytext;
3541 *yyextra->pCopySquareGString << *yytext;
3542 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3543 yyextra->lastStringContext=YY_START;
3547 *yyextra->pCopySquareGString << *yytext;
3548 if (yyextra->insidePHP)
3550 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3551 yyextra->lastStringContext=YY_START;
3552 BEGIN(CopyPHPGString);
3556 *yyextra->pCopySquareGString << *yytext;
3557 yyextra->squareCount++;
3560 *yyextra->pCopySquareGString << *yytext;
3561 if (--yyextra->squareCount<0)
3562 BEGIN(yyextra->lastSquareContext);
3566 *yyextra->pCopySquareGString << *yytext;
3569 if (yyextra->insidePHP)
3571 yyextra->current->initializer << yytext;
3572 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3573 yyextra->lastStringContext=YY_START;
3574 BEGIN(CopyPHPGString);
3578 *yyextra->pCopySquareGString << yytext;
3581<GCopySquare>{CHARLIT} {
3582 if (yyextra->insidePHP)
3588 *yyextra->pCopySquareGString << yytext;
3591<GCopySquare>[^"'\[\]\n\/,]+ {
3592 *yyextra->pCopySquareGString << yytext;
3595 *yyextra->pCopySquareGString << *yytext;
3600 *yyextra->pCopyCurlyString += *yytext;
3601 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3602 yyextra->lastStringContext=YY_START;
3606 *yyextra->pCopyCurlyString += *yytext;
3607 if (yyextra->insidePHP)
3609 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3610 yyextra->lastStringContext=YY_START;
3611 BEGIN(CopyPHPString);
3615 *yyextra->pCopyCurlyString += *yytext;
3616 yyextra->curlyCount++;
3619 *yyextra->pCopyCurlyString += *yytext;
3620 if (--yyextra->curlyCount<0)
3621 BEGIN(yyextra->lastCurlyContext);
3623<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3629 *yyextra->pCopyCurlyString += yytext;
3632<CopyCurly>[^"'{}\/\n,]+ {
3633 *yyextra->pCopyCurlyString += yytext;
3635<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3638 *yyextra->pCopyCurlyString += *yytext;
3641 *yyextra->pCopyCurlyString += *yytext;
3645<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3647<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3649 int s = line.
find(
' ');
3650 int e = line.
find(
'"',s);
3651 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3652 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3659 *yyextra->pCopyCurlyGString << *yytext;
3660 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3661 yyextra->lastStringContext=YY_START;
3665 *yyextra->pCopyCurlyGString << *yytext;
3666 if (yyextra->insidePHP)
3668 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3669 yyextra->lastStringContext=YY_START;
3670 BEGIN(CopyPHPGString);
3674 *yyextra->pCopyCurlyGString << *yytext;
3675 yyextra->curlyCount++;
3678 *yyextra->pCopyCurlyGString << *yytext;
3679 if (--yyextra->curlyCount<0)
3681 yyextra->current->endBodyLine = yyextra->yyLineNr;
3682 BEGIN(yyextra->lastCurlyContext);
3685<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3691 *yyextra->pCopyCurlyGString << yytext;
3694<GCopyCurly>[^"'{}\/\n,]+ {
3695 *yyextra->pCopyCurlyGString << yytext;
3698 *yyextra->pCopyCurlyGString << yytext;
3700<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3703 *yyextra->pCopyCurlyGString << *yytext;
3706 *yyextra->pCopyCurlyGString << *yytext;
3713 if (yyextra->current->type.isEmpty() &&
3714 yyextra->current->name==
"enum")
3716 yyextra->current->section = EntryType::makeEnum();
3717 yyextra->current->name.clear();
3718 yyextra->current->args.clear();
3719 BEGIN(EnumBaseType);
3723 if (yyextra->current->type.isEmpty())
3726 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3729 yyextra->current->bitfields+=
":";
3733 yyextra->current->bitfields+=*yytext;
3736 yyextra->current->args+=*yytext;
3740 yyextra->current->args+=
' ';
3743 QCString oldType = yyextra->current->type;
3744 if (yyextra->current->bodyLine==-1)
3746 yyextra->current->bodyLine = yyextra->yyLineNr;
3747 yyextra->current->bodyColumn = yyextra->yyColNr;
3749 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3751 yyextra->current->type = yyextra->current->type.mid(3);
3753 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3755 yyextra->current->type.prepend(
"typedef ");
3757 bool isStatic = yyextra->current->isStatic;
3758 Protection prot = yyextra->current->protection;
3759 bool isConcept = yyextra->current->section.isConcept();
3760 bool isModule = yyextra->current->section.isModuleDoc();
3763 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3768 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3771 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3773 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3775 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3776 if (yyextra->current->section.isClass())
3780 yyextra->current->section = EntryType::makeVariable() ;
3781 yyextra->current->fileName = yyextra->fileName;
3782 yyextra->current->startLine = yyextra->yyBegLineNr;
3783 yyextra->current->startColumn = yyextra->yyBegColNr;
3784 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3787 if ( *yytext ==
',')
3789 yyextra->current->isStatic = isStatic;
3790 yyextra->current->protection = prot;
3791 yyextra->current->name.clear();
3792 yyextra->current->args.clear();
3793 yyextra->current->brief.clear();
3794 yyextra->current->doc.clear();
3795 yyextra->current->initializer.str(std::string());
3796 yyextra->current->bitfields.clear();
3801 yyextra->mtype = MethodTypes::Method;
3802 yyextra->virt = Specifier::Normal;
3803 yyextra->current->bodyLine = -1;
3804 yyextra->current->bodyColumn = 1;
3805 yyextra->current->groups.clear();
3811 if (yyextra->insideSlice)
3813 yyextra->squareCount=1;
3814 yyextra->lastSquareContext = YY_START;
3815 yyextra->current->metaData +=
"[";
3816 BEGIN( SliceMetadata );
3818 else if (!yyextra->insideCS &&
3819 (yyextra->current->name.isEmpty() ||
3820 yyextra->current->name==
"typedef"
3824 yyextra->squareCount=1;
3825 yyextra->lastSquareContext = YY_START;
3826 yyextra->idlAttr.clear();
3827 yyextra->idlProp.clear();
3828 yyextra->current->mtype = yyextra->mtype;
3831 yyextra->current->mtype == MethodTypes::Property)
3833 yyextra->odlProp =
true;
3834 yyextra->current->spec.setGettable(
true).setSettable(
true);
3837 BEGIN( IDLAttribute );
3839 else if (yyextra->insideCS &&
3840 yyextra->current->name.isEmpty())
3842 yyextra->squareCount=1;
3843 yyextra->lastSquareContext = YY_START;
3846 yyextra->current->args.clear();
3847 BEGIN( SkipSquare );
3851 yyextra->current->args += yytext ;
3852 yyextra->squareCount=1;
3853 yyextra->externLinkage=
FALSE;
3858 yyextra->squareCount++;
3859 yyextra->current->metaData +=
"[";
3861<SliceMetadata>{BN}* {
3864<SliceMetadata>\"[^\"]*\" {
3865 yyextra->current->metaData += yytext;
3868 yyextra->current->metaData += yytext;
3871 yyextra->current->metaData += yytext;
3872 if (--yyextra->squareCount<=0)
3874 BEGIN (yyextra->lastSquareContext);
3878 yyextra->current->type +=
"(";
3879 yyextra->roundCount++;
3881<SliceOptional>[0-9]+ {
3882 yyextra->current->type += yytext;
3885 yyextra->current->type +=
")";
3886 if(--yyextra->roundCount<=0)
3888 BEGIN (yyextra->lastModifierContext);
3893 if (--yyextra->squareCount<=0)
3896 if (yyextra->current->mtype == MethodTypes::Property)
3897 BEGIN( IDLPropName );
3899 BEGIN( yyextra->lastSquareContext );
3902<IDLAttribute>"propput" {
3905 yyextra->current->mtype = MethodTypes::Property;
3907 yyextra->current->spec.setSettable(
true);
3909<IDLAttribute>"propget" {
3912 yyextra->current->mtype = MethodTypes::Property;
3914 yyextra->current->spec.setGettable(
true);
3916<IDLAttribute>"property" {
3917 yyextra->current->spec.setProperty(
true);
3919<IDLAttribute>"attribute" {
3920 yyextra->current->spec.setAttribute(
true);
3922<IDLAttribute>"optional" {
3923 yyextra->current->spec.setOptional(
true);
3925<IDLAttribute>"readonly" {
3928 yyextra->current->spec.setSettable(
false);
3932 yyextra->current->spec.setReadonly(
true);
3935<IDLAttribute>"bound" {
3936 yyextra->current->spec.setBound(
true);
3938<IDLAttribute>"removable" {
3939 yyextra->current->spec.setRemovable(
true);
3941<IDLAttribute>"constrained" {
3942 yyextra->current->spec.setConstrained(
true);
3944<IDLAttribute>"transient" {
3945 yyextra->current->spec.setTransient(
true);
3947<IDLAttribute>"maybevoid" {
3948 yyextra->current->spec.setMaybeVoid(
true);
3950<IDLAttribute>"maybedefault" {
3951 yyextra->current->spec.setMaybeDefault(
true);
3953<IDLAttribute>"maybeambiguous" {
3954 yyextra->current->spec.setMaybeAmbiguous(
true);
3958<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3961 if (yyextra->odlProp)
3963 yyextra->idlProp = yytext;
3966<IDLPropName>{ID}{BN}*"(" {
3967 yyextra->current->name = yytext;
3968 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3969 yyextra->current->startLine = yyextra->yyLineNr;
3970 yyextra->current->startColumn = yyextra->yyColNr;
3973<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3974 if (yyextra->odlProp)
3976 yyextra->idlProp += yytext;
3979<IDLPropName>{ID}{BNopt}/";" {
3980 if (yyextra->odlProp)
3982 yyextra->current->name = yytext;
3983 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3984 yyextra->odlProp =
false;
3989<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3990 yyextra->idlAttr = yytext;
3991 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3994 yyextra->idlProp = yytext;
3996<IDLProp>{BN}*{ID}{BN}*"," {
3997 if (yyextra->current->args.isEmpty())
3998 yyextra->current->args =
"(";
4000 yyextra->current->args +=
", ";
4001 yyextra->current->args += yyextra->idlAttr;
4002 yyextra->current->args +=
" ";
4003 yyextra->current->args += yyextra->idlProp;
4004 yyextra->current->args +=
" ";
4005 yyextra->current->args += yytext;
4006 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4007 yyextra->idlProp.clear();
4008 yyextra->idlAttr.clear();
4011<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4015 yyextra->current->fileName = yyextra->fileName;
4016 yyextra->current->type = yyextra->idlProp;
4017 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4018 if (!yyextra->current->args.isEmpty())
4019 yyextra->current->args +=
")";
4020 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4021 yyextra->current->section = EntryType::makeVariable();
4022 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4024 BEGIN( FindMembers );
4029<Array>"]" { yyextra->current->args += *yytext ;
4030 if (--yyextra->squareCount<=0)
4031 BEGIN( FindMembers ) ;
4033<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4034 if (--yyextra->squareCount<=0)
4035 BEGIN( SFunction ) ;
4037<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4038 yyextra->squareCount++;
4040<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4041<SkipSquare>"[" { yyextra->squareCount++; }
4043 if (--yyextra->squareCount<=0)
4044 BEGIN( yyextra->lastSquareContext );
4047 yyextra->lastStringContext=YY_START;
4048 BEGIN( SkipString );
4050<SkipSquare>[^\n\[\]\"]+
4051<FindMembers>"<" {
addType(yyscanner);
4052 yyextra->current->type += yytext ;
4055<Sharp>">" { yyextra->current->type += *yytext ;
4056 if (--yyextra->sharpCount<=0)
4057 BEGIN( FindMembers ) ;
4059<Sharp>"<" { yyextra->current->type += *yytext ;
4060 yyextra->sharpCount++;
4063 yyextra->current->type +=
' ';
4066<Sharp>. { yyextra->current->type += *yytext ; }
4069 yyextra->current->bodyLine = yyextra->yyLineNr;
4070 yyextra->current->bodyColumn = yyextra->yyColNr;
4071 yyextra->current->name = yytext;
4076 yyextra->lastInitializerContext = YY_START;
4077 yyextra->sharpCount=0;
4078 yyextra->initBracketCount=0;
4079 yyextra->current->initializer.str(
"=");
4080 BEGIN(ReadInitializer);
4083 yyextra->lastInitializerContext = YY_START;
4084 yyextra->sharpCount=0;
4085 yyextra->initBracketCount=0;
4086 yyextra->current->initializer.str(yytext);
4087 BEGIN(ReadInitializer);
4090 if (yyextra->insideJava)
4092 if (!yyextra->current->name.isEmpty())
4094 yyextra->current->fileName = yyextra->fileName;
4095 yyextra->current->startLine = yyextra->yyLineNr;
4096 yyextra->current->startColumn = yyextra->yyColNr;
4097 if (!yyextra->current_root->spec.isEnum())
4099 yyextra->current->type =
"@";
4101 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4102 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4103 yyextra->current->section = EntryType::makeVariable();
4104 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4108 BEGIN( FindMembers );
4119 if (!yyextra->current->name.isEmpty())
4121 yyextra->current->fileName = yyextra->fileName;
4122 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4124 yyextra->current->startLine = yyextra->current->bodyLine;
4125 yyextra->current->startColumn = yyextra->current->bodyColumn;
4129 yyextra->current->startLine = yyextra->yyLineNr;
4130 yyextra->current->startColumn = yyextra->yyColNr;
4132 if (!yyextra->current_root->spec.isEnum())
4134 yyextra->current->type =
"@";
4136 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4137 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4138 yyextra->current->section = EntryType::makeVariable();
4140 if (!yyextra->insideCS && !yyextra->insideJava &&
4141 !yyextra->current_root->spec.isStrong())
4148 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4150 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4155 yyextra->current->reset();
4160 yyextra->squareCount=1;
4161 yyextra->lastSquareContext = YY_START;
4164<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4165<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4166<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4169 yyextra->current->program << yytext ;
4172<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4173 yyextra->current->program << yytext ;
4174 yyextra->pSkipInterpString = &yyextra->current->program;
4175 yyextra->lastSkipInterpStringContext=YY_START;
4176 BEGIN( SkipInterpString );
4178<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})* {
4179 *yyextra->pSkipInterpString << yytext;
4181<SkipInterpString>\" {
4182 *yyextra->pSkipInterpString << *yytext;
4183 BEGIN( yyextra->lastSkipInterpStringContext );
4186<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4187 yyextra->current->program << yytext ;
4188 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4189 yyextra->lastSkipInterpVerbStringContext=YY_START;
4190 BEGIN( SkipInterpVerbString );
4192<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4193 *yyextra->pSkipInterpVerbString << yytext;
4195<SkipInterpString>"{"[^}]*"}" {
4196 *yyextra->pSkipInterpString << yytext;
4198<SkipInterpVerbString>"{"[^}]*"}" {
4199 *yyextra->pSkipInterpVerbString << yytext;
4201<SkipInterpVerbString>\" {
4202 *yyextra->pSkipInterpVerbString << *yytext;
4203 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4205<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4206<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4207 yyextra->pSkipVerbString = &yyextra->current->program;
4208 yyextra->lastSkipVerbStringContext=YY_START;
4209 BEGIN( SkipVerbString );
4211<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4213 yyextra->current->program << yytext ;
4214 yyextra->pCopyHereDocGString = &yyextra->current->program;
4215 yyextra->lastHereDocContext=YY_START;
4216 BEGIN( CopyHereDoc );
4223<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4224 yyextra->current->program << yytext;
4226 yyextra->lastRawStringContext = YY_START;
4227 yyextra->pCopyRawGString = &yyextra->current->program;
4230<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4231 yyextra->pCopyQuotedGString = &yyextra->current->program;
4232 yyextra->lastStringContext=YY_START;
4233 yyextra->stopAtInvalidString=
false;
4234 BEGIN( CopyGString );
4236<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4237<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4238 yyextra->lastContext = YY_START ;
4241<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4242 ++yyextra->yyLineNr ;
4243 yyextra->lastContext = YY_START ;
4246<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4247 if (!yyextra->insidePHP)
4249 yyextra->current->program << yytext;
4253 yyextra->current->program << yytext;
4254 yyextra->pCopyQuotedGString = &yyextra->current->program;
4255 yyextra->lastStringContext=YY_START;
4256 BEGIN(CopyPHPGString);
4259<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4260 if (yyextra->insidePHP)
4267 yyextra->current->program << yytext;
4270<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4271 ++yyextra->curlyCount ;
4274 yyextra->current->program << yytext ;
4275 --yyextra->curlyCount ;
4277<ReadBody,ReadNSBody>"}" {
4278 if ( yyextra->curlyCount>0 )
4280 yyextra->current->program << yytext ;
4281 --yyextra->curlyCount ;
4285 yyextra->current->endBodyLine = yyextra->yyLineNr;
4286 std::shared_ptr<Entry> original_root = yyextra->current_root;
4287 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4291 QCString doc = yyextra->current->doc;
4292 int docLine = yyextra->current->docLine;
4293 QCString docFile = yyextra->current->docFile;
4294 QCString brief = yyextra->current->brief;
4295 int briefLine = yyextra->current->briefLine;
4296 QCString briefFile = yyextra->current->briefFile;
4298 yyextra->current->doc =
"";
4299 yyextra->current->docLine = 0;
4300 yyextra->current->docFile =
"";
4301 yyextra->current->brief =
"";
4302 yyextra->current->briefLine = 0;
4303 yyextra->current->briefFile =
"";
4304 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4306 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4307 yyextra->current->program.str(std::string());
4308 new_current->name = yyextra->current->name.mid(split_point + 2);
4309 yyextra->current->name = yyextra->current->name.left(split_point);
4310 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4312 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4313 yyextra->current_root = yyextra->current;
4314 yyextra->current = new_current;
4317 yyextra->current->doc = doc;
4318 yyextra->current->docLine = docLine;
4319 yyextra->current->docFile = docFile;
4320 yyextra->current->brief = brief;
4321 yyextra->current->briefLine = briefLine;
4322 yyextra->current->briefFile = briefFile;
4324 QCString &cn = yyextra->current->name;
4325 QCString rn = yyextra->current_root->name;
4331 if (yyextra->isTypedef && cn.
isEmpty())
4334 BEGIN( TypedefName );
4338 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4340 yyextra->current->program <<
',';
4345 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4346 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4348 if (yyextra->insideObjC &&
4349 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4352 BEGIN( ReadBodyIntf ) ;
4356 yyextra->memspecEntry = yyextra->current;
4357 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4358 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4359 if (yyextra->current->section.isNamespace() ||
4360 yyextra->current->spec.isInterface() ||
4361 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4362 yyextra->insideSlice
4365 yyextra->current->reset();
4366 yyextra->current_root = std::move(original_root);
4368 yyextra->memspecEntry.reset();
4369 BEGIN( FindMembers ) ;
4373 static const reg::Ex re(R
"(@\d+$)");
4374 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4375 !
reg::search(yyextra->memspecEntry->name.str(),re))
4378 yyextra->current->doc.clear();
4379 yyextra->current->brief.clear();
4381 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.
4387<ReadBody>"}"{BN}+"typedef"{BN}+ {
4389 if ( yyextra->curlyCount>0 )
4391 yyextra->current->program << yytext ;
4392 --yyextra->curlyCount ;
4396 yyextra->isTypedef =
TRUE;
4397 yyextra->current->endBodyLine = yyextra->yyLineNr;
4398 QCString &cn = yyextra->current->name;
4399 QCString rn = yyextra->current_root->name;
4404 BEGIN( TypedefName );
4407<TypedefName>("const"|"volatile"){BN} {
4409 yyextra->current->type.prepend(yytext);
4412 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4414 yyextra->current->program <<
",";
4416 yyextra->current->name=yytext;
4418 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4419 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4421 if (!yyextra->firstTypedefEntry)
4423 yyextra->firstTypedefEntry = yyextra->current;
4425 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4427 yyextra->isTypedef=
TRUE;
4428 BEGIN(MemberSpecSkip);
4432 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4434 yyextra->current->program <<
',';
4437 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4438 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4439 yyextra->memspecEntry = yyextra->current;
4440 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4443 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4445<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4447 int i=0,l=(int)yyleng,j;
4448 while (i<l && (!
isId(yytext[i]))) i++;
4450 j=yyextra->msName.
find(
"[");
4453 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4454 yyextra->msName=yyextra->msName.left(j);
4459 if (yyextra->firstTypedefEntry)
4461 if (yyextra->firstTypedefEntry->spec.isStruct())
4463 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4465 else if (yyextra->firstTypedefEntry->spec.isUnion())
4467 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4469 else if (yyextra->firstTypedefEntry->section.isEnum())
4471 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4475 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4481 yyextra->current->name = yyextra->msName;
4487 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4493 const Entry *p=yyextra->current.get();
4501 int pi = (i==-1) ? 0 : i+2;
4511 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4515 if (!yyextra->msName.isEmpty()
4521 if (typedefHidesStruct &&
4522 yyextra->isTypedef &&
4523 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4524 yyextra->msType.stripWhiteSpace().isEmpty() &&
4525 yyextra->memspecEntry)
4527 yyextra->memspecEntry->name=yyextra->msName;
4531 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4532 varEntry->lang = yyextra->language;
4533 varEntry->protection = yyextra->current->protection ;
4534 varEntry->mtype = yyextra->current->mtype;
4535 varEntry->virt = yyextra->current->virt;
4536 varEntry->isStatic = yyextra->current->isStatic;
4537 varEntry->section = EntryType::makeVariable();
4538 varEntry->name = yyextra->msName.stripWhiteSpace();
4539 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4540 varEntry->args = yyextra->msArgs;
4541 if (yyextra->isTypedef)
4543 varEntry->type.prepend(
"typedef ");
4546 if (typedefHidesStruct &&
4547 yyextra->isTypedef &&
4548 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4549 yyextra->memspecEntry
4552 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4556 varEntry->type+=yyextra->current->name+yyextra->msType;
4558 varEntry->fileName = yyextra->fileName;
4559 varEntry->startLine = yyextra->yyLineNr;
4560 varEntry->startColumn = yyextra->yyColNr;
4561 varEntry->doc = yyextra->current->doc;
4562 varEntry->brief = yyextra->current->brief;
4563 varEntry->mGrpId = yyextra->current->mGrpId;
4564 varEntry->initializer.str(yyextra->current->initializer.str());
4565 varEntry->groups = yyextra->current->groups;
4566 varEntry->sli = yyextra->current->sli;
4571 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4576 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4578 if (!yyextra->current->doc.isEmpty())
4580 yyextra->memspecEntry->doc += yyextra->current->doc;
4582 if (!yyextra->current->brief.isEmpty())
4584 yyextra->memspecEntry->brief += yyextra->current->brief;
4587 yyextra->msType.clear();
4588 yyextra->msName.clear();
4589 yyextra->msArgs.clear();
4590 yyextra->isTypedef=
FALSE;
4591 yyextra->firstTypedefEntry.reset();
4592 yyextra->memspecEntry.reset();
4593 yyextra->current->reset();
4595 BEGIN( FindMembers );
4599 yyextra->current->doc.clear();
4600 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
4605 yyextra->lastInitializerContext=YY_START;
4606 yyextra->sharpCount=0;
4607 yyextra->initBracketCount=0;
4608 yyextra->current->initializer.str(yytext);
4609 BEGIN(ReadInitializer);
4620<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4621<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4622<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4625<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4626 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4628 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4629 yyextra->insideObjC=
FALSE;
4630 BEGIN( FindMembers );
4632<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4633<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4635<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4636<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4637 if (yyextra->insidePHP)
4643 yyextra->current->bodyLine = yyextra->yyLineNr;
4644 yyextra->current->bodyColumn = yyextra->yyColNr;
4647 yyextra->funcPtrType=yytext;
4648 yyextra->roundCount=0;
4653<FuncPtr>{SCOPENAME} {
4654 yyextra->current->name = yytext;
4657 BEGIN( FuncPtrOperator );
4661 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4663 yyextra->funcPtrType += yyextra->current->name;
4667 BEGIN( EndFuncPtr );
4674<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4675 yyextra->current->name += yytext;
4676 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4679<FuncPtrOperator>\n {
4681 yyextra->current->name += *yytext;
4683<FuncPtrOperator>"(" {
4685 BEGIN( EndFuncPtr );
4688 yyextra->current->name += *yytext;
4690<EndFuncPtr>")"{BNopt}/";" {
4692 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4695<EndFuncPtr>")"{BNopt}/"(" {
4697 if (yyextra->funcPtrType!=
"(")
4699 yyextra->current->type+=yyextra->funcPtrType+
")";
4703<EndFuncPtr>")"{BNopt}/"[" {
4705 yyextra->current->type+=yyextra->funcPtrType;
4706 yyextra->current->args +=
")";
4711 yyextra->current->args += *yytext ;
4714 yyextra->current->bodyLine = yyextra->yyLineNr;
4715 yyextra->current->bodyColumn = yyextra->yyColNr;
4716 yyextra->currentArgumentContext = FuncFuncEnd;
4717 yyextra->fullArgString=yyextra->current->args;
4718 yyextra->copyArgString=&yyextra->current->args;
4719 BEGIN( ReadFuncArgType ) ;
4721<EndFuncPtr>"["[^\n\]]*"]" {
4722 yyextra->funcPtrType+=yytext;
4728 yyextra->current->args += *yytext ;
4729 ++yyextra->roundCount;
4732 yyextra->current->args += *yytext ;
4733 if ( yyextra->roundCount )
4734 --yyextra->roundCount;
4740<FuncFuncEnd>")"{BN}*"(" {
4742 yyextra->current->type+=yyextra->funcPtrType+
")(";
4743 BEGIN(FuncFuncType);
4745<FuncFuncEnd>")"{BNopt}/[;{] {
4747 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4750<FuncFuncEnd>")"{BNopt}/"[" {
4752 yyextra->current->type+=yyextra->funcPtrType;
4753 yyextra->current->args+=
")";
4754 BEGIN(FuncFuncArray);
4757 yyextra->current->args += *yytext;
4760 yyextra->current->type += *yytext;
4761 yyextra->roundCount++;
4764 yyextra->current->type += *yytext;
4765 if (yyextra->roundCount)
4766 --yyextra->roundCount;
4770<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4771<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4773 yyextra->current->type += *yytext;
4775<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4776 if (yyextra->current->type.startsWith(
"typedef") &&
4777 yyextra->current->bodyLine==-1)
4780 yyextra->current->bodyLine = yyextra->yyLineNr;
4781 yyextra->current->bodyColumn = yyextra->yyColNr;
4782 BEGIN( GetCallType );
4784 else if (!yyextra->current->name.isEmpty())
4786 yyextra->current->args = yytext;
4787 yyextra->current->bodyLine = yyextra->yyLineNr;
4788 yyextra->current->bodyColumn = yyextra->yyColNr;
4789 yyextra->currentArgumentContext = FuncQual;
4790 yyextra->fullArgString=yyextra->current->args;
4791 yyextra->copyArgString=&yyextra->current->args;
4792 BEGIN( ReadFuncArgType ) ;
4796<GetCallType>{BN}*{ID}{BN}*"*" {
4799 yyextra->funcPtrType=
"(";
4800 yyextra->funcPtrType+=yytext;
4801 yyextra->roundCount=0;
4805 if (!yyextra->current->name.isEmpty())
4807 yyextra->current->args = yytext;
4808 yyextra->current->bodyLine = yyextra->yyLineNr;
4809 yyextra->current->bodyColumn = yyextra->yyColNr;
4810 yyextra->currentArgumentContext = FuncQual;
4811 yyextra->fullArgString=yyextra->current->args;
4812 yyextra->copyArgString=&yyextra->current->args;
4813 BEGIN( ReadFuncArgType ) ;
4827<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4828 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4829 else yyextra->fullArgString+=yytext;
4831<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4832 yyextra->fullArgString+=yytext;
4834<CopyArgRound>[^\/\n\)\(\"\']+ {
4835 *yyextra->copyArgString+=yytext;
4836 yyextra->fullArgString+=yytext;
4838<CopyArgSquare>[^\/\n\]\[\"\']+ {
4839 *yyextra->copyArgString+=yytext;
4840 yyextra->fullArgString+=yytext;
4842<ReadFuncArgType,ReadTempArgs>{BN}* {
4843 *yyextra->copyArgString+=
" ";
4844 yyextra->fullArgString+=
" ";
4847<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4849 yyextra->lastRawStringContext = YY_START;
4850 yyextra->pCopyRawString = yyextra->copyArgString;
4851 *yyextra->pCopyRawString+=yytext;
4852 yyextra->fullArgString+=yytext;
4855<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4856 *yyextra->copyArgString+=*yytext;
4857 yyextra->fullArgString+=*yytext;
4858 yyextra->lastCopyArgStringContext = YY_START;
4859 BEGIN( CopyArgString );
4861<ReadFuncArgType>"[" {
4862 if (!yyextra->insidePHP) REJECT;
4863 *yyextra->copyArgString+=*yytext;
4864 yyextra->fullArgString+=*yytext;
4865 yyextra->argSquareCount=0;
4866 yyextra->lastCopyArgContext = YY_START;
4867 BEGIN( CopyArgSquare );
4869<ReadFuncArgType,ReadTempArgs>"(" {
4870 *yyextra->copyArgString+=*yytext;
4871 yyextra->fullArgString+=*yytext;
4872 yyextra->argRoundCount=0;
4873 yyextra->lastCopyArgContext = YY_START;
4874 BEGIN( CopyArgRound );
4876<ReadFuncArgType>")" {
4877 *yyextra->copyArgString+=*yytext;
4878 yyextra->fullArgString+=*yytext;
4880 if (yyextra->insideJS)
4891 yyextra->docBackup = yyextra->current->doc;
4892 yyextra->briefBackup = yyextra->current->brief;
4894 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4897<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4898 if (yyextra->currentArgumentContext==DefineEnd)
4902 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4908 BEGIN( yyextra->currentArgumentContext );
4914 yyextra->fullArgString+=yytext;
4915 yyextra->lastCopyArgChar=0;
4916 yyextra->lastCommentInArgContext=YY_START;
4918 BEGIN( CopyArgCommentLine );
4920 BEGIN( CopyArgComment );
4924<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4925<ReadFuncArgType,ReadTempArgs>{CCS} {
4926 yyextra->lastCContext = YY_START;
4927 BEGIN( SkipComment );
4929<ReadFuncArgType,ReadTempArgs>{CPPC} {
4930 yyextra->lastCContext = YY_START;
4931 BEGIN( SkipCxxComment );
4947<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4949 if (yyextra->currentArgumentContext==DefineEnd)
4953 int i;
for (i=(
int)yyleng-1;i>0;i--)
4957 *yyextra->copyArgString+=*yytext;
4958 yyextra->fullArgString+=*yytext;
4961 BEGIN( yyextra->currentArgumentContext );
4967 yyextra->lastCopyArgChar=*yytext;
4970 yyextra->lastCommentInArgContext=YY_START;
4971 yyextra->fullArgString+=text;
4972 if (text.
find(
"//")!=-1)
4973 BEGIN( CopyArgCommentLine );
4975 BEGIN( CopyArgComment );
4978<CopyArgComment>^{B}*"*"+/{BN}+
4979<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4980<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4981 if (yyextra->lastCopyArgChar!=0)
4982 unput(yyextra->lastCopyArgChar);
4983 BEGIN( yyextra->lastCommentInArgContext );
4985<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4987 if (yyextra->lastCopyArgChar!=0)
4988 unput(yyextra->lastCopyArgChar);
4989 BEGIN( yyextra->lastCommentInArgContext );
4991<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4992 yyextra->docBlockName=
"uml";
4993 yyextra->fullArgString+=yytext;
4994 BEGIN(CopyArgVerbatim);
4996<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4997 yyextra->docBlockName=&yytext[1];
4998 yyextra->fullArgString+=yytext;
4999 BEGIN(CopyArgVerbatim);
5001<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5002 yyextra->docBlockName=&yytext[1];
5003 if (yyextra->docBlockName.at(1)==
'[')
5005 yyextra->docBlockName.at(1)=
']';
5007 if (yyextra->docBlockName.at(1)==
'{')
5009 yyextra->docBlockName.at(1)=
'}';
5011 if (yyextra->docBlockName.at(1)==
'(')
5013 yyextra->docBlockName.at(1)=
')';
5015 yyextra->fullArgString+=yytext;
5016 BEGIN(CopyArgVerbatim);
5018<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5019 yyextra->fullArgString+=yytext;
5020 if (&yytext[4]==yyextra->docBlockName)
5022 yyextra->docBlockName=
"";
5023 BEGIN(CopyArgCommentLine);
5026<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5027 yyextra->fullArgString+=yytext;
5028 if (yyextra->docBlockName==&yytext[1])
5030 yyextra->docBlockName=
"";
5031 BEGIN(CopyArgCommentLine);
5034<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5035<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5036<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5037<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5038<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5039 warn(yyextra->fileName,yyextra->yyLineNr,
5040 "Ignoring {:c}brief command inside argument documentation",*yytext
5042 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5045 *yyextra->copyArgString+=*yytext;
5046 yyextra->fullArgString+=*yytext;
5047 yyextra->argSharpCount=1;
5048 BEGIN( CopyArgSharp );
5051 *yyextra->copyArgString+=*yytext;
5052 yyextra->fullArgString+=*yytext;
5054 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5056 BEGIN( yyextra->currentArgumentContext );
5059 yyextra->argRoundCount++;
5060 *yyextra->copyArgString+=*yytext;
5061 yyextra->fullArgString+=*yytext;
5064 *yyextra->copyArgString+=*yytext;
5065 yyextra->fullArgString+=*yytext;
5066 if (yyextra->argRoundCount>0)
5067 yyextra->argRoundCount--;
5069 BEGIN( yyextra->lastCopyArgContext );
5072 yyextra->argSquareCount++;
5073 *yyextra->copyArgString+=*yytext;
5074 yyextra->fullArgString+=*yytext;
5077 *yyextra->copyArgString+=*yytext;
5078 yyextra->fullArgString+=*yytext;
5079 if (yyextra->argSquareCount>0)
5080 yyextra->argSquareCount--;
5082 BEGIN( yyextra->lastCopyArgContext );
5085 *yyextra->copyArgString+=*yytext;
5086 yyextra->fullArgString+=*yytext;
5087 yyextra->argRoundCount=0;
5088 yyextra->lastCopyArgContext = YY_START;
5089 BEGIN( CopyArgRound );
5092 yyextra->argSharpCount++;
5094 *yyextra->copyArgString+=*yytext;
5095 yyextra->fullArgString+=*yytext;
5098 *yyextra->copyArgString+=*yytext;
5099 yyextra->fullArgString+=*yytext;
5100 yyextra->argSharpCount--;
5101 if (yyextra->argSharpCount>0)
5107 BEGIN( ReadTempArgs );
5111<CopyArgString,CopyArgPHPString>\\. {
5112 *yyextra->copyArgString+=yytext;
5113 yyextra->fullArgString+=yytext;
5116 *yyextra->copyArgString+=*yytext;
5117 yyextra->fullArgString+=*yytext;
5118 BEGIN( yyextra->lastCopyArgStringContext );
5120<CopyArgPHPString>\' {
5121 *yyextra->copyArgString+=*yytext;
5122 yyextra->fullArgString+=*yytext;
5123 BEGIN( yyextra->lastCopyArgStringContext );
5125<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5126 if (yyextra->insidePHP)
5132 *yyextra->copyArgString+=yytext;
5133 yyextra->fullArgString+=yytext;
5136<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5137 *yyextra->copyArgString+=yytext;
5138 yyextra->fullArgString+=yytext;
5139 if (yyextra->insidePHP)
5141 yyextra->lastCopyArgStringContext=YY_START;
5142 BEGIN(SkipPHPString);
5145<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5146 *yyextra->copyArgString+=yytext;
5147 yyextra->fullArgString+=yytext;
5149<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5151 *yyextra->copyArgString+=*yytext;
5152 yyextra->fullArgString+=*yytext;
5154<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5155 *yyextra->copyArgString+=yytext;
5156 yyextra->fullArgString+=yytext;
5158<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5159 *yyextra->copyArgString+=*yytext;
5160 yyextra->fullArgString+=*yytext;
5168<FuncRound>"(" { yyextra->current->args += *yytext ;
5169 ++yyextra->roundCount ;
5171<FuncRound>")" { yyextra->current->args += *yytext ;
5172 if ( yyextra->roundCount )
5173 --yyextra->roundCount ;
5185 if (
qstrcmp(yytext,
";")==0 &&
5186 ((yyextra->insideJS || yyextra->insidePHP) &&
5189 yyextra->current->reset();
5191 BEGIN( FindMembers );
5195 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5198<FuncQual>{BN}*"abstract"{BN}* {
5200 yyextra->current->virt = Specifier::Pure;
5201 yyextra->current->args +=
" override ";
5203<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5205 yyextra->current->spec.setOverride(
true);
5206 yyextra->current->args +=
" override ";
5209<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5211 yyextra->current->spec.setFinal(
true);
5212 yyextra->current->args +=
" final ";
5215<FuncQual>{BN}*"sealed"{BN}* {
5217 yyextra->current->spec.setSealed(
true);
5218 yyextra->current->args +=
" sealed ";
5220<FuncQual>{BN}*"new"{BN}* {
5222 yyextra->current->spec.setNew(
true);
5223 yyextra->current->args +=
" new ";
5225<FuncQual>{BN}*"const"{BN}* {
5227 yyextra->current->args +=
" const ";
5228 yyextra->current->argList.setConstSpecifier(
TRUE);
5230<FuncQual>{BN}*"volatile"{BN}* {
5232 yyextra->current->args +=
" volatile ";
5233 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5235<FuncQual>{BN}*"noexcept"{BN}* {
5237 yyextra->current->args +=
" noexcept ";
5238 yyextra->current->spec.setNoExcept(
true);
5240<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5242 yyextra->current->args +=
" noexcept(false)";
5244<FuncQual>{BN}*"noexcept"{BN}*"(" {
5246 yyextra->current->args +=
" noexcept(";
5247 yyextra->current->spec.setNoExcept(
true);
5248 yyextra->lastRoundContext=FuncQual;
5249 yyextra->pCopyRoundString=&yyextra->current->args;
5250 yyextra->roundCount=0;
5254 yyextra->current->args +=
" &";
5257<FuncQual>{BN}*"&&" {
5258 yyextra->current->args +=
" &&";
5262<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5264 yyextra->current->args +=
" = 0";
5265 yyextra->current->virt = Specifier::Pure;
5266 yyextra->current->argList.setPureSpecifier(
TRUE);
5269<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5271 yyextra->current->args +=
" = delete";
5272 yyextra->current->spec.setDelete(
true);
5273 yyextra->current->argList.setIsDeleted(
TRUE);
5276<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5278 yyextra->current->args +=
" = default";
5279 yyextra->current->spec.setDefault(
true);
5282<FuncQual>{BN}*"->"{BN}* {
5284 yyextra->current->argList.setTrailingReturnType(
" -> ");
5285 yyextra->current->args +=
" -> ";
5286 yyextra->roundCount=0;
5287 BEGIN(TrailingReturn);
5289<TrailingReturn>[{;] {
5290 if (yyextra->roundCount>0) REJECT;
5294<TrailingReturn>"requires"{BN}+ {
5295 if (yyextra->insideJava) REJECT;
5296 yyextra->requiresContext = FuncQual;
5297 yyextra->current->req+=
' ';
5298 BEGIN(RequiresClause);
5300<TrailingReturn>"(" {
5301 yyextra->roundCount++;
5302 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5303 yyextra->current->args+=yytext;
5305<TrailingReturn>")" {
5306 if (yyextra->roundCount>0)
5308 yyextra->roundCount--;
5312 warn(yyextra->fileName,yyextra->yyLineNr,
5313 "Found ')' without opening '(' for trailing return type '{})...'",
5314 yyextra->current->argList.trailingReturnType());
5316 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5317 yyextra->current->args+=yytext;
5320 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5321 yyextra->current->args+=yytext;
5325 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5326 yyextra->current->args+=
' ';
5328<FuncRound,FuncFunc>{BN}*","{BN}* {
5330 yyextra->current->args +=
", " ;
5332<FuncQual,FuncRound,FuncFunc>{BN}+ {
5334 yyextra->current->args +=
' ' ;
5336<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5338 yyextra->lastCPPContext = YY_START;
5342 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5349 yyextra->lastInitializerContext=YY_START;
5350 yyextra->sharpCount=0;
5351 yyextra->initBracketCount=0;
5352 yyextra->current->initializer.str(yytext);
5353 BEGIN(ReadInitializer);
5368 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5371 yyextra->requiresContext = YY_START;
5372 yyextra->current->req+=
' ';
5373 BEGIN(RequiresClause);
5375 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5378 yyextra->current->typeConstr.clear();
5379 yyextra->current->typeConstr.push_back(
Argument());
5380 yyextra->lastCSConstraint = YY_START;
5381 BEGIN( CSConstraintName );
5385 yyextra->current->args = yytext;
5386 yyextra->oldStyleArgType.clear();
5387 BEGIN(OldStyleArgs);
5391 yyextra->current->args += yytext;
5397 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5399 if (yyextra->current->doc!=yyextra->docBackup)
5401 doc=yyextra->current->doc;
5402 yyextra->current->doc=yyextra->docBackup;
5404 if (yyextra->current->brief!=yyextra->briefBackup)
5406 brief=yyextra->current->brief;
5407 yyextra->current->brief=yyextra->briefBackup;
5409 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5410 oldStyleArgName,brief,doc);
5411 yyextra->current->args.clear();
5412 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5414<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5416 if (yyextra->current->argList.empty())
5418 yyextra->current->argList.setNoParameters(
TRUE);
5424<OldStyleArgs>. { yyextra->current->args += *yytext; }
5425<FuncQual,FuncRound,FuncFunc>\" {
5426 if (yyextra->insideIDL && yyextra->insideCppQuote)
5432 yyextra->current->args += *yytext;
5435<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5436<FuncQual>{BN}*"try:" |
5437<FuncQual>{BN}*"try"{BN}+ {
5438 yyextra->insideTryBlock=
TRUE;
5440 if (yytext[yyleng-1]==
':')
5446<FuncQual>{BN}*"throw"{BN}*"(" {
5447 yyextra->current->exception =
" throw (" ;
5448 yyextra->roundCount=0;
5450 BEGIN( ExcpRound ) ;
5452<FuncQual>{BN}*"raises"{BN}*"(" {
5453 yyextra->current->exception =
" raises (" ;
5455 yyextra->roundCount=0;
5456 BEGIN( ExcpRound ) ;
5458<FuncQual>{BN}*"throws"{BN}+ {
5459 yyextra->current->exception =
" throws " ;
5463<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5464 ++yyextra->roundCount ;
5466<ExcpRound>")" { yyextra->current->exception += *yytext ;
5467 if ( yyextra->roundCount )
5468 --yyextra->roundCount ;
5473 yyextra->current->exception += *yytext;
5476 unput(
'{'); BEGIN( FuncQual );
5479 unput(
';'); BEGIN( FuncQual );
5482 yyextra->current->exception +=
' ';
5486 yyextra->current->exception += *yytext;
5488<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5489 yyextra->current->name = yyextra->current->args ;
5490 yyextra->current->args = yytext ;
5491 yyextra->roundCount=0;
5492 BEGIN( FuncRound ) ;
5495 if (!yyextra->insidePHP) BEGIN(SkipInits);
5501 yyextra->current->fileName = yyextra->fileName;
5502 yyextra->current->startLine = yyextra->yyBegLineNr;
5503 yyextra->current->startColumn = yyextra->yyBegColNr;
5504 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5506 std::string type = yyextra->current->type.str();
5510 ti = (int)
match.position();
5514 int di = yyextra->current->type.find(
"decltype(");
5515 if (di!=-1 && di<ti)
5520 int ts=yyextra->current->type.find(
'<');
5521 int te=yyextra->current->type.findRev(
'>');
5524 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5525 bool isFunction = ti==-1 ||
5526 (ts!=-1 && ts<te && ts<ti && ti<te);
5527 bool isVariable = !yyextra->current->type.isEmpty() &&
5528 (!isFunction || startsWithTypedef);
5533 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5538 if (yyextra->isTypedef && !startsWithTypedef)
5540 yyextra->current->type.prepend(
"typedef ");
5542 yyextra->current->section = EntryType::makeVariable() ;
5547 yyextra->current->section = EntryType::makeFunction() ;
5548 yyextra->current->proto = *yytext==
';';
5556 if (yyextra->isTypedef && !startsWithTypedef)
5558 yyextra->current->type.prepend(
"typedef ");
5561 yyextra->current->section = EntryType::makeVariable();
5566 yyextra->current->section = EntryType::makeFunction();
5567 yyextra->current->proto =
TRUE;
5571 if ( yyextra->insidePHP)
5575 yyextra->current->spec.setFinal(
true);
5579 yyextra->current->spec.setAbstract(
true);
5582 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5585 if ( *yytext ==
'{' )
5587 yyextra->lastCurlyContext = FindMembers;
5588 yyextra->curlyCount=0;
5593 BEGIN( FindMembers );
5598 if ( yyextra->insidePHP)
5602 yyextra->previous = yyextra->current;
5603 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5606 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5608 yyextra->current->spec.setOptional(
true).setRequired(
true);
5610 yyextra->lastCurlyContext = FindMembers;
5611 if ( *yytext ==
',' )
5613 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5615 if ( *yytext ==
'{' )
5617 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5619 yyextra->previous->spec.setInline(
true);
5622 yyextra->curlyCount=0;
5623 BEGIN( SkipCurly ) ;
5627 if (!yyextra->previous->section.isVariable())
5628 yyextra->previous->bodyLine=-1;
5629 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...
5633<SkipInits>">"{BN}*"{" {
5635 yyextra->curlyCount=1;
5636 BEGIN(SkipC11Inits);
5638<SkipInits>{ID}{BN}*"{" {
5640 yyextra->curlyCount=1;
5641 BEGIN(SkipC11Inits);
5644 ++yyextra->curlyCount;
5647 if ( --yyextra->curlyCount<=0 )
5652<SkipC11Attribute>"]]" {
5653 BEGIN(yyextra->lastC11AttributeContext);
5661 ++yyextra->curlyCount ;
5663<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5666 if( yyextra->curlyCount )
5668 --yyextra->curlyCount ;
5672 if (!yyextra->current->sli.empty() && yyextra->previous)
5674 yyextra->previous->sli = yyextra->current->sli;
5675 yyextra->current->sli.clear();
5677 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5678 BEGIN( yyextra->lastCurlyContext ) ;
5681<SkipCurly>"}"{BN}*{DCOMM}"<" {
5683 if ( yyextra->curlyCount )
5686 --yyextra->curlyCount ;
5690 yyextra->current->endBodyLine=yyextra->yyLineNr;
5691 yyextra->tempEntry = yyextra->current;
5692 yyextra->current = yyextra->previous;
5694 yyextra->docBlockContext = SkipCurlyEndDoc;
5695 yyextra->docBlockInBody =
FALSE;
5696 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5698 yyextra->docBlock.str(std::string());
5699 yyextra->docBlockTerm =
'}';
5700 if (yytext[yyleng-3]==
'/')
5712<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5713 yyextra->docBlockContext = SkipCurlyEndDoc;
5714 yyextra->docBlockInBody =
FALSE;
5715 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5717 yyextra->docBlock.str(std::string());
5718 yyextra->docBlockTerm =
'}';
5719 if (yytext[yyleng-3]==
'/')
5730<SkipCurlyEndDoc>"}" {
5732 if (yyextra->tempEntry)
5734 yyextra->current = yyextra->tempEntry;
5735 yyextra->tempEntry.reset();
5737 BEGIN( yyextra->lastCurlyContext );
5741 yyextra->lastStringContext=SkipCurly;
5742 BEGIN( SkipString );
5744<SkipCurly>^{B}*"#" {
5745 if (yyextra->insidePHP)
5748 BEGIN( SkipCurlyCpp );
5750<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5754<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5755 if (!yyextra->insidePHP)
5761 yyextra->lastHereDocContext = YY_START;
5765<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5767 yyextra->lastRawStringContext = YY_START;
5768 yyextra->dummyRawString.clear();
5769 yyextra->pCopyRawString = &yyextra->dummyRawString;
5770 *yyextra->pCopyRawString += yytext;
5773<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
5777<SkipCurly,SkipCurlyCpp>"\$" {}
5781 yyextra->lastCurlyContext = FindMembers;
5784<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5788<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5790 yyextra->lastCContext = YY_START;
5793<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5795 yyextra->lastCContext = YY_START;
5796 BEGIN(SkipCxxComment);
5798<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5799 yyextra->roundCount=0;
5800 yyextra->lastSkipRoundContext=YY_START;
5803<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5804 yyextra->lastStringContext=YY_START;
5805 BEGIN( SkipString );
5808 warn(yyextra->fileName,yyextra->yyLineNr,
5809 "Found ';' while parsing initializer list! "
5810 "(doxygen could be confused by a macro call without semicolon)"
5812 BEGIN( FindMembers );
5814<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5815 if (!yyextra->insidePHP)
5818 yyextra->lastCContext = YY_START;
5819 BEGIN(SkipCxxComment);
5821<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5822 if (!yyextra->insideCS) REJECT;
5825 yyextra->lastSkipVerbStringContext=YY_START;
5826 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5827 yyextra->dummyTextStream.clear();
5828 BEGIN(SkipVerbString);
5830<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5831 if (yyextra->insidePHP) REJECT;
5833<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5834 if (yyextra->insidePHP)
5836 yyextra->lastStringContext=YY_START;
5837 BEGIN(SkipPHPString);
5840<SkipC11Attribute>{ID} {
5843 yyextra->current->spec.setNoDiscard(
true);
5846<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5847<SkipString,SkipPHPString>\\. { }
5849 BEGIN( yyextra->lastStringContext );
5852 BEGIN( yyextra->lastStringContext );
5854<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5855<SkipString,SkipPHPString>\n {
5859<SkipString,SkipPHPString>. { }
5865 yyextra->current->section = EntryType::makeEmpty() ;
5866 yyextra->current->type.clear() ;
5867 yyextra->current->name.clear() ;
5868 yyextra->current->args.clear() ;
5869 yyextra->current->argList.clear();
5870 BEGIN( FindMembers ) ;
5873 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5877 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5881 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5883 if (!yyextra->baseName.isEmpty())
5885 yyextra->current->extends.emplace_back(
5886 yyextra->baseName,Protection::Public,Specifier::Normal);
5887 yyextra->baseName.clear();
5889 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5894 yyextra->current->section = EntryType::makeEmpty() ;
5895 yyextra->current->type.clear() ;
5896 yyextra->current->name.clear() ;
5897 yyextra->current->args.clear() ;
5898 yyextra->current->argList.clear();
5900 BEGIN( FindMembers ) ;
5902<CompoundName>{SCOPENAME}/{BN}*"<" {
5903 yyextra->sharpCount = 0;
5904 yyextra->current->name = yytext ;
5906 if (yyextra->current->spec.isProtocol())
5908 yyextra->current->name+=
"-p";
5911 yyextra->lastClassTemplSpecContext = ClassVar;
5912 if (yyextra->insideObjC)
5914 BEGIN( ObjCProtocolList );
5916 else if (yyextra->insideCS)
5923 yyextra->roundCount=0;
5924 BEGIN( ClassTemplSpec );
5931 yyextra->current->tArgLists.
push_back(al);
5932 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5933 yyextra->templateStr=
"<";
5934 yyextra->current->name +=
"<";
5935 yyextra->fullArgString = yyextra->templateStr;
5936 yyextra->copyArgString = &yyextra->current->name;
5938 yyextra->currentArgumentContext = ClassVar;
5939 BEGIN( ReadTempArgs );
5941<ObjCProtocolList>"<" {
5942 yyextra->insideProtocolList=
TRUE;
5945<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5946 yyextra->current->name += yytext;
5948 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5951 if (yyextra->current->spec.isProtocol())
5958 BEGIN( yyextra->lastClassTemplSpecContext );
5962<ClassTemplSpec>"<" {
5963 yyextra->current->name += yytext;
5964 if (yyextra->roundCount==0) yyextra->sharpCount++;
5967 yyextra->current->name += yytext;
5969<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5970 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5974 yyextra->current->name =
substitute(yytext,
".",
"::");
5975 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5980 else if (!yyextra->current->tArgLists.empty())
5984 yyextra->current->name = yytext;
5985 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5988 QCString rn = yyextra->current_root->name;
5990 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5994 yyextra->current->spec.setForwardDecl(
true);
5995 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5997 else if (yyextra->insideIDL &&
5998 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
5999 yyextra->current->spec.isInterface()) ||
6000 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6001 yyextra->current->spec.isService())
6009 yyextra->current->name = yytext;
6010 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6011 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6014 yyextra->current->spec.setInterface(
false).setService(
false);
6018 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6021 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6024 yyextra->current->reset();
6026 if (yyextra->insideObjC)
6028 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6029 yyextra->insideObjC =
FALSE;
6031 if (yyextra->isTypedef)
6033 yyextra->current->type.prepend(
"typedef");
6035 BEGIN( FindMembers );
Wrapper class for the Entry type.
6038<CompoundName>{SCOPENAME}/{BN}*"(" {
6039 yyextra->current->name = yytext ;
6042 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6044 yyextra->lastAlignAsContext = YY_START;
6049 if (yyextra->current->spec.isProtocol())
6051 yyextra->current->name +=
"-p";
6056<AlignAs>"(" { yyextra->roundCount=0;
6057 BEGIN( AlignAsEnd );
6061<AlignAsEnd>"(" { yyextra->roundCount++; }
6062<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6064 BEGIN( yyextra->lastAlignAsContext );
6070 yyextra->current->name = yytext ;
6074 yyextra->current->bodyLine = yyextra->yyLineNr;
6075 yyextra->current->bodyColumn = yyextra->yyColNr;
6076 yyextra->current->initializer.str(std::string());
6077 yyextra->lastInitializerContext = FindMembers;
6078 yyextra->sharpCount=0;
6079 yyextra->initBracketCount=0;
6080 BEGIN(ReadInitializer);
6082<CompoundName>{SCOPENAME}/{BN}*"," {
6084 yyextra->current->reset();
6087<CompoundName>{SCOPENAME} {
6088 yyextra->current->name = yytext ;
6091 if (yyextra->current->spec.isProtocol())
6093 yyextra->current->name +=
"-p";
6095 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6101<CompoundName>{CSSCOPENAME} {
6102 yyextra->current->name =
substitute(yytext,
".",
"::");
6106<ClassVar>{SCOPENAME}{BNopt}/"(" {
6107 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6110 yyextra->roundCount=0;
6111 BEGIN(SkipUnionSwitch);
6116 yyextra->yyBegColNr=yyextra->yyColNr;
6117 yyextra->yyBegLineNr=yyextra->yyLineNr;
6118 yyextra->current->name = yytext;
6119 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6122 BEGIN( FindMembers );
6126 if (yyextra->isTypedef)
6130 yyextra->current->type.prepend(
"typedef ");
6138<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6139 if (yyextra->insideCli)
6142 yyextra->current->spec.setSealedClass(
true);
6144 yyextra->current->spec.setAbstractClass(
true);
6152<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6153 yyextra->yyBegColNr=yyextra->yyColNr;
6154 yyextra->yyBegLineNr=yyextra->yyLineNr;
6157 if (yyextra->current->section.isEnum())
6159 yyextra->current->section = EntryType::makeVariable() ;
6161 yyextra->current->type +=
' ' ;
6162 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...
6171 yyextra->yyBegColNr=yyextra->yyColNr;
6172 yyextra->yyBegLineNr=yyextra->yyLineNr;
6174 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6177 yyextra->roundCount=0;
6178 BEGIN(SkipUnionSwitch);
6180 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6182 yyextra->current->type.clear();
6183 yyextra->baseProt = Protection::Public;
6184 yyextra->baseVirt = Specifier::Normal;
6185 yyextra->baseName.clear();
6186 BEGIN( BasesProt ) ;
6188 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6190 yyextra->current->typeConstr.clear();
6191 yyextra->current->typeConstr.push_back(
Argument());
6192 yyextra->lastCSConstraint = YY_START;
6193 BEGIN( CSConstraintName );
6195 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6197 yyextra->current->spec.setAbstract(
true);
6199 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6201 yyextra->current->spec.setSealed(
true);
6203 else if (
qstrcmp(yytext,
"final")==0)
6205 yyextra->current->spec.setFinal(
true);
6209 if (yyextra->current->section.isEnum())
6211 yyextra->current->section = EntryType::makeVariable() ;
6213 yyextra->current->type +=
' ' ;
6214 yyextra->current->type += yyextra->current->name ;
6215 yyextra->current->name = yytext ;
6224 if (yyextra->insideObjC && *yytext==
'(')
6226 yyextra->current->name+=
'(';
6229 yyextra->current->spec.setCategory(
true);
6231 BEGIN( ClassCategory );
6237 BEGIN( FindMembers );
6240<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6241<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6242 yyextra->fullArgString.clear();
6243 yyextra->lastCopyArgChar=
'#';
6244 yyextra->lastCommentInArgContext=YY_START;
6246 BEGIN( CopyArgCommentLine );
6248 BEGIN( CopyArgComment );
6250<CSConstraintType,CSConstraintName>"#" {
6251 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6253<CSConstraintType>"=>" {
6258 BEGIN( yyextra->lastCSConstraint );
6260<CSConstraintType>"{" {
6264 BEGIN( yyextra->lastCSConstraint );
6266<CSConstraintType,CSConstraintName>";" {
6269 BEGIN( yyextra->lastCSConstraint );
6271<CSConstraintName>":" {
6272 BEGIN( CSConstraintType );
6274<CSConstraintName>{ID} {
6276 yyextra->current->typeConstr.back().name=yytext;
6278<CSConstraintType>"where" {
6279 yyextra->current->typeConstr.push_back(
Argument());
6280 BEGIN( CSConstraintName );
6282<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6283 if (yyextra->current->typeConstr.back().type.isEmpty())
6286 yyextra->current->typeConstr.back().type=yytext;
6290 QCString name = yyextra->current->typeConstr.back().name;
6291 yyextra->current->typeConstr.push_back(
Argument());
6292 yyextra->current->typeConstr.back().name=name;
6293 yyextra->current->typeConstr.back().type=yytext;
6296<CSConstraintName,CSConstraintType>\n {
6299<CSConstraintName,CSConstraintType>. {
6301<ClassCategory>{ID} {
6302 yyextra->current->name+=yytext;
6304<ClassCategory>")"/{BN}*"{" {
6305 yyextra->current->name+=
')';
6308<ClassCategory>")"/{BN}*"<" {
6309 yyextra->current->name+=
')';
6310 BEGIN( ObjCProtocolList );
6313 yyextra->current->name+=
')';
6314 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6326 if (yyextra->current->section.isVariable())
6328 yyextra->current->bitfields+=
":";
6329 yyextra->current->args.clear();
6332 else if (yyextra->current->section.isEnum())
6335 yyextra->current->args.clear();
6336 BEGIN(EnumBaseType);
6340 yyextra->current->type.clear();
6341 if (yyextra->current->spec.isInterface() ||
6342 yyextra->current->spec.isStruct() ||
6343 yyextra->current->spec.isRef() ||
6344 yyextra->current->spec.isValue() ||
6345 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6348 yyextra->baseProt = Protection::Public;
6352 yyextra->baseProt = Protection::Private;
6354 yyextra->baseVirt = Specifier::Normal;
6355 yyextra->baseName.clear();
6356 BEGIN( BasesProt ) ;
6360 if (yyextra->isTypedef)
6362 yyextra->current->type.prepend(
"typedef");
6364 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6366 yyextra->current->section = EntryType::makeVariable() ;
6368 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6370 yyextra->current->reset();
6377 BEGIN( FindMembers );
6379<Bases,ClassVar>{CPPC}"/"/[^/] {
6380 if (!yyextra->insideObjC)
6387 yyextra->current->program << yytext;
6388 yyextra->current->fileName = yyextra->fileName ;
6389 yyextra->current->startLine = yyextra->yyLineNr ;
6390 yyextra->current->startColumn = yyextra->yyColNr;
6391 yyextra->curlyCount=0;
6392 BEGIN( ReadBodyIntf );
6395<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6396<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6397<Bases,ClassVar>{CPPC}"!" |
6398<Bases,ClassVar>[\-+]{BN}* {
6399 if (!yyextra->insideObjC)
6406 yyextra->current->program << yytext;
6407 yyextra->current->fileName = yyextra->fileName ;
6408 yyextra->current->startLine = yyextra->yyLineNr ;
6409 yyextra->current->startColumn = yyextra->yyColNr;
6410 yyextra->curlyCount=0;
6411 BEGIN( ReadBodyIntf );
6414<CompoundName,ClassVar>{B}*"{"{B}* {
6415 yyextra->current->program.str(std::string());
6416 yyextra->current->fileName = yyextra->fileName ;
6417 yyextra->current->bodyLine = yyextra->yyLineNr;
6418 yyextra->current->bodyColumn = yyextra->yyColNr;
6420 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6422 if (yyextra->current->section.isNamespace())
6426 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6438 yyextra->curlyCount=0;
6439 if (yyextra->current_root &&
6440 !yyextra->current_root->spec.isInterface() &&
6441 (yyextra->current->spec.isInterface() ||
6442 yyextra->current->spec.isProtocol() ||
6443 yyextra->current->spec.isCategory() ||
6444 yyextra->current->section.isObjcImpl()
6449 BEGIN( ReadBodyIntf );
6451 else if (yyextra->current->section.isNamespace())
6453 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6460<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6461<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6462<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6463<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6464<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6465<BasesProt>{BN} {
lineCount(yyscanner); }
6466<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6467<Bases>"decltype"{BN}*"(" {
6469 yyextra->roundCount=0;
6470 yyextra->lastSkipRoundContext=YY_START;
6473<Bases>("\\")?({ID}"\\")*{ID} {
6474 if (!yyextra->insidePHP)
6483 yyextra->baseName += bn;
6484 yyextra->current->args +=
' ';
6485 yyextra->current->args += yytext;
6488<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6494 yyextra->current->typeConstr.clear();
6495 yyextra->current->typeConstr.push_back(
Argument());
6496 yyextra->lastCSConstraint = YY_START;
6497 BEGIN( CSConstraintName );
6501 yyextra->baseName+=yytext;
6502 yyextra->current->args +=
' ';
6503 yyextra->current->args += yytext;
6506<Bases>{BN}*{ID}("."{ID})* {
6508 yyextra->baseName += name;
6509 yyextra->current->args +=
' ';
6510 yyextra->current->args += name;
6512<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6513 if (!yyextra->insideObjC)
6523<ClassVar,Bases>"@end" {
6531<ClassVar>"<" { yyextra->current->name += *yytext;
6532 yyextra->sharpCount=1;
6533 yyextra->roundCount=0;
6534 yyextra->lastSkipSharpContext = YY_START;
6535 yyextra->specName = &yyextra->current->name;
6536 BEGIN ( Specialization );
6540 yyextra->sharpCount=1;
6541 yyextra->roundCount=0;
6542 yyextra->lastSkipSharpContext = YY_START;
6543 if (yyextra->insideObjC)
6553 yyextra->templateStr = yytext;
6554 yyextra->specName = &yyextra->templateStr;
6555 BEGIN ( Specialization );
6558<Specialization>"<" { *yyextra->specName += *yytext;
6559 if (yyextra->roundCount==0) yyextra->sharpCount++;
6561<Specialization>">" {
6562 *yyextra->specName += *yytext;
6563 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6566 BEGIN(yyextra->lastSkipSharpContext);
6569<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6570<Specialization>"<<" { *yyextra->specName += yytext; }
6571<Specialization>">>"/{B}*"::" {
6576<Specialization>">>" {
6577 if (yyextra->insideCS)
6587 if (yyextra->roundCount>0)
6589 *yyextra->specName += yytext;
6599<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6600<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6601<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6603<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6604<Specialization>"\\'" { *yyextra->specName += *yytext;}
6605<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6606<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6607<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6608<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6609<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6610<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6611<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6612<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6613<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6616 *yyextra->specName += *yytext;
6618<SkipRound>"(" { ++yyextra->roundCount; }
6619<SkipRound>")" {
if (--yyextra->roundCount<0)
6620 BEGIN ( yyextra->lastSkipRoundContext );
6623 yyextra->lastStringContext=SkipRound;
6626<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6627 if (yyextra->insideProtocolList)
6629 yyextra->baseName+=
"-p";
6633 yyextra->current->args +=
',' ;
6636 if (!yyextra->baseName.isEmpty())
6638 yyextra->current->extends.emplace_back(
6639 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6642 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6643 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6644 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6646 yyextra->baseProt=Protection::Public;
6650 yyextra->baseProt=Protection::Private;
6652 yyextra->baseVirt=Specifier::Normal;
6653 yyextra->baseName.clear();
6656 yyextra->insideProtocolList=
FALSE;
6668 if (*yytext==
',' && yyextra->insideObjC)
6670 yyextra->insideProtocolList=
TRUE;
6676 yyextra->current->program.str(std::string());
6677 yyextra->current->fileName = yyextra->fileName ;
6678 yyextra->current->bodyLine = yyextra->yyLineNr;
6679 yyextra->current->bodyColumn = yyextra->yyColNr;
6681 if (!yyextra->baseName.isEmpty())
6682 yyextra->current->extends.emplace_back(
6683 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6685 yyextra->curlyCount=0;
6686 if (yyextra->insideObjC)
6688 BEGIN( ReadBodyIntf );
6695<SkipUnionSwitch>{B}*"(" {
6696 yyextra->roundCount++;
6698<SkipUnionSwitch>")" {
6699 if (--yyextra->roundCount==0)
6704<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6706<Comment>{BN}+ { yyextra->current->program << yytext ;
6709<Comment>{CCS} { yyextra->current->program << yytext ; }
6710<Comment>{CPPC} { yyextra->current->program << yytext ; }
6711<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6712 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6713 yyextra->current->program << yytext ;
6715<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6716 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6717 yyextra->current->program << yytext ;
6719<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6720<Comment>{CCE} { yyextra->current->program << yytext ;
6721 if (!yyextra->insideCode)
6723 yyextra->doxygenComment=
false;
6724 BEGIN( yyextra->lastContext );
6727<Comment>. { yyextra->current->program << *yytext ; }
6729<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6731 if (!yyextra->current->doc.isEmpty())
6733 yyextra->current->doc+=
"\n\n";
6737 yyextra->current->docLine = yyextra->yyLineNr;
6738 yyextra->current->docFile = yyextra->fileName;
6741 yyextra->lastDocContext = YY_START;
6742 if (yyextra->current_root->section.isScope())
6744 yyextra->current->inside = yyextra->current_root->name+
"::";
6746 yyextra->docBlockContext = YY_START;
6747 yyextra->docBlockInBody = YY_START==SkipCurly;
6752 yyextra->docBlock.str(indent.
str());
6754 if (yyextra->docBlockAutoBrief)
6756 yyextra->current->briefLine = yyextra->yyLineNr;
6757 yyextra->current->briefFile = yyextra->fileName;
6762<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6768 yyextra->lastDocContext = YY_START;
6771 if (yyextra->current_root->section.isScope())
6773 yyextra->current->inside = yyextra->current_root->name+
"::";
6775 yyextra->current->docLine = yyextra->yyLineNr;
6776 yyextra->current->docFile = yyextra->fileName;
6777 yyextra->docBlockContext = YY_START;
6778 yyextra->docBlockInBody = YY_START==SkipCurly;
6780 yyextra->docBlockAutoBrief = javadocAutoBrief;
6784 yyextra->docBlock.str(indent.
str());
6786 if (yyextra->docBlockAutoBrief)
6788 yyextra->current->briefLine = yyextra->yyLineNr;
6789 yyextra->current->briefFile = yyextra->fileName;
6796 yyextra->current->program << yytext ;
6797 yyextra->lastContext = YY_START ;
6798 yyextra->doxygenComment=
true;
6802<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6807<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6808 yyextra->lastDocContext = YY_START;
6811 if (yyextra->current_root->section.isScope())
6813 yyextra->current->inside = yyextra->current_root->name+
"::";
6815 yyextra->current->docLine = yyextra->yyLineNr;
6816 yyextra->current->docFile = yyextra->fileName;
6817 yyextra->docBlockContext = YY_START;
6818 yyextra->docBlockInBody = YY_START==SkipCurly;
6820 yyextra->docBlockAutoBrief = javadocAutoBrief;
6824 yyextra->docBlock.str(indent.
str());
6826 if (yyextra->docBlockAutoBrief)
6828 yyextra->current->briefLine = yyextra->yyLineNr;
6829 yyextra->current->briefFile = yyextra->fileName;
6834<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6835 yyextra->lastDocContext = YY_START;
6836 if (yyextra->current_root->section.isScope())
6838 yyextra->current->inside = yyextra->current_root->name+
"::";
6840 yyextra->docBlockContext = YY_START;
6841 yyextra->docBlockInBody = YY_START==SkipCurly;
6842 yyextra->docBlockAutoBrief =
FALSE;
6846 yyextra->docBlock.str(indent.
str());
6851<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6852 yyextra->lastDocContext = YY_START;
6853 if (yyextra->current_root->section.isScope())
6855 yyextra->current->inside = yyextra->current_root->name+
"::";
6857 yyextra->docBlockContext = YY_START;
6858 yyextra->docBlockInBody = YY_START==SkipCurly;
6859 yyextra->docBlockAutoBrief =
FALSE;
6862 yyextra->docBlock.str(indent.
str());
6866<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6868 yyextra->externLinkage=
TRUE;
6871 if (yyextra->externLinkage)
6873 yyextra->externLinkage=
FALSE;
6875 else if (yyextra->insideCS &&
6876 !yyextra->current->name.isEmpty() &&
6877 !yyextra->current->type.isEmpty())
6879 if (yyextra->current->mtype == MethodTypes::Event)
6881 yyextra->mtype = MethodTypes::Event;
6885 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6889 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6891 yyextra->current->bodyLine = yyextra->yyLineNr;
6892 yyextra->current->bodyColumn = yyextra->yyColNr;
6893 yyextra->curlyCount=0;
6894 BEGIN( CSAccessorDecl );
6896 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6900 yyextra->current->exception =
" {";
6901 BEGIN(UNOIDLAttributeBlock);
6905 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6906 yyextra->current->name.isEmpty()
6910 yyextra->needsSemi =
FALSE;
6911 if (yyextra->current->isStatic)
6913 yyextra->current->name=
"[static initializer]";
6914 yyextra->current->type.clear();
6918 yyextra->current->name=
"[instance initializer]";
6935 yyextra->current->bodyLine = yyextra->yyLineNr;
6936 yyextra->current->bodyColumn = yyextra->yyColNr;
6937 yyextra->current->initializer.str(yytext);
6938 yyextra->lastInitializerContext = YY_START;
6939 yyextra->sharpCount=0;
6940 yyextra->initBracketCount=1;
6941 BEGIN(ReadInitializer);
6945<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6946<CSAccessorDecl>"}"{B}*"=" {
6948 if (yyextra->curlyCount != 0) REJECT;
6949 yyextra->current->initializer.str(
"=");
6950 yyextra->current->endBodyLine=yyextra->yyLineNr;
6951 yyextra->lastInitializerContext = FindMembers;
6952 BEGIN(ReadInitializer);
6954<CSAccessorDecl>"}" {
6955 if (yyextra->curlyCount)
6957 yyextra->curlyCount--;
6961 yyextra->mtype = MethodTypes::Method;
6962 yyextra->virt = Specifier::Normal;
6964 yyextra->current->endBodyLine=yyextra->yyLineNr;
6969<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6970<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6971<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6972<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6973<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6974<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6975<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6976<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6977<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6978<CSAccessorDecl>{CHARLIT} {}
6979<CSAccessorDecl>"\"" { BEGIN(CSString);}
6980<CSAccessorDecl>"." {}
6981<CSAccessorDecl>\n {
lineCount(yyscanner); }
6982<CSString>"\"" { BEGIN(CSAccessorDecl);}
6990<SliceSequence>{SCOPENAME} {
6991 if (yyextra->current->spec.isLocal())
6993 yyextra->current->type =
"local ";
6995 yyextra->current->type +=
"sequence<";
6996 yyextra->current->type += yytext;
6997 yyextra->current->type +=
">";
7000<SliceSequence>{BN}*">"{BN}* {
7002 BEGIN(SliceSequenceName);
7005<SliceSequenceName>{ID}{BN}* {
7007 yyextra->current->name = yytext ;
7008 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7011<SliceSequenceName>";" {
7012 yyextra->current->section = EntryType::makeVariable();
7013 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7018<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7020 if (yyextra->current->spec.isLocal())
7022 yyextra->current->type =
"local ";
7024 yyextra->current->type +=
"dictionary<";
7025 yyextra->current->type += yytext;
7026 yyextra->current->type +=
">";
7027 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7030<SliceDictionary>{BN}*">"{BN}* {
7032 BEGIN(SliceDictionaryName);
7035<SliceDictionaryName>{ID}{BN}* {
7037 yyextra->current->name = yytext ;
7038 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7041<SliceDictionaryName>";" {
7042 yyextra->current->section = EntryType::makeVariable();
7043 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7053<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7054 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7055 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7058<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7059 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7060 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7062<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7063 yyextra->docBlock << yytext;
7064 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7065 BEGIN( yyextra->docBlockContext );
7067<DocLine>{NONLopt}/"\n" {
7068 yyextra->docBlock << yytext;
7069 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7070 BEGIN( yyextra->docBlockContext );
7075<DocBlock>"*"*{CCE} {
7077 BEGIN(yyextra->docBlockContext);
7079<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7082 yyextra->docBlock <<
"\\ilinebr " << indent;
7084<DocBlock>^{B}*"*"+/[^/] {
7087 yyextra->docBlock << indent;
7089<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7092 yyextra->docBlock << indent;
7094<DocBlock>^{B}*({CPPC}){B}* {
7097 yyextra->docBlock << yytext;
7101 yyextra->docBlock << yytext;
7103<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7104 yyextra->docBlock << yytext;
7106<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7107 yyextra->docBlock << yytext;
7108 char blockName[] =
"f$";
7110 if (c==
'[') blockName[1]=
']';
7111 else if (c==
'{') blockName[1]=
'}';
7112 else if (c==
'(') blockName[1]=
')';
7114 BEGIN(DocCopyBlock);
7116<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7117 yyextra->fileName = &yytext[6];
7118 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7119 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7120 yyextra->docBlock << yytext;
7122<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7123 yyextra->fileName = &yytext[6];
7124 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7125 yyextra->docBlock << yytext;
7127<DocBlock>{CMD}"iline"{LINENR}{B} {
7132 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7136 yyextra->yyLineNr = nr;
7138 yyextra->docBlock << yytext;
7140<DocBlock>{B}*"<"{PRE}">" {
7141 yyextra->docBlock << yytext;
7143 BEGIN(DocCopyBlock);
7145<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7146 yyextra->docBlock << yytext;
7148 BEGIN(DocCopyBlock);
7150<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7151 yyextra->docBlock << yytext;
7153 BEGIN(DocCopyBlock);
7155<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7156 yyextra->docBlock << yytext;
7158 BEGIN(DocCopyBlock);
7160<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7162 yyextra->docBlock <<
"\\ilinebr ";
7163 yyextra->docBlock << pat;
7165 BEGIN(DocCopyBlock);
7167<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7169 yyextra->docBlock << pat;
7171 BEGIN(DocCopyBlock);
7173<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7174<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7175<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7177 yyextra->docBlock <<
"\\ilinebr ";
7178 yyextra->docBlock << pat;
7180 BEGIN(DocCopyBlock);
7182<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7183<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7184<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7186 yyextra->docBlock << pat;
7188 BEGIN(DocCopyBlock);
7191 yyextra->docBlock <<
"```";
7194 yyextra->docBlock << yytext;
7197 yyextra->docBlock << yytext;
7199 BEGIN(DocCopyBlock);
7201<DocBlock>{B}*"<"{CODE}">" {
7202 if (yyextra->insideCS)
7204 yyextra->docBlock << yytext;
7206 BEGIN(DocCopyBlock);
7213<DocBlock>[^@*~`'\/\\\n]+ {
7214 yyextra->docBlock << yytext;
7218 yyextra->docBlock << *yytext;
7221 yyextra->docBlock << *yytext;
7226<DocCopyBlock>"</"{PRE}">" {
7231 yyextra->docBlock << yytext;
7233<DocCopyBlock>"</"{CODE}">" {
7238 yyextra->docBlock << yytext;
7240<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7245 yyextra->docBlock << yytext;
7247<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7252 yyextra->docBlock << yytext;
7254<DocCopyBlock>^{B}*"*"+/{BN}+ {
7255 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7263 yyextra->docBlock << indent;
7266<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7267 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7271 yyextra->docBlock << indent;
7278<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7279 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7283 yyextra->docBlock << indent+
"*";
7290<DocCopyBlock>^{B}*"*"+/{BN}* {
7291 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7294 if (yyextra->nestedComment>0)
7297 yyextra->docBlock << indent+
"*";
7302 yyextra->docBlock << indent;
7310<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7316 yyextra->docBlock << pat;
7318<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7324 yyextra->docBlock << pat;
7326<DocCopyBlock>"```" {
7327 if (yyextra->docBlockName==
"``")
7329 yyextra->docBlock <<
"`";
7331 yyextra->docBlock <<
"``";
7336 yyextra->docBlock << yytext;
7339<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7344 yyextra->docBlock << yytext;
7346<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7351 yyextra->docBlock << yytext;
7353<DocCopyBlock>"`"{1,2} {
7358 yyextra->docBlock << yytext;
7360<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7361 yyextra->docBlock << yytext;
7364 yyextra->docBlock << yytext;
7365 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7369 yyextra->lastStringContext=YY_START;
7370 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7371 yyextra->stopAtInvalidString=
true;
7375<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7378 yyextra->nestedComment++;
7380 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7382 yyextra->nestedComment--;
7384 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7386 warn(yyextra->fileName,yyextra->yyLineNr,
7387 "Found end of C comment inside a '{}' block without matching start of the comment!"
7388 " Maybe the end marker for the block is missing?",
7389 yyextra->docBlockName);
7392 yyextra->docBlock << yytext;
7395 yyextra->docBlock << *yytext;
7399 yyextra->docBlock << *yytext;
7401<DocCopyBlock><<EOF>> {
7402 warn(yyextra->fileName,yyextra->yyLineNr,
7403 "reached end of file while inside a '{}' block!"
7404 " The command that should end the block seems to be missing!",
7405 yyextra->docBlockName);
7412<Prototype>"operator"{B}*"("{B}*")" {
7413 yyextra->current->name+=yytext;
7416 yyextra->current->args+=*yytext;
7417 yyextra->currentArgumentContext = PrototypeQual;
7418 yyextra->fullArgString = yyextra->current->args;
7419 yyextra->copyArgString = &yyextra->current->args;
7420 BEGIN( ReadFuncArgType ) ;
7422<Prototype>"("({ID}"::")*({B}*[&*])+ {
7423 if (yyextra->insidePHP)
7429 yyextra->current->type+=yyextra->current->name+yytext;
7430 yyextra->current->name.clear();
7431 BEGIN( PrototypePtr );
7434<PrototypePtr>{SCOPENAME} {
7435 yyextra->current->name+=yytext;
7438 yyextra->current->args+=*yytext;
7439 yyextra->currentArgumentContext = PrototypeQual;
7440 yyextra->fullArgString = yyextra->current->args;
7441 yyextra->copyArgString = &yyextra->current->args;
7442 BEGIN( ReadFuncArgType ) ;
7445 yyextra->current->type+=
')';
7449 yyextra->current->name+=yytext;
7452 BEGIN( PrototypeSkipLine);
7454<PrototypeQual>{B}*"const"{B}* {
7455 yyextra->current->args +=
" const ";
7456 yyextra->current->argList.setConstSpecifier(
TRUE);
7458<PrototypeQual>{B}*"volatile"{B}* {
7459 yyextra->current->args +=
" volatile ";
7460 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7462<PrototypeQual>{B}*"="{B}*"0"{B}* {
7463 yyextra->current->args +=
" = 0";
7464 yyextra->current->virt = Specifier::Pure;
7465 yyextra->current->argList.setPureSpecifier(
TRUE);
7467<PrototypeQual>"throw"{B}*"(" {
7468 yyextra->current->exception =
"throw(";
7469 BEGIN(PrototypeExc);
7472 yyextra->current->exception +=
')';
7473 BEGIN(PrototypeQual);
7476 yyextra->current->exception += *yytext;
7479 yyextra->current->args += *yytext;
7482 yyextra->current->name += *yytext;
7484<PrototypeSkipLine>. {
7490<SkipCxxComment>.*"\\\n" {
7491 if (yyextra->insideCS)
7500<SkipCxxComment>{ANYopt}/\n {
7501 BEGIN( yyextra->lastCContext ) ;
7503<SkipComment>[^\*\n]+
7508 if (!yyextra->insideCpp) REJECT;
7509 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7510 yyextra->lastC11AttributeContext = YY_START;
7511 BEGIN( SkipC11Attribute );
7516 if (yyextra->insideIDL && yyextra->insideCppQuote)
7520 else if (yyextra->insidePHP)
7522 yyextra->lastStringContext=YY_START;
7527 if (!yyextra->insidePHP)
7529 yyextra->lastCPPContext = YY_START;
7534 yyextra->lastCContext = YY_START ;
7535 BEGIN( SkipCxxComment ) ;
7539 if (!yyextra->insidePHP)
7541 yyextra->lastCContext = YY_START ;
7542 BEGIN( SkipCxxComment ) ;
7545 if (yyextra->insidePHP)
7547 yyextra->lastStringContext=YY_START;
7548 BEGIN(SkipPHPString);
7552 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7554 if (yyextra->current->type.isEmpty())
7556 if (yyextra->current->name.isEmpty())
7557 yyextra->current->name=
"?";
7559 yyextra->current->name+=
"?";
7563 yyextra->current->type+=
"?";
7567<*>"}" { yyextra->exported=
false; }
7569<SkipComment>{CPPC}|{CCS}
7570<*>{CCS} { yyextra->lastCContext = YY_START ;
7571 BEGIN( SkipComment ) ;
7573<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7575 yyextra->lastCContext = YY_START ;
7576 BEGIN( SkipCxxComment ) ;
7579 if (yyextra->insideCS && yyextra->fakeNS)
7583 BEGIN ( ReadNSBody);
7595 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7597 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7599 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7609 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7610 yyextra->outerScopeEntries.clear();
7611 yyextra->baseName.clear();
7612 yyextra->protection = Protection::Public;
7613 yyextra->baseProt = Protection::Public;
7614 yyextra->sharpCount = 0;
7615 yyextra->roundCount = 0;
7616 yyextra->curlyCount = 0;
7617 yyextra->mtype = MethodTypes::Method;
7618 yyextra->isStatic =
FALSE;
7619 yyextra->virt = Specifier::Normal;
7620 yyextra->baseVirt = Specifier::Normal;
7621 yyextra->isTypedef =
FALSE;
7622 yyextra->insideTryBlock =
FALSE;
7623 yyextra->insideFormula =
FALSE;
7624 yyextra->insideCode=
FALSE;
7626 yyextra->previous = 0;
7627 yyextra->firstTypedefEntry.reset();
7628 yyextra->memspecEntry.reset();
7633 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7634 if (yyextra->insideJava)
7636 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7638 yyextra->current->protection = yyextra->protection;
7639 yyextra->current->exported = yyextra->exported ;
7640 yyextra->current->mtype = yyextra->mtype;
7641 yyextra->current->virt = yyextra->virt;
7642 yyextra->current->isStatic = yyextra->isStatic;
7643 yyextra->current->lang = yyextra->language;
7645 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7646 yyextra->isTypedef=
FALSE;
7654 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7655 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7657 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7663 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7666 for (p = yytext ; *p ; ++p )
7670 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7674 yyextra->column+=tabSize - (yyextra->column%tabSize);
7678 yyextra->column++,yyextra->yyColNr++;
7686 int col=startIndent;
7692 if (c==
'\t') col+=tabSize-(col%tabSize);
7693 else if (c==
'\n') col=0;
7701 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7702 yyextra->current->
protection = yyextra->protection = prot;
7703 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7704 yyextra->current->type.clear();
7705 yyextra->current->name.clear();
7706 yyextra->current->args.clear();
7707 yyextra->current->argList.clear();
7713 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7714 size_t tl=yyextra->current->type.length();
7715 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7717 yyextra->current->type +=
' ' ;
7719 yyextra->current->type += yyextra->current->name;
7720 yyextra->current->name.clear() ;
7721 tl=yyextra->current->type.length();
7722 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7724 yyextra->current->type +=
' ' ;
7726 yyextra->current->type += yyextra->current->args ;
7727 yyextra->current->args.clear() ;
7728 yyextra->current->argList.clear();
7735 if (s==
nullptr || *s==0)
return name;
7737 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7749 bool funcPtr = i>0 && type[i-1]==
')';
7751 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7752 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7753 return type.
left(i);
7759 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7762 yyextra->docBlock <<
"\\iskip";
7764 yyextra->docBlockName=blockName;
7765 yyextra->fencedSize=fencedSize;
7766 yyextra->isCodeBlock=codeBlock;
7767 yyextra->nestedComment=0;
7773 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7774 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7778 yyextra->docBlock <<
"\\endiskip";
7780 yyextra->docBlockName=
"";
7800 int i=name.
find(
"operator");
7801 if (i==-1)
return FALSE;
7811 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7813 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7814 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7815 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7816 yyextra->insideD = yyextra->language==SrcLangExt::D;
7817 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7818 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7819 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7820 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7821 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7822 yyextra->language==SrcLangExt::Lex);
7833 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7834 if (yyextra->current_root->section.isScope())
7837 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7839 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7841 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7851 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7852 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7853 if (yyextra->current->argList.empty())
return FALSE;
7854 for (
const Argument &a : yyextra->current->argList)
7865 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7866 if (yyextra->insideJava)
7869 yyextra->current->protection = Protection::Public;
7870 if (text.
find(
"protected")!=-1)
7871 yyextra->current->protection = Protection::Protected;
7872 else if (text.
find(
"private")!=-1)
7873 yyextra->current->protection = Protection::Private;
7874 else if (text.
find(
"package")!=-1)
7875 yyextra->current->protection = Protection::Package;
7882 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7883 int si =
static_cast<int>(yyextra->current->args.length());
7884 if (yyextra->oldStyleArgType.isEmpty())
7886 std::string args = yyextra->current->args.str();
7887 static const reg::Ex re(R
"(\([^)]*\).*)");
7893 bi1=(int)match.position();
7894 size_t secondMatchStart = match.position()+match.length();
7897 bi2=(int)match.position();
7901 if (bi1!=-1 && bi2!=-1)
7904 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7906 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7907 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7909 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7910 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7911 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7916 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7919 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7920 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7922 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7923 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7929 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7932 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7936 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7937 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7950 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7953 oldStyleArgPtr=yyextra->current->args.
left(j);
7972 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7973 for (
Argument &a : yyextra->current->argList)
7982 a.
docs=brief+
"\n\n"+docs;
8014 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8017 yyextra->current->briefFile = yyextra->fileName;
8018 yyextra->current->briefLine = yyextra->yyLineNr;
8022 yyextra->current->docFile = yyextra->fileName;
8023 yyextra->current->docLine = yyextra->yyLineNr;
8031 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8032 if (yyextra->tempEntry==0)
8037 yyextra->previous = yyextra->current;
8038 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8042 yyextra->previous = yyextra->current;
8043 yyextra->current = yyextra->tempEntry;
8044 yyextra->tempEntry.reset();
8051 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8054 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8055 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8058 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8059 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8061 docEntry->inbodyFile = yyextra->fileName;
8062 docEntry->inbodyLine = lineNr;
8066 bool needsEntry=
FALSE;
8068 Markdown markdown(yyextra->fileName,lineNr);
8071 while (yyextra->commentScanner.parseCommentBlock(
8072 yyextra->thisParser,
8073 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8077 yyextra->docBlockInBody ?
FALSE : brief,
8078 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8079 yyextra->docBlockInBody,
8080 yyextra->protection,
8091 QCString docFile = yyextra->current->docFile;
8093 yyextra->current->docFile = docFile;
8094 yyextra->current->docLine = lineNr;
8102 if (yyextra->docBlockTerm)
8104 unput(yyextra->docBlockTerm);
8105 yyextra->docBlockTerm=0;
8112 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8123 QCString orgDoc = yyextra->current->doc;
8124 QCString orgBrief = yyextra->current->brief;
8125 int orgDocLine = yyextra->current->docLine;
8126 int orgBriefLine = yyextra->current->briefLine;
8128 yyextra->current->doc.
clear();
8129 yyextra->current->brief.clear();
8132 int lineNr = orgDocLine;
8134 Markdown markdown(yyextra->fileName,lineNr);
8137 while (yyextra->commentScanner.parseCommentBlock(
8138 yyextra->thisParser,
8139 yyextra->current.get(),
8146 yyextra->protection,
8155 if (needsEntry)
newEntry(yyscanner);
8161 a.
docs = yyextra->current->doc;
8164 yyextra->current->doc = orgDoc;
8165 yyextra->current->brief = orgBrief;
8166 yyextra->current->docLine = orgDocLine;
8167 yyextra->current->briefLine = orgBriefLine;
8178 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8179 for (
const auto &ce : rt->children())
8181 if (!ce->program.empty())
8185 yyextra->padCount=0;
8188 yyextra->programStr = ce->program.str();
8189 yyextra->inputString = yyextra->programStr.data();
8190 yyextra->inputPosition = 0;
8191 if (ce->section.isEnum() || ce->spec.isEnum())
8192 BEGIN( FindFields ) ;
8194 BEGIN( FindMembers ) ;
8195 yyextra->current_root = ce;
8196 yyextra->fileName = ce->fileName;
8198 yyextra->yyLineNr = ce->bodyLine;
8199 yyextra->yyColNr = ce->bodyColumn;
8200 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8202 yyextra->current = std::make_shared<Entry>();
8203 yyextra->isStatic =
FALSE;
8208 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8210 ce->groups = rt->groups;
8213 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8215 if ( ce->section.isClass() )
8217 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8219 yyextra->current->protection = yyextra->protection = Protection::Public ;
8221 else if (yyextra->insideJava)
8223 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8225 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8227 if (ce->lang==SrcLangExt::ObjC)
8229 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8233 yyextra->current->protection = yyextra->protection = Protection::Public ;
8238 yyextra->current->protection = yyextra->protection = Protection::Private ;
8241 else if (ce->section.isEnum() )
8243 yyextra->current->protection = yyextra->protection = ce->protection;
8245 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8247 if (ce->section.isNamespace() )
8249 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8251 yyextra->current->protection = yyextra->protection = ce->protection;
8252 yyextra->current->exported = yyextra->exported =
false;
8254 else if (ce->section.isNamespace() )
8256 yyextra->current->protection = yyextra->protection = Protection::Public ;
8257 yyextra->current->exported = yyextra->exported = ce->exported;
8261 yyextra->current->protection = yyextra->protection = Protection::Public ;
8262 yyextra->current->exported = yyextra->exported =
false;
8264 yyextra->mtype = MethodTypes::Method;
8265 yyextra->virt = Specifier::Normal;
8272 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8274 scannerYYlex(yyscanner);
8275 yyextra->lexInit=
TRUE;
8278 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8280 yyextra->programStr.clear();
8281 ce->program.str(std::string());
8297 const char *fileBuf,
8298 const std::shared_ptr<Entry> &rt,
8302 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8305 yyextra->inputString = fileBuf;
8306 yyextra->inputPosition = 0;
8307 yyextra->column = 0;
8308 scannerYYrestart(
nullptr,yyscanner);
8311 yyextra->protection = Protection::Public;
8312 yyextra->mtype = MethodTypes::Method;
8313 yyextra->isStatic =
FALSE;
8314 yyextra->exported =
false;
8315 yyextra->virt = Specifier::Normal;
8316 yyextra->current_root = rt;
8317 yyextra->yyLineNr = 1 ;
8318 yyextra->yyBegLineNr = 1;
8319 yyextra->yyBegColNr = 0;
8320 yyextra->anonCount = 0;
8321 yyextra->anonNSCount = 0;
8322 yyextra->fileName = fileName;
8323 yyextra->clangParser = clangParser;
8325 rt->lang = yyextra->language;
8326 msg(
"Parsing file {}...\n",yyextra->fileName);
8328 yyextra->current_root = rt;
8330 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8331 yyextra->current = std::make_shared<Entry>();
8336 yyextra->current->name = yyextra->fileName;
8337 yyextra->current->section = sec;
8338 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8340 yyextra->current->reset();
8342 if ( yyextra->insidePHP )
8344 BEGIN( FindMembersPHP );
8346 else if ( yyextra->insideJava )
8348 yyextra->current->name=
"java::lang";
8349 yyextra->current->fileName = yyextra->fileName;
8350 yyextra->current->section = EntryType::makeUsingDir();
8351 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8353 BEGIN( FindMembers );
8357 BEGIN( FindMembers );
8360 scannerYYlex(yyscanner);
8361 yyextra->lexInit=
TRUE;
8363 if (YY_START==Comment)
8365 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8369 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8371 yyextra->programStr.clear();
8372 rt->program.str(std::string());
8376 yyextra->anonNSCount++;
8379 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8382 parent->moveToSubEntryAndKeep(child);
8384 yyextra->outerScopeEntries.clear();
8393 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8396 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8399 if (!yyextra->current)
8404 const char *orgInputString;
8405 int orgInputPosition;
8406 YY_BUFFER_STATE orgState;
8409 orgState = YY_CURRENT_BUFFER;
8410 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8411 orgInputString = yyextra->inputString;
8412 orgInputPosition = yyextra->inputPosition;
8415 yyextra->inputString = text.
data();
8416 yyextra->inputPosition = 0;
8417 yyextra->column = 0;
8418 scannerYYrestart(
nullptr, yyscanner);
8420 scannerYYlex(yyscanner);
8421 yyextra->lexInit=
TRUE;
8423 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8424 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8426 yyextra->current->section = EntryType::makeVariableDoc();
8430 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8431 yy_switch_to_buffer(orgState, yyscanner);
8432 yyextra->inputString = orgInputString;
8433 yyextra->inputPosition = orgInputPosition;
8449 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8457 scannerYYlex_destroy(
p->yyscanner);
8461 const char *fileBuf,
8462 const std::shared_ptr<Entry> &root,
8466 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8467 yyextra->thisParser =
this;
8471 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8479 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8480 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8481 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8492#include "scanner.l.h"
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
std::unique_ptr< Private > p
~COutlineParser() override
bool needsPreprocessing(const QCString &extension) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
static bool isFlagSet(const DebugMask mask)
Protection protection
class protection
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)
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)
const char * qPrint(const char *s)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
EntryType guessSection(const QCString &name)