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}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1330 yyextra->current->spec.setThreadLocal(
true);
1333<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1334 yyextra->current->spec.setExplicit(
true);
1337<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1338 yyextra->current->spec.setLocal(
true);
1341<FindMembers>{B}*"@required"{BN}+ {
1342 yyextra->current->spec.setOptional(
false).setRequired(
true);
1345<FindMembers>{B}*"@optional"{BN}+ {
1346 yyextra->current->spec.setRequired(
false).setOptional(
true);
1354<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1355<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1356 yyextra->isTypedef=
FALSE;
1357 yyextra->current->section = EntryType::makeNamespace();
1358 yyextra->current->type =
"namespace" ;
1359 yyextra->current->fileName = yyextra->fileName;
1360 yyextra->current->startLine = yyextra->yyLineNr;
1361 yyextra->current->startColumn = yyextra->yyColNr;
1362 yyextra->current->bodyLine = yyextra->yyLineNr;
1363 yyextra->current->bodyColumn = yyextra->yyColNr;
1365 if (yyextra->insidePHP)
1367 BEGIN( PackageName );
1371 BEGIN( CompoundName );
1374<FindMembers>{B}*"module"{BN}+ {
1376 if (yyextra->insideIDL || yyextra->insideSlice)
1378 yyextra->isTypedef=
FALSE;
1379 yyextra->current->section = EntryType::makeNamespace();
1380 yyextra->current->type =
"module" ;
1381 yyextra->current->fileName = yyextra->fileName;
1382 yyextra->current->startLine = yyextra->yyLineNr;
1383 yyextra->current->startColumn = yyextra->yyColNr;
1384 yyextra->current->bodyLine = yyextra->yyLineNr;
1385 yyextra->current->bodyColumn = yyextra->yyColNr;
1386 BEGIN( CompoundName );
1388 else if (yyextra->insideD)
1399<FindMembers>{B}*"library"{BN}+ {
1401 if (yyextra->insideIDL)
1403 yyextra->isTypedef=
FALSE;
1404 yyextra->current->section = EntryType::makeNamespace();
1405 yyextra->current->type =
"library" ;
1406 yyextra->current->fileName = yyextra->fileName;
1407 yyextra->current->startLine = yyextra->yyLineNr;
1408 yyextra->current->startColumn = yyextra->yyColNr;
1409 yyextra->current->bodyLine = yyextra->yyLineNr;
1410 yyextra->current->bodyColumn = yyextra->yyColNr;
1411 BEGIN( CompoundName );
1419<FindMembers>{B}*"constants"{BN}+ {
1421 if (yyextra->insideIDL)
1423 yyextra->isTypedef=
FALSE;
1424 yyextra->current->section = EntryType::makeNamespace();
1425 yyextra->current->type =
"constants";
1426 yyextra->current->fileName = yyextra->fileName;
1427 yyextra->current->startLine = yyextra->yyLineNr;
1428 yyextra->current->startColumn = yyextra->yyColNr;
1429 yyextra->current->bodyLine = yyextra->yyLineNr;
1430 yyextra->current->bodyColumn = yyextra->yyColNr;
1431 BEGIN( CompoundName );
1439<FindMembers>{BN}*("service"){BN}+ {
1441 if (yyextra->insideIDL)
1443 yyextra->isTypedef=
FALSE;
1444 yyextra->current->section = EntryType::makeClass();
1448 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1450 yyextra->current->type +=
" service " ;
1451 yyextra->current->fileName = yyextra->fileName;
1452 yyextra->current->startLine = yyextra->yyLineNr;
1453 yyextra->current->bodyLine = yyextra->yyLineNr;
1454 yyextra->current->bodyColumn = yyextra->yyColNr;
1455 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1463<FindMembers>{BN}*("singleton"){BN}+ {
1465 if (yyextra->insideIDL)
1467 yyextra->isTypedef=
FALSE;
1468 yyextra->current->section = EntryType::makeClass();
1470 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1471 setPublished(spec.isPublished());
1473 yyextra->current->type +=
" singleton " ;
1474 yyextra->current->fileName = yyextra->fileName;
1475 yyextra->current->startLine = yyextra->yyLineNr;
1476 yyextra->current->bodyLine = yyextra->yyLineNr;
1477 yyextra->current->bodyColumn = yyextra->yyColNr;
1478 BEGIN( CompoundName );
1486<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1488 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1490 yyextra->isTypedef=
FALSE;
1491 yyextra->current->section = EntryType::makeClass();
1493 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1495 setOptional(spec.isOptional()).
1496 setPublished(spec.isPublished()).
1497 setLocal(spec.isLocal());
1499 yyextra->current->type +=
" interface" ;
1500 yyextra->current->fileName = yyextra->fileName;
1501 yyextra->current->startLine = yyextra->yyLineNr;
1502 yyextra->current->startColumn = yyextra->yyColNr;
1503 yyextra->current->bodyLine = yyextra->yyLineNr;
1504 yyextra->current->bodyColumn = yyextra->yyColNr;
1506 BEGIN( CompoundName );
1514<FindMembers>{B}*"@implementation"{BN}+ {
1516 yyextra->isTypedef=
FALSE;
1517 yyextra->current->section = EntryType::makeObjcImpl();
1518 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1519 yyextra->insideObjC =
TRUE;
1520 yyextra->current->protection = yyextra->protection = Protection::Public ;
1522 yyextra->current->type +=
" implementation" ;
1523 yyextra->current->fileName = yyextra->fileName;
1524 yyextra->current->startLine = yyextra->yyLineNr;
1525 yyextra->current->bodyLine = yyextra->yyLineNr;
1526 yyextra->current->bodyColumn = yyextra->yyColNr;
1527 BEGIN( CompoundName );
1529<FindMembers>{B}*"@interface"{BN}+ {
1531 yyextra->isTypedef=
FALSE;
1532 yyextra->current->section = EntryType::makeClass();
1533 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1534 if (!yyextra->insideJava)
1536 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1537 yyextra->insideObjC =
TRUE;
1539 yyextra->current->protection = yyextra->protection = Protection::Public ;
1541 yyextra->current->type +=
" interface" ;
1542 yyextra->current->fileName = yyextra->fileName;
1543 yyextra->current->startLine = yyextra->yyLineNr;
1544 yyextra->current->startColumn = yyextra->yyColNr;
1545 yyextra->current->bodyLine = yyextra->yyLineNr;
1546 yyextra->current->bodyColumn = yyextra->yyColNr;
1547 BEGIN( CompoundName );
1549<FindMembers>{B}*"@protocol"{BN}+ {
1551 yyextra->isTypedef=
FALSE;
1552 yyextra->current->section = EntryType::makeClass();
1554 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1555 yyextra->insideObjC =
TRUE;
1556 yyextra->current->protection = yyextra->protection = Protection::Public ;
1558 yyextra->current->type +=
" protocol" ;
1559 yyextra->current->fileName = yyextra->fileName;
1560 yyextra->current->startLine = yyextra->yyLineNr;
1561 yyextra->current->startColumn = yyextra->yyColNr;
1562 yyextra->current->bodyLine = yyextra->yyLineNr;
1563 yyextra->current->bodyColumn = yyextra->yyColNr;
1564 BEGIN( CompoundName );
1566<FindMembers>{B}*"exception"{BN}+ {
1567 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1568 yyextra->isTypedef=
FALSE;
1569 yyextra->current->section = EntryType::makeClass();
1572 yyextra->current->spec =
TypeSpecifier().setException(
true).
1573 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1575 yyextra->current->type +=
" exception" ;
1576 yyextra->current->fileName = yyextra->fileName;
1577 yyextra->current->startLine = yyextra->yyLineNr;
1578 yyextra->current->startColumn = yyextra->yyColNr;
1579 yyextra->current->bodyLine = yyextra->yyLineNr;
1580 yyextra->current->bodyColumn = yyextra->yyColNr;
1582 BEGIN( CompoundName );
1584<FindMembers>"@class" |
1585<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1586<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1588 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1589 bool isConst=decl.
find(
"const")!=-1;
1590 bool isVolatile=decl.
find(
"volatile")!=-1;
1591 yyextra->current->section = EntryType::makeClass();
1593 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1596 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1598 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1600 yyextra->current->spec.setLocal(
true);
1604 yyextra->current->type +=
" const";
1606 else if (isVolatile)
1608 yyextra->current->type +=
" volatile";
1610 yyextra->current->type +=
" class" ;
1611 yyextra->current->fileName = yyextra->fileName;
1612 yyextra->current->startLine = yyextra->yyLineNr;
1613 yyextra->current->startColumn = yyextra->yyColNr;
1614 yyextra->current->bodyLine = yyextra->yyLineNr;
1615 yyextra->current->bodyColumn = yyextra->yyColNr;
1618 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1619 yyextra->insideObjC =
TRUE;
1622 if (yytext[yyleng-1]==
'{') unput(
'{');
1623 BEGIN( CompoundName ) ;
1625<FindMembers>{B}*"value class{" |
1626<FindMembers>{B}*"value class"{BN}+ {
1627 yyextra->isTypedef=
FALSE;
1628 yyextra->current->section = EntryType::makeClass();
1631 yyextra->current->type +=
" value class" ;
1632 yyextra->current->fileName = yyextra->fileName;
1633 yyextra->current->startLine = yyextra->yyLineNr;
1634 yyextra->current->startColumn = yyextra->yyColNr;
1635 yyextra->current->bodyLine = yyextra->yyLineNr;
1636 yyextra->current->bodyColumn = yyextra->yyColNr;
1638 if (yytext[yyleng-1]==
'{') unput(
'{');
1639 BEGIN( CompoundName ) ;
1641<FindMembers>{B}*"ref class{" |
1642<FindMembers>{B}*"ref class"{BN}+ {
1643 yyextra->isTypedef=
FALSE;
1644 yyextra->current->section = EntryType::makeClass();
1647 yyextra->current->type +=
" ref class" ;
1648 yyextra->current->fileName = yyextra->fileName;
1649 yyextra->current->startLine = yyextra->yyLineNr;
1650 yyextra->current->startColumn = yyextra->yyColNr;
1651 yyextra->current->bodyLine = yyextra->yyLineNr;
1652 yyextra->current->bodyColumn = yyextra->yyColNr;
1654 if (yytext[yyleng-1]==
'{') unput(
'{');
1655 BEGIN( CompoundName ) ;
1657<FindMembers>{B}*"interface class{" |
1658<FindMembers>{B}*"interface class"{BN}+ {
1659 yyextra->isTypedef=
FALSE;
1660 yyextra->current->section = EntryType::makeClass();
1661 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1663 yyextra->current->type +=
" interface class" ;
1664 yyextra->current->fileName = yyextra->fileName;
1665 yyextra->current->startLine = yyextra->yyLineNr;
1666 yyextra->current->startColumn = yyextra->yyColNr;
1667 yyextra->current->bodyLine = yyextra->yyLineNr;
1668 yyextra->current->bodyColumn = yyextra->yyColNr;
1670 if (yytext[yyleng-1]==
'{') unput(
'{');
1671 BEGIN( CompoundName ) ;
1673<FindMembers>{B}*"coclass"{BN}+ {
1674 if (yyextra->insideIDL)
1676 yyextra->isTypedef=
FALSE;
1677 yyextra->current->section = EntryType::makeClass();
1679 yyextra->current->type +=
" coclass" ;
1680 yyextra->current->fileName = yyextra->fileName;
1681 yyextra->current->startLine = yyextra->yyLineNr;
1682 yyextra->current->startColumn = yyextra->yyColNr;
1683 yyextra->current->bodyLine = yyextra->yyLineNr;
1684 yyextra->current->bodyColumn = yyextra->yyColNr;
1686 BEGIN( CompoundName ) ;
1691 yyextra->current->name = yytext;
1692 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1696<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1697<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1698 if (yyextra->insideJava) REJECT;
1700 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1701 bool isConst=decl.
find(
"const")!=-1;
1702 bool isVolatile=decl.
find(
"volatile")!=-1;
1703 yyextra->current->section = EntryType::makeClass() ;
1707 setPublished(spec.isPublished()).
1708 setInline(spec.isInline()).
1709 setLocal(spec.isLocal());
1715 yyextra->current->type +=
" const";
1717 else if (isVolatile)
1719 yyextra->current->type +=
" volatile";
1721 yyextra->current->type +=
" struct" ;
1722 yyextra->current->fileName = yyextra->fileName;
1723 yyextra->current->startLine = yyextra->yyLineNr;
1724 yyextra->current->startColumn = yyextra->yyColNr;
1725 yyextra->current->bodyLine = yyextra->yyLineNr;
1726 yyextra->current->bodyColumn = yyextra->yyColNr;
1728 if (yytext[yyleng-1]==
'{') unput(
'{');
1729 BEGIN( CompoundName ) ;
1731<FindMembers>{B}*"value struct{" |
1732<FindMembers>{B}*"value struct"{BN}+ {
1733 yyextra->isTypedef=
FALSE;
1734 yyextra->current->section = EntryType::makeClass();
1735 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1737 yyextra->current->type +=
" value struct" ;
1738 yyextra->current->fileName = yyextra->fileName;
1739 yyextra->current->startLine = yyextra->yyLineNr;
1740 yyextra->current->startColumn = yyextra->yyColNr;
1741 yyextra->current->bodyLine = yyextra->yyLineNr;
1742 yyextra->current->bodyColumn = yyextra->yyColNr;
1744 if (yytext[yyleng-1]==
'{') unput(
'{');
1745 BEGIN( CompoundName ) ;
1747<FindMembers>{B}*"ref struct{" |
1748<FindMembers>{B}*"ref struct"{BN}+ {
1749 yyextra->isTypedef=
FALSE;
1750 yyextra->current->section = EntryType::makeClass();
1751 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1753 yyextra->current->type +=
" ref struct" ;
1754 yyextra->current->fileName = yyextra->fileName;
1755 yyextra->current->startLine = yyextra->yyLineNr;
1756 yyextra->current->startColumn = yyextra->yyColNr;
1757 yyextra->current->bodyLine = yyextra->yyLineNr;
1758 yyextra->current->bodyColumn = yyextra->yyColNr;
1760 if (yytext[yyleng-1]==
'{') unput(
'{');
1761 BEGIN( CompoundName ) ;
1763<FindMembers>{B}*"interface struct{" |
1764<FindMembers>{B}*"interface struct"{BN}+ {
1765 yyextra->isTypedef=
FALSE;
1766 yyextra->current->section = EntryType::makeClass();
1767 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1769 yyextra->current->type +=
" interface struct";
1770 yyextra->current->fileName = yyextra->fileName;
1771 yyextra->current->startLine = yyextra->yyLineNr;
1772 yyextra->current->startColumn = yyextra->yyColNr;
1773 yyextra->current->bodyLine = yyextra->yyLineNr;
1774 yyextra->current->bodyColumn = yyextra->yyColNr;
1776 if (yytext[yyleng-1]==
'{') unput(
'{');
1777 BEGIN( CompoundName ) ;
1779<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1780<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1781 if (yyextra->insideJava) REJECT;
1783 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1784 bool isConst=decl.
find(
"const")!=-1;
1785 bool isVolatile=decl.
find(
"volatile")!=-1;
1786 yyextra->current->section = EntryType::makeClass();
1793 yyextra->current->type +=
" const";
1795 else if (isVolatile)
1797 yyextra->current->type +=
" volatile";
1799 yyextra->current->type +=
" union" ;
1800 yyextra->current->fileName = yyextra->fileName;
1801 yyextra->current->startLine = yyextra->yyLineNr;
1802 yyextra->current->startColumn = yyextra->yyColNr;
1803 yyextra->current->bodyLine = yyextra->yyLineNr;
1804 yyextra->current->bodyColumn = yyextra->yyColNr;
1806 if (yytext[yyleng-1]==
'{') unput(
'{');
1807 BEGIN( CompoundName ) ;
1809<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1810<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1812 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1813 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1814 bool isEnumSytruct = text.
find(
"struct")!=-1;
1815 if (yyextra->insideJava)
1817 yyextra->current->section = EntryType::makeClass();
1823 yyextra->current->section = EntryType::makeEnum() ;
1826 yyextra->current->type +=
" enum";
1829 yyextra->current->spec.setStrong(
true);
1833 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1835 yyextra->current->fileName = yyextra->fileName;
1836 yyextra->current->startLine = yyextra->yyLineNr;
1837 yyextra->current->startColumn = yyextra->yyColNr;
1838 yyextra->current->bodyLine = yyextra->yyLineNr;
1839 yyextra->current->bodyColumn = yyextra->yyColNr;
1841 if (yytext[yyleng-1]==
'{') unput(
'{');
1842 BEGIN( CompoundName ) ;
1844<FindMembers>{B}*"concept"{BN}+ {
1845 if (yyextra->insideJava) REJECT;
1846 yyextra->isTypedef=
FALSE;
1847 yyextra->current->section = EntryType::makeConcept();
1849 yyextra->current->type +=
" concept";
1850 yyextra->current->fileName = yyextra->fileName;
1851 yyextra->current->startLine = yyextra->yyLineNr;
1852 yyextra->current->startColumn = yyextra->yyColNr;
1853 yyextra->current->bodyLine = yyextra->yyLineNr;
1854 yyextra->current->bodyColumn = yyextra->yyColNr;
1856 BEGIN( ConceptName ) ;
1858<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1860 yyextra->current->name +=
"()";
1861 BEGIN( FindMembers );
1863<Operator>"("{BN}*")"{BNopt}/"(" {
1865 yyextra->current->name += yytext ;
1866 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1867 BEGIN( FindMembers ) ;
1871 BEGIN( FindMembers ) ;
1875 yyextra->current->name += *yytext ;
1877<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1878 if (!yyextra->current->type.startsWith(
"friend "))
1880 yyextra->current->name += yytext;
1884 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1886 BEGIN( FindMembers ) ;
1888<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1891 yyextra->current->tArgLists.
push_back(al);
1892 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1893 yyextra->templateStr=
"<";
1894 yyextra->fullArgString = yyextra->templateStr;
1895 yyextra->copyArgString = &yyextra->templateStr;
1896 yyextra->currentArgumentContext = FindMembers;
1897 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1899<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1900 if (yyextra->insideJava) REJECT;
1902 BEGIN( NSAliasName );
1905 yyextra->aliasName = yytext;
1906 BEGIN( NSAliasArg );
1908<NSAliasArg>({ID}"::")*{ID} {
1910 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1921 BEGIN( FindMembers );
1923<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1925 yyextra->aliasName=yytext;
1928<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1932 yyextra->current->fileName = yyextra->fileName;
1934 yyextra->current->section = EntryType::makeUsingDecl();
1935 yyextra->current_root->copyToSubEntry(yyextra->current);
1937 yyextra->current->section = EntryType::makeUsingDir();
1938 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1940 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1942<PHPUseAs>{BN}+"as"{BN}+ {
1945<PHPUseAs>{PHPUSEKW} {
1949 if (!yyextra->aliasName.isEmpty())
1954 yyextra->aliasName.clear();
const std::string & str() const
1956<PHPUse,PHPUseAs>[,;] {
1966<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1970 yyextra->current->fileName = yyextra->fileName;
1977 yyextra->current->section = EntryType::makeUsingDir();
1978 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)
1982<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1986 yyextra->current->fileName = yyextra->fileName;
1998 if (yyextra->insideD)
2000 yyextra->current->section = EntryType::makeUsingDir();
2005 yyextra->current->section = EntryType::makeUsingDecl();
2007 yyextra->previous = yyextra->current;
2008 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2012<IDLImport>"\""[^"]*"\"" {
2013 QCString fileName(&yytext[1],yyleng-2);
2029<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2030 if (yyextra->insideJava) REJECT;
2031 yyextra->current->startLine=yyextra->yyLineNr;
2032 yyextra->current->startColumn = yyextra->yyColNr;
2036<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2037<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2039 yyextra->current->name=yytext;
2040 yyextra->current->fileName = yyextra->fileName;
2041 yyextra->current->section = EntryType::makeUsingDecl();
2042 yyextra->current->startLine = yyextra->yyLineNr;
2043 yyextra->previous = yyextra->current;
2044 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2046 if (yyextra->insideCS)
2051 yyextra->current->name=yytext;
2052 yyextra->current->fileName = yyextra->fileName;
2053 yyextra->current->startLine = yyextra->yyLineNr;
2054 yyextra->current->startColumn = yyextra->yyColNr;
2055 yyextra->current->section = EntryType::makeUsingDir();
2056 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2061<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2063 yyextra->current->fileName = yyextra->fileName;
2064 yyextra->current->section = EntryType::makeUsingDecl();
2065 yyextra->current->startLine = yyextra->yyLineNr;
2066 yyextra->current->bodyLine = yyextra->yyLineNr;
2067 yyextra->current->bodyColumn = yyextra->yyColNr;
2068 yyextra->lastInitializerContext = UsingAlias;
2069 yyextra->sharpCount=0;
2070 yyextra->initBracketCount=0;
2072 BEGIN(ReadInitializer);
2075 yyextra->current->section = EntryType::makeVariable();
2077 init.stripPrefix(
"class ");
2078 init.stripPrefix(
"struct ");
2080 yyextra->current->type =
"typedef "+
init;
2081 yyextra->current->args.clear();
2082 yyextra->current->spec.setAlias(
true);
2083 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2088 yyextra->current->initializer << yytext;
2091 yyextra->current->initializer << yytext;
2095 yyextra->current->fileName = yyextra->fileName;
2096 yyextra->current->section = EntryType::makeUsingDir();
2097 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2101<Using>";" { BEGIN(FindMembers); }
2102<FindMembers>{SCOPENAME}{BN}*"<>" {
2107<FindMembers>{SCOPENAME}{BNopt}/"<" {
2109 if (yyextra->insideCpp && name==
"import") REJECT;
2110 yyextra->roundCount=0;
2111 yyextra->sharpCount=0;
2114 yyextra->current->name=name;
2120 BEGIN( EndTemplate );
2122<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2123 yyextra->sharpCount=0;
2124 yyextra->roundCount=0;
2132 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...
2135 if (!yyextra->insidePHP)
2141 yyextra->lastHereDocContext = YY_START;
2145<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2146 yyextra->current->name+=yytext;
2150 if (yyextra->roundCount==0)
2153 yyextra->sharpCount++;
2155 yyextra->current->name+=yytext;
2157<ClassTemplSpec,EndTemplate>">=" {
2158 yyextra->current->name+=yytext;
2160<ClassTemplSpec,EndTemplate>(">>") {
2161 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2169 yyextra->current->name+=yytext;
2174 yyextra->current->name+=
'>';
2176 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2178 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2183<EndTemplate>">"{BN}*"(" {
2185 yyextra->current->name+=
'>';
2187 if (yyextra->roundCount==0)
2189 --yyextra->sharpCount;
2191 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2193 yyextra->current->bodyLine = yyextra->yyLineNr;
2194 yyextra->current->bodyColumn = yyextra->yyColNr;
2195 yyextra->current->args =
"(";
2196 yyextra->currentArgumentContext = FuncQual;
2197 yyextra->fullArgString = yyextra->current->args;
2198 yyextra->copyArgString = &yyextra->current->args;
2200 BEGIN( ReadFuncArgType ) ;
2204 yyextra->current->name+=
"(";
2205 yyextra->roundCount++;
2208<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2210 yyextra->current->name+=
'>';
2211 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2216<EndTemplate>">"{BNopt}/"::" {
2218 yyextra->current->name+=
'>';
2220 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2222 BEGIN(FindMemberName);
2225<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2226 yyextra->roundCount++;
2228<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2229 if (yyextra->roundCount>0) yyextra->roundCount--;
2232 yyextra->current->name+=*yytext;
2235<FindMembers>"define"{BN}*"("{BN}*["'] {
2236 if (yyextra->insidePHP)
2238 yyextra->current->bodyLine = yyextra->yyLineNr;
2239 yyextra->current->bodyColumn = yyextra->yyColNr;
2246 yyextra->delimiter = yytext;
2247 *yyextra->pCopyHereDocGString << yytext;
2248 BEGIN(CopyHereDocEnd);
2250<CopyHereDoc>"\""{ID}/"\"" {
2251 yyextra->delimiter = &yytext[1];
2252 *yyextra->pCopyHereDocGString << yytext;
2253 BEGIN(CopyHereDocEnd);
2255<CopyHereDoc>"'"{ID}/"'" {
2256 yyextra->delimiter = &yytext[1];
2257 *yyextra->pCopyHereDocGString << yytext;
2258 BEGIN(CopyHereDocEnd);
2261 yyextra->delimiter = yytext;
2264<HereDoc>"\""{ID}/"\"" {
2265 yyextra->delimiter = &yytext[1];
2268<HereDoc>"'"{ID}/"'" {
2269 yyextra->delimiter = &yytext[1];
2273 if (yyextra->delimiter==yytext)
2275 BEGIN(yyextra->lastHereDocContext);
2279<CopyHereDocEnd>^{Bopt}{ID} {
2280 *yyextra->pCopyHereDocGString << yytext;
2283 BEGIN(yyextra->lastHereDocContext);
2288 *yyextra->pCopyHereDocGString << yytext;
2290<CopyHereDocEnd>{ID} {
2291 *yyextra->pCopyHereDocGString << yytext;
2294 *yyextra->pCopyHereDocGString << yytext;
2296<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2298<FindMembers>"Q_PROPERTY" {
2299 yyextra->yyBegLineNr = yyextra->yyLineNr;
2300 yyextra->yyBegColNr = yyextra->yyColNr;
2301 yyextra->current->protection = Protection::Public ;
2302 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2303 yyextra->current->type.clear();
2313 yyextra->current->name+=yytext;
2316 yyextra->current->type+= yyextra->current->name;
2317 yyextra->current->type+= yytext;
2318 yyextra->current->name=
"";
2320<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2321 yyextra->current->type+= yyextra->current->name;
2322 yyextra->current->name=yytext;
2324<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2325 yyextra->current->spec.setReadable(
true);
2328<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2329 yyextra->current->spec.setWritable(
true);
2332<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2333<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2334<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2335<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2336<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2337<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2338<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2339<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2340<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2341<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2345 yyextra->current->read = yytext;
2349 yyextra->current->write = yytext;
2352<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2353 yyextra->current->name=yytext;
2357<FindMembers>"requires" {
2358 if (yyextra->insideJava) REJECT;
2359 yyextra->current->req.clear();
2360 yyextra->requiresContext = YY_START;
2361 BEGIN(RequiresClause);
2363<RequiresClause>"requires"{BN}*/"{" {
2364 if (yyextra->insideJava) REJECT;
2366 yyextra->current->req+=yytext;
2367 BEGIN( RequiresExpression ) ;
2369<RequiresClause>"requires"{BN}*"(" {
2370 if (yyextra->insideJava) REJECT;
2372 yyextra->current->req+=yytext;
2373 yyextra->lastRoundContext=RequiresExpression;
2374 yyextra->pCopyRoundString=&yyextra->current->req;
2375 yyextra->roundCount=0;
2376 BEGIN( CopyRound ) ;
2378<RequiresExpression>"{" {
2379 yyextra->current->req+=yytext;
2380 yyextra->lastCurlyContext=RequiresClause;
2381 yyextra->pCopyCurlyString=&yyextra->current->req;
2382 yyextra->curlyCount=0;
2383 BEGIN( CopyCurly ) ;
2385<RequiresExpression>\n {
2386 yyextra->current->req+=
' ';
2389<RequiresExpression>. {
2390 yyextra->current->req+=yytext;
2392<RequiresClause>"(" {
2393 yyextra->current->req+=yytext;
2394 yyextra->lastRoundContext=RequiresClause;
2395 yyextra->pCopyRoundString=&yyextra->current->req;
2396 yyextra->roundCount=0;
2397 BEGIN( CopyRound ) ;
2399<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2403 yyextra->current->req+=yytext;
2404 yyextra->lastRoundContext=RequiresClause;
2405 yyextra->pCopyRoundString=&yyextra->current->req;
2406 yyextra->roundCount=0;
2414<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2418 yyextra->current->req+=yytext;
2419 yyextra->lastSharpContext=RequiresClause;
2420 yyextra->pCopySharpString=&yyextra->current->req;
2421 yyextra->sharpCount=0;
2429<RequiresClause>{NOTopt}{SCOPENAME} {
2433 yyextra->current->req=yytext;
2434 BEGIN(yyextra->requiresContext);
2441<RequiresClause>{NOTopt}"::"{ID} {
2443 yyextra->current->req+=yytext;
2445<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2447 yyextra->current->req+=yytext;
2449<RequiresClause>{BN}+ {
2450 yyextra->current->req+=
' ';
2455 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2456 BEGIN(yyextra->requiresContext);
2458<FindMembers,FindMemberName>{SCOPENAME} {
2460 yyextra->yyBegColNr=yyextra->yyColNr;
2461 yyextra->yyBegLineNr=yyextra->yyLineNr;
2463 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2467 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2469 if (yyextra->insideIDL)
2474 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2478 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2483 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2485 BEGIN(IDLUnionCase);
2487 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2489 yyextra->insideTryBlock=
FALSE;
2490 BEGIN(TryFunctionBlock);
2492 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2494 yyextra->lastAlignAsContext = YY_START;
2497 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2499 yyextra->current->type=
"var";
2501 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2503 yyextra->current->type=
"function";
2505 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2509 yyextra->current->name=
"this";
2512 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2515 BEGIN(StaticAssert);
2517 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2521 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2522 yyextra->current->type+=yytext;
2525 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2527 if (yyextra->current->type.isEmpty())
2529 yyextra->current->type =
"optional";
2533 yyextra->current->type +=
" optional";
2535 yyextra->lastModifierContext = YY_START;
2536 BEGIN(SliceOptional);
2540 if (YY_START==FindMembers)
2544 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2545 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2547 yyextra->current->protection = Protection::Public;
2549 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2551 yyextra->current->protection = Protection::Protected;
2553 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2555 yyextra->current->protection = Protection::Package;
2557 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2559 yyextra->current->protection = Protection::Private;
2561 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2563 if (YY_START==FindMembers)
2564 yyextra->current->name = yytext;
2566 yyextra->current->name += yytext;
2567 yyextra->current->isStatic =
TRUE;
2571 if (YY_START==FindMembers)
2572 yyextra->current->name = yytext;
2574 yyextra->current->name += yytext;
2575 if (yyextra->current->name.startsWith(
"static "))
2577 yyextra->current->isStatic =
TRUE;
2578 yyextra->current->name= yyextra->current->name.mid(7);
2580 else if (yyextra->current->name.startsWith(
"inline "))
2582 if (yyextra->current->type.isEmpty())
2584 yyextra->current->type=
"inline";
2588 yyextra->current->type+=
"inline ";
2590 yyextra->current->name= yyextra->current->name.mid(7);
2592 else if (yyextra->current->name.startsWith(
"constexpr "))
2594 if (yyextra->current->type.isEmpty())
2596 yyextra->current->type=
"constexpr";
2600 yyextra->current->type+=
"constexpr ";
2602 yyextra->current->name=yyextra->current->name.mid(10);
2604 else if (yyextra->current->name.startsWith(
"consteval "))
2606 if (yyextra->current->type.isEmpty())
2608 yyextra->current->type=
"consteval";
2612 yyextra->current->type+=
"consteval ";
2614 yyextra->current->name=yyextra->current->name.mid(10);
2616 else if (yyextra->current->name.startsWith(
"constinit "))
2618 if (yyextra->current->type.isEmpty())
2620 yyextra->current->type=
"constinit";
2624 yyextra->current->type+=
"constinit ";
2626 yyextra->current->name=yyextra->current->name.mid(10);
2628 else if (yyextra->current->name.startsWith(
"const "))
2630 if (yyextra->current->type.isEmpty())
2632 yyextra->current->type=
"const";
2636 yyextra->current->type+=
"const ";
2638 yyextra->current->name=yyextra->current->name.mid(6);
2640 else if (yyextra->current->name.startsWith(
"volatile "))
2642 if (yyextra->current->type.isEmpty())
2644 yyextra->current->type=
"volatile";
2648 yyextra->current->type+=
"volatile ";
2650 yyextra->current->name=yyextra->current->name.mid(9);
2652 else if (yyextra->current->name.startsWith(
"typedef "))
2654 if (yyextra->current->type.isEmpty())
2656 yyextra->current->type=
"typedef";
2660 yyextra->current->type+=
"typedef ";
2662 yyextra->current->name=yyextra->current->name.mid(8);
2672 yyextra->externLinkage=
FALSE;
2676 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2679 yyextra->lastSkipRoundContext = FindMembers;
2680 yyextra->roundCount=0;
2683<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2689 yyextra->current->type+=yytext;
2690 yyextra->lastRoundContext=FindMembers;
2691 yyextra->pCopyRoundString=&yyextra->current->type;
2692 yyextra->roundCount=0;
2695<DeclType>{BN}+ {
lineCount(yyscanner); }
2700<CSIndexer>"["[^\n\]]*"]" {
2704<FindMembers>[0-9]{ID} {
2707 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2709 yyextra->current->name+=
".";
2713 yyextra->current->name+=yytext;
2715<CppQuote>"("{B}*"\"" {
2716 yyextra->insideCppQuote=
TRUE;
2720<IDLUnionCase>":" { BEGIN(FindMembers); }
2721<IDLUnionCase>\n {
lineCount(yyscanner); }
2723<TryFunctionBlock>\n {
lineCount(yyscanner); }
2724<TryFunctionBlock>"{" {
2725 yyextra->curlyCount=0;
2726 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2730<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2732<TryFunctionBlockEnd>\n { unput(*yytext);
2733 BEGIN( FindMembers );
2735<TryFunctionBlockEnd>. { unput(*yytext);
2736 BEGIN( FindMembers );
2739 yyextra->insideCppQuote=
FALSE;
2742<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2744 yyextra->lastCPPContext = YY_START;
2747<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2748<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2749 if (yyextra->insidePHP)
2751 yyextra->current->bodyLine = yyextra->yyLineNr;
2752 yyextra->current->bodyColumn = yyextra->yyColNr;
2753 yyextra->current->fileName = yyextra->fileName;
2754 yyextra->current->startLine = yyextra->yyLineNr;
2755 yyextra->current->startColumn = yyextra->yyColNr;
2756 yyextra->current->type.clear();
2757 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2758 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2759 yyextra->current->section = EntryType::makeDefine();
2760 yyextra->lastDefineContext = YY_START;
2763<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2764 yyextra->yyLineNr = atoi(&yytext[1]);
2766 yyextra->lastPreLineCtrlContext = YY_START;
2767 if (YY_START==ReadBody ||
2768 YY_START==ReadNSBody ||
2769 YY_START==ReadBodyIntf)
2771 yyextra->current->program << yytext;
2773 BEGIN( PreLineCtrl );
2775<PreLineCtrl>"\""[^\n\"]*"\"" {
2777 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2778 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2779 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2781 yyextra->current->program << yytext;
2785 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2786 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2787 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2789 yyextra->current->program << yytext;
2793 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2794 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2795 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2797 yyextra->current->program << yytext;
2800 BEGIN( yyextra->lastPreLineCtrlContext );
2803<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2804<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2805 BEGIN( yyextra->lastCPPContext) ;
2807<SDefine>{ID}{B}*"(" {
2808 yyextra->current->name = yytext;
2809 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2810 yyextra->current->args =
"(";
2811 yyextra->current->bodyLine = yyextra->yyLineNr;
2812 yyextra->current->bodyColumn = yyextra->yyColNr;
2813 yyextra->currentArgumentContext = DefineEnd;
2814 yyextra->fullArgString=yyextra->current->args;
2815 yyextra->copyArgString=&yyextra->current->args;
2816 BEGIN( ReadFuncArgType ) ;
2831 yyextra->current->bodyLine = yyextra->yyLineNr;
2832 yyextra->current->bodyColumn = yyextra->yyColNr;
2833 yyextra->current->name = yytext;
2840 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2842 BEGIN(yyextra->lastDefineContext);
2846 yyextra->current->fileName = yyextra->fileName;
2847 yyextra->current->startLine = yyextra->yyLineNr;
2848 yyextra->current->startColumn = yyextra->yyColNr;
2849 yyextra->current->type.clear();
2850 yyextra->current->type =
"const";
2854 yyextra->current->initializer.str(
init.str());
2855 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2856 yyextra->current->section = EntryType::makeVariable();
2857 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2862<DefineEnd>\\[\r]?\n {
2864 yyextra->current->endBodyLine = yyextra->yyLineNr;
2867 if (yyextra->insideIDL && yyextra->insideCppQuote)
2873 yyextra->lastStringContext=DefineEnd;
2878<DefinePHP>{ID}["']{BN}*","{BN}* {
2879 yyextra->current->name = yytext;
2880 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2881 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2882 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2883 yyextra->current->bodyLine = yyextra->yyLineNr;
2884 yyextra->current->bodyColumn = yyextra->yyColNr;
2885 yyextra->lastRoundContext = DefinePHPEnd;
2886 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2887 yyextra->roundCount = 0;
2888 BEGIN( GCopyRound );
2892 if (yyextra->insideCli)
2895 yyextra->current->name = yytext ;
2903 yyextra->current->name += yytext ;
2906<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2907 if (yyextra->current->bodyLine==-1)
2909 yyextra->current->bodyLine=yyextra->yyLineNr;
2910 yyextra->current->bodyColumn = yyextra->yyColNr;
2912 yyextra->docBlockContext = YY_START;
2913 yyextra->docBlockInBody =
FALSE;
2914 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2919 yyextra->docBlock.
str(indent.
str());
2923 yyextra->docBlockTerm =
';';
2924 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2926 yyextra->current->bitfields =
":"+yyextra->current->args;
2927 yyextra->current->args.clear();
2928 yyextra->current->section = EntryType::makeVariable();
2930 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
2941<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2942 yyextra->docBlockContext = YY_START;
2943 yyextra->docBlockInBody =
FALSE;
2944 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2949 yyextra->docBlock.
str(indent.
str());
2952 yyextra->docBlockTerm =
',';
2953 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2955 yyextra->current->bitfields =
":"+yyextra->current->args;
2956 yyextra->current->args.clear();
2957 yyextra->current->section = EntryType::makeVariable();
2959 if (yytext[yyleng-3]==
'/')
2970<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2971 if (yyextra->current->bodyLine==-1)
2973 yyextra->current->bodyLine=yyextra->yyLineNr;
2974 yyextra->current->bodyColumn = yyextra->yyColNr;
2976 yyextra->docBlockContext = YY_START;
2977 yyextra->docBlockInBody =
FALSE;
2978 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2982 yyextra->docBlock.
str(indent.
str());
2985 yyextra->docBlockTerm = 0;
2986 if (yytext[yyleng-3]==
'/')
2998<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3000 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3003 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3008 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3014 if (yytext[2]==
'!' || yytext[2]==
'/')
3016 yyextra->docBlockContext = YY_START;
3017 yyextra->docBlockInBody =
FALSE;
3018 yyextra->docBlockAutoBrief =
FALSE;
3019 yyextra->docBlock.str(std::string());
3020 yyextra->docBlockTerm = 0;
3026 yyextra->lastCContext=YY_START;
3027 BEGIN(SkipCxxComment);
3032 if (yytext[2]==
'!' || yytext[2]==
'*')
3034 yyextra->docBlockContext = YY_START;
3035 yyextra->docBlockInBody =
FALSE;
3036 yyextra->docBlock.str(std::string());
3037 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3039 yyextra->docBlockTerm = 0;
3045 yyextra->lastCContext=YY_START;
3050<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3051 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3052 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3056 if (!yyextra->insideCS) REJECT;
3057 yyextra->current->bodyLine = yyextra->yyLineNr;
3058 yyextra->current->bodyColumn = yyextra->yyColNr;
3059 yyextra->current->initializer.str(yytext);
3060 yyextra->lastInitializerContext = YY_START;
3061 yyextra->sharpCount=0;
3062 yyextra->initBracketCount=0;
3063 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3064 yyextra->current->spec.setGettable(
true);
3065 BEGIN(ReadInitializerPtr);
3068 yyextra->current->bodyLine = yyextra->yyLineNr;
3069 yyextra->current->bodyColumn = yyextra->yyColNr;
3070 yyextra->current->initializer.str(yytext);
3071 yyextra->lastInitializerContext = YY_START;
3072 yyextra->sharpCount=0;
3073 yyextra->initBracketCount=0;
3074 BEGIN(ReadInitializer);
3076<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3078 yyextra->current->exception +=
" ";
3081<UNOIDLAttributeBlock>"}" {
3082 yyextra->current->exception +=
" }";
3086<ReadInitializer,ReadInitializerPtr>"(" {
3087 yyextra->lastRoundContext=YY_START;
3088 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3089 yyextra->roundCount=0;
3090 yyextra->current->initializer << *yytext;
3093<ReadInitializer,ReadInitializerPtr>"[" {
3094 if (!yyextra->insidePHP) REJECT;
3095 yyextra->lastSquareContext=YY_START;
3096 yyextra->pCopySquareGString=&yyextra->current->initializer;
3097 yyextra->squareCount=0;
3098 yyextra->current->initializer << *yytext;
3101<ReadInitializer,ReadInitializerPtr>"{" {
3102 yyextra->lastCurlyContext=YY_START;
3103 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3104 yyextra->curlyCount=0;
3105 yyextra->current->initializer << *yytext;
3108<ReadInitializer,ReadInitializerPtr>[;,] {
3110 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3112 yyextra->current->fileName = yyextra->fileName;
3113 yyextra->current->startLine = yyextra->yyLineNr;
3114 yyextra->current->startColumn = yyextra->yyColNr;
3115 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3116 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3117 yyextra->current->section = EntryType::makeVariable();
3118 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3122 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3125 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3126 BEGIN(yyextra->lastInitializerContext);
3128 else if (*yytext==
',' && yyextra->initBracketCount==0)
3131 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3132 BEGIN(yyextra->lastInitializerContext);
3136 yyextra->current->initializer << *yytext;
3139<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3140 if (!yyextra->insideCpp)
3146 yyextra->current->initializer << yytext;
3148 yyextra->lastRawStringContext = YY_START;
3149 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3154<RawGString>{RAWEND} {
3157 *yyextra->pCopyRawGString << yytext;
3158 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3165<RawGString>[^)\n]+ {
3166 *yyextra->pCopyRawGString << yytext;
3169 *yyextra->pCopyRawGString << yytext;
3172 *yyextra->pCopyRawGString << yytext;
3175<RawString>{RAWEND} {
3176 *yyextra->pCopyRawString+=yytext;
3177 yyextra->fullArgString+=yytext;
3180 BEGIN(yyextra->lastRawStringContext);
3184 *yyextra->pCopyRawString += yytext;
3185 yyextra->fullArgString+=yytext;
3188 *yyextra->pCopyRawString += yytext;
3189 yyextra->fullArgString+=yytext;
3192 *yyextra->pCopyRawString += yytext;
3193 yyextra->fullArgString+=yytext;
3196<ReadInitializer,ReadInitializerPtr>\" {
3197 if (yyextra->insideIDL && yyextra->insideCppQuote)
3203 yyextra->lastStringContext=YY_START;
3204 yyextra->current->initializer << yytext;
3205 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3206 yyextra->stopAtInvalidString=
false;
3210<ReadInitializer,ReadInitializerPtr>"->" {
3211 yyextra->current->initializer << yytext;
3213<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3214 yyextra->current->initializer << yytext;
3216<ReadInitializer,ReadInitializerPtr>(">>") {
3217 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3220 yyextra->initBracketCount-=2;
3221 yyextra->sharpCount-=2;
3223 yyextra->current->initializer << yytext;
3225<ReadInitializer,ReadInitializerPtr>(">=") {
3226 yyextra->current->initializer << yytext;
3228<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3229 yyextra->initBracketCount++;
3230 yyextra->sharpCount++;
3231 yyextra->current->initializer << *yytext;
3233<ReadInitializer,ReadInitializerPtr>[>\]})] {
3234 yyextra->initBracketCount--;
3235 yyextra->sharpCount--;
3238 yyextra->current->endBodyLine=yyextra->yyLineNr;
3240 yyextra->current->initializer << *yytext;
3242<ReadInitializer,ReadInitializerPtr>\' {
3243 if (yyextra->insidePHP)
3245 yyextra->current->initializer << yytext;
3246 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3247 yyextra->lastStringContext=YY_START;
3248 BEGIN(CopyPHPGString);
3252 yyextra->current->initializer << yytext;
3255<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3256 if (yyextra->insidePHP)
3262 yyextra->current->initializer << yytext;
3265<ReadInitializer,ReadInitializerPtr>\n {
3266 yyextra->current->initializer << *yytext;
3269<ReadInitializer,ReadInitializerPtr>"@\"" {
3271 yyextra->current->initializer << yytext;
3272 if (!yyextra->insideCS && !yyextra->insideObjC)
3279 yyextra->lastSkipVerbStringContext=YY_START;
3280 yyextra->pSkipVerbString=&yyextra->current->initializer;
3281 BEGIN(SkipVerbString);
3284<SkipVerbString>[^\n"\\]+ {
3285 *yyextra->pSkipVerbString << yytext;
3287<SkipVerbString>"\\\\" {
3288 if (yyextra->insideCS) REJECT
3289 *yyextra->pSkipVerbString << yytext;
3291<SkipVerbString>"\\\"" {
3292 if (yyextra->insideCS) REJECT
3293 *yyextra->pSkipVerbString << yytext;
3295<SkipVerbString>"\"\"" {
3296 *yyextra->pSkipVerbString << yytext;
3298<SkipVerbString>"\"" {
3299 *yyextra->pSkipVerbString << *yytext;
3300 BEGIN(yyextra->lastSkipVerbStringContext);
3303 *yyextra->pSkipVerbString << *yytext;
3307 *yyextra->pSkipVerbString << *yytext;
3309<ReadInitializer,ReadInitializerPtr>"?>" {
3310 if (yyextra->insidePHP)
3311 BEGIN( FindMembersPHP );
3313 yyextra->current->initializer << yytext;
3315<ReadInitializer,ReadInitializerPtr>. {
3316 yyextra->current->initializer << *yytext;
3320<CopyString,CopyPHPString>\\. {
3321 *yyextra->pCopyQuotedString+=yytext;
3324 *yyextra->pCopyQuotedString+=*yytext;
3325 BEGIN( yyextra->lastStringContext );
3328 *yyextra->pCopyQuotedString+=*yytext;
3329 BEGIN( yyextra->lastStringContext );
3331<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3332 *yyextra->pCopyQuotedString+=yytext;
3334<CopyString,CopyPHPString>\n {
3335 *yyextra->pCopyQuotedString+=*yytext;
3338<CopyString,CopyPHPString>. {
3339 *yyextra->pCopyQuotedString+=*yytext;
3343<CopyGString,CopyPHPGString>\\. {
3344 *yyextra->pCopyQuotedGString << yytext;
3347 *yyextra->pCopyQuotedGString << *yytext;
3348 BEGIN( yyextra->lastStringContext );
3351 *yyextra->pCopyQuotedGString << *yytext;
3352 BEGIN( yyextra->lastStringContext );
3354<CopyGString,CopyPHPGString>"<?php" {
3355 *yyextra->pCopyQuotedGString << yytext;
3356 BEGIN( yyextra->lastStringContext );
3358<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3359 *yyextra->pCopyQuotedGString << yytext;
3361<CopyGString,CopyPHPGString>\n {
3362 *yyextra->pCopyQuotedGString << *yytext;
3363 if (yyextra->stopAtInvalidString)
3365 BEGIN( yyextra->lastStringContext );
3372<CopyGString,CopyPHPGString>. {
3373 *yyextra->pCopyQuotedGString << *yytext;
3378 *yyextra->pCopyRoundString += *yytext;
3379 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3380 yyextra->lastStringContext=YY_START;
3384 *yyextra->pCopyRoundString += *yytext;
3385 yyextra->roundCount++;
3388 *yyextra->pCopyRoundString += *yytext;
3389 if (--yyextra->roundCount<0)
3390 BEGIN(yyextra->lastRoundContext);
3394 *yyextra->pCopyRoundString += *yytext;
3397 if (yyextra->insidePHP)
3399 yyextra->current->initializer << yytext;
3400 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3401 yyextra->lastStringContext=YY_START;
3402 BEGIN(CopyPHPString);
3406 *yyextra->pCopyRoundString += yytext;
3409<CopyRound>{CHARLIT} {
3410 if (yyextra->insidePHP)
3416 *yyextra->pCopyRoundString+=yytext;
3419<CopyRound>[^"'()\n,]+ {
3420 *yyextra->pCopyRoundString+=yytext;
3423 *yyextra->pCopyRoundString+=*yytext;
3428 *yyextra->pCopySharpString += *yytext;
3429 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3430 yyextra->lastStringContext=YY_START;
3434 *yyextra->pCopySharpString += *yytext;
3435 yyextra->sharpCount++;
3438 *yyextra->pCopySharpString += *yytext;
3439 if (--yyextra->sharpCount<0)
3441 BEGIN(yyextra->lastSharpContext);
3446 *yyextra->pCopySharpString += *yytext;
3449 if (yyextra->insidePHP)
3451 yyextra->current->initializer << yytext;
3452 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3453 yyextra->lastStringContext=YY_START;
3454 BEGIN(CopyPHPString);
3458 *yyextra->pCopySharpString += yytext;
3461<CopySharp>{CHARLIT} {
3462 if (yyextra->insidePHP)
3468 *yyextra->pCopySharpString+=yytext;
3471<CopySharp>[^"'<>\n,]+ {
3472 *yyextra->pCopySharpString+=yytext;
3475 *yyextra->pCopySharpString+=*yytext;
3481 *yyextra->pCopyRoundGString << *yytext;
3482 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3483 yyextra->lastStringContext=YY_START;
3487 *yyextra->pCopyRoundGString << *yytext;
3488 yyextra->roundCount++;
3491 *yyextra->pCopyRoundGString << *yytext;
3492 if (--yyextra->roundCount<0)
3493 BEGIN(yyextra->lastRoundContext);
3497 *yyextra->pCopyRoundGString << *yytext;
3500 if (yyextra->insidePHP)
3502 yyextra->current->initializer << yytext;
3503 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3504 yyextra->lastStringContext=YY_START;
3505 BEGIN(CopyPHPGString);
3509 *yyextra->pCopyRoundGString << yytext;
3512<GCopyRound>{CHARLIT} {
3513 if (yyextra->insidePHP)
3519 *yyextra->pCopyRoundGString << yytext;
3523 if (!yyextra->insideCS) REJECT;
3524 *yyextra->pCopyRoundGString << yytext;
3525 yyextra->lastSkipVerbStringContext=YY_START;
3526 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3527 BEGIN(SkipVerbString);
3529<GCopyRound>[^"'()\n\/,R]+ {
3530 *yyextra->pCopyRoundGString << yytext;
3532<GCopyRound>{RAWBEGIN} {
3533 *yyextra->pCopyRoundGString << yytext;
3535 yyextra->lastRawStringContext = YY_START;
3536 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3540 *yyextra->pCopyRoundGString << *yytext;
3545 *yyextra->pCopySquareGString << *yytext;
3546 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3547 yyextra->lastStringContext=YY_START;
3551 *yyextra->pCopySquareGString << *yytext;
3552 if (yyextra->insidePHP)
3554 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3555 yyextra->lastStringContext=YY_START;
3556 BEGIN(CopyPHPGString);
3560 *yyextra->pCopySquareGString << *yytext;
3561 yyextra->squareCount++;
3564 *yyextra->pCopySquareGString << *yytext;
3565 if (--yyextra->squareCount<0)
3566 BEGIN(yyextra->lastSquareContext);
3570 *yyextra->pCopySquareGString << *yytext;
3573 if (yyextra->insidePHP)
3575 yyextra->current->initializer << yytext;
3576 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3577 yyextra->lastStringContext=YY_START;
3578 BEGIN(CopyPHPGString);
3582 *yyextra->pCopySquareGString << yytext;
3585<GCopySquare>{CHARLIT} {
3586 if (yyextra->insidePHP)
3592 *yyextra->pCopySquareGString << yytext;
3595<GCopySquare>[^"'\[\]\n\/,]+ {
3596 *yyextra->pCopySquareGString << yytext;
3599 *yyextra->pCopySquareGString << *yytext;
3604 *yyextra->pCopyCurlyString += *yytext;
3605 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3606 yyextra->lastStringContext=YY_START;
3610 *yyextra->pCopyCurlyString += *yytext;
3611 if (yyextra->insidePHP)
3613 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3614 yyextra->lastStringContext=YY_START;
3615 BEGIN(CopyPHPString);
3619 *yyextra->pCopyCurlyString += *yytext;
3620 yyextra->curlyCount++;
3623 *yyextra->pCopyCurlyString += *yytext;
3624 if (--yyextra->curlyCount<0)
3625 BEGIN(yyextra->lastCurlyContext);
3627<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3633 *yyextra->pCopyCurlyString += yytext;
3636<CopyCurly>[^"'{}\/\n,]+ {
3637 *yyextra->pCopyCurlyString += yytext;
3639<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3642 *yyextra->pCopyCurlyString += *yytext;
3645 *yyextra->pCopyCurlyString += *yytext;
3649<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3651<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3653 int s = line.
find(
' ');
3654 int e = line.
find(
'"',s);
3655 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3656 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3663 *yyextra->pCopyCurlyGString << *yytext;
3664 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3665 yyextra->lastStringContext=YY_START;
3669 *yyextra->pCopyCurlyGString << *yytext;
3670 if (yyextra->insidePHP)
3672 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3673 yyextra->lastStringContext=YY_START;
3674 BEGIN(CopyPHPGString);
3678 *yyextra->pCopyCurlyGString << *yytext;
3679 yyextra->curlyCount++;
3682 *yyextra->pCopyCurlyGString << *yytext;
3683 if (--yyextra->curlyCount<0)
3685 yyextra->current->endBodyLine = yyextra->yyLineNr;
3686 BEGIN(yyextra->lastCurlyContext);
3689<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3695 *yyextra->pCopyCurlyGString << yytext;
3698<GCopyCurly>[^"'{}\/\n,]+ {
3699 *yyextra->pCopyCurlyGString << yytext;
3702 *yyextra->pCopyCurlyGString << yytext;
3704<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3707 *yyextra->pCopyCurlyGString << *yytext;
3710 *yyextra->pCopyCurlyGString << *yytext;
3717 if (yyextra->current->type.isEmpty() &&
3718 yyextra->current->name==
"enum")
3720 yyextra->current->section = EntryType::makeEnum();
3721 yyextra->current->name.clear();
3722 yyextra->current->args.clear();
3723 BEGIN(EnumBaseType);
3727 if (yyextra->current->type.isEmpty())
3730 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3733 yyextra->current->bitfields+=
":";
3737 yyextra->current->bitfields+=*yytext;
3740 yyextra->current->args+=*yytext;
3744 yyextra->current->args+=
' ';
3747 QCString oldType = yyextra->current->type;
3748 if (yyextra->current->bodyLine==-1)
3750 yyextra->current->bodyLine = yyextra->yyLineNr;
3751 yyextra->current->bodyColumn = yyextra->yyColNr;
3753 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3755 yyextra->current->type = yyextra->current->type.mid(3);
3757 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3759 yyextra->current->type.prepend(
"typedef ");
3761 bool isStatic = yyextra->current->isStatic;
3762 Protection prot = yyextra->current->protection;
3763 bool isConcept = yyextra->current->section.isConcept();
3764 bool isModule = yyextra->current->section.isModuleDoc();
3767 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3772 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3775 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3777 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3779 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3780 if (yyextra->current->section.isClass())
3784 yyextra->current->section = EntryType::makeVariable() ;
3785 yyextra->current->fileName = yyextra->fileName;
3786 yyextra->current->startLine = yyextra->yyBegLineNr;
3787 yyextra->current->startColumn = yyextra->yyBegColNr;
3788 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3791 if ( *yytext ==
',')
3793 yyextra->current->isStatic = isStatic;
3794 yyextra->current->protection = prot;
3795 yyextra->current->name.clear();
3796 yyextra->current->args.clear();
3797 yyextra->current->brief.clear();
3798 yyextra->current->doc.clear();
3799 yyextra->current->initializer.str(std::string());
3800 yyextra->current->bitfields.clear();
3805 yyextra->mtype = MethodTypes::Method;
3806 yyextra->virt = Specifier::Normal;
3807 yyextra->current->bodyLine = -1;
3808 yyextra->current->bodyColumn = 1;
3809 yyextra->current->groups.clear();
3815 if (yyextra->insideSlice)
3817 yyextra->squareCount=1;
3818 yyextra->lastSquareContext = YY_START;
3819 yyextra->current->metaData +=
"[";
3820 BEGIN( SliceMetadata );
3822 else if (!yyextra->insideCS &&
3823 (yyextra->current->name.isEmpty() ||
3824 yyextra->current->name==
"typedef"
3828 yyextra->squareCount=1;
3829 yyextra->lastSquareContext = YY_START;
3830 yyextra->idlAttr.clear();
3831 yyextra->idlProp.clear();
3832 yyextra->current->mtype = yyextra->mtype;
3835 yyextra->current->mtype == MethodTypes::Property)
3837 yyextra->odlProp =
true;
3838 yyextra->current->spec.setGettable(
true).setSettable(
true);
3841 BEGIN( IDLAttribute );
3843 else if (yyextra->insideCS &&
3844 yyextra->current->name.isEmpty())
3846 yyextra->squareCount=1;
3847 yyextra->lastSquareContext = YY_START;
3850 yyextra->current->args.clear();
3851 BEGIN( SkipSquare );
3855 yyextra->current->args += yytext ;
3856 yyextra->squareCount=1;
3857 yyextra->externLinkage=
FALSE;
3862 yyextra->squareCount++;
3863 yyextra->current->metaData +=
"[";
3865<SliceMetadata>{BN}* {
3868<SliceMetadata>\"[^\"]*\" {
3869 yyextra->current->metaData += yytext;
3872 yyextra->current->metaData += yytext;
3875 yyextra->current->metaData += yytext;
3876 if (--yyextra->squareCount<=0)
3878 BEGIN (yyextra->lastSquareContext);
3882 yyextra->current->type +=
"(";
3883 yyextra->roundCount++;
3885<SliceOptional>[0-9]+ {
3886 yyextra->current->type += yytext;
3889 yyextra->current->type +=
")";
3890 if(--yyextra->roundCount<=0)
3892 BEGIN (yyextra->lastModifierContext);
3897 if (--yyextra->squareCount<=0)
3900 if (yyextra->current->mtype == MethodTypes::Property)
3901 BEGIN( IDLPropName );
3903 BEGIN( yyextra->lastSquareContext );
3906<IDLAttribute>"propput" {
3909 yyextra->current->mtype = MethodTypes::Property;
3911 yyextra->current->spec.setSettable(
true);
3913<IDLAttribute>"propget" {
3916 yyextra->current->mtype = MethodTypes::Property;
3918 yyextra->current->spec.setGettable(
true);
3920<IDLAttribute>"property" {
3921 yyextra->current->spec.setProperty(
true);
3923<IDLAttribute>"attribute" {
3924 yyextra->current->spec.setAttribute(
true);
3926<IDLAttribute>"optional" {
3927 yyextra->current->spec.setOptional(
true);
3929<IDLAttribute>"readonly" {
3932 yyextra->current->spec.setSettable(
false);
3936 yyextra->current->spec.setReadonly(
true);
3939<IDLAttribute>"bound" {
3940 yyextra->current->spec.setBound(
true);
3942<IDLAttribute>"removable" {
3943 yyextra->current->spec.setRemovable(
true);
3945<IDLAttribute>"constrained" {
3946 yyextra->current->spec.setConstrained(
true);
3948<IDLAttribute>"transient" {
3949 yyextra->current->spec.setTransient(
true);
3951<IDLAttribute>"maybevoid" {
3952 yyextra->current->spec.setMaybeVoid(
true);
3954<IDLAttribute>"maybedefault" {
3955 yyextra->current->spec.setMaybeDefault(
true);
3957<IDLAttribute>"maybeambiguous" {
3958 yyextra->current->spec.setMaybeAmbiguous(
true);
3962<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3965 if (yyextra->odlProp)
3967 yyextra->idlProp = yytext;
3970<IDLPropName>{ID}{BN}*"(" {
3971 yyextra->current->name = yytext;
3972 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3973 yyextra->current->startLine = yyextra->yyLineNr;
3974 yyextra->current->startColumn = yyextra->yyColNr;
3977<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3978 if (yyextra->odlProp)
3980 yyextra->idlProp += yytext;
3983<IDLPropName>{ID}{BNopt}/";" {
3984 if (yyextra->odlProp)
3986 yyextra->current->name = yytext;
3987 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3988 yyextra->odlProp =
false;
3993<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3994 yyextra->idlAttr = yytext;
3995 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3998 yyextra->idlProp = yytext;
4000<IDLProp>{BN}*{ID}{BN}*"," {
4001 if (yyextra->current->args.isEmpty())
4002 yyextra->current->args =
"(";
4004 yyextra->current->args +=
", ";
4005 yyextra->current->args += yyextra->idlAttr;
4006 yyextra->current->args +=
" ";
4007 yyextra->current->args += yyextra->idlProp;
4008 yyextra->current->args +=
" ";
4009 yyextra->current->args += yytext;
4010 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4011 yyextra->idlProp.clear();
4012 yyextra->idlAttr.clear();
4015<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4019 yyextra->current->fileName = yyextra->fileName;
4020 yyextra->current->type = yyextra->idlProp;
4021 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4022 if (!yyextra->current->args.isEmpty())
4023 yyextra->current->args +=
")";
4024 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4025 yyextra->current->section = EntryType::makeVariable();
4026 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4028 BEGIN( FindMembers );
4033<Array>"]" { yyextra->current->args += *yytext ;
4034 if (--yyextra->squareCount<=0)
4035 BEGIN( FindMembers ) ;
4037<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4038 if (--yyextra->squareCount<=0)
4039 BEGIN( SFunction ) ;
4041<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4042 yyextra->squareCount++;
4044<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4045<SkipSquare>"[" { yyextra->squareCount++; }
4047 if (--yyextra->squareCount<=0)
4048 BEGIN( yyextra->lastSquareContext );
4051 yyextra->lastStringContext=YY_START;
4052 BEGIN( SkipString );
4054<SkipSquare>[^\n\[\]\"]+
4055<FindMembers>"<" {
addType(yyscanner);
4056 yyextra->current->type += yytext ;
4059<Sharp>">" { yyextra->current->type += *yytext ;
4060 if (--yyextra->sharpCount<=0)
4061 BEGIN( FindMembers ) ;
4063<Sharp>"<" { yyextra->current->type += *yytext ;
4064 yyextra->sharpCount++;
4067 yyextra->current->type +=
' ';
4070<Sharp>. { yyextra->current->type += *yytext ; }
4073 yyextra->current->bodyLine = yyextra->yyLineNr;
4074 yyextra->current->bodyColumn = yyextra->yyColNr;
4075 yyextra->current->name = yytext;
4080 yyextra->lastInitializerContext = YY_START;
4081 yyextra->sharpCount=0;
4082 yyextra->initBracketCount=0;
4083 yyextra->current->initializer.str(
"=");
4084 BEGIN(ReadInitializer);
4087 yyextra->lastInitializerContext = YY_START;
4088 yyextra->sharpCount=0;
4089 yyextra->initBracketCount=0;
4090 yyextra->current->initializer.str(yytext);
4091 BEGIN(ReadInitializer);
4094 if (yyextra->insideJava)
4096 if (!yyextra->current->name.isEmpty())
4098 yyextra->current->fileName = yyextra->fileName;
4099 yyextra->current->startLine = yyextra->yyLineNr;
4100 yyextra->current->startColumn = yyextra->yyColNr;
4101 if (!yyextra->current_root->spec.isEnum())
4103 yyextra->current->type =
"@";
4105 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4106 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4107 yyextra->current->section = EntryType::makeVariable();
4108 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4112 BEGIN( FindMembers );
4123 if (!yyextra->current->name.isEmpty())
4125 yyextra->current->fileName = yyextra->fileName;
4126 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4128 yyextra->current->startLine = yyextra->current->bodyLine;
4129 yyextra->current->startColumn = yyextra->current->bodyColumn;
4133 yyextra->current->startLine = yyextra->yyLineNr;
4134 yyextra->current->startColumn = yyextra->yyColNr;
4136 if (!yyextra->current_root->spec.isEnum())
4138 yyextra->current->type =
"@";
4140 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4141 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4142 yyextra->current->section = EntryType::makeVariable();
4144 if (!yyextra->insideCS && !yyextra->insideJava &&
4145 !yyextra->current_root->spec.isStrong())
4152 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4154 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4159 yyextra->current->reset();
4164 yyextra->squareCount=1;
4165 yyextra->lastSquareContext = YY_START;
4168<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4169<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4170<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4173 yyextra->current->program << yytext ;
4176<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4177 yyextra->current->program << yytext ;
4178 yyextra->pSkipInterpString = &yyextra->current->program;
4179 yyextra->lastSkipInterpStringContext=YY_START;
4180 BEGIN( SkipInterpString );
4182<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})* {
4183 *yyextra->pSkipInterpString << yytext;
4185<SkipInterpString>\" {
4186 *yyextra->pSkipInterpString << *yytext;
4187 BEGIN( yyextra->lastSkipInterpStringContext );
4190<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4191 yyextra->current->program << yytext ;
4192 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4193 yyextra->lastSkipInterpVerbStringContext=YY_START;
4194 BEGIN( SkipInterpVerbString );
4196<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4197 *yyextra->pSkipInterpVerbString << yytext;
4199<SkipInterpString>"{"[^}]*"}" {
4200 *yyextra->pSkipInterpString << yytext;
4202<SkipInterpVerbString>"{"[^}]*"}" {
4203 *yyextra->pSkipInterpVerbString << yytext;
4205<SkipInterpVerbString>\" {
4206 *yyextra->pSkipInterpVerbString << *yytext;
4207 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4209<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4210<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4211 yyextra->pSkipVerbString = &yyextra->current->program;
4212 yyextra->lastSkipVerbStringContext=YY_START;
4213 BEGIN( SkipVerbString );
4215<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4217 yyextra->current->program << yytext ;
4218 yyextra->pCopyHereDocGString = &yyextra->current->program;
4219 yyextra->lastHereDocContext=YY_START;
4220 BEGIN( CopyHereDoc );
4227<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4228 yyextra->current->program << yytext;
4230 yyextra->lastRawStringContext = YY_START;
4231 yyextra->pCopyRawGString = &yyextra->current->program;
4234<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4235 yyextra->pCopyQuotedGString = &yyextra->current->program;
4236 yyextra->lastStringContext=YY_START;
4237 yyextra->stopAtInvalidString=
false;
4238 BEGIN( CopyGString );
4240<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4241<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4242 yyextra->lastContext = YY_START ;
4245<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4246 ++yyextra->yyLineNr ;
4247 yyextra->lastContext = YY_START ;
4250<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4251 if (!yyextra->insidePHP)
4253 yyextra->current->program << yytext;
4257 yyextra->current->program << yytext;
4258 yyextra->pCopyQuotedGString = &yyextra->current->program;
4259 yyextra->lastStringContext=YY_START;
4260 BEGIN(CopyPHPGString);
4263<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4264 if (yyextra->insidePHP)
4271 yyextra->current->program << yytext;
4274<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4275 ++yyextra->curlyCount ;
4278 yyextra->current->program << yytext ;
4279 --yyextra->curlyCount ;
4281<ReadBody,ReadNSBody>"}" {
4282 if ( yyextra->curlyCount>0 )
4284 yyextra->current->program << yytext ;
4285 --yyextra->curlyCount ;
4289 yyextra->current->endBodyLine = yyextra->yyLineNr;
4290 std::shared_ptr<Entry> original_root = yyextra->current_root;
4291 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4295 QCString doc = yyextra->current->doc;
4296 int docLine = yyextra->current->docLine;
4297 QCString docFile = yyextra->current->docFile;
4298 QCString brief = yyextra->current->brief;
4299 int briefLine = yyextra->current->briefLine;
4300 QCString briefFile = yyextra->current->briefFile;
4302 yyextra->current->doc =
"";
4303 yyextra->current->docLine = 0;
4304 yyextra->current->docFile =
"";
4305 yyextra->current->brief =
"";
4306 yyextra->current->briefLine = 0;
4307 yyextra->current->briefFile =
"";
4308 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4310 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4311 yyextra->current->program.str(std::string());
4312 new_current->name = yyextra->current->name.mid(split_point + 2);
4313 yyextra->current->name = yyextra->current->name.left(split_point);
4314 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4316 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4317 yyextra->current_root = yyextra->current;
4318 yyextra->current = new_current;
4321 yyextra->current->doc = doc;
4322 yyextra->current->docLine = docLine;
4323 yyextra->current->docFile = docFile;
4324 yyextra->current->brief = brief;
4325 yyextra->current->briefLine = briefLine;
4326 yyextra->current->briefFile = briefFile;
4328 QCString &cn = yyextra->current->name;
4329 QCString rn = yyextra->current_root->name;
4335 if (yyextra->isTypedef && cn.
isEmpty())
4338 BEGIN( TypedefName );
4342 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4344 yyextra->current->program <<
',';
4349 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4350 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4352 if (yyextra->insideObjC &&
4353 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4356 BEGIN( ReadBodyIntf ) ;
4360 yyextra->memspecEntry = yyextra->current;
4361 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4362 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4363 if (yyextra->current->section.isNamespace() ||
4364 yyextra->current->spec.isInterface() ||
4365 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4366 yyextra->insideSlice
4369 yyextra->current->reset();
4370 yyextra->current_root = std::move(original_root);
4372 yyextra->memspecEntry.reset();
4373 BEGIN( FindMembers ) ;
4377 static const reg::Ex re(R
"(@\d+$)");
4378 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4379 !
reg::search(yyextra->memspecEntry->name.str(),re))
4382 yyextra->current->doc.clear();
4383 yyextra->current->brief.clear();
4385 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.
4391<ReadBody>"}"{BN}+"typedef"{BN}+ {
4393 if ( yyextra->curlyCount>0 )
4395 yyextra->current->program << yytext ;
4396 --yyextra->curlyCount ;
4400 yyextra->isTypedef =
TRUE;
4401 yyextra->current->endBodyLine = yyextra->yyLineNr;
4402 QCString &cn = yyextra->current->name;
4403 QCString rn = yyextra->current_root->name;
4408 BEGIN( TypedefName );
4411<TypedefName>("const"|"volatile"){BN} {
4413 yyextra->current->type.prepend(yytext);
4416 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4418 yyextra->current->program <<
",";
4420 yyextra->current->name=yytext;
4422 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4423 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4425 if (!yyextra->firstTypedefEntry)
4427 yyextra->firstTypedefEntry = yyextra->current;
4429 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4431 yyextra->isTypedef=
TRUE;
4432 BEGIN(MemberSpecSkip);
4436 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4438 yyextra->current->program <<
',';
4441 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4442 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4443 yyextra->memspecEntry = yyextra->current;
4444 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4447 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4449<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4451 int i=0,l=(int)yyleng,j;
4452 while (i<l && (!
isId(yytext[i]))) i++;
4454 j=yyextra->msName.
find(
"[");
4457 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4458 yyextra->msName=yyextra->msName.left(j);
4463 if (yyextra->firstTypedefEntry)
4465 if (yyextra->firstTypedefEntry->spec.isStruct())
4467 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4469 else if (yyextra->firstTypedefEntry->spec.isUnion())
4471 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4473 else if (yyextra->firstTypedefEntry->section.isEnum())
4475 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4479 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4485 yyextra->current->name = yyextra->msName;
4491 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4497 const Entry *p=yyextra->current.get();
4505 int pi = (i==-1) ? 0 : i+2;
4515 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4519 if (!yyextra->msName.isEmpty()
4525 if (typedefHidesStruct &&
4526 yyextra->isTypedef &&
4527 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4528 yyextra->msType.stripWhiteSpace().isEmpty() &&
4529 yyextra->memspecEntry)
4531 yyextra->memspecEntry->name=yyextra->msName;
4535 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4536 varEntry->lang = yyextra->language;
4537 varEntry->protection = yyextra->current->protection ;
4538 varEntry->mtype = yyextra->current->mtype;
4539 varEntry->virt = yyextra->current->virt;
4540 varEntry->isStatic = yyextra->current->isStatic;
4541 varEntry->section = EntryType::makeVariable();
4542 varEntry->name = yyextra->msName.stripWhiteSpace();
4543 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4544 varEntry->args = yyextra->msArgs;
4545 if (yyextra->isTypedef)
4547 varEntry->type.prepend(
"typedef ");
4550 if (typedefHidesStruct &&
4551 yyextra->isTypedef &&
4552 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4553 yyextra->memspecEntry
4556 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4560 varEntry->type+=yyextra->current->name+yyextra->msType;
4562 varEntry->fileName = yyextra->fileName;
4563 varEntry->startLine = yyextra->yyLineNr;
4564 varEntry->startColumn = yyextra->yyColNr;
4565 varEntry->doc = yyextra->current->doc;
4566 varEntry->brief = yyextra->current->brief;
4567 varEntry->mGrpId = yyextra->current->mGrpId;
4568 varEntry->initializer.str(yyextra->current->initializer.str());
4569 varEntry->groups = yyextra->current->groups;
4570 varEntry->sli = yyextra->current->sli;
4575 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4580 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4582 if (!yyextra->current->doc.isEmpty())
4584 yyextra->memspecEntry->doc += yyextra->current->doc;
4586 if (!yyextra->current->brief.isEmpty())
4588 yyextra->memspecEntry->brief += yyextra->current->brief;
4591 yyextra->msType.clear();
4592 yyextra->msName.clear();
4593 yyextra->msArgs.clear();
4594 yyextra->isTypedef=
FALSE;
4595 yyextra->firstTypedefEntry.reset();
4596 yyextra->memspecEntry.reset();
4597 yyextra->current->reset();
4599 BEGIN( FindMembers );
4603 yyextra->current->doc.clear();
4604 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
4609 yyextra->lastInitializerContext=YY_START;
4610 yyextra->sharpCount=0;
4611 yyextra->initBracketCount=0;
4612 yyextra->current->initializer.str(yytext);
4613 BEGIN(ReadInitializer);
4624<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4625<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4626<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4629<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4630 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4632 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4633 yyextra->insideObjC=
FALSE;
4634 BEGIN( FindMembers );
4636<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4637<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4639<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4640<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4641 if (yyextra->insidePHP)
4647 yyextra->current->bodyLine = yyextra->yyLineNr;
4648 yyextra->current->bodyColumn = yyextra->yyColNr;
4651 yyextra->funcPtrType=yytext;
4652 yyextra->roundCount=0;
4657<FuncPtr>{SCOPENAME} {
4658 yyextra->current->name = yytext;
4661 BEGIN( FuncPtrOperator );
4665 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4667 yyextra->funcPtrType += yyextra->current->name;
4671 BEGIN( EndFuncPtr );
4678<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4679 yyextra->current->name += yytext;
4680 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4683<FuncPtrOperator>\n {
4685 yyextra->current->name += *yytext;
4687<FuncPtrOperator>"(" {
4689 BEGIN( EndFuncPtr );
4692 yyextra->current->name += *yytext;
4694<EndFuncPtr>")"{BNopt}/";" {
4696 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4699<EndFuncPtr>")"{BNopt}/"(" {
4701 if (yyextra->funcPtrType!=
"(")
4703 yyextra->current->type+=yyextra->funcPtrType+
")";
4707<EndFuncPtr>")"{BNopt}/"[" {
4709 yyextra->current->type+=yyextra->funcPtrType;
4710 yyextra->current->args +=
")";
4715 yyextra->current->args += *yytext ;
4718 yyextra->current->bodyLine = yyextra->yyLineNr;
4719 yyextra->current->bodyColumn = yyextra->yyColNr;
4720 yyextra->currentArgumentContext = FuncFuncEnd;
4721 yyextra->fullArgString=yyextra->current->args;
4722 yyextra->copyArgString=&yyextra->current->args;
4723 BEGIN( ReadFuncArgType ) ;
4725<EndFuncPtr>"["[^\n\]]*"]" {
4726 yyextra->funcPtrType+=yytext;
4732 yyextra->current->args += *yytext ;
4733 ++yyextra->roundCount;
4736 yyextra->current->args += *yytext ;
4737 if ( yyextra->roundCount )
4738 --yyextra->roundCount;
4744<FuncFuncEnd>")"{BN}*"(" {
4746 yyextra->current->type+=yyextra->funcPtrType+
")(";
4747 BEGIN(FuncFuncType);
4749<FuncFuncEnd>")"{BNopt}/[;{] {
4751 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4754<FuncFuncEnd>")"{BNopt}/"[" {
4756 yyextra->current->type+=yyextra->funcPtrType;
4757 yyextra->current->args+=
")";
4758 BEGIN(FuncFuncArray);
4761 yyextra->current->args += *yytext;
4764 yyextra->current->type += *yytext;
4765 yyextra->roundCount++;
4768 yyextra->current->type += *yytext;
4769 if (yyextra->roundCount)
4770 --yyextra->roundCount;
4774<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4775<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4777 yyextra->current->type += *yytext;
4779<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4780 if (yyextra->current->type.startsWith(
"typedef") &&
4781 yyextra->current->bodyLine==-1)
4784 yyextra->current->bodyLine = yyextra->yyLineNr;
4785 yyextra->current->bodyColumn = yyextra->yyColNr;
4786 BEGIN( GetCallType );
4788 else if (!yyextra->current->name.isEmpty())
4790 yyextra->current->args = yytext;
4791 yyextra->current->bodyLine = yyextra->yyLineNr;
4792 yyextra->current->bodyColumn = yyextra->yyColNr;
4793 yyextra->currentArgumentContext = FuncQual;
4794 yyextra->fullArgString=yyextra->current->args;
4795 yyextra->copyArgString=&yyextra->current->args;
4796 BEGIN( ReadFuncArgType ) ;
4800<GetCallType>{BN}*{ID}{BN}*"*" {
4803 yyextra->funcPtrType=
"(";
4804 yyextra->funcPtrType+=yytext;
4805 yyextra->roundCount=0;
4809 if (!yyextra->current->name.isEmpty())
4811 yyextra->current->args = yytext;
4812 yyextra->current->bodyLine = yyextra->yyLineNr;
4813 yyextra->current->bodyColumn = yyextra->yyColNr;
4814 yyextra->currentArgumentContext = FuncQual;
4815 yyextra->fullArgString=yyextra->current->args;
4816 yyextra->copyArgString=&yyextra->current->args;
4817 BEGIN( ReadFuncArgType ) ;
4831<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4832 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4833 else yyextra->fullArgString+=yytext;
4835<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4836 yyextra->fullArgString+=yytext;
4838<CopyArgRound>[^\/\n\)\(\"\']+ {
4839 *yyextra->copyArgString+=yytext;
4840 yyextra->fullArgString+=yytext;
4842<CopyArgSquare>[^\/\n\]\[\"\']+ {
4843 *yyextra->copyArgString+=yytext;
4844 yyextra->fullArgString+=yytext;
4846<ReadFuncArgType,ReadTempArgs>{BN}* {
4847 *yyextra->copyArgString+=
" ";
4848 yyextra->fullArgString+=
" ";
4851<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4853 yyextra->lastRawStringContext = YY_START;
4854 yyextra->pCopyRawString = yyextra->copyArgString;
4855 *yyextra->pCopyRawString+=yytext;
4856 yyextra->fullArgString+=yytext;
4859<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4860 *yyextra->copyArgString+=*yytext;
4861 yyextra->fullArgString+=*yytext;
4862 yyextra->lastCopyArgStringContext = YY_START;
4863 BEGIN( CopyArgString );
4865<ReadFuncArgType>"[" {
4866 if (!yyextra->insidePHP) REJECT;
4867 *yyextra->copyArgString+=*yytext;
4868 yyextra->fullArgString+=*yytext;
4869 yyextra->argSquareCount=0;
4870 yyextra->lastCopyArgContext = YY_START;
4871 BEGIN( CopyArgSquare );
4873<ReadFuncArgType,ReadTempArgs>"(" {
4874 *yyextra->copyArgString+=*yytext;
4875 yyextra->fullArgString+=*yytext;
4876 yyextra->argRoundCount=0;
4877 yyextra->lastCopyArgContext = YY_START;
4878 BEGIN( CopyArgRound );
4880<ReadFuncArgType>")" {
4881 *yyextra->copyArgString+=*yytext;
4882 yyextra->fullArgString+=*yytext;
4884 if (yyextra->insideJS)
4895 yyextra->docBackup = yyextra->current->doc;
4896 yyextra->briefBackup = yyextra->current->brief;
4898 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4901<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4902 if (yyextra->currentArgumentContext==DefineEnd)
4906 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4912 BEGIN( yyextra->currentArgumentContext );
4918 yyextra->fullArgString+=yytext;
4919 yyextra->lastCopyArgChar=0;
4920 yyextra->lastCommentInArgContext=YY_START;
4922 BEGIN( CopyArgCommentLine );
4924 BEGIN( CopyArgComment );
4928<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4929<ReadFuncArgType,ReadTempArgs>{CCS} {
4930 yyextra->lastCContext = YY_START;
4931 BEGIN( SkipComment );
4933<ReadFuncArgType,ReadTempArgs>{CPPC} {
4934 yyextra->lastCContext = YY_START;
4935 BEGIN( SkipCxxComment );
4951<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4953 if (yyextra->currentArgumentContext==DefineEnd)
4957 int i;
for (i=(
int)yyleng-1;i>0;i--)
4961 *yyextra->copyArgString+=*yytext;
4962 yyextra->fullArgString+=*yytext;
4965 BEGIN( yyextra->currentArgumentContext );
4971 yyextra->lastCopyArgChar=*yytext;
4974 yyextra->lastCommentInArgContext=YY_START;
4975 yyextra->fullArgString+=text;
4976 if (text.
find(
"//")!=-1)
4977 BEGIN( CopyArgCommentLine );
4979 BEGIN( CopyArgComment );
4982<CopyArgComment>^{B}*"*"+/{BN}+
4983<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4984<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4985 if (yyextra->lastCopyArgChar!=0)
4986 unput(yyextra->lastCopyArgChar);
4987 BEGIN( yyextra->lastCommentInArgContext );
4989<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4991 if (yyextra->lastCopyArgChar!=0)
4992 unput(yyextra->lastCopyArgChar);
4993 BEGIN( yyextra->lastCommentInArgContext );
4995<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4996 yyextra->docBlockName=
"uml";
4997 yyextra->fullArgString+=yytext;
4998 BEGIN(CopyArgVerbatim);
5000<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5001 yyextra->docBlockName=&yytext[1];
5002 yyextra->fullArgString+=yytext;
5003 BEGIN(CopyArgVerbatim);
5005<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5006 yyextra->docBlockName=&yytext[1];
5007 if (yyextra->docBlockName.at(1)==
'[')
5009 yyextra->docBlockName.at(1)=
']';
5011 if (yyextra->docBlockName.at(1)==
'{')
5013 yyextra->docBlockName.at(1)=
'}';
5015 if (yyextra->docBlockName.at(1)==
'(')
5017 yyextra->docBlockName.at(1)=
')';
5019 yyextra->fullArgString+=yytext;
5020 BEGIN(CopyArgVerbatim);
5022<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5023 yyextra->fullArgString+=yytext;
5024 if (&yytext[4]==yyextra->docBlockName)
5026 yyextra->docBlockName=
"";
5027 BEGIN(CopyArgCommentLine);
5030<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5031 yyextra->fullArgString+=yytext;
5032 if (yyextra->docBlockName==&yytext[1])
5034 yyextra->docBlockName=
"";
5035 BEGIN(CopyArgCommentLine);
5038<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5039<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5040<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5041<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5042<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5043 warn(yyextra->fileName,yyextra->yyLineNr,
5044 "Ignoring {:c}brief command inside argument documentation",*yytext
5046 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5049 *yyextra->copyArgString+=*yytext;
5050 yyextra->fullArgString+=*yytext;
5051 yyextra->argSharpCount=1;
5052 BEGIN( CopyArgSharp );
5055 *yyextra->copyArgString+=*yytext;
5056 yyextra->fullArgString+=*yytext;
5058 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5060 BEGIN( yyextra->currentArgumentContext );
5063 yyextra->argRoundCount++;
5064 *yyextra->copyArgString+=*yytext;
5065 yyextra->fullArgString+=*yytext;
5068 *yyextra->copyArgString+=*yytext;
5069 yyextra->fullArgString+=*yytext;
5070 if (yyextra->argRoundCount>0)
5071 yyextra->argRoundCount--;
5073 BEGIN( yyextra->lastCopyArgContext );
5076 yyextra->argSquareCount++;
5077 *yyextra->copyArgString+=*yytext;
5078 yyextra->fullArgString+=*yytext;
5081 *yyextra->copyArgString+=*yytext;
5082 yyextra->fullArgString+=*yytext;
5083 if (yyextra->argSquareCount>0)
5084 yyextra->argSquareCount--;
5086 BEGIN( yyextra->lastCopyArgContext );
5089 *yyextra->copyArgString+=*yytext;
5090 yyextra->fullArgString+=*yytext;
5091 yyextra->argRoundCount=0;
5092 yyextra->lastCopyArgContext = YY_START;
5093 BEGIN( CopyArgRound );
5096 yyextra->argSharpCount++;
5098 *yyextra->copyArgString+=*yytext;
5099 yyextra->fullArgString+=*yytext;
5102 *yyextra->copyArgString+=*yytext;
5103 yyextra->fullArgString+=*yytext;
5104 yyextra->argSharpCount--;
5105 if (yyextra->argSharpCount>0)
5111 BEGIN( ReadTempArgs );
5115<CopyArgString,CopyArgPHPString>\\. {
5116 *yyextra->copyArgString+=yytext;
5117 yyextra->fullArgString+=yytext;
5120 *yyextra->copyArgString+=*yytext;
5121 yyextra->fullArgString+=*yytext;
5122 BEGIN( yyextra->lastCopyArgStringContext );
5124<CopyArgPHPString>\' {
5125 *yyextra->copyArgString+=*yytext;
5126 yyextra->fullArgString+=*yytext;
5127 BEGIN( yyextra->lastCopyArgStringContext );
5129<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5130 if (yyextra->insidePHP)
5136 *yyextra->copyArgString+=yytext;
5137 yyextra->fullArgString+=yytext;
5140<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5141 *yyextra->copyArgString+=yytext;
5142 yyextra->fullArgString+=yytext;
5143 if (yyextra->insidePHP)
5145 yyextra->lastCopyArgStringContext=YY_START;
5146 BEGIN(SkipPHPString);
5149<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5150 *yyextra->copyArgString+=yytext;
5151 yyextra->fullArgString+=yytext;
5153<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5155 *yyextra->copyArgString+=*yytext;
5156 yyextra->fullArgString+=*yytext;
5158<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5159 *yyextra->copyArgString+=yytext;
5160 yyextra->fullArgString+=yytext;
5162<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5163 *yyextra->copyArgString+=*yytext;
5164 yyextra->fullArgString+=*yytext;
5172<FuncRound>"(" { yyextra->current->args += *yytext ;
5173 ++yyextra->roundCount ;
5175<FuncRound>")" { yyextra->current->args += *yytext ;
5176 if ( yyextra->roundCount )
5177 --yyextra->roundCount ;
5189 if (
qstrcmp(yytext,
";")==0 &&
5190 ((yyextra->insideJS || yyextra->insidePHP) &&
5193 yyextra->current->reset();
5195 BEGIN( FindMembers );
5199 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5202<FuncQual>{BN}*"abstract"{BN}* {
5204 yyextra->current->virt = Specifier::Pure;
5205 yyextra->current->args +=
" override ";
5207<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5209 yyextra->current->spec.setOverride(
true);
5210 yyextra->current->args +=
" override ";
5213<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5215 yyextra->current->spec.setFinal(
true);
5216 yyextra->current->args +=
" final ";
5219<FuncQual>{BN}*"sealed"{BN}* {
5221 yyextra->current->spec.setSealed(
true);
5222 yyextra->current->args +=
" sealed ";
5224<FuncQual>{BN}*"new"{BN}* {
5226 yyextra->current->spec.setNew(
true);
5227 yyextra->current->args +=
" new ";
5229<FuncQual>{BN}*"const"{BN}* {
5231 yyextra->current->args +=
" const ";
5232 yyextra->current->argList.setConstSpecifier(
TRUE);
5234<FuncQual>{BN}*"volatile"{BN}* {
5236 yyextra->current->args +=
" volatile ";
5237 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5239<FuncQual>{BN}*"noexcept"{BN}* {
5241 yyextra->current->args +=
" noexcept ";
5242 yyextra->current->spec.setNoExcept(
true);
5244<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5246 yyextra->current->args +=
" noexcept(false)";
5248<FuncQual>{BN}*"noexcept"{BN}*"(" {
5250 yyextra->current->args +=
" noexcept(";
5251 yyextra->current->spec.setNoExcept(
true);
5252 yyextra->lastRoundContext=FuncQual;
5253 yyextra->pCopyRoundString=&yyextra->current->args;
5254 yyextra->roundCount=0;
5258 yyextra->current->args +=
" &";
5261<FuncQual>{BN}*"&&" {
5262 yyextra->current->args +=
" &&";
5266<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5268 yyextra->current->args +=
" = 0";
5269 yyextra->current->virt = Specifier::Pure;
5270 yyextra->current->argList.setPureSpecifier(
TRUE);
5273<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5275 yyextra->current->args +=
" = delete";
5276 yyextra->current->spec.setDelete(
true);
5277 yyextra->current->argList.setIsDeleted(
TRUE);
5280<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5282 yyextra->current->args +=
" = default";
5283 yyextra->current->spec.setDefault(
true);
5286<FuncQual>{BN}*"->"{BN}* {
5288 yyextra->current->argList.setTrailingReturnType(
" -> ");
5289 yyextra->current->args +=
" -> ";
5290 yyextra->roundCount=0;
5291 BEGIN(TrailingReturn);
5293<TrailingReturn>[{;] {
5294 if (yyextra->roundCount>0) REJECT;
5298<TrailingReturn>"requires"{BN}+ {
5299 if (yyextra->insideJava) REJECT;
5300 yyextra->requiresContext = FuncQual;
5301 yyextra->current->req+=
' ';
5302 BEGIN(RequiresClause);
5304<TrailingReturn>"(" {
5305 yyextra->roundCount++;
5306 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5307 yyextra->current->args+=yytext;
5309<TrailingReturn>")" {
5310 if (yyextra->roundCount>0)
5312 yyextra->roundCount--;
5316 warn(yyextra->fileName,yyextra->yyLineNr,
5317 "Found ')' without opening '(' for trailing return type '{})...'",
5318 yyextra->current->argList.trailingReturnType());
5320 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5321 yyextra->current->args+=yytext;
5324 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5325 yyextra->current->args+=yytext;
5329 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5330 yyextra->current->args+=
' ';
5332<FuncRound,FuncFunc>{BN}*","{BN}* {
5334 yyextra->current->args +=
", " ;
5336<FuncQual,FuncRound,FuncFunc>{BN}+ {
5338 yyextra->current->args +=
' ' ;
5340<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5342 yyextra->lastCPPContext = YY_START;
5346 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5353 yyextra->lastInitializerContext=YY_START;
5354 yyextra->sharpCount=0;
5355 yyextra->initBracketCount=0;
5356 yyextra->current->initializer.str(yytext);
5357 BEGIN(ReadInitializer);
5372 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5375 yyextra->requiresContext = YY_START;
5376 yyextra->current->req+=
' ';
5377 BEGIN(RequiresClause);
5379 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5382 yyextra->current->typeConstr.clear();
5383 yyextra->current->typeConstr.push_back(
Argument());
5384 yyextra->lastCSConstraint = YY_START;
5385 BEGIN( CSConstraintName );
5389 yyextra->current->args = yytext;
5390 yyextra->oldStyleArgType.clear();
5391 BEGIN(OldStyleArgs);
5395 yyextra->current->args += yytext;
5401 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5403 if (yyextra->current->doc!=yyextra->docBackup)
5405 doc=yyextra->current->doc;
5406 yyextra->current->doc=yyextra->docBackup;
5408 if (yyextra->current->brief!=yyextra->briefBackup)
5410 brief=yyextra->current->brief;
5411 yyextra->current->brief=yyextra->briefBackup;
5413 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5414 oldStyleArgName,brief,doc);
5415 yyextra->current->args.clear();
5416 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5418<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5420 if (yyextra->current->argList.empty())
5422 yyextra->current->argList.setNoParameters(
TRUE);
5428<OldStyleArgs>. { yyextra->current->args += *yytext; }
5429<FuncQual,FuncRound,FuncFunc>\" {
5430 if (yyextra->insideIDL && yyextra->insideCppQuote)
5436 yyextra->current->args += *yytext;
5439<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5440<FuncQual>{BN}*"try:" |
5441<FuncQual>{BN}*"try"{BN}+ {
5442 yyextra->insideTryBlock=
TRUE;
5444 if (yytext[yyleng-1]==
':')
5450<FuncQual>{BN}*"throw"{BN}*"(" {
5451 yyextra->current->exception =
" throw (" ;
5452 yyextra->roundCount=0;
5454 BEGIN( ExcpRound ) ;
5456<FuncQual>{BN}*"raises"{BN}*"(" {
5457 yyextra->current->exception =
" raises (" ;
5459 yyextra->roundCount=0;
5460 BEGIN( ExcpRound ) ;
5462<FuncQual>{BN}*"throws"{BN}+ {
5463 yyextra->current->exception =
" throws " ;
5467<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5468 ++yyextra->roundCount ;
5470<ExcpRound>")" { yyextra->current->exception += *yytext ;
5471 if ( yyextra->roundCount )
5472 --yyextra->roundCount ;
5477 yyextra->current->exception += *yytext;
5480 unput(
'{'); BEGIN( FuncQual );
5483 unput(
';'); BEGIN( FuncQual );
5486 yyextra->current->exception +=
' ';
5490 yyextra->current->exception += *yytext;
5492<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5493 yyextra->current->name = yyextra->current->args ;
5494 yyextra->current->args = yytext ;
5495 yyextra->roundCount=0;
5496 BEGIN( FuncRound ) ;
5499 if (!yyextra->insidePHP) BEGIN(SkipInits);
5505 yyextra->current->fileName = yyextra->fileName;
5506 yyextra->current->startLine = yyextra->yyBegLineNr;
5507 yyextra->current->startColumn = yyextra->yyBegColNr;
5508 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5510 std::string type = yyextra->current->type.str();
5514 ti = (int)
match.position();
5518 int di = yyextra->current->type.find(
"decltype(");
5519 if (di!=-1 && di<ti)
5524 int ts=yyextra->current->type.find(
'<');
5525 int te=yyextra->current->type.findRev(
'>');
5528 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5529 bool isFunction = ti==-1 ||
5530 (ts!=-1 && ts<te && ts<ti && ti<te);
5531 bool isVariable = !yyextra->current->type.isEmpty() &&
5532 (!isFunction || startsWithTypedef);
5537 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5542 if (yyextra->isTypedef && !startsWithTypedef)
5544 yyextra->current->type.prepend(
"typedef ");
5546 yyextra->current->section = EntryType::makeVariable() ;
5551 yyextra->current->section = EntryType::makeFunction() ;
5552 yyextra->current->proto = *yytext==
';';
5560 if (yyextra->isTypedef && !startsWithTypedef)
5562 yyextra->current->type.prepend(
"typedef ");
5565 yyextra->current->section = EntryType::makeVariable();
5570 yyextra->current->section = EntryType::makeFunction();
5571 yyextra->current->proto =
TRUE;
5575 if ( yyextra->insidePHP)
5579 yyextra->current->spec.setFinal(
true);
5583 yyextra->current->spec.setAbstract(
true);
5586 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5589 if ( *yytext ==
'{' )
5591 yyextra->lastCurlyContext = FindMembers;
5592 yyextra->curlyCount=0;
5597 BEGIN( FindMembers );
5602 if ( yyextra->insidePHP)
5606 yyextra->previous = yyextra->current;
5607 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5610 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5612 yyextra->current->spec.setOptional(
true).setRequired(
true);
5614 yyextra->lastCurlyContext = FindMembers;
5615 if ( *yytext ==
',' )
5617 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5619 if ( *yytext ==
'{' )
5621 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5623 yyextra->previous->spec.setInline(
true);
5626 yyextra->curlyCount=0;
5627 BEGIN( SkipCurly ) ;
5631 if (!yyextra->previous->section.isVariable())
5632 yyextra->previous->bodyLine=-1;
5633 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...
5637<SkipInits>">"{BN}*"{" {
5639 yyextra->curlyCount=1;
5640 BEGIN(SkipC11Inits);
5642<SkipInits>{ID}{BN}*"{" {
5644 yyextra->curlyCount=1;
5645 BEGIN(SkipC11Inits);
5648 ++yyextra->curlyCount;
5651 if ( --yyextra->curlyCount<=0 )
5656<SkipC11Attribute>"]]" {
5657 BEGIN(yyextra->lastC11AttributeContext);
5665 ++yyextra->curlyCount ;
5667<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5670 if( yyextra->curlyCount )
5672 --yyextra->curlyCount ;
5676 if (!yyextra->current->sli.empty() && yyextra->previous)
5678 yyextra->previous->sli = yyextra->current->sli;
5679 yyextra->current->sli.clear();
5681 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5682 BEGIN( yyextra->lastCurlyContext ) ;
5685<SkipCurly>"}"{BN}*{DCOMM}"<" {
5687 if ( yyextra->curlyCount )
5690 --yyextra->curlyCount ;
5694 yyextra->current->endBodyLine=yyextra->yyLineNr;
5695 yyextra->tempEntry = yyextra->current;
5696 yyextra->current = yyextra->previous;
5698 yyextra->docBlockContext = SkipCurlyEndDoc;
5699 yyextra->docBlockInBody =
FALSE;
5700 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5702 yyextra->docBlock.str(std::string());
5703 yyextra->docBlockTerm =
'}';
5704 if (yytext[yyleng-3]==
'/')
5716<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5717 yyextra->docBlockContext = SkipCurlyEndDoc;
5718 yyextra->docBlockInBody =
FALSE;
5719 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5721 yyextra->docBlock.str(std::string());
5722 yyextra->docBlockTerm =
'}';
5723 if (yytext[yyleng-3]==
'/')
5734<SkipCurlyEndDoc>"}" {
5736 if (yyextra->tempEntry)
5738 yyextra->current = yyextra->tempEntry;
5739 yyextra->tempEntry.reset();
5741 BEGIN( yyextra->lastCurlyContext );
5745 yyextra->lastStringContext=SkipCurly;
5746 BEGIN( SkipString );
5748<SkipCurly>^{B}*"#" {
5749 if (yyextra->insidePHP)
5752 BEGIN( SkipCurlyCpp );
5754<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5758<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5759 if (!yyextra->insidePHP)
5765 yyextra->lastHereDocContext = YY_START;
5769<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5771 yyextra->lastRawStringContext = YY_START;
5772 yyextra->dummyRawString.clear();
5773 yyextra->pCopyRawString = &yyextra->dummyRawString;
5774 *yyextra->pCopyRawString += yytext;
5777<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
5781<SkipCurly,SkipCurlyCpp>"\$" {}
5785 yyextra->lastCurlyContext = FindMembers;
5788<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5792<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5794 yyextra->lastCContext = YY_START;
5797<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5799 yyextra->lastCContext = YY_START;
5800 BEGIN(SkipCxxComment);
5802<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5803 yyextra->roundCount=0;
5804 yyextra->lastSkipRoundContext=YY_START;
5807<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5808 yyextra->lastStringContext=YY_START;
5809 BEGIN( SkipString );
5812 warn(yyextra->fileName,yyextra->yyLineNr,
5813 "Found ';' while parsing initializer list! "
5814 "(doxygen could be confused by a macro call without semicolon)"
5816 BEGIN( FindMembers );
5818<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5819 if (!yyextra->insidePHP)
5822 yyextra->lastCContext = YY_START;
5823 BEGIN(SkipCxxComment);
5825<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5826 if (!yyextra->insideCS) REJECT;
5829 yyextra->lastSkipVerbStringContext=YY_START;
5830 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5831 yyextra->dummyTextStream.clear();
5832 BEGIN(SkipVerbString);
5834<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5835 if (yyextra->insidePHP) REJECT;
5837<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5838 if (yyextra->insidePHP)
5840 yyextra->lastStringContext=YY_START;
5841 BEGIN(SkipPHPString);
5844<SkipC11Attribute>{ID} {
5847 yyextra->current->spec.setNoDiscard(
true);
5850<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5851<SkipString,SkipPHPString>\\. { }
5853 BEGIN( yyextra->lastStringContext );
5856 BEGIN( yyextra->lastStringContext );
5858<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5859<SkipString,SkipPHPString>\n {
5863<SkipString,SkipPHPString>. { }
5869 yyextra->current->section = EntryType::makeEmpty() ;
5870 yyextra->current->type.clear() ;
5871 yyextra->current->name.clear() ;
5872 yyextra->current->args.clear() ;
5873 yyextra->current->argList.clear();
5874 BEGIN( FindMembers ) ;
5877 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5881 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5885 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5887 if (!yyextra->baseName.isEmpty())
5889 yyextra->current->extends.emplace_back(
5890 yyextra->baseName,Protection::Public,Specifier::Normal);
5891 yyextra->baseName.clear();
5893 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5898 yyextra->current->section = EntryType::makeEmpty() ;
5899 yyextra->current->type.clear() ;
5900 yyextra->current->name.clear() ;
5901 yyextra->current->args.clear() ;
5902 yyextra->current->argList.clear();
5904 BEGIN( FindMembers ) ;
5906<CompoundName>{SCOPENAME}/{BN}*"<" {
5907 yyextra->sharpCount = 0;
5908 yyextra->current->name = yytext ;
5910 if (yyextra->current->spec.isProtocol())
5912 yyextra->current->name+=
"-p";
5915 yyextra->lastClassTemplSpecContext = ClassVar;
5916 if (yyextra->insideObjC)
5918 BEGIN( ObjCProtocolList );
5920 else if (yyextra->insideCS)
5927 yyextra->roundCount=0;
5928 BEGIN( ClassTemplSpec );
5935 yyextra->current->tArgLists.
push_back(al);
5936 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5937 yyextra->templateStr=
"<";
5938 yyextra->current->name +=
"<";
5939 yyextra->fullArgString = yyextra->templateStr;
5940 yyextra->copyArgString = &yyextra->current->name;
5942 yyextra->currentArgumentContext = ClassVar;
5943 BEGIN( ReadTempArgs );
5945<ObjCProtocolList>"<" {
5946 yyextra->insideProtocolList=
TRUE;
5949<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5950 yyextra->current->name += yytext;
5952 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5955 if (yyextra->current->spec.isProtocol())
5962 BEGIN( yyextra->lastClassTemplSpecContext );
5966<ClassTemplSpec>"<" {
5967 yyextra->current->name += yytext;
5968 if (yyextra->roundCount==0) yyextra->sharpCount++;
5971 yyextra->current->name += yytext;
5973<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5974 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5978 yyextra->current->name =
substitute(yytext,
".",
"::");
5979 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5984 else if (!yyextra->current->tArgLists.empty())
5988 yyextra->current->name = yytext;
5989 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5992 QCString rn = yyextra->current_root->name;
5994 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5998 yyextra->current->spec.setForwardDecl(
true);
5999 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6001 else if (yyextra->insideIDL &&
6002 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6003 yyextra->current->spec.isInterface()) ||
6004 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6005 yyextra->current->spec.isService())
6013 yyextra->current->name = yytext;
6014 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6015 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6018 yyextra->current->spec.setInterface(
false).setService(
false);
6022 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6025 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6028 yyextra->current->reset();
6030 if (yyextra->insideObjC)
6032 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6033 yyextra->insideObjC =
FALSE;
6035 if (yyextra->isTypedef)
6037 yyextra->current->type.prepend(
"typedef");
6039 BEGIN( FindMembers );
Wrapper class for the Entry type.
6042<CompoundName>{SCOPENAME}/{BN}*"(" {
6043 yyextra->current->name = yytext ;
6046 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6048 yyextra->lastAlignAsContext = YY_START;
6053 if (yyextra->current->spec.isProtocol())
6055 yyextra->current->name +=
"-p";
6060<AlignAs>"(" { yyextra->roundCount=0;
6061 BEGIN( AlignAsEnd );
6065<AlignAsEnd>"(" { yyextra->roundCount++; }
6066<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6068 BEGIN( yyextra->lastAlignAsContext );
6074 yyextra->current->name = yytext ;
6078 yyextra->current->bodyLine = yyextra->yyLineNr;
6079 yyextra->current->bodyColumn = yyextra->yyColNr;
6080 yyextra->current->initializer.str(std::string());
6081 yyextra->lastInitializerContext = FindMembers;
6082 yyextra->sharpCount=0;
6083 yyextra->initBracketCount=0;
6084 BEGIN(ReadInitializer);
6086<CompoundName>{SCOPENAME}/{BN}*"," {
6088 yyextra->current->reset();
6091<CompoundName>{SCOPENAME} {
6092 yyextra->current->name = yytext ;
6095 if (yyextra->current->spec.isProtocol())
6097 yyextra->current->name +=
"-p";
6099 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6105<CompoundName>{CSSCOPENAME} {
6106 yyextra->current->name =
substitute(yytext,
".",
"::");
6110<ClassVar>{SCOPENAME}{BNopt}/"(" {
6111 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6114 yyextra->roundCount=0;
6115 BEGIN(SkipUnionSwitch);
6120 yyextra->yyBegColNr=yyextra->yyColNr;
6121 yyextra->yyBegLineNr=yyextra->yyLineNr;
6122 yyextra->current->name = yytext;
6123 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6126 BEGIN( FindMembers );
6130 if (yyextra->isTypedef)
6134 yyextra->current->type.prepend(
"typedef ");
6142<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6143 if (yyextra->insideCli)
6146 yyextra->current->spec.setSealedClass(
true);
6148 yyextra->current->spec.setAbstractClass(
true);
6156<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6157 yyextra->yyBegColNr=yyextra->yyColNr;
6158 yyextra->yyBegLineNr=yyextra->yyLineNr;
6161 if (yyextra->current->section.isEnum())
6163 yyextra->current->section = EntryType::makeVariable() ;
6165 yyextra->current->type +=
' ' ;
6166 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...
6175 yyextra->yyBegColNr=yyextra->yyColNr;
6176 yyextra->yyBegLineNr=yyextra->yyLineNr;
6178 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6181 yyextra->roundCount=0;
6182 BEGIN(SkipUnionSwitch);
6184 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6186 yyextra->current->type.clear();
6187 yyextra->baseProt = Protection::Public;
6188 yyextra->baseVirt = Specifier::Normal;
6189 yyextra->baseName.clear();
6190 BEGIN( BasesProt ) ;
6192 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6194 yyextra->current->typeConstr.clear();
6195 yyextra->current->typeConstr.push_back(
Argument());
6196 yyextra->lastCSConstraint = YY_START;
6197 BEGIN( CSConstraintName );
6199 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6201 yyextra->current->spec.setAbstract(
true);
6203 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6205 yyextra->current->spec.setSealed(
true);
6207 else if (
qstrcmp(yytext,
"final")==0)
6209 yyextra->current->spec.setFinal(
true);
6213 if (yyextra->current->section.isEnum())
6215 yyextra->current->section = EntryType::makeVariable() ;
6217 yyextra->current->type +=
' ' ;
6218 yyextra->current->type += yyextra->current->name ;
6219 yyextra->current->name = yytext ;
6228 if (yyextra->insideObjC && *yytext==
'(')
6230 yyextra->current->name+=
'(';
6233 yyextra->current->spec.setCategory(
true);
6235 BEGIN( ClassCategory );
6241 BEGIN( FindMembers );
6244<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6245<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6246 yyextra->fullArgString.clear();
6247 yyextra->lastCopyArgChar=
'#';
6248 yyextra->lastCommentInArgContext=YY_START;
6250 BEGIN( CopyArgCommentLine );
6252 BEGIN( CopyArgComment );
6254<CSConstraintType,CSConstraintName>"#" {
6255 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6257<CSConstraintType>"=>" {
6262 BEGIN( yyextra->lastCSConstraint );
6264<CSConstraintType>"{" {
6268 BEGIN( yyextra->lastCSConstraint );
6270<CSConstraintType,CSConstraintName>";" {
6273 BEGIN( yyextra->lastCSConstraint );
6275<CSConstraintName>":" {
6276 BEGIN( CSConstraintType );
6278<CSConstraintName>{ID} {
6280 yyextra->current->typeConstr.back().name=yytext;
6282<CSConstraintType>"where" {
6283 yyextra->current->typeConstr.push_back(
Argument());
6284 BEGIN( CSConstraintName );
6286<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6287 if (yyextra->current->typeConstr.back().type.isEmpty())
6290 yyextra->current->typeConstr.back().type=yytext;
6294 QCString name = yyextra->current->typeConstr.back().name;
6295 yyextra->current->typeConstr.push_back(
Argument());
6296 yyextra->current->typeConstr.back().name=name;
6297 yyextra->current->typeConstr.back().type=yytext;
6300<CSConstraintName,CSConstraintType>\n {
6303<CSConstraintName,CSConstraintType>. {
6305<ClassCategory>{ID} {
6306 yyextra->current->name+=yytext;
6308<ClassCategory>")"/{BN}*"{" {
6309 yyextra->current->name+=
')';
6312<ClassCategory>")"/{BN}*"<" {
6313 yyextra->current->name+=
')';
6314 BEGIN( ObjCProtocolList );
6317 yyextra->current->name+=
')';
6318 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6330 if (yyextra->current->section.isVariable())
6332 yyextra->current->bitfields+=
":";
6333 yyextra->current->args.clear();
6336 else if (yyextra->current->section.isEnum())
6339 yyextra->current->args.clear();
6340 BEGIN(EnumBaseType);
6344 yyextra->current->type.clear();
6345 if (yyextra->current->spec.isInterface() ||
6346 yyextra->current->spec.isStruct() ||
6347 yyextra->current->spec.isRef() ||
6348 yyextra->current->spec.isValue() ||
6349 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6352 yyextra->baseProt = Protection::Public;
6356 yyextra->baseProt = Protection::Private;
6358 yyextra->baseVirt = Specifier::Normal;
6359 yyextra->baseName.clear();
6360 BEGIN( BasesProt ) ;
6364 if (yyextra->isTypedef)
6366 yyextra->current->type.prepend(
"typedef");
6368 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6370 yyextra->current->section = EntryType::makeVariable() ;
6372 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6374 yyextra->current->reset();
6381 BEGIN( FindMembers );
6383<Bases,ClassVar>{CPPC}"/"/[^/] {
6384 if (!yyextra->insideObjC)
6391 yyextra->current->program << yytext;
6392 yyextra->current->fileName = yyextra->fileName ;
6393 yyextra->current->startLine = yyextra->yyLineNr ;
6394 yyextra->current->startColumn = yyextra->yyColNr;
6395 yyextra->curlyCount=0;
6396 BEGIN( ReadBodyIntf );
6399<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6400<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6401<Bases,ClassVar>{CPPC}"!" |
6402<Bases,ClassVar>[\-+]{BN}* {
6403 if (!yyextra->insideObjC)
6410 yyextra->current->program << yytext;
6411 yyextra->current->fileName = yyextra->fileName ;
6412 yyextra->current->startLine = yyextra->yyLineNr ;
6413 yyextra->current->startColumn = yyextra->yyColNr;
6414 yyextra->curlyCount=0;
6415 BEGIN( ReadBodyIntf );
6418<CompoundName,ClassVar>{B}*"{"{B}* {
6419 yyextra->current->program.str(std::string());
6420 yyextra->current->fileName = yyextra->fileName ;
6421 yyextra->current->bodyLine = yyextra->yyLineNr;
6422 yyextra->current->bodyColumn = yyextra->yyColNr;
6424 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6426 if (yyextra->current->section.isNamespace())
6430 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6442 yyextra->curlyCount=0;
6443 if (yyextra->current_root &&
6444 !yyextra->current_root->spec.isInterface() &&
6445 (yyextra->current->spec.isInterface() ||
6446 yyextra->current->spec.isProtocol() ||
6447 yyextra->current->spec.isCategory() ||
6448 yyextra->current->section.isObjcImpl()
6453 BEGIN( ReadBodyIntf );
6455 else if (yyextra->current->section.isNamespace())
6457 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6464<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6465<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6466<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6467<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6468<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6469<BasesProt>{BN} {
lineCount(yyscanner); }
6470<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6471<Bases>"decltype"{BN}*"(" {
6473 yyextra->roundCount=0;
6474 yyextra->lastSkipRoundContext=YY_START;
6477<Bases>("\\")?({ID}"\\")*{ID} {
6478 if (!yyextra->insidePHP)
6487 yyextra->baseName += bn;
6488 yyextra->current->args +=
' ';
6489 yyextra->current->args += yytext;
6492<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6498 yyextra->current->typeConstr.clear();
6499 yyextra->current->typeConstr.push_back(
Argument());
6500 yyextra->lastCSConstraint = YY_START;
6501 BEGIN( CSConstraintName );
6505 yyextra->baseName+=yytext;
6506 yyextra->current->args +=
' ';
6507 yyextra->current->args += yytext;
6510<Bases>{BN}*{ID}("."{ID})* {
6512 yyextra->baseName += name;
6513 yyextra->current->args +=
' ';
6514 yyextra->current->args += name;
6516<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6517 if (!yyextra->insideObjC)
6527<ClassVar,Bases>"@end" {
6535<ClassVar>"<" { yyextra->current->name += *yytext;
6536 yyextra->sharpCount=1;
6537 yyextra->roundCount=0;
6538 yyextra->lastSkipSharpContext = YY_START;
6539 yyextra->specName = &yyextra->current->name;
6540 BEGIN ( Specialization );
6544 yyextra->sharpCount=1;
6545 yyextra->roundCount=0;
6546 yyextra->lastSkipSharpContext = YY_START;
6547 if (yyextra->insideObjC)
6557 yyextra->templateStr = yytext;
6558 yyextra->specName = &yyextra->templateStr;
6559 BEGIN ( Specialization );
6562<Specialization>"<" { *yyextra->specName += *yytext;
6563 if (yyextra->roundCount==0) yyextra->sharpCount++;
6565<Specialization>">" {
6566 *yyextra->specName += *yytext;
6567 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6570 BEGIN(yyextra->lastSkipSharpContext);
6573<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6574<Specialization>"<<" { *yyextra->specName += yytext; }
6575<Specialization>">>"/{B}*"::" {
6580<Specialization>">>" {
6581 if (yyextra->insideCS)
6591 if (yyextra->roundCount>0)
6593 *yyextra->specName += yytext;
6603<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6604<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6605<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6607<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6608<Specialization>"\\'" { *yyextra->specName += *yytext;}
6609<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6610<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6611<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6612<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6613<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6614<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6615<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6616<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6617<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6620 *yyextra->specName += *yytext;
6622<SkipRound>"(" { ++yyextra->roundCount; }
6623<SkipRound>")" {
if (--yyextra->roundCount<0)
6624 BEGIN ( yyextra->lastSkipRoundContext );
6627 yyextra->lastStringContext=SkipRound;
6630<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6631 if (yyextra->insideProtocolList)
6633 yyextra->baseName+=
"-p";
6637 yyextra->current->args +=
',' ;
6640 if (!yyextra->baseName.isEmpty())
6642 yyextra->current->extends.emplace_back(
6643 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6646 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6647 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6648 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6650 yyextra->baseProt=Protection::Public;
6654 yyextra->baseProt=Protection::Private;
6656 yyextra->baseVirt=Specifier::Normal;
6657 yyextra->baseName.clear();
6660 yyextra->insideProtocolList=
FALSE;
6672 if (*yytext==
',' && yyextra->insideObjC)
6674 yyextra->insideProtocolList=
TRUE;
6680 yyextra->current->program.str(std::string());
6681 yyextra->current->fileName = yyextra->fileName ;
6682 yyextra->current->bodyLine = yyextra->yyLineNr;
6683 yyextra->current->bodyColumn = yyextra->yyColNr;
6685 if (!yyextra->baseName.isEmpty())
6686 yyextra->current->extends.emplace_back(
6687 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6689 yyextra->curlyCount=0;
6690 if (yyextra->insideObjC)
6692 BEGIN( ReadBodyIntf );
6699<SkipUnionSwitch>{B}*"(" {
6700 yyextra->roundCount++;
6702<SkipUnionSwitch>")" {
6703 if (--yyextra->roundCount==0)
6708<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6710<Comment>{BN}+ { yyextra->current->program << yytext ;
6713<Comment>{CCS} { yyextra->current->program << yytext ; }
6714<Comment>{CPPC} { yyextra->current->program << yytext ; }
6715<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6716 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6717 yyextra->current->program << yytext ;
6719<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6720 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6721 yyextra->current->program << yytext ;
6723<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6724<Comment>{CCE} { yyextra->current->program << yytext ;
6725 if (!yyextra->insideCode)
6727 yyextra->doxygenComment=
false;
6728 BEGIN( yyextra->lastContext );
6731<Comment>. { yyextra->current->program << *yytext ; }
6733<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6735 if (!yyextra->current->doc.isEmpty())
6737 yyextra->current->doc+=
"\n\n";
6741 yyextra->current->docLine = yyextra->yyLineNr;
6742 yyextra->current->docFile = yyextra->fileName;
6745 yyextra->lastDocContext = YY_START;
6746 if (yyextra->current_root->section.isScope())
6748 yyextra->current->inside = yyextra->current_root->name+
"::";
6750 yyextra->docBlockContext = YY_START;
6751 yyextra->docBlockInBody = YY_START==SkipCurly;
6756 yyextra->docBlock.
str(indent.
str());
6758 if (yyextra->docBlockAutoBrief)
6760 yyextra->current->briefLine = yyextra->yyLineNr;
6761 yyextra->current->briefFile = yyextra->fileName;
6766<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6772 yyextra->lastDocContext = YY_START;
6775 if (yyextra->current_root->section.isScope())
6777 yyextra->current->inside = yyextra->current_root->name+
"::";
6779 yyextra->current->docLine = yyextra->yyLineNr;
6780 yyextra->current->docFile = yyextra->fileName;
6781 yyextra->docBlockContext = YY_START;
6782 yyextra->docBlockInBody = YY_START==SkipCurly;
6784 yyextra->docBlockAutoBrief = javadocAutoBrief;
6788 yyextra->docBlock.
str(indent.
str());
6790 if (yyextra->docBlockAutoBrief)
6792 yyextra->current->briefLine = yyextra->yyLineNr;
6793 yyextra->current->briefFile = yyextra->fileName;
6800 yyextra->current->program << yytext ;
6801 yyextra->lastContext = YY_START ;
6802 yyextra->doxygenComment=
true;
6806<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6811<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6812 yyextra->lastDocContext = YY_START;
6815 if (yyextra->current_root->section.isScope())
6817 yyextra->current->inside = yyextra->current_root->name+
"::";
6819 yyextra->current->docLine = yyextra->yyLineNr;
6820 yyextra->current->docFile = yyextra->fileName;
6821 yyextra->docBlockContext = YY_START;
6822 yyextra->docBlockInBody = YY_START==SkipCurly;
6824 yyextra->docBlockAutoBrief = javadocAutoBrief;
6828 yyextra->docBlock.
str(indent.
str());
6830 if (yyextra->docBlockAutoBrief)
6832 yyextra->current->briefLine = yyextra->yyLineNr;
6833 yyextra->current->briefFile = yyextra->fileName;
6838<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6839 yyextra->lastDocContext = YY_START;
6840 if (yyextra->current_root->section.isScope())
6842 yyextra->current->inside = yyextra->current_root->name+
"::";
6844 yyextra->docBlockContext = YY_START;
6845 yyextra->docBlockInBody = YY_START==SkipCurly;
6846 yyextra->docBlockAutoBrief =
FALSE;
6850 yyextra->docBlock.
str(indent.
str());
6855<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6856 yyextra->lastDocContext = YY_START;
6857 if (yyextra->current_root->section.isScope())
6859 yyextra->current->inside = yyextra->current_root->name+
"::";
6861 yyextra->docBlockContext = YY_START;
6862 yyextra->docBlockInBody = YY_START==SkipCurly;
6863 yyextra->docBlockAutoBrief =
FALSE;
6866 yyextra->docBlock.
str(indent.
str());
6870<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6872 yyextra->externLinkage=
TRUE;
6875 if (yyextra->externLinkage)
6877 yyextra->externLinkage=
FALSE;
6879 else if (yyextra->insideCS &&
6880 !yyextra->current->name.isEmpty() &&
6881 !yyextra->current->type.isEmpty())
6883 if (yyextra->current->mtype == MethodTypes::Event)
6885 yyextra->mtype = MethodTypes::Event;
6889 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6893 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6895 yyextra->current->bodyLine = yyextra->yyLineNr;
6896 yyextra->current->bodyColumn = yyextra->yyColNr;
6897 yyextra->curlyCount=0;
6898 BEGIN( CSAccessorDecl );
6900 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6904 yyextra->current->exception =
" {";
6905 BEGIN(UNOIDLAttributeBlock);
6909 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6910 yyextra->current->name.isEmpty()
6914 yyextra->needsSemi =
FALSE;
6915 if (yyextra->current->isStatic)
6917 yyextra->current->name=
"[static initializer]";
6918 yyextra->current->type.clear();
6922 yyextra->current->name=
"[instance initializer]";
6939 yyextra->current->bodyLine = yyextra->yyLineNr;
6940 yyextra->current->bodyColumn = yyextra->yyColNr;
6941 yyextra->current->initializer.str(yytext);
6942 yyextra->lastInitializerContext = YY_START;
6943 yyextra->sharpCount=0;
6944 yyextra->initBracketCount=1;
6945 BEGIN(ReadInitializer);
6949<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6950<CSAccessorDecl>"}"{B}*"=" {
6952 if (yyextra->curlyCount != 0) REJECT;
6953 yyextra->current->initializer.str(
"=");
6954 yyextra->current->endBodyLine=yyextra->yyLineNr;
6955 yyextra->lastInitializerContext = FindMembers;
6956 BEGIN(ReadInitializer);
6958<CSAccessorDecl>"}" {
6959 if (yyextra->curlyCount)
6961 yyextra->curlyCount--;
6965 yyextra->mtype = MethodTypes::Method;
6966 yyextra->virt = Specifier::Normal;
6968 yyextra->current->endBodyLine=yyextra->yyLineNr;
6973<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6974<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6975<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6976<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6977<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6978<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6979<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6980<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6981<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6982<CSAccessorDecl>{CHARLIT} {}
6983<CSAccessorDecl>"\"" { BEGIN(CSString);}
6984<CSAccessorDecl>"." {}
6985<CSAccessorDecl>\n {
lineCount(yyscanner); }
6986<CSString>"\"" { BEGIN(CSAccessorDecl);}
6994<SliceSequence>{SCOPENAME} {
6995 if (yyextra->current->spec.isLocal())
6997 yyextra->current->type =
"local ";
6999 yyextra->current->type +=
"sequence<";
7000 yyextra->current->type += yytext;
7001 yyextra->current->type +=
">";
7004<SliceSequence>{BN}*">"{BN}* {
7006 BEGIN(SliceSequenceName);
7009<SliceSequenceName>{ID}{BN}* {
7011 yyextra->current->name = yytext ;
7012 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7015<SliceSequenceName>";" {
7016 yyextra->current->section = EntryType::makeVariable();
7017 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7022<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7024 if (yyextra->current->spec.isLocal())
7026 yyextra->current->type =
"local ";
7028 yyextra->current->type +=
"dictionary<";
7029 yyextra->current->type += yytext;
7030 yyextra->current->type +=
">";
7031 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7034<SliceDictionary>{BN}*">"{BN}* {
7036 BEGIN(SliceDictionaryName);
7039<SliceDictionaryName>{ID}{BN}* {
7041 yyextra->current->name = yytext ;
7042 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7045<SliceDictionaryName>";" {
7046 yyextra->current->section = EntryType::makeVariable();
7047 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7057<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7058 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7059 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7062<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7063 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7064 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7066<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7067 yyextra->docBlock << yytext;
7068 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7069 BEGIN( yyextra->docBlockContext );
7071<DocLine>{NONLopt}/"\n" {
7072 yyextra->docBlock << yytext;
7073 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7074 BEGIN( yyextra->docBlockContext );
7079<DocBlock>"*"*{CCE} {
7081 BEGIN(yyextra->docBlockContext);
7083<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7086 yyextra->docBlock <<
"\\ilinebr " << indent;
7088<DocBlock>^{B}*"*"+/[^/] {
7091 yyextra->docBlock << indent;
7093<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7096 yyextra->docBlock << indent;
7098<DocBlock>^{B}*({CPPC}){B}* {
7101 yyextra->docBlock << yytext;
7105 yyextra->docBlock << yytext;
7107<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7108 yyextra->docBlock << yytext;
7110<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7111 yyextra->docBlock << yytext;
7112 char blockName[] =
"f$";
7114 if (c==
'[') blockName[1]=
']';
7115 else if (c==
'{') blockName[1]=
'}';
7116 else if (c==
'(') blockName[1]=
')';
7118 BEGIN(DocCopyBlock);
7120<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7121 yyextra->fileName = &yytext[6];
7122 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7123 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7124 yyextra->docBlock << yytext;
7126<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7127 yyextra->fileName = &yytext[6];
7128 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7129 yyextra->docBlock << yytext;
7131<DocBlock>{CMD}"iline"{LINENR}{B} {
7136 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7140 yyextra->yyLineNr = nr;
7142 yyextra->docBlock << yytext;
7144<DocBlock>{B}*"<"{PRE}">" {
7145 yyextra->docBlock << yytext;
7147 BEGIN(DocCopyBlock);
7149<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7150 yyextra->docBlock << yytext;
7152 BEGIN(DocCopyBlock);
7154<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7155 yyextra->docBlock << yytext;
7157 BEGIN(DocCopyBlock);
7159<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7160 yyextra->docBlock << yytext;
7162 BEGIN(DocCopyBlock);
7164<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7166 yyextra->docBlock <<
"\\ilinebr ";
7167 yyextra->docBlock << pat;
7169 BEGIN(DocCopyBlock);
7171<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7173 yyextra->docBlock << pat;
7175 BEGIN(DocCopyBlock);
7177<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7178<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7179<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7181 yyextra->docBlock <<
"\\ilinebr ";
7182 yyextra->docBlock << pat;
7184 BEGIN(DocCopyBlock);
7186<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7187<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7188<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7190 yyextra->docBlock << pat;
7192 BEGIN(DocCopyBlock);
7195 yyextra->docBlock <<
"```";
7198 yyextra->docBlock << yytext;
7201 yyextra->docBlock << yytext;
7203 BEGIN(DocCopyBlock);
7205<DocBlock>{B}*"<"{CODE}">" {
7206 if (yyextra->insideCS)
7208 yyextra->docBlock << yytext;
7210 BEGIN(DocCopyBlock);
7217<DocBlock>[^@*~`'\/\\\n]+ {
7218 yyextra->docBlock << yytext;
7222 yyextra->docBlock << *yytext;
7225 yyextra->docBlock << *yytext;
7230<DocCopyBlock>"</"{PRE}">" {
7235 yyextra->docBlock << yytext;
7237<DocCopyBlock>"</"{CODE}">" {
7242 yyextra->docBlock << yytext;
7244<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7249 yyextra->docBlock << yytext;
7251<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7256 yyextra->docBlock << yytext;
7258<DocCopyBlock>^{B}*"*"+/{BN}+ {
7259 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7267 yyextra->docBlock << indent;
7270<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7271 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7275 yyextra->docBlock << indent;
7282<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7283 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7287 yyextra->docBlock << indent+
"*";
7294<DocCopyBlock>^{B}*"*"+/{BN}* {
7295 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7298 if (yyextra->nestedComment>0)
7301 yyextra->docBlock << indent+
"*";
7306 yyextra->docBlock << indent;
7314<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7320 yyextra->docBlock << pat;
7322<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7328 yyextra->docBlock << pat;
7330<DocCopyBlock>"```" {
7331 if (yyextra->docBlockName==
"``")
7333 yyextra->docBlock <<
"`";
7335 yyextra->docBlock <<
"``";
7340 yyextra->docBlock << yytext;
7343<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7348 yyextra->docBlock << yytext;
7350<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7355 yyextra->docBlock << yytext;
7357<DocCopyBlock>"`"{1,2} {
7362 yyextra->docBlock << yytext;
7364<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7365 yyextra->docBlock << yytext;
7368 yyextra->docBlock << yytext;
7369 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7373 yyextra->lastStringContext=YY_START;
7374 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7375 yyextra->stopAtInvalidString=
true;
7379<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7382 yyextra->nestedComment++;
7384 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7386 yyextra->nestedComment--;
7388 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7390 warn(yyextra->fileName,yyextra->yyLineNr,
7391 "Found end of C comment inside a '{}' block without matching start of the comment!"
7392 " Maybe the end marker for the block is missing?",
7393 yyextra->docBlockName);
7396 yyextra->docBlock << yytext;
7399 yyextra->docBlock << *yytext;
7403 yyextra->docBlock << *yytext;
7405<DocCopyBlock><<EOF>> {
7406 warn(yyextra->fileName,yyextra->yyLineNr,
7407 "reached end of file while inside a '{}' block!"
7408 " The command that should end the block seems to be missing!",
7409 yyextra->docBlockName);
7416<Prototype>"operator"{B}*"("{B}*")" {
7417 yyextra->current->name+=yytext;
7420 yyextra->current->args+=*yytext;
7421 yyextra->currentArgumentContext = PrototypeQual;
7422 yyextra->fullArgString = yyextra->current->args;
7423 yyextra->copyArgString = &yyextra->current->args;
7424 BEGIN( ReadFuncArgType ) ;
7426<Prototype>"("({ID}"::")*({B}*[&*])+ {
7427 if (yyextra->insidePHP)
7433 yyextra->current->type+=yyextra->current->name+yytext;
7434 yyextra->current->name.clear();
7435 BEGIN( PrototypePtr );
7438<PrototypePtr>{SCOPENAME} {
7439 yyextra->current->name+=yytext;
7442 yyextra->current->args+=*yytext;
7443 yyextra->currentArgumentContext = PrototypeQual;
7444 yyextra->fullArgString = yyextra->current->args;
7445 yyextra->copyArgString = &yyextra->current->args;
7446 BEGIN( ReadFuncArgType ) ;
7449 yyextra->current->type+=
')';
7453 yyextra->current->name+=yytext;
7456 BEGIN( PrototypeSkipLine);
7458<PrototypeQual>{B}*"const"{B}* {
7459 yyextra->current->args +=
" const ";
7460 yyextra->current->argList.setConstSpecifier(
TRUE);
7462<PrototypeQual>{B}*"volatile"{B}* {
7463 yyextra->current->args +=
" volatile ";
7464 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7466<PrototypeQual>{B}*"="{B}*"0"{B}* {
7467 yyextra->current->args +=
" = 0";
7468 yyextra->current->virt = Specifier::Pure;
7469 yyextra->current->argList.setPureSpecifier(
TRUE);
7471<PrototypeQual>"throw"{B}*"(" {
7472 yyextra->current->exception =
"throw(";
7473 BEGIN(PrototypeExc);
7476 yyextra->current->exception +=
')';
7477 BEGIN(PrototypeQual);
7480 yyextra->current->exception += *yytext;
7483 yyextra->current->args += *yytext;
7486 yyextra->current->name += *yytext;
7488<PrototypeSkipLine>. {
7494<SkipCxxComment>.*"\\\n" {
7495 if (yyextra->insideCS)
7504<SkipCxxComment>{ANYopt}/\n {
7505 BEGIN( yyextra->lastCContext ) ;
7507<SkipComment>[^\*\n]+
7512 if (!yyextra->insideCpp) REJECT;
7513 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7514 yyextra->lastC11AttributeContext = YY_START;
7515 BEGIN( SkipC11Attribute );
7520 if (yyextra->insideIDL && yyextra->insideCppQuote)
7524 else if (yyextra->insidePHP)
7526 yyextra->lastStringContext=YY_START;
7531 if (!yyextra->insidePHP)
7533 yyextra->lastCPPContext = YY_START;
7538 yyextra->lastCContext = YY_START ;
7539 BEGIN( SkipCxxComment ) ;
7543 if (!yyextra->insidePHP)
7545 yyextra->lastCContext = YY_START ;
7546 BEGIN( SkipCxxComment ) ;
7549 if (yyextra->insidePHP)
7551 yyextra->lastStringContext=YY_START;
7552 BEGIN(SkipPHPString);
7556 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7558 if (yyextra->current->type.isEmpty())
7560 if (yyextra->current->name.isEmpty())
7561 yyextra->current->name=
"?";
7563 yyextra->current->name+=
"?";
7567 yyextra->current->type+=
"?";
7571<*>"}" { yyextra->exported=
false; }
7573<SkipComment>{CPPC}|{CCS}
7574<*>{CCS} { yyextra->lastCContext = YY_START ;
7575 BEGIN( SkipComment ) ;
7577<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7579 yyextra->lastCContext = YY_START ;
7580 BEGIN( SkipCxxComment ) ;
7583 if (yyextra->insideCS && yyextra->fakeNS)
7587 BEGIN ( ReadNSBody);
7599 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7601 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7603 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7613 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7614 yyextra->outerScopeEntries.clear();
7615 yyextra->baseName.clear();
7616 yyextra->protection = Protection::Public;
7617 yyextra->baseProt = Protection::Public;
7618 yyextra->sharpCount = 0;
7619 yyextra->roundCount = 0;
7620 yyextra->curlyCount = 0;
7621 yyextra->mtype = MethodTypes::Method;
7622 yyextra->isStatic =
FALSE;
7623 yyextra->virt = Specifier::Normal;
7624 yyextra->baseVirt = Specifier::Normal;
7625 yyextra->isTypedef =
FALSE;
7626 yyextra->insideTryBlock =
FALSE;
7627 yyextra->insideFormula =
FALSE;
7628 yyextra->insideCode=
FALSE;
7630 yyextra->previous = 0;
7631 yyextra->firstTypedefEntry.reset();
7632 yyextra->memspecEntry.reset();
7637 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7638 if (yyextra->insideJava)
7640 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7642 yyextra->current->protection = yyextra->protection;
7643 yyextra->current->exported = yyextra->exported ;
7644 yyextra->current->mtype = yyextra->mtype;
7645 yyextra->current->virt = yyextra->virt;
7646 yyextra->current->isStatic = yyextra->isStatic;
7647 yyextra->current->lang = yyextra->language;
7649 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7650 yyextra->isTypedef=
FALSE;
7658 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7659 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7661 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7667 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7670 for (p = yytext ; *p ; ++p )
7674 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7678 yyextra->column+=tabSize - (yyextra->column%tabSize);
7682 yyextra->column++,yyextra->yyColNr++;
7690 int col=startIndent;
7696 if (c==
'\t') col+=tabSize-(col%tabSize);
7697 else if (c==
'\n') col=0;
7705 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7706 yyextra->current->
protection = yyextra->protection = prot;
7707 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7708 yyextra->current->type.clear();
7709 yyextra->current->name.clear();
7710 yyextra->current->args.clear();
7711 yyextra->current->argList.clear();
7717 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7718 size_t tl=yyextra->current->type.length();
7719 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7721 yyextra->current->type +=
' ' ;
7723 yyextra->current->type += yyextra->current->name;
7724 yyextra->current->name.clear() ;
7725 tl=yyextra->current->type.length();
7726 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7728 yyextra->current->type +=
' ' ;
7730 yyextra->current->type += yyextra->current->args ;
7731 yyextra->current->args.clear() ;
7732 yyextra->current->argList.clear();
7739 if (s==
nullptr || *s==0)
return name;
7741 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7753 bool funcPtr = i>0 && type[i-1]==
')';
7755 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7756 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7757 return type.
left(i);
7763 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7766 yyextra->docBlock <<
"\\iskip";
7768 yyextra->docBlockName=blockName;
7769 yyextra->fencedSize=fencedSize;
7770 yyextra->isCodeBlock=codeBlock;
7771 yyextra->nestedComment=0;
7777 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7778 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7782 yyextra->docBlock <<
"\\endiskip";
7784 yyextra->docBlockName=
"";
7804 int i=name.
find(
"operator");
7805 if (i==-1)
return FALSE;
7815 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7817 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7818 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7819 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7820 yyextra->insideD = yyextra->language==SrcLangExt::D;
7821 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7822 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7823 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7824 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7825 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7826 yyextra->language==SrcLangExt::Lex);
7837 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7838 if (yyextra->current_root->section.isScope())
7841 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7843 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7845 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7855 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7856 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7857 if (yyextra->current->argList.empty())
return FALSE;
7858 for (
const Argument &a : yyextra->current->argList)
7869 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7870 if (yyextra->insideJava)
7873 yyextra->current->protection = Protection::Public;
7874 if (text.
find(
"protected")!=-1)
7875 yyextra->current->protection = Protection::Protected;
7876 else if (text.
find(
"private")!=-1)
7877 yyextra->current->protection = Protection::Private;
7878 else if (text.
find(
"package")!=-1)
7879 yyextra->current->protection = Protection::Package;
7886 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7887 int si =
static_cast<int>(yyextra->current->args.length());
7888 if (yyextra->oldStyleArgType.isEmpty())
7890 std::string args = yyextra->current->args.str();
7891 static const reg::Ex re(R
"(\([^)]*\).*)");
7897 bi1=(int)match.position();
7898 size_t secondMatchStart = match.position()+match.length();
7901 bi2=(int)match.position();
7905 if (bi1!=-1 && bi2!=-1)
7908 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7910 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7911 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7913 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7914 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7915 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7920 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7923 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7924 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7926 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7927 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7933 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7936 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7940 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7941 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7954 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7957 oldStyleArgPtr=yyextra->current->args.
left(j);
7976 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7977 for (
Argument &a : yyextra->current->argList)
7986 a.
docs=brief+
"\n\n"+docs;
8018 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8021 yyextra->current->briefFile = yyextra->fileName;
8022 yyextra->current->briefLine = yyextra->yyLineNr;
8026 yyextra->current->docFile = yyextra->fileName;
8027 yyextra->current->docLine = yyextra->yyLineNr;
8035 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8036 if (yyextra->tempEntry==0)
8041 yyextra->previous = yyextra->current;
8042 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8046 yyextra->previous = yyextra->current;
8047 yyextra->current = yyextra->tempEntry;
8048 yyextra->tempEntry.reset();
8055 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8058 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8059 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8062 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8063 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8065 docEntry->inbodyFile = yyextra->fileName;
8066 docEntry->inbodyLine = lineNr;
8070 bool needsEntry=
FALSE;
8072 Markdown markdown(yyextra->fileName,lineNr);
8075 while (yyextra->commentScanner.parseCommentBlock(
8076 yyextra->thisParser,
8077 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8081 yyextra->docBlockInBody ?
FALSE : brief,
8082 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8083 yyextra->docBlockInBody,
8084 yyextra->protection,
8095 QCString docFile = yyextra->current->docFile;
8097 yyextra->current->docFile = docFile;
8098 yyextra->current->docLine = lineNr;
8106 if (yyextra->docBlockTerm)
8108 unput(yyextra->docBlockTerm);
8109 yyextra->docBlockTerm=0;
8116 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8127 QCString orgDoc = yyextra->current->doc;
8128 QCString orgBrief = yyextra->current->brief;
8129 int orgDocLine = yyextra->current->docLine;
8130 int orgBriefLine = yyextra->current->briefLine;
8132 yyextra->current->doc.
clear();
8133 yyextra->current->brief.clear();
8136 int lineNr = orgDocLine;
8138 Markdown markdown(yyextra->fileName,lineNr);
8141 while (yyextra->commentScanner.parseCommentBlock(
8142 yyextra->thisParser,
8143 yyextra->current.get(),
8150 yyextra->protection,
8159 if (needsEntry)
newEntry(yyscanner);
8165 a.
docs = yyextra->current->doc;
8168 yyextra->current->doc = orgDoc;
8169 yyextra->current->brief = orgBrief;
8170 yyextra->current->docLine = orgDocLine;
8171 yyextra->current->briefLine = orgBriefLine;
8182 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8183 for (
const auto &ce : rt->children())
8185 if (!ce->program.empty())
8189 yyextra->padCount=0;
8192 yyextra->programStr = ce->program.str();
8193 yyextra->inputString = yyextra->programStr.data();
8194 yyextra->inputPosition = 0;
8195 if (ce->section.isEnum() || ce->spec.isEnum())
8196 BEGIN( FindFields ) ;
8198 BEGIN( FindMembers ) ;
8199 yyextra->current_root = ce;
8200 yyextra->fileName = ce->fileName;
8202 yyextra->yyLineNr = ce->bodyLine;
8203 yyextra->yyColNr = ce->bodyColumn;
8204 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8206 yyextra->current = std::make_shared<Entry>();
8207 yyextra->isStatic =
FALSE;
8212 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8214 ce->groups = rt->groups;
8217 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8219 if ( ce->section.isClass() )
8221 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8223 yyextra->current->protection = yyextra->protection = Protection::Public ;
8225 else if (yyextra->insideJava)
8227 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8229 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8231 if (ce->lang==SrcLangExt::ObjC)
8233 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8237 yyextra->current->protection = yyextra->protection = Protection::Public ;
8242 yyextra->current->protection = yyextra->protection = Protection::Private ;
8245 else if (ce->section.isEnum() )
8247 yyextra->current->protection = yyextra->protection = ce->protection;
8249 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8251 if (ce->section.isNamespace() )
8253 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8255 yyextra->current->protection = yyextra->protection = ce->protection;
8256 yyextra->current->exported = yyextra->exported =
false;
8258 else if (ce->section.isNamespace() )
8260 yyextra->current->protection = yyextra->protection = Protection::Public ;
8261 yyextra->current->exported = yyextra->exported = ce->exported;
8265 yyextra->current->protection = yyextra->protection = Protection::Public ;
8266 yyextra->current->exported = yyextra->exported =
false;
8268 yyextra->mtype = MethodTypes::Method;
8269 yyextra->virt = Specifier::Normal;
8276 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8278 scannerYYlex(yyscanner);
8279 yyextra->lexInit=
TRUE;
8282 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8284 yyextra->programStr.clear();
8285 ce->program.str(std::string());
8301 const char *fileBuf,
8302 const std::shared_ptr<Entry> &rt,
8306 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8309 yyextra->inputString = fileBuf;
8310 yyextra->inputPosition = 0;
8311 yyextra->column = 0;
8312 scannerYYrestart(
nullptr,yyscanner);
8315 yyextra->protection = Protection::Public;
8316 yyextra->mtype = MethodTypes::Method;
8317 yyextra->isStatic =
FALSE;
8318 yyextra->exported =
false;
8319 yyextra->virt = Specifier::Normal;
8320 yyextra->current_root = rt;
8321 yyextra->yyLineNr = 1 ;
8322 yyextra->yyBegLineNr = 1;
8323 yyextra->yyBegColNr = 0;
8324 yyextra->anonCount = 0;
8325 yyextra->anonNSCount = 0;
8326 yyextra->fileName = fileName;
8327 yyextra->clangParser = clangParser;
8329 rt->lang = yyextra->language;
8330 msg(
"Parsing file {}...\n",yyextra->fileName);
8332 yyextra->current_root = rt;
8334 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8335 yyextra->current = std::make_shared<Entry>();
8340 yyextra->current->name = yyextra->fileName;
8341 yyextra->current->section = sec;
8342 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8344 yyextra->current->reset();
8346 if ( yyextra->insidePHP )
8348 BEGIN( FindMembersPHP );
8350 else if ( yyextra->insideJava )
8352 yyextra->current->name=
"java::lang";
8353 yyextra->current->fileName = yyextra->fileName;
8354 yyextra->current->section = EntryType::makeUsingDir();
8355 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8357 BEGIN( FindMembers );
8361 BEGIN( FindMembers );
8364 scannerYYlex(yyscanner);
8365 yyextra->lexInit=
TRUE;
8367 if (YY_START==Comment)
8369 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8373 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8375 yyextra->programStr.clear();
8376 rt->program.str(std::string());
8380 yyextra->anonNSCount++;
8383 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8386 parent->moveToSubEntryAndKeep(child);
8388 yyextra->outerScopeEntries.clear();
8397 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8400 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8403 if (!yyextra->current)
8408 const char *orgInputString;
8409 int orgInputPosition;
8410 YY_BUFFER_STATE orgState;
8413 orgState = YY_CURRENT_BUFFER;
8414 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8415 orgInputString = yyextra->inputString;
8416 orgInputPosition = yyextra->inputPosition;
8419 yyextra->inputString = text.
data();
8420 yyextra->inputPosition = 0;
8421 yyextra->column = 0;
8422 scannerYYrestart(
nullptr, yyscanner);
8424 scannerYYlex(yyscanner);
8425 yyextra->lexInit=
TRUE;
8427 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8428 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8430 yyextra->current->section = EntryType::makeVariableDoc();
8434 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8435 yy_switch_to_buffer(orgState, yyscanner);
8436 yyextra->inputString = orgInputString;
8437 yyextra->inputPosition = orgInputPosition;
8453 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8461 scannerYYlex_destroy(
p->yyscanner);
8465 const char *fileBuf,
8466 const std::shared_ptr<Entry> &root,
8470 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8471 yyextra->thisParser =
this;
8475 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8483 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8484 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8485 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8496#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)