13%option never-interactive
14%option prefix="scannerYY"
16%option extra-type="struct scannerYY_state *"
20#define YY_TYPEDEF_YY_SCANNER_T
60#define YY_NO_UNISTD_H 1
225static inline int computeIndent(
const char *s,
int startIndent);
256#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
259static inline const char *
getLexerFILE() {
return __FILE__;}
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.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static const char * getLexerFILE()
static void addType(yyscan_t yyscanner)
#define lineCount(s, len)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static void setContext(yyscan_t yyscanner)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
void fixArgumentListForJavaScript(ArgumentList &al)
static bool startOfRequiresExpression(const QCString &req)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
Some helper functions for std::string.
TextStream * pSkipInterpString
EntryRelations outerScopeEntries
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
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
std::pair< Entry *, std::shared_ptr< Entry > > EntryRelation
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
std::vector< EntryRelation > EntryRelations
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
271NOTopt (("!"{BNopt})|("not"{BN}+))?
273HEXDIGIT ({DIGIT}|[a-f]|[A-F])
274ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
275SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
276TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
277CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
280CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
281PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
282PHPUSEKW ("public"|"private"|"protected")
283IDLATTR ("["[^\]]*"]"){BN}*
284TYPEDEFPREFIX ((("volatile"|"const"){BN}+)?)
285RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
286RAWEND ")"[^ \t\(\)\\]{0,16}\"
287ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
288ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
289LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
290BITOP "&"|"|"|"^"|"<<"|">>"|"~"
291OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
292FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
293MODULE_ID ({ID}".")*{ID}
294LINENR {B}*[1-9][0-9]*
295FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
296FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
297FILECHARS {FILEICHAR}*{FILEECHAR}+
298HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
299VFILEMASK {FILECHARS}("."{FILECHARS})*
300FILEMASK {VFILEMASK}|{HFILEMASK}
311DCOMMC ("/\*!"|"/\**")
313DCOMMCPP ("/\/!"|"/\/\/")
315DCOMM {DCOMMC}|{DCOMMCPP}
383%x TryFunctionBlockEnd
398%x SkipInterpVerbString
412%x UNOIDLAttributeBlock
441%x SpecializationSingleQuote
442%x SpecializationDoubleQuote
475%x SliceDictionaryName
506<*>"DEPRECATED_ATTRIBUTE" {
507 if (!yyextra->insideObjC) REJECT;
509<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
510 if (!yyextra->insideObjC) REJECT;
511 yyextra->lastDeprecatedContext=YY_START;
512 yyextra->lastStringContext=Deprecated_round;
515<Deprecated_round>")" {
516 BEGIN(yyextra->lastDeprecatedContext);
518<Deprecated_round>{BNopt} {
521<Deprecated_round>. { }
523 yyextra->curlyCount=0;
524 yyextra->needsSemi =
TRUE;
525 BEGIN(SkipCurlyBlock);
528 yyextra->roundCount=0;
529 BEGIN(SkipRoundBlock);
532 ++yyextra->roundCount;
535 if (yyextra->roundCount )
536 --yyextra->roundCount ;
541 ++yyextra->curlyCount ;
544 if( yyextra->curlyCount )
546 --yyextra->curlyCount ;
548 else if (yyextra->needsSemi)
554 BEGIN( FindMembers );
558 if (yyextra->insidePHP)
560 yyextra->lastStringContext=NextSemi;
561 BEGIN(SkipPHPString);
564<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
566 yyextra->lastStringContext=NextSemi;
571 BEGIN( FindMembers );
575 BEGIN( FindMembers );
578 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
582<FindMembers>"<?php" {
583 yyextra->insidePHP =
TRUE;
585<FindMembersPHP>"<?"("php"?) {
586 BEGIN( FindMembers );
588<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
590 BEGIN( FindMembers );
592<FindMembers>"?>"|"</script>" {
593 if (yyextra->insidePHP)
594 BEGIN( FindMembersPHP );
598<FindMembersPHP>[^\n<]+ {
605<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
610<FindMembers>"%{"[^\n]* {
611 if (!yyextra->insideIDL)
615 if (!yyextra->insideIDL)
618<FindMembers>{B}*("properties"){BN}*":"{BN}* {
620 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
623<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
625 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
628<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
630 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
633<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
635 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
638<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
643<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
645 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
647<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
650<FindMembers>{B}*"internal"{BN}*":"{BN}* {
651 if (yyextra->insideCli)
660<FindMembers>{B}*"protected"{BN}*":"{BN}* {
663<FindMembers>{B}*"private"{BN}*":"{BN}* {
666<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
667 if (!yyextra->insideCpp) REJECT;
671<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
672 if (!yyextra->insideCpp) REJECT;
676<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
677 if (!yyextra->insideCpp) REJECT;
689<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
690<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
691 BEGIN( SkipComment ) ;
693<CppProt>("slots"|"Q_SLOTS") {
694 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
696<FindMembers>{B}*"event"{BN}+ {
697 if (yyextra->insideCli)
701 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
702 yyextra->current->bodyLine = yyextra->yyLineNr;
703 yyextra->current->bodyColumn = yyextra->yyColNr;
704 yyextra->curlyCount=0;
705 BEGIN( CliPropertyType );
707 else if (yyextra->insideCS)
710 yyextra->current->mtype = MethodTypes::Event;
711 yyextra->current->bodyLine = yyextra->yyLineNr;
712 yyextra->current->bodyColumn = yyextra->yyColNr;
719<FindMembers>{B}*"property"{BN}+ {
720 if (yyextra->insideCli)
724 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
725 yyextra->current->bodyLine = yyextra->yyLineNr;
726 yyextra->current->bodyColumn = yyextra->yyColNr;
727 yyextra->curlyCount=0;
728 BEGIN( CliPropertyType );
735<CliPropertyType>{ID} {
737 yyextra->current->name = yytext;
739<CliPropertyType>"[" {
740 yyextra->current->args =
"[";
741 BEGIN( CliPropertyIndex );
743<CliPropertyType>"{" {
744 yyextra->curlyCount=0;
746 BEGIN( CSAccessorDecl );
748<CliPropertyType>";" {
750 BEGIN( FindMembers );
755<CliPropertyType>{B}* {
759 yyextra->current->type += yytext;
761<CliPropertyIndex>"]" {
762 BEGIN( CliPropertyType );
763 yyextra->current->args+=yytext;
766 yyextra->current->args+=yytext;
781<FindMembers>{B}*"@private"{BN}+ {
784<FindMembers>{B}*"@protected"{BN}+ {
787<FindMembers>{B}*"@public"{BN}+ {
790<FindMembers>[\-+]{BN}* {
791 if (!yyextra->insideObjC)
797 yyextra->current->fileName = yyextra->fileName;
798 yyextra->current->startLine = yyextra->yyLineNr;
799 yyextra->current->startColumn = yyextra->yyColNr;
800 yyextra->current->bodyLine = yyextra->yyLineNr;
801 yyextra->current->bodyColumn = yyextra->yyColNr;
802 yyextra->current->section = EntryType::makeFunction();
803 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
804 yyextra->insideObjC =
TRUE;
805 yyextra->yyBegColNr = yyextra->yyColNr;
806 yyextra->yyBegLineNr = yyextra->yyLineNr;
807 yyextra->current->virt = Specifier::Virtual;
809 yyextra->current->isStatic=yytext[0]==
'+';
815 BEGIN( ObjCReturnType );
816 yyextra->current->type.clear();
817 yyextra->roundCount=0;
820 if (yyextra->current->type.isEmpty())
822 yyextra->current->type +=
"id";
824 yyextra->current->name = yytext;
828 yyextra->current->name +=
':';
830 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
833<ObjCReturnType>[^()]* {
834 yyextra->current->type += yytext;
836<ObjCReturnType>"(^)(" {
837 yyextra->current->type += yytext;
838 yyextra->roundCount++;
841 yyextra->current->type += yytext;
842 yyextra->roundCount++;
845 if (yyextra->roundCount<=0)
851 yyextra->current->type += yytext;
852 yyextra->roundCount--;
855<ObjCParams>({ID})?{BN}*":" {
860 yyextra->current->name +=
" :";
864 yyextra->current->name += keyw+
":";
866 if (yyextra->current->argList.back().type.isEmpty())
868 yyextra->current->argList.back().type=
"id";
872 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
874<ObjCParams>{ID}{BN}* {
878<ObjCParams>","{BN}*"..." {
885 yyextra->current->argList.push_back(a);
893 yyextra->roundCount=0;
894 yyextra->current->argList.back().type.clear();
895 BEGIN( ObjCParamType );
898 yyextra->roundCount++;
899 yyextra->current->argList.back().type+=yytext;
901<ObjCParamType>")"/{B}* {
902 if (yyextra->roundCount<=0)
908 yyextra->current->argList.back().type+=yytext;
909 yyextra->roundCount--;
912<ObjCParamType>[^()]* {
915<ObjCMethod,ObjCParams>";" {
916 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
918 yyextra->current->argList.back().type=
"id";
920 if (yyextra->current->argList.empty())
922 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
929<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
934 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
936 yyextra->current->argList.back().type=
"id";
938 if (yyextra->current->argList.empty())
940 yyextra->current->argList.setNoParameters(
TRUE);
946<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
947 if (yyextra->insideSlice)
950 yyextra->current->bodyLine = yyextra->yyLineNr;
951 yyextra->current->bodyColumn = yyextra->yyColNr;
952 yyextra->current->fileName = yyextra->fileName ;
953 yyextra->current->startLine = yyextra->yyLineNr ;
954 yyextra->current->startColumn = yyextra->yyColNr;
955 yyextra->current->args.clear();
956 yyextra->current->section = EntryType::makeTypedef();
957 yyextra->isTypedef =
TRUE;
958 BEGIN( SliceSequence );
963<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
964 if (yyextra->insideSlice)
967 yyextra->current->bodyLine = yyextra->yyLineNr;
968 yyextra->current->bodyColumn = yyextra->yyColNr;
969 yyextra->current->fileName = yyextra->fileName ;
970 yyextra->current->startLine = yyextra->yyLineNr ;
971 yyextra->current->startColumn = yyextra->yyColNr;
972 yyextra->current->args.clear();
973 yyextra->current->section = EntryType::makeTypedef() ;
974 yyextra->isTypedef =
TRUE;
975 BEGIN( SliceDictionary );
980<FindMembers>{BN}{1,80} {
983<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
984 if (yyextra->insideJava)
987 yyextra->lastSkipRoundContext = YY_START;
988 yyextra->roundCount=0;
993 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
994 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
995 yyextra->current->protection = Protection::Public ;
997 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
1004<ObjCPropAttr>"getter="{ID} {
1005 yyextra->current->read = yytext+7;
1007<ObjCPropAttr>"setter="{ID} {
1008 yyextra->current->write = yytext+7;
1010<ObjCPropAttr>"readonly" {
1011 yyextra->current->spec.setWritable(
false);
1013<ObjCPropAttr>"readwrite" {
1015<ObjCPropAttr>"assign" {
1017<ObjCPropAttr>"unsafe_unretained" {
1018 yyextra->current->spec.setAssign(
false);
1019 yyextra->current->spec.setUnretained(
true);
1021<ObjCPropAttr>"retain" {
1022 yyextra->current->spec.setAssign(
false);
1023 yyextra->current->spec.setRetain(
true);
1025<ObjCPropAttr>"copy" {
1026 yyextra->current->spec.setAssign(
false);
1027 yyextra->current->spec.setCopy(
true);
1029<ObjCPropAttr>"weak" {
1030 yyextra->current->spec.setAssign(
false);
1031 yyextra->current->spec.setWeak(
true);
1033<ObjCPropAttr>"strong" {
1034 yyextra->current->spec.setAssign(
false);
1035 yyextra->current->spec.setStrong(
true);
1037<ObjCPropAttr>"nonatomic" {
1038 yyextra->current->spec.setNonAtomic(
true);
1043<FindMembers>"@"{ID}("."{ID})+ {
1044 if (yyextra->insideJava)
1053<FindMembers>"@"{ID} {
1054 if (yyextra->insideJava)
1058 else if (
qstrcmp(yytext,
"@property")==0)
1060 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1061 yyextra->current->spec.setWritable(
true).setReadable(
true);
1062 yyextra->current->protection = Protection::Public ;
1064 else if (
qstrcmp(yytext,
"@synthesize")==0)
1066 BEGIN( ObjCSkipStatement );
1068 else if (
qstrcmp(yytext,
"@dynamic")==0)
1070 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1077<ObjCSkipStatement>";" {
1080<PackageName>{ID}(("."|"\\"){ID})* {
1081 yyextra->isTypedef=
FALSE;
1083 yyextra->current->name = yytext;
1084 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1085 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1086 yyextra->current->section = EntryType::makeNamespace();
1087 yyextra->current->type =
"namespace" ;
1088 yyextra->current->fileName = yyextra->fileName;
1089 yyextra->current->startLine = yyextra->yyLineNr;
1090 yyextra->current->startColumn = yyextra->yyColNr;
1091 yyextra->current->bodyLine = yyextra->yyLineNr;
1092 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
1096 std::shared_ptr<Entry> tmp = yyextra->current;
1097 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1098 yyextra->current_root = std::move(tmp);
1103 yyextra->curlyCount=0;
1104 BEGIN( ReadNSBody );
1106<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1107 if (!yyextra->insideCpp) REJECT;
1109 yyextra->current->exported =
true;
1111 BEGIN( ModuleName );
1113<FindMembers>{B}*"module"{BN}*";" {
1114 if (!yyextra->insideCpp) REJECT;
1115 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1118 BEGIN( FindMembers );
1120<FindMembers>{B}*"module"{BN}+ {
1121 if (!yyextra->insideCpp) REJECT;
1123 yyextra->current->exported =
false;
1125 BEGIN( ModuleName );
1127<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1128 if (!yyextra->insideCpp) REJECT;
1129 yyextra->current->exported =
true;
1131 BEGIN( ModuleImport );
1133<FindMembers>{B}*"import"{BN}+ {
1134 if (!yyextra->insideCpp) REJECT;
1136 BEGIN( ModuleImport );
1138<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1140 int i = name.
find(
':');
1146 yyextra->current->exported,
1149 yyextra->current->section = EntryType::makeModuleDoc();
1150 yyextra->isTypedef=
FALSE;
1152 yyextra->current->type +=
" module";
1153 yyextra->current->fileName = yyextra->fileName;
1154 yyextra->current->startLine = yyextra->yyLineNr;
1155 yyextra->current->startColumn = yyextra->yyColNr;
1156 yyextra->current->bodyLine = yyextra->yyLineNr;
1157 yyextra->current->bodyColumn = yyextra->yyColNr;
1158 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
1161<ModuleName>{MODULE_ID} {
1165 yyextra->current->exported,
1167 yyextra->current->section = EntryType::makeModuleDoc();
1168 yyextra->isTypedef=
FALSE;
1170 yyextra->current->type +=
" module";
1171 yyextra->current->fileName = yyextra->fileName;
1172 yyextra->current->startLine = yyextra->yyLineNr;
1173 yyextra->current->startColumn = yyextra->yyColNr;
1174 yyextra->current->bodyLine = yyextra->yyLineNr;
1175 yyextra->current->bodyColumn = yyextra->yyColNr;
1176 yyextra->current->name = yytext;
1179<ModuleName>":"{BN}+"private" {
1180 yyextra->current->exported = yyextra->exported =
false;
1183<ModuleName>";" { unput(
';');
1188<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1194<ModuleImport>"<"[^>\n]*">" {
1200<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1202 int i = name.
find(
':');
1208 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1212<ModuleImport>{MODULE_ID} {
1216 yyextra->current->exported);
1219<ModuleImport>";" { BEGIN(FindMembers); }
1220<ModuleImport>\n {
lineCount(yyscanner); }
1222<FindMembers>{B}*"export"{BN}+"{" {
1223 yyextra->current->exported = yyextra->exported =
true;
1225<FindMembers>{B}*"export"{BN}+ {
1226 if (!yyextra->insideCpp) REJECT;
1227 yyextra->current->exported=
true;
1229<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1230 yyextra->current->type +=
" initonly ";
1231 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1234<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1235 yyextra->current->isStatic =
TRUE;
1238<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1239 yyextra->current->isStatic =
TRUE;
1242<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1243 yyextra->current->isStatic =
FALSE;
1244 yyextra->current->explicitExternal =
TRUE;
1247<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1249 yyextra->current->type +=
" const ";
1250 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1258<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1259 yyextra->current->type +=
" virtual ";
1260 yyextra->current->virt = Specifier::Virtual;
1263<FindMembers>{B}*"constexpr"{BN}+ {
1264 if (yyextra->insideCpp)
1266 yyextra->current->spec.setConstExpr(
true);
1270<FindMembers>{B}*"consteval"{BN}+ {
1271 if (yyextra->insideCpp)
1273 yyextra->current->spec.setConstEval(
true);
1277<FindMembers>{B}*"constinit"{BN}+ {
1278 if (yyextra->insideCpp)
1280 yyextra->current->spec.setConstInit(
true);
1284<FindMembers>{B}*"published"{BN}+ {
1285 if (yyextra->insideIDL)
1288 yyextra->current->spec.setPublished(
true);
1295<FindMembers>{B}*"sealed"{BN}+ {
1296 if (yyextra->insideCS)
1298 yyextra->current->spec.setSealed(
true);
1305<FindMembers>{B}*"abstract"{BN}+ {
1306 if (yyextra->insidePHP || yyextra->insideCS)
1308 yyextra->current->spec.setAbstract(
true);
1312 if (yyextra->insideCpp) REJECT;
1313 yyextra->current->type +=
" abstract ";
1314 if (!yyextra->insideJava)
1316 yyextra->current->virt = Specifier::Pure;
1320 yyextra->current->spec.setAbstract(
true);
1325<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1326 yyextra->current->spec.setInline(
true);
1329<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1330 yyextra->current->spec.setMutable(
true);
1333<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1334 yyextra->current->spec.setThreadLocal(
true);
1337<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1338 yyextra->current->spec.setExplicit(
true);
1341<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1342 yyextra->current->spec.setLocal(
true);
1345<FindMembers>{B}*"@required"{BN}+ {
1346 yyextra->current->spec.setOptional(
false).setRequired(
true);
1349<FindMembers>{B}*"@optional"{BN}+ {
1350 yyextra->current->spec.setRequired(
false).setOptional(
true);
1358<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1359<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1360 yyextra->isTypedef=
FALSE;
1361 yyextra->current->section = EntryType::makeNamespace();
1362 yyextra->current->type =
"namespace" ;
1363 yyextra->current->fileName = yyextra->fileName;
1364 yyextra->current->startLine = yyextra->yyLineNr;
1365 yyextra->current->startColumn = yyextra->yyColNr;
1366 yyextra->current->bodyLine = yyextra->yyLineNr;
1367 yyextra->current->bodyColumn = yyextra->yyColNr;
1369 if (yyextra->insidePHP)
1371 BEGIN( PackageName );
1375 BEGIN( CompoundName );
1378<FindMembers>{B}*"module"{BN}+ {
1380 if (yyextra->insideIDL || yyextra->insideSlice)
1382 yyextra->isTypedef=
FALSE;
1383 yyextra->current->section = EntryType::makeNamespace();
1384 yyextra->current->type =
"module" ;
1385 yyextra->current->fileName = yyextra->fileName;
1386 yyextra->current->startLine = yyextra->yyLineNr;
1387 yyextra->current->startColumn = yyextra->yyColNr;
1388 yyextra->current->bodyLine = yyextra->yyLineNr;
1389 yyextra->current->bodyColumn = yyextra->yyColNr;
1390 BEGIN( CompoundName );
1392 else if (yyextra->insideD)
1403<FindMembers>{B}*"library"{BN}+ {
1405 if (yyextra->insideIDL)
1407 yyextra->isTypedef=
FALSE;
1408 yyextra->current->section = EntryType::makeNamespace();
1409 yyextra->current->type =
"library" ;
1410 yyextra->current->fileName = yyextra->fileName;
1411 yyextra->current->startLine = yyextra->yyLineNr;
1412 yyextra->current->startColumn = yyextra->yyColNr;
1413 yyextra->current->bodyLine = yyextra->yyLineNr;
1414 yyextra->current->bodyColumn = yyextra->yyColNr;
1415 BEGIN( CompoundName );
1423<FindMembers>{B}*"constants"{BN}+ {
1425 if (yyextra->insideIDL)
1427 yyextra->isTypedef=
FALSE;
1428 yyextra->current->section = EntryType::makeNamespace();
1429 yyextra->current->type =
"constants";
1430 yyextra->current->fileName = yyextra->fileName;
1431 yyextra->current->startLine = yyextra->yyLineNr;
1432 yyextra->current->startColumn = yyextra->yyColNr;
1433 yyextra->current->bodyLine = yyextra->yyLineNr;
1434 yyextra->current->bodyColumn = yyextra->yyColNr;
1435 BEGIN( CompoundName );
1443<FindMembers>{BN}*("service"){BN}+ {
1445 if (yyextra->insideIDL)
1447 yyextra->isTypedef=
FALSE;
1448 yyextra->current->section = EntryType::makeClass();
1452 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1454 yyextra->current->type +=
" service " ;
1455 yyextra->current->fileName = yyextra->fileName;
1456 yyextra->current->startLine = yyextra->yyLineNr;
1457 yyextra->current->bodyLine = yyextra->yyLineNr;
1458 yyextra->current->bodyColumn = yyextra->yyColNr;
1459 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1467<FindMembers>{BN}*("singleton"){BN}+ {
1469 if (yyextra->insideIDL)
1471 yyextra->isTypedef=
FALSE;
1472 yyextra->current->section = EntryType::makeClass();
1474 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1475 setPublished(spec.isPublished());
1477 yyextra->current->type +=
" singleton " ;
1478 yyextra->current->fileName = yyextra->fileName;
1479 yyextra->current->startLine = yyextra->yyLineNr;
1480 yyextra->current->bodyLine = yyextra->yyLineNr;
1481 yyextra->current->bodyColumn = yyextra->yyColNr;
1482 BEGIN( CompoundName );
1490<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1492 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1494 yyextra->isTypedef=
FALSE;
1495 yyextra->current->section = EntryType::makeClass();
1497 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1499 setOptional(spec.isOptional()).
1500 setPublished(spec.isPublished()).
1501 setLocal(spec.isLocal());
1503 yyextra->current->type +=
" interface" ;
1504 yyextra->current->fileName = yyextra->fileName;
1505 yyextra->current->startLine = yyextra->yyLineNr;
1506 yyextra->current->startColumn = yyextra->yyColNr;
1507 yyextra->current->bodyLine = yyextra->yyLineNr;
1508 yyextra->current->bodyColumn = yyextra->yyColNr;
1510 BEGIN( CompoundName );
1518<FindMembers>{B}*"@implementation"{BN}+ {
1520 yyextra->isTypedef=
FALSE;
1521 yyextra->current->section = EntryType::makeObjcImpl();
1522 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1523 yyextra->insideObjC =
TRUE;
1524 yyextra->current->protection = yyextra->protection = Protection::Public ;
1526 yyextra->current->type +=
" implementation" ;
1527 yyextra->current->fileName = yyextra->fileName;
1528 yyextra->current->startLine = yyextra->yyLineNr;
1529 yyextra->current->bodyLine = yyextra->yyLineNr;
1530 yyextra->current->bodyColumn = yyextra->yyColNr;
1531 BEGIN( CompoundName );
1533<FindMembers>{B}*"@interface"{BN}+ {
1535 yyextra->isTypedef=
FALSE;
1536 yyextra->current->section = EntryType::makeClass();
1537 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1538 if (!yyextra->insideJava)
1540 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1541 yyextra->insideObjC =
TRUE;
1543 yyextra->current->protection = yyextra->protection = Protection::Public ;
1545 yyextra->current->type +=
" interface" ;
1546 yyextra->current->fileName = yyextra->fileName;
1547 yyextra->current->startLine = yyextra->yyLineNr;
1548 yyextra->current->startColumn = yyextra->yyColNr;
1549 yyextra->current->bodyLine = yyextra->yyLineNr;
1550 yyextra->current->bodyColumn = yyextra->yyColNr;
1551 BEGIN( CompoundName );
1553<FindMembers>{B}*"@protocol"{BN}+ {
1555 yyextra->isTypedef=
FALSE;
1556 yyextra->current->section = EntryType::makeClass();
1558 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1559 yyextra->insideObjC =
TRUE;
1560 yyextra->current->protection = yyextra->protection = Protection::Public ;
1562 yyextra->current->type +=
" protocol" ;
1563 yyextra->current->fileName = yyextra->fileName;
1564 yyextra->current->startLine = yyextra->yyLineNr;
1565 yyextra->current->startColumn = yyextra->yyColNr;
1566 yyextra->current->bodyLine = yyextra->yyLineNr;
1567 yyextra->current->bodyColumn = yyextra->yyColNr;
1568 BEGIN( CompoundName );
1570<FindMembers>{B}*"exception"{BN}+ {
1571 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1572 yyextra->isTypedef=
FALSE;
1573 yyextra->current->section = EntryType::makeClass();
1576 yyextra->current->spec =
TypeSpecifier().setException(
true).
1577 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1579 yyextra->current->type +=
" exception" ;
1580 yyextra->current->fileName = yyextra->fileName;
1581 yyextra->current->startLine = yyextra->yyLineNr;
1582 yyextra->current->startColumn = yyextra->yyColNr;
1583 yyextra->current->bodyLine = yyextra->yyLineNr;
1584 yyextra->current->bodyColumn = yyextra->yyColNr;
1586 BEGIN( CompoundName );
1588<FindMembers>"@class" |
1589<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1590<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1592 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1593 bool isConst=decl.
find(
"const")!=-1;
1594 bool isVolatile=decl.
find(
"volatile")!=-1;
1595 yyextra->current->section = EntryType::makeClass();
1597 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1600 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1602 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1604 yyextra->current->spec.setLocal(
true);
1608 yyextra->current->type +=
" const";
1610 else if (isVolatile)
1612 yyextra->current->type +=
" volatile";
1614 yyextra->current->type +=
" class" ;
1615 yyextra->current->fileName = yyextra->fileName;
1616 yyextra->current->startLine = yyextra->yyLineNr;
1617 yyextra->current->startColumn = yyextra->yyColNr;
1618 yyextra->current->bodyLine = yyextra->yyLineNr;
1619 yyextra->current->bodyColumn = yyextra->yyColNr;
1622 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1623 yyextra->insideObjC =
TRUE;
1626 if (yytext[yyleng-1]==
'{') unput(
'{');
1627 BEGIN( CompoundName ) ;
1629<FindMembers>{B}*"value class{" |
1630<FindMembers>{B}*"value class"{BN}+ {
1631 yyextra->isTypedef=
FALSE;
1632 yyextra->current->section = EntryType::makeClass();
1635 yyextra->current->type +=
" value class" ;
1636 yyextra->current->fileName = yyextra->fileName;
1637 yyextra->current->startLine = yyextra->yyLineNr;
1638 yyextra->current->startColumn = yyextra->yyColNr;
1639 yyextra->current->bodyLine = yyextra->yyLineNr;
1640 yyextra->current->bodyColumn = yyextra->yyColNr;
1642 if (yytext[yyleng-1]==
'{') unput(
'{');
1643 BEGIN( CompoundName ) ;
1645<FindMembers>{B}*"ref class{" |
1646<FindMembers>{B}*"ref class"{BN}+ {
1647 yyextra->isTypedef=
FALSE;
1648 yyextra->current->section = EntryType::makeClass();
1651 yyextra->current->type +=
" ref class" ;
1652 yyextra->current->fileName = yyextra->fileName;
1653 yyextra->current->startLine = yyextra->yyLineNr;
1654 yyextra->current->startColumn = yyextra->yyColNr;
1655 yyextra->current->bodyLine = yyextra->yyLineNr;
1656 yyextra->current->bodyColumn = yyextra->yyColNr;
1658 if (yytext[yyleng-1]==
'{') unput(
'{');
1659 BEGIN( CompoundName ) ;
1661<FindMembers>{B}*"interface class{" |
1662<FindMembers>{B}*"interface class"{BN}+ {
1663 yyextra->isTypedef=
FALSE;
1664 yyextra->current->section = EntryType::makeClass();
1665 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1667 yyextra->current->type +=
" interface class" ;
1668 yyextra->current->fileName = yyextra->fileName;
1669 yyextra->current->startLine = yyextra->yyLineNr;
1670 yyextra->current->startColumn = yyextra->yyColNr;
1671 yyextra->current->bodyLine = yyextra->yyLineNr;
1672 yyextra->current->bodyColumn = yyextra->yyColNr;
1674 if (yytext[yyleng-1]==
'{') unput(
'{');
1675 BEGIN( CompoundName ) ;
1677<FindMembers>{B}*"coclass"{BN}+ {
1678 if (yyextra->insideIDL)
1680 yyextra->isTypedef=
FALSE;
1681 yyextra->current->section = EntryType::makeClass();
1683 yyextra->current->type +=
" coclass" ;
1684 yyextra->current->fileName = yyextra->fileName;
1685 yyextra->current->startLine = yyextra->yyLineNr;
1686 yyextra->current->startColumn = yyextra->yyColNr;
1687 yyextra->current->bodyLine = yyextra->yyLineNr;
1688 yyextra->current->bodyColumn = yyextra->yyColNr;
1690 BEGIN( CompoundName ) ;
1695 yyextra->current->name = yytext;
1696 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1700<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1701<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1702 if (yyextra->insideJava) REJECT;
1704 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1705 bool isConst=decl.
find(
"const")!=-1;
1706 bool isVolatile=decl.
find(
"volatile")!=-1;
1707 yyextra->current->section = EntryType::makeClass() ;
1711 setPublished(spec.isPublished()).
1712 setInline(spec.isInline()).
1713 setLocal(spec.isLocal());
1719 yyextra->current->type +=
" const";
1721 else if (isVolatile)
1723 yyextra->current->type +=
" volatile";
1725 yyextra->current->type +=
" struct" ;
1726 yyextra->current->fileName = yyextra->fileName;
1727 yyextra->current->startLine = yyextra->yyLineNr;
1728 yyextra->current->startColumn = yyextra->yyColNr;
1729 yyextra->current->bodyLine = yyextra->yyLineNr;
1730 yyextra->current->bodyColumn = yyextra->yyColNr;
1732 if (yytext[yyleng-1]==
'{') unput(
'{');
1733 BEGIN( CompoundName ) ;
1735<FindMembers>{B}*"value struct{" |
1736<FindMembers>{B}*"value struct"{BN}+ {
1737 yyextra->isTypedef=
FALSE;
1738 yyextra->current->section = EntryType::makeClass();
1739 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1741 yyextra->current->type +=
" value struct" ;
1742 yyextra->current->fileName = yyextra->fileName;
1743 yyextra->current->startLine = yyextra->yyLineNr;
1744 yyextra->current->startColumn = yyextra->yyColNr;
1745 yyextra->current->bodyLine = yyextra->yyLineNr;
1746 yyextra->current->bodyColumn = yyextra->yyColNr;
1748 if (yytext[yyleng-1]==
'{') unput(
'{');
1749 BEGIN( CompoundName ) ;
1751<FindMembers>{B}*"ref struct{" |
1752<FindMembers>{B}*"ref struct"{BN}+ {
1753 yyextra->isTypedef=
FALSE;
1754 yyextra->current->section = EntryType::makeClass();
1755 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1757 yyextra->current->type +=
" ref struct" ;
1758 yyextra->current->fileName = yyextra->fileName;
1759 yyextra->current->startLine = yyextra->yyLineNr;
1760 yyextra->current->startColumn = yyextra->yyColNr;
1761 yyextra->current->bodyLine = yyextra->yyLineNr;
1762 yyextra->current->bodyColumn = yyextra->yyColNr;
1764 if (yytext[yyleng-1]==
'{') unput(
'{');
1765 BEGIN( CompoundName ) ;
1767<FindMembers>{B}*"interface struct{" |
1768<FindMembers>{B}*"interface struct"{BN}+ {
1769 yyextra->isTypedef=
FALSE;
1770 yyextra->current->section = EntryType::makeClass();
1771 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1773 yyextra->current->type +=
" interface struct";
1774 yyextra->current->fileName = yyextra->fileName;
1775 yyextra->current->startLine = yyextra->yyLineNr;
1776 yyextra->current->startColumn = yyextra->yyColNr;
1777 yyextra->current->bodyLine = yyextra->yyLineNr;
1778 yyextra->current->bodyColumn = yyextra->yyColNr;
1780 if (yytext[yyleng-1]==
'{') unput(
'{');
1781 BEGIN( CompoundName ) ;
1783<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1784<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1785 if (yyextra->insideJava) REJECT;
1787 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1788 bool isConst=decl.
find(
"const")!=-1;
1789 bool isVolatile=decl.
find(
"volatile")!=-1;
1790 yyextra->current->section = EntryType::makeClass();
1797 yyextra->current->type +=
" const";
1799 else if (isVolatile)
1801 yyextra->current->type +=
" volatile";
1803 yyextra->current->type +=
" union" ;
1804 yyextra->current->fileName = yyextra->fileName;
1805 yyextra->current->startLine = yyextra->yyLineNr;
1806 yyextra->current->startColumn = yyextra->yyColNr;
1807 yyextra->current->bodyLine = yyextra->yyLineNr;
1808 yyextra->current->bodyColumn = yyextra->yyColNr;
1810 if (yytext[yyleng-1]==
'{') unput(
'{');
1811 BEGIN( CompoundName ) ;
1813<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1814<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1816 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1817 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1818 bool isEnumSytruct = text.
find(
"struct")!=-1;
1819 if (yyextra->insideJava)
1821 yyextra->current->section = EntryType::makeClass();
1827 yyextra->current->section = EntryType::makeEnum() ;
1830 yyextra->current->type +=
" enum";
1833 yyextra->current->spec.setStrong(
true);
1837 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1839 yyextra->current->fileName = yyextra->fileName;
1840 yyextra->current->startLine = yyextra->yyLineNr;
1841 yyextra->current->startColumn = yyextra->yyColNr;
1842 yyextra->current->bodyLine = yyextra->yyLineNr;
1843 yyextra->current->bodyColumn = yyextra->yyColNr;
1845 if (yytext[yyleng-1]==
'{') unput(
'{');
1846 BEGIN( CompoundName ) ;
1848<FindMembers>{B}*"concept"{BN}+ {
1849 if (yyextra->insideJava) REJECT;
1850 yyextra->isTypedef=
FALSE;
1851 yyextra->current->section = EntryType::makeConcept();
1853 yyextra->current->type +=
" concept";
1854 yyextra->current->fileName = yyextra->fileName;
1855 yyextra->current->startLine = yyextra->yyLineNr;
1856 yyextra->current->startColumn = yyextra->yyColNr;
1857 yyextra->current->bodyLine = yyextra->yyLineNr;
1858 yyextra->current->bodyColumn = yyextra->yyColNr;
1859 yyextra->keepComment =
true;
1861 BEGIN( ConceptName ) ;
1863<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1865 yyextra->current->name +=
"()";
1866 BEGIN( FindMembers );
1868<Operator>"("{BN}*")"{BNopt}/"(" {
1870 yyextra->current->name += yytext ;
1871 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1872 BEGIN( FindMembers ) ;
1876 BEGIN( FindMembers ) ;
1880 yyextra->current->name += *yytext ;
1882<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1883 if (!yyextra->current->type.startsWith(
"friend "))
1885 yyextra->current->name += yytext;
1889 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1891 BEGIN( FindMembers ) ;
1893<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1896 yyextra->current->tArgLists.
push_back(al);
1897 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1898 yyextra->templateStr=
"<";
1899 yyextra->fullArgString = yyextra->templateStr;
1900 yyextra->copyArgString = &yyextra->templateStr;
1901 yyextra->currentArgumentContext = FindMembers;
1902 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1904<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1905 if (yyextra->insideJava) REJECT;
1907 BEGIN( NSAliasName );
1910 yyextra->aliasName = yytext;
1911 BEGIN( NSAliasArg );
1913<NSAliasArg>({ID}"::")*{ID} {
1915 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1926 BEGIN( FindMembers );
1928<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1930 yyextra->aliasName=yytext;
1933<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1937 yyextra->current->fileName = yyextra->fileName;
1939 yyextra->current->section = EntryType::makeUsingDecl();
1940 yyextra->current_root->copyToSubEntry(yyextra->current);
1942 yyextra->current->section = EntryType::makeUsingDir();
1943 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1945 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1947<PHPUseAs>{BN}+"as"{BN}+ {
1950<PHPUseAs>{PHPUSEKW} {
1954 if (!yyextra->aliasName.isEmpty())
1959 yyextra->aliasName.clear();
const std::string & str() const
1961<PHPUse,PHPUseAs>[,;] {
1971<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1975 yyextra->current->fileName = yyextra->fileName;
1982 yyextra->current->section = EntryType::makeUsingDir();
1983 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)
1987<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1991 yyextra->current->fileName = yyextra->fileName;
2003 if (yyextra->insideD)
2005 yyextra->current->section = EntryType::makeUsingDir();
2010 yyextra->current->section = EntryType::makeUsingDecl();
2012 yyextra->previous = yyextra->current;
2013 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2017<IDLImport>"\""[^"]*"\"" {
2018 QCString fileName(&yytext[1],yyleng-2);
2034<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2035 if (yyextra->insideJava) REJECT;
2036 yyextra->current->startLine=yyextra->yyLineNr;
2037 yyextra->current->startColumn = yyextra->yyColNr;
2041<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2042<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2044 yyextra->current->name=yytext;
2045 yyextra->current->fileName = yyextra->fileName;
2046 yyextra->current->section = EntryType::makeUsingDecl();
2047 yyextra->current->startLine = yyextra->yyLineNr;
2048 yyextra->previous = yyextra->current;
2049 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2051 if (yyextra->insideCS)
2056 yyextra->current->name=yytext;
2057 yyextra->current->fileName = yyextra->fileName;
2058 yyextra->current->startLine = yyextra->yyLineNr;
2059 yyextra->current->startColumn = yyextra->yyColNr;
2060 yyextra->current->section = EntryType::makeUsingDir();
2061 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2066<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2068 yyextra->current->fileName = yyextra->fileName;
2069 yyextra->current->section = EntryType::makeUsingDecl();
2070 yyextra->current->startLine = yyextra->yyLineNr;
2071 yyextra->current->bodyLine = yyextra->yyLineNr;
2072 yyextra->current->bodyColumn = yyextra->yyColNr;
2073 yyextra->lastInitializerContext = UsingAlias;
2074 yyextra->sharpCount=0;
2075 yyextra->initBracketCount=0;
2077 BEGIN(ReadInitializer);
2080 yyextra->current->section = EntryType::makeVariable();
2082 init.stripPrefix(
"class ");
2083 init.stripPrefix(
"struct ");
2085 yyextra->current->type =
"typedef "+
init;
2086 yyextra->current->args.clear();
2087 yyextra->current->spec.setAlias(
true);
2088 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2093 yyextra->current->initializer << yytext;
2096 yyextra->current->initializer << yytext;
2100 yyextra->current->fileName = yyextra->fileName;
2101 yyextra->current->section = EntryType::makeUsingDir();
2102 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2106<Using>";" { BEGIN(FindMembers); }
2107<FindMembers>{SCOPENAME}{BN}*"<>" {
2112<FindMembers>{SCOPENAME}{BNopt}/"<" {
2114 if (yyextra->insideCpp && name==
"import") REJECT;
2115 yyextra->roundCount=0;
2116 yyextra->sharpCount=0;
2119 yyextra->current->name=name;
2125 BEGIN( EndTemplate );
2127<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2128 yyextra->sharpCount=0;
2129 yyextra->roundCount=0;
2137 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...
2140 if (!yyextra->insidePHP)
2146 yyextra->lastHereDocContext = YY_START;
2150<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2151 yyextra->current->name+=yytext;
2155 if (yyextra->roundCount==0)
2158 yyextra->sharpCount++;
2160 yyextra->current->name+=yytext;
2162<ClassTemplSpec,EndTemplate>">=" {
2163 yyextra->current->name+=yytext;
2165<ClassTemplSpec,EndTemplate>(">>") {
2166 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2174 yyextra->current->name+=yytext;
2179 yyextra->current->name+=
'>';
2181 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2183 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2188<EndTemplate>">"{BN}*"(" {
2190 yyextra->current->name+=
'>';
2192 if (yyextra->roundCount==0)
2194 --yyextra->sharpCount;
2196 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2198 yyextra->current->bodyLine = yyextra->yyLineNr;
2199 yyextra->current->bodyColumn = yyextra->yyColNr;
2200 yyextra->current->args =
"(";
2201 yyextra->currentArgumentContext = FuncQual;
2202 yyextra->fullArgString = yyextra->current->args;
2203 yyextra->copyArgString = &yyextra->current->args;
2205 BEGIN( ReadFuncArgType ) ;
2209 yyextra->current->name+=
"(";
2210 yyextra->roundCount++;
2213<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2215 yyextra->current->name+=
'>';
2216 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2221<EndTemplate>">"{BNopt}/"::" {
2223 yyextra->current->name+=
'>';
2225 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2227 BEGIN(FindMemberName);
2230<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2231 yyextra->roundCount++;
2233<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2234 if (yyextra->roundCount>0) yyextra->roundCount--;
2237 yyextra->current->name+=*yytext;
2240<FindMembers>"define"{BN}*"("{BN}*["'] {
2241 if (yyextra->insidePHP)
2243 yyextra->current->bodyLine = yyextra->yyLineNr;
2244 yyextra->current->bodyColumn = yyextra->yyColNr;
2251 yyextra->delimiter = yytext;
2252 *yyextra->pCopyHereDocGString << yytext;
2253 BEGIN(CopyHereDocEnd);
2255<CopyHereDoc>"\""{ID}/"\"" {
2256 yyextra->delimiter = &yytext[1];
2257 *yyextra->pCopyHereDocGString << yytext;
2258 BEGIN(CopyHereDocEnd);
2260<CopyHereDoc>"'"{ID}/"'" {
2261 yyextra->delimiter = &yytext[1];
2262 *yyextra->pCopyHereDocGString << yytext;
2263 BEGIN(CopyHereDocEnd);
2266 yyextra->delimiter = yytext;
2269<HereDoc>"\""{ID}/"\"" {
2270 yyextra->delimiter = &yytext[1];
2273<HereDoc>"'"{ID}/"'" {
2274 yyextra->delimiter = &yytext[1];
2277<HereDocEnd>^{Bopt}{ID} {
2280 BEGIN(yyextra->lastHereDocContext);
2284<CopyHereDocEnd>^{Bopt}{ID} {
2285 *yyextra->pCopyHereDocGString << yytext;
2288 BEGIN(yyextra->lastHereDocContext);
2293 *yyextra->pCopyHereDocGString << yytext;
2295<CopyHereDocEnd>{ID} {
2296 *yyextra->pCopyHereDocGString << yytext;
2299 *yyextra->pCopyHereDocGString << yytext;
2301<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2303<FindMembers>"Q_PROPERTY" {
2304 yyextra->yyBegLineNr = yyextra->yyLineNr;
2305 yyextra->yyBegColNr = yyextra->yyColNr;
2306 yyextra->current->protection = Protection::Public ;
2307 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2308 yyextra->current->type.clear();
2318 yyextra->current->name+=yytext;
2321 yyextra->current->type+= yyextra->current->name;
2322 yyextra->current->type+= yytext;
2323 yyextra->current->name=
"";
2325<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2326 yyextra->current->type+= yyextra->current->name;
2327 yyextra->current->name=yytext;
2329<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2330 yyextra->current->spec.setReadable(
true);
2333<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2334 yyextra->current->spec.setWritable(
true);
2337<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2338<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2339<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2340<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2341<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2342<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2343<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2344<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2345<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2346<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2350 yyextra->current->read = yytext;
2354 yyextra->current->write = yytext;
2357<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2358 yyextra->current->name=yytext;
2362<FindMembers>"requires" {
2363 if (yyextra->insideJava) REJECT;
2364 yyextra->current->req.clear();
2365 yyextra->requiresContext = YY_START;
2366 BEGIN(RequiresClause);
2368<RequiresClause>"requires"{BN}*/"{" {
2369 if (yyextra->insideJava) REJECT;
2371 yyextra->current->req+=yytext;
2372 BEGIN( RequiresExpression ) ;
2374<RequiresClause>"requires"{BN}*"(" {
2375 if (yyextra->insideJava) REJECT;
2377 yyextra->current->req+=yytext;
2378 yyextra->lastRoundContext=RequiresExpression;
2379 yyextra->pCopyRoundString=&yyextra->current->req;
2380 yyextra->roundCount=0;
2381 BEGIN( CopyRound ) ;
2383<RequiresExpression>"{" {
2384 yyextra->current->req+=yytext;
2385 yyextra->lastCurlyContext=RequiresClause;
2386 yyextra->pCopyCurlyString=&yyextra->current->req;
2387 yyextra->curlyCount=0;
2388 BEGIN( CopyCurly ) ;
2390<RequiresExpression>\n {
2391 yyextra->current->req+=
' ';
2394<RequiresExpression>. {
2395 yyextra->current->req+=yytext;
2397<RequiresClause>"(" {
2398 yyextra->current->req+=yytext;
2399 yyextra->lastRoundContext=RequiresClause;
2400 yyextra->pCopyRoundString=&yyextra->current->req;
2401 yyextra->roundCount=0;
2402 BEGIN( CopyRound ) ;
2404<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2408 yyextra->current->req+=yytext;
2409 yyextra->lastRoundContext=RequiresClause;
2410 yyextra->pCopyRoundString=&yyextra->current->req;
2411 yyextra->roundCount=0;
2419<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2423 yyextra->current->req+=yytext;
2424 yyextra->lastSharpContext=RequiresClause;
2425 yyextra->pCopySharpString=&yyextra->current->req;
2426 yyextra->sharpCount=0;
2434<RequiresClause>{NOTopt}{SCOPENAME} {
2438 yyextra->current->req=yytext;
2439 BEGIN(yyextra->requiresContext);
2446<RequiresClause>{NOTopt}"::"{ID} {
2448 yyextra->current->req+=yytext;
2450<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2452 yyextra->current->req+=yytext;
2454<RequiresClause>{BN}+ {
2455 yyextra->current->req+=
' ';
2460 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2461 BEGIN(yyextra->requiresContext);
2463<FindMembers,FindMemberName>{SCOPENAME} {
2465 yyextra->yyBegColNr=yyextra->yyColNr;
2466 yyextra->yyBegLineNr=yyextra->yyLineNr;
2468 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2472 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2474 if (yyextra->insideIDL)
2479 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2483 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2488 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2490 BEGIN(IDLUnionCase);
2492 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2494 yyextra->insideTryBlock=
FALSE;
2495 BEGIN(TryFunctionBlock);
2497 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2499 yyextra->lastAlignAsContext = YY_START;
2502 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2504 yyextra->current->type=
"var";
2506 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2508 yyextra->current->type=
"function";
2510 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2514 yyextra->current->name=
"this";
2517 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2520 BEGIN(StaticAssert);
2522 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2526 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2527 yyextra->current->type+=yytext;
2530 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2532 if (yyextra->current->type.isEmpty())
2534 yyextra->current->type =
"optional";
2538 yyextra->current->type +=
" optional";
2540 yyextra->lastModifierContext = YY_START;
2541 BEGIN(SliceOptional);
2545 if (YY_START==FindMembers)
2549 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2550 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2552 yyextra->current->protection = Protection::Public;
2554 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2556 yyextra->current->protection = Protection::Protected;
2558 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2560 yyextra->current->protection = Protection::Package;
2562 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2564 yyextra->current->protection = Protection::Private;
2566 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2568 if (YY_START==FindMembers)
2569 yyextra->current->name = yytext;
2571 yyextra->current->name += yytext;
2572 yyextra->current->isStatic =
TRUE;
2576 if (YY_START==FindMembers)
2577 yyextra->current->name = yytext;
2579 yyextra->current->name += yytext;
2580 if (yyextra->current->name.startsWith(
"static "))
2582 yyextra->current->isStatic =
TRUE;
2583 yyextra->current->name= yyextra->current->name.mid(7);
2585 else if (yyextra->current->name.startsWith(
"inline "))
2587 if (yyextra->current->type.isEmpty())
2589 yyextra->current->type=
"inline";
2593 yyextra->current->type+=
"inline ";
2595 yyextra->current->name= yyextra->current->name.mid(7);
2597 else if (yyextra->current->name.startsWith(
"constexpr "))
2599 if (yyextra->current->type.isEmpty())
2601 yyextra->current->type=
"constexpr";
2605 yyextra->current->type+=
"constexpr ";
2607 yyextra->current->name=yyextra->current->name.mid(10);
2609 else if (yyextra->current->name.startsWith(
"consteval "))
2611 if (yyextra->current->type.isEmpty())
2613 yyextra->current->type=
"consteval";
2617 yyextra->current->type+=
"consteval ";
2619 yyextra->current->name=yyextra->current->name.mid(10);
2621 else if (yyextra->current->name.startsWith(
"constinit "))
2623 if (yyextra->current->type.isEmpty())
2625 yyextra->current->type=
"constinit";
2629 yyextra->current->type+=
"constinit ";
2631 yyextra->current->name=yyextra->current->name.mid(10);
2633 else if (yyextra->current->name.startsWith(
"const "))
2635 if (yyextra->current->type.isEmpty())
2637 yyextra->current->type=
"const";
2641 yyextra->current->type+=
"const ";
2643 yyextra->current->name=yyextra->current->name.mid(6);
2645 else if (yyextra->current->name.startsWith(
"volatile "))
2647 if (yyextra->current->type.isEmpty())
2649 yyextra->current->type=
"volatile";
2653 yyextra->current->type+=
"volatile ";
2655 yyextra->current->name=yyextra->current->name.mid(9);
2657 else if (yyextra->current->name.startsWith(
"typedef"))
2659 if (yyextra->current->type.isEmpty())
2661 yyextra->current->type=
"typedef";
2665 yyextra->current->type+=
"typedef ";
2667 yyextra->current->name=yyextra->current->name.mid(8);
2677 yyextra->externLinkage=
FALSE;
2681 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2684 yyextra->lastSkipRoundContext = FindMembers;
2685 yyextra->roundCount=0;
2688<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2694 yyextra->current->type+=yytext;
2695 yyextra->lastRoundContext=FindMembers;
2696 yyextra->pCopyRoundString=&yyextra->current->type;
2697 yyextra->roundCount=0;
2700<DeclType>{BN}+ {
lineCount(yyscanner); }
2705<CSIndexer>"["[^\n\]]*"]" {
2709<FindMembers>[0-9]{ID} {
2712 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2714 yyextra->current->name+=
".";
2718 yyextra->current->name+=yytext;
2720<CppQuote>"("{B}*"\"" {
2721 yyextra->insideCppQuote=
TRUE;
2725<IDLUnionCase>":" { BEGIN(FindMembers); }
2726<IDLUnionCase>\n {
lineCount(yyscanner); }
2728<TryFunctionBlock>\n {
lineCount(yyscanner); }
2729<TryFunctionBlock>"{" {
2730 yyextra->curlyCount=0;
2731 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2735<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2737<TryFunctionBlockEnd>\n { unput(*yytext);
2738 BEGIN( FindMembers );
2740<TryFunctionBlockEnd>. { unput(*yytext);
2741 BEGIN( FindMembers );
2744 yyextra->insideCppQuote=
FALSE;
2747<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2749 yyextra->lastCPPContext = YY_START;
2752<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2753<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2754 if (yyextra->insidePHP)
2756 yyextra->current->bodyLine = yyextra->yyLineNr;
2757 yyextra->current->bodyColumn = yyextra->yyColNr;
2758 yyextra->current->fileName = yyextra->fileName;
2759 yyextra->current->startLine = yyextra->yyLineNr;
2760 yyextra->current->startColumn = yyextra->yyColNr;
2761 yyextra->current->type.clear();
2762 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2763 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2764 yyextra->current->section = EntryType::makeDefine();
2765 yyextra->lastDefineContext = YY_START;
2768<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2769 yyextra->yyLineNr = atoi(&yytext[1]);
2771 yyextra->lastPreLineCtrlContext = YY_START;
2772 if (YY_START==ReadBody ||
2773 YY_START==ReadNSBody ||
2774 YY_START==ReadBodyIntf)
2776 yyextra->current->program << yytext;
2778 BEGIN( PreLineCtrl );
2780<PreLineCtrl>"\""[^\n\"]*"\"" {
2782 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2783 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2784 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2786 yyextra->current->program << yytext;
2790 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2791 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2792 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2794 yyextra->current->program << yytext;
2798 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2799 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2800 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2802 yyextra->current->program << yytext;
2805 BEGIN( yyextra->lastPreLineCtrlContext );
2808<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2809<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2810 BEGIN( yyextra->lastCPPContext) ;
2812<SDefine>{ID}{B}*"(" {
2813 yyextra->current->name = yytext;
2814 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2815 yyextra->current->args =
"(";
2816 yyextra->current->bodyLine = yyextra->yyLineNr;
2817 yyextra->current->bodyColumn = yyextra->yyColNr;
2818 yyextra->currentArgumentContext = DefineEnd;
2819 yyextra->fullArgString=yyextra->current->args;
2820 yyextra->copyArgString=&yyextra->current->args;
2821 BEGIN( ReadFuncArgType ) ;
2836 yyextra->current->bodyLine = yyextra->yyLineNr;
2837 yyextra->current->bodyColumn = yyextra->yyColNr;
2838 yyextra->current->name = yytext;
2845 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2847 BEGIN(yyextra->lastDefineContext);
2851 yyextra->current->fileName = yyextra->fileName;
2852 yyextra->current->startLine = yyextra->yyLineNr;
2853 yyextra->current->startColumn = yyextra->yyColNr;
2854 yyextra->current->type.clear();
2855 yyextra->current->type =
"const";
2859 yyextra->current->initializer.str(
init.str());
2860 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2861 yyextra->current->section = EntryType::makeVariable();
2862 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2867<DefineEnd>\\[\r]?\n {
2869 yyextra->current->endBodyLine = yyextra->yyLineNr;
2872 if (yyextra->insideIDL && yyextra->insideCppQuote)
2878 yyextra->lastStringContext=DefineEnd;
2883<DefinePHP>{ID}["']{BN}*","{BN}* {
2884 yyextra->current->name = yytext;
2885 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2886 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2887 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2888 yyextra->current->bodyLine = yyextra->yyLineNr;
2889 yyextra->current->bodyColumn = yyextra->yyColNr;
2890 yyextra->lastRoundContext = DefinePHPEnd;
2891 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2892 yyextra->roundCount = 0;
2893 BEGIN( GCopyRound );
2897 if (yyextra->insideCli)
2900 yyextra->current->name = yytext ;
2908 yyextra->current->name += yytext ;
2911<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2912 if (yyextra->current->bodyLine==-1)
2914 yyextra->current->bodyLine=yyextra->yyLineNr;
2915 yyextra->current->bodyColumn = yyextra->yyColNr;
2917 yyextra->docBlockContext = YY_START;
2918 yyextra->docBlockInBody =
FALSE;
2919 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2924 yyextra->docBlock.
str(indent.
str());
2928 yyextra->docBlockTerm =
';';
2929 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2931 yyextra->current->bitfields =
":"+yyextra->current->args;
2932 yyextra->current->args.clear();
2933 yyextra->current->section = EntryType::makeVariable();
2935 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
2946<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2947 yyextra->docBlockContext = YY_START;
2948 yyextra->docBlockInBody =
FALSE;
2949 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2954 yyextra->docBlock.
str(indent.
str());
2957 yyextra->docBlockTerm =
',';
2958 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2960 yyextra->current->bitfields =
":"+yyextra->current->args;
2961 yyextra->current->args.clear();
2962 yyextra->current->section = EntryType::makeVariable();
2964 if (yytext[yyleng-3]==
'/')
2975<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2976 if (yyextra->current->bodyLine==-1)
2978 yyextra->current->bodyLine=yyextra->yyLineNr;
2979 yyextra->current->bodyColumn = yyextra->yyColNr;
2981 yyextra->docBlockContext = YY_START;
2982 yyextra->docBlockInBody =
FALSE;
2983 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2987 yyextra->docBlock.
str(indent.
str());
2990 yyextra->docBlockTerm = 0;
2991 if (yytext[yyleng-3]==
'/')
3003<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3005 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3008 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3013 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3019 if (yytext[2]==
'!' || yytext[2]==
'/')
3021 yyextra->docBlockContext = YY_START;
3022 yyextra->docBlockInBody =
FALSE;
3023 yyextra->docBlockAutoBrief =
FALSE;
3024 yyextra->docBlock.str(std::string());
3025 yyextra->docBlockTerm = 0;
3031 yyextra->lastCContext=YY_START;
3032 BEGIN(SkipCxxComment);
3037 if (yytext[2]==
'!' || yytext[2]==
'*')
3039 yyextra->docBlockContext = YY_START;
3040 yyextra->docBlockInBody =
FALSE;
3041 yyextra->docBlock.str(std::string());
3042 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3044 yyextra->docBlockTerm = 0;
3050 yyextra->lastCContext=YY_START;
3055<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3056 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3057 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3061 if (!yyextra->insideCS) REJECT;
3062 yyextra->current->bodyLine = yyextra->yyLineNr;
3063 yyextra->current->bodyColumn = yyextra->yyColNr;
3064 yyextra->current->initializer.str(yytext);
3065 yyextra->lastInitializerContext = YY_START;
3066 yyextra->sharpCount=0;
3067 yyextra->initBracketCount=0;
3068 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3069 yyextra->current->spec.setGettable(
true);
3070 BEGIN(ReadInitializerPtr);
3073 yyextra->current->bodyLine = yyextra->yyLineNr;
3074 yyextra->current->bodyColumn = yyextra->yyColNr;
3075 yyextra->current->initializer.str(yytext);
3076 yyextra->lastInitializerContext = YY_START;
3077 yyextra->sharpCount=0;
3078 yyextra->initBracketCount=0;
3079 BEGIN(ReadInitializer);
3081<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3083 yyextra->current->exception +=
" ";
3086<UNOIDLAttributeBlock>"}" {
3087 yyextra->current->exception +=
" }";
3091<ReadInitializer,ReadInitializerPtr>"(" {
3092 yyextra->lastRoundContext=YY_START;
3093 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3094 yyextra->roundCount=0;
3095 yyextra->current->initializer << *yytext;
3098<ReadInitializer,ReadInitializerPtr>"[" {
3099 if (!yyextra->insidePHP) REJECT;
3100 yyextra->lastSquareContext=YY_START;
3101 yyextra->pCopySquareGString=&yyextra->current->initializer;
3102 yyextra->squareCount=0;
3103 yyextra->current->initializer << *yytext;
3106<ReadInitializer,ReadInitializerPtr>"{" {
3107 yyextra->lastCurlyContext=YY_START;
3108 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3109 yyextra->curlyCount=0;
3110 yyextra->current->initializer << *yytext;
3113<ReadInitializer,ReadInitializerPtr>[;,] {
3115 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3117 yyextra->current->fileName = yyextra->fileName;
3118 yyextra->current->startLine = yyextra->yyLineNr;
3119 yyextra->current->startColumn = yyextra->yyColNr;
3120 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3121 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3122 yyextra->current->section = EntryType::makeVariable();
3123 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3127 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3130 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3131 BEGIN(yyextra->lastInitializerContext);
3133 else if (*yytext==
',' && yyextra->initBracketCount==0)
3136 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3137 BEGIN(yyextra->lastInitializerContext);
3141 yyextra->current->initializer << *yytext;
3144<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3145 if (!yyextra->insideCpp)
3151 yyextra->current->initializer << yytext;
3153 yyextra->lastRawStringContext = YY_START;
3154 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3159<RawGString>{RAWEND} {
3162 *yyextra->pCopyRawGString << yytext;
3163 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3170<RawGString>[^)\n]+ {
3171 *yyextra->pCopyRawGString << yytext;
3174 *yyextra->pCopyRawGString << yytext;
3177 *yyextra->pCopyRawGString << yytext;
3180<RawString>{RAWEND} {
3181 *yyextra->pCopyRawString+=yytext;
3182 yyextra->fullArgString+=yytext;
3185 BEGIN(yyextra->lastRawStringContext);
3189 *yyextra->pCopyRawString += yytext;
3190 yyextra->fullArgString+=yytext;
3193 *yyextra->pCopyRawString += yytext;
3194 yyextra->fullArgString+=yytext;
3197 *yyextra->pCopyRawString += yytext;
3198 yyextra->fullArgString+=yytext;
3201<ReadInitializer,ReadInitializerPtr>\" {
3202 if (yyextra->insideIDL && yyextra->insideCppQuote)
3208 yyextra->lastStringContext=YY_START;
3209 yyextra->current->initializer << yytext;
3210 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3211 yyextra->stopAtInvalidString=
false;
3215<ReadInitializer,ReadInitializerPtr>"->" {
3216 yyextra->current->initializer << yytext;
3218<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3219 yyextra->current->initializer << yytext;
3221<ReadInitializer,ReadInitializerPtr>(">>") {
3222 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3225 yyextra->initBracketCount-=2;
3226 yyextra->sharpCount-=2;
3228 yyextra->current->initializer << yytext;
3230<ReadInitializer,ReadInitializerPtr>(">=") {
3231 yyextra->current->initializer << yytext;
3233<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3234 yyextra->initBracketCount++;
3235 yyextra->sharpCount++;
3236 yyextra->current->initializer << *yytext;
3238<ReadInitializer,ReadInitializerPtr>[>\]})] {
3239 yyextra->initBracketCount--;
3240 yyextra->sharpCount--;
3243 yyextra->current->endBodyLine=yyextra->yyLineNr;
3245 yyextra->current->initializer << *yytext;
3247<ReadInitializer,ReadInitializerPtr>\' {
3248 if (yyextra->insidePHP)
3250 yyextra->current->initializer << yytext;
3251 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3252 yyextra->lastStringContext=YY_START;
3253 BEGIN(CopyPHPGString);
3257 yyextra->current->initializer << yytext;
3260<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3261 if (yyextra->insidePHP)
3267 yyextra->current->initializer << yytext;
3270<ReadInitializer,ReadInitializerPtr>\n {
3271 yyextra->current->initializer << *yytext;
3274<ReadInitializer,ReadInitializerPtr>"@\"" {
3276 yyextra->current->initializer << yytext;
3277 if (!yyextra->insideCS && !yyextra->insideObjC)
3284 yyextra->lastSkipVerbStringContext=YY_START;
3285 yyextra->pSkipVerbString=&yyextra->current->initializer;
3286 BEGIN(SkipVerbString);
3289<SkipVerbString>[^\n"\\]+ {
3290 *yyextra->pSkipVerbString << yytext;
3292<SkipVerbString>"\\\\" {
3293 if (yyextra->insideCS) REJECT
3294 *yyextra->pSkipVerbString << yytext;
3296<SkipVerbString>"\\\"" {
3297 if (yyextra->insideCS) REJECT
3298 *yyextra->pSkipVerbString << yytext;
3300<SkipVerbString>"\"\"" {
3301 *yyextra->pSkipVerbString << yytext;
3303<SkipVerbString>"\"" {
3304 *yyextra->pSkipVerbString << *yytext;
3305 BEGIN(yyextra->lastSkipVerbStringContext);
3308 *yyextra->pSkipVerbString << *yytext;
3312 *yyextra->pSkipVerbString << *yytext;
3314<ReadInitializer,ReadInitializerPtr>"?>" {
3315 if (yyextra->insidePHP)
3316 BEGIN( FindMembersPHP );
3318 yyextra->current->initializer << yytext;
3320<ReadInitializer,ReadInitializerPtr>. {
3321 yyextra->current->initializer << *yytext;
3325<CopyString,CopyPHPString>\\. {
3326 *yyextra->pCopyQuotedString+=yytext;
3329 *yyextra->pCopyQuotedString+=*yytext;
3330 BEGIN( yyextra->lastStringContext );
3333 *yyextra->pCopyQuotedString+=*yytext;
3334 BEGIN( yyextra->lastStringContext );
3336<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3337 *yyextra->pCopyQuotedString+=yytext;
3339<CopyString,CopyPHPString>\n {
3340 *yyextra->pCopyQuotedString+=*yytext;
3343<CopyString,CopyPHPString>. {
3344 *yyextra->pCopyQuotedString+=*yytext;
3348<CopyGString,CopyPHPGString>\\. {
3349 *yyextra->pCopyQuotedGString << yytext;
3352 *yyextra->pCopyQuotedGString << *yytext;
3353 BEGIN( yyextra->lastStringContext );
3356 *yyextra->pCopyQuotedGString << *yytext;
3357 BEGIN( yyextra->lastStringContext );
3359<CopyGString,CopyPHPGString>"<?php" {
3360 *yyextra->pCopyQuotedGString << yytext;
3361 BEGIN( yyextra->lastStringContext );
3363<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3364 *yyextra->pCopyQuotedGString << yytext;
3366<CopyGString,CopyPHPGString>\n {
3367 *yyextra->pCopyQuotedGString << *yytext;
3368 if (yyextra->stopAtInvalidString)
3370 BEGIN( yyextra->lastStringContext );
3377<CopyGString,CopyPHPGString>. {
3378 *yyextra->pCopyQuotedGString << *yytext;
3383 *yyextra->pCopyRoundString += *yytext;
3384 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3385 yyextra->lastStringContext=YY_START;
3389 *yyextra->pCopyRoundString += *yytext;
3390 yyextra->roundCount++;
3393 *yyextra->pCopyRoundString += *yytext;
3394 if (--yyextra->roundCount<0)
3395 BEGIN(yyextra->lastRoundContext);
3399 *yyextra->pCopyRoundString += *yytext;
3402 if (yyextra->insidePHP)
3404 yyextra->current->initializer << yytext;
3405 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3406 yyextra->lastStringContext=YY_START;
3407 BEGIN(CopyPHPString);
3411 *yyextra->pCopyRoundString += yytext;
3414<CopyRound>{CHARLIT} {
3415 if (yyextra->insidePHP)
3421 *yyextra->pCopyRoundString+=yytext;
3424<CopyRound>[^"'()\n,]+ {
3425 *yyextra->pCopyRoundString+=yytext;
3428 *yyextra->pCopyRoundString+=*yytext;
3433 *yyextra->pCopySharpString += *yytext;
3434 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3435 yyextra->lastStringContext=YY_START;
3439 *yyextra->pCopySharpString += *yytext;
3440 yyextra->sharpCount++;
3443 *yyextra->pCopySharpString += *yytext;
3444 if (--yyextra->sharpCount<0)
3446 BEGIN(yyextra->lastSharpContext);
3451 *yyextra->pCopySharpString += *yytext;
3454 if (yyextra->insidePHP)
3456 yyextra->current->initializer << yytext;
3457 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3458 yyextra->lastStringContext=YY_START;
3459 BEGIN(CopyPHPString);
3463 *yyextra->pCopySharpString += yytext;
3466<CopySharp>{CHARLIT} {
3467 if (yyextra->insidePHP)
3473 *yyextra->pCopySharpString+=yytext;
3476<CopySharp>[^"'<>\n,]+ {
3477 *yyextra->pCopySharpString+=yytext;
3480 *yyextra->pCopySharpString+=*yytext;
3486 *yyextra->pCopyRoundGString << *yytext;
3487 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3488 yyextra->lastStringContext=YY_START;
3492 *yyextra->pCopyRoundGString << *yytext;
3493 yyextra->roundCount++;
3496 *yyextra->pCopyRoundGString << *yytext;
3497 if (--yyextra->roundCount<0)
3498 BEGIN(yyextra->lastRoundContext);
3502 *yyextra->pCopyRoundGString << *yytext;
3505 if (yyextra->insidePHP)
3507 yyextra->current->initializer << yytext;
3508 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3509 yyextra->lastStringContext=YY_START;
3510 BEGIN(CopyPHPGString);
3514 *yyextra->pCopyRoundGString << yytext;
3517<GCopyRound>{CHARLIT} {
3518 if (yyextra->insidePHP)
3524 *yyextra->pCopyRoundGString << yytext;
3528 if (!yyextra->insideCS) REJECT;
3529 *yyextra->pCopyRoundGString << yytext;
3530 yyextra->lastSkipVerbStringContext=YY_START;
3531 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3532 BEGIN(SkipVerbString);
3534<GCopyRound>[^"'()\n\/,R]+ {
3535 *yyextra->pCopyRoundGString << yytext;
3537<GCopyRound>{RAWBEGIN} {
3538 *yyextra->pCopyRoundGString << yytext;
3540 yyextra->lastRawStringContext = YY_START;
3541 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3545 *yyextra->pCopyRoundGString << *yytext;
3550 *yyextra->pCopySquareGString << *yytext;
3551 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3552 yyextra->lastStringContext=YY_START;
3556 *yyextra->pCopySquareGString << *yytext;
3557 if (yyextra->insidePHP)
3559 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3560 yyextra->lastStringContext=YY_START;
3561 BEGIN(CopyPHPGString);
3565 *yyextra->pCopySquareGString << *yytext;
3566 yyextra->squareCount++;
3569 *yyextra->pCopySquareGString << *yytext;
3570 if (--yyextra->squareCount<0)
3571 BEGIN(yyextra->lastSquareContext);
3575 *yyextra->pCopySquareGString << *yytext;
3578 if (yyextra->insidePHP)
3580 yyextra->current->initializer << yytext;
3581 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3582 yyextra->lastStringContext=YY_START;
3583 BEGIN(CopyPHPGString);
3587 *yyextra->pCopySquareGString << yytext;
3590<GCopySquare>{CHARLIT} {
3591 if (yyextra->insidePHP)
3597 *yyextra->pCopySquareGString << yytext;
3600<GCopySquare>[^"'\[\]\n\/,]+ {
3601 *yyextra->pCopySquareGString << yytext;
3604 *yyextra->pCopySquareGString << *yytext;
3609 *yyextra->pCopyCurlyString += *yytext;
3610 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3611 yyextra->lastStringContext=YY_START;
3612 yyextra->keepComment=
false;
3616 *yyextra->pCopyCurlyString += *yytext;
3617 if (yyextra->insidePHP)
3619 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3620 yyextra->lastStringContext=YY_START;
3621 yyextra->keepComment=
false;
3622 BEGIN(CopyPHPString);
3626 *yyextra->pCopyCurlyString += *yytext;
3627 yyextra->curlyCount++;
3630 *yyextra->pCopyCurlyString += *yytext;
3631 if (--yyextra->curlyCount<0)
3633 yyextra->keepComment=
false;
3634 BEGIN(yyextra->lastCurlyContext);
3637<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3643 *yyextra->pCopyCurlyString += yytext;
3646<CopyCurly>[^"'{}\/\n,]+ {
3647 *yyextra->pCopyCurlyString += yytext;
3649<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3652 *yyextra->pCopyCurlyString += *yytext;
3655 *yyextra->pCopyCurlyString += *yytext;
3657<CopyCurly>{CPPC}[^\n]* {
3658 if (yyextra->keepComment)
3660 *yyextra->pCopyCurlyString += yytext;
3668 if (yyextra->keepComment)
3670 *yyextra->pCopyCurlyString += yytext;
3679 *yyextra->pCopyCurlyString += yytext;
3684 *yyextra->pCopyCurlyString += *yytext;
3687 *yyextra->pCopyCurlyString += *yytext;
3689<CopyComment><<EOF>> {
3690 warn(yyextra->fileName,yyextra->yyLineNr,
3691 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3696<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3698<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3700 int s = line.
find(
' ');
3701 int e = line.
find(
'"',s);
3702 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3703 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3710 *yyextra->pCopyCurlyGString << *yytext;
3711 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3712 yyextra->lastStringContext=YY_START;
3713 yyextra->keepComment =
false;
3717 *yyextra->pCopyCurlyGString << *yytext;
3718 if (yyextra->insidePHP)
3720 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3721 yyextra->lastStringContext=YY_START;
3722 yyextra->keepComment =
false;
3723 BEGIN(CopyPHPGString);
3727 *yyextra->pCopyCurlyGString << *yytext;
3728 yyextra->curlyCount++;
3731 *yyextra->pCopyCurlyGString << *yytext;
3732 if (--yyextra->curlyCount<0)
3734 yyextra->current->endBodyLine = yyextra->yyLineNr;
3735 yyextra->keepComment =
false;
3736 BEGIN(yyextra->lastCurlyContext);
3739<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3745 *yyextra->pCopyCurlyGString << yytext;
3748<GCopyCurly>[^"'{}\/\n,]+ {
3749 *yyextra->pCopyCurlyGString << yytext;
3752 *yyextra->pCopyCurlyGString << yytext;
3754<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3757 *yyextra->pCopyCurlyGString << *yytext;
3760 *yyextra->pCopyCurlyGString << *yytext;
3762<GCopyCurly>{CPPC}[^\n]* {
3763 if (yyextra->keepComment)
3765 *yyextra->pCopyCurlyGString << yytext;
3773 if (yyextra->keepComment)
3775 *yyextra->pCopyCurlyGString << yytext;
3776 BEGIN(GCopyComment);
3783<GCopyComment>{CCE} {
3784 *yyextra->pCopyCurlyGString << yytext;
3789 *yyextra->pCopyCurlyGString << *yytext;
3792 *yyextra->pCopyCurlyGString << *yytext;
3794<GCopyComment><<EOF>> {
3795 warn(yyextra->fileName,yyextra->yyLineNr,
3796 "reached end of file while inside a C style comment block!");
3804 if (yyextra->current->type.isEmpty() &&
3805 yyextra->current->name==
"enum")
3807 yyextra->current->section = EntryType::makeEnum();
3808 yyextra->current->name.clear();
3809 yyextra->current->args.clear();
3810 BEGIN(EnumBaseType);
3814 if (yyextra->current->type.isEmpty())
3817 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3820 yyextra->current->bitfields+=
":";
3824 yyextra->current->bitfields+=*yytext;
3827 yyextra->current->args+=*yytext;
3831 yyextra->current->args+=
' ';
3834 QCString oldType = yyextra->current->type;
3835 if (yyextra->current->bodyLine==-1)
3837 yyextra->current->bodyLine = yyextra->yyLineNr;
3838 yyextra->current->bodyColumn = yyextra->yyColNr;
3840 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3842 yyextra->current->type = yyextra->current->type.mid(3);
3844 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3846 yyextra->current->type.prepend(
"typedef ");
3848 bool isStatic = yyextra->current->isStatic;
3849 Protection prot = yyextra->current->protection;
3850 bool isConcept = yyextra->current->section.isConcept();
3851 bool isModule = yyextra->current->section.isModuleDoc();
3854 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3859 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3862 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3864 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3866 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3867 if (yyextra->current->section.isClass())
3871 yyextra->current->section = EntryType::makeVariable() ;
3872 yyextra->current->fileName = yyextra->fileName;
3873 yyextra->current->startLine = yyextra->yyBegLineNr;
3874 yyextra->current->startColumn = yyextra->yyBegColNr;
3875 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3878 if ( *yytext ==
',')
3880 yyextra->current->isStatic = isStatic;
3881 yyextra->current->protection = prot;
3882 yyextra->current->name.clear();
3883 yyextra->current->args.clear();
3884 yyextra->current->brief.clear();
3885 yyextra->current->doc.clear();
3886 yyextra->current->initializer.str(std::string());
3887 yyextra->current->bitfields.clear();
3892 yyextra->mtype = MethodTypes::Method;
3893 yyextra->virt = Specifier::Normal;
3894 yyextra->current->bodyLine = -1;
3895 yyextra->current->bodyColumn = 1;
3896 yyextra->current->groups.clear();
3902 if (yyextra->insideSlice)
3904 yyextra->squareCount=1;
3905 yyextra->lastSquareContext = YY_START;
3906 yyextra->current->metaData +=
"[";
3907 BEGIN( SliceMetadata );
3909 else if (!yyextra->insideCS &&
3910 (yyextra->current->name.isEmpty() ||
3911 yyextra->current->name==
"typedef"
3915 yyextra->squareCount=1;
3916 yyextra->lastSquareContext = YY_START;
3917 yyextra->idlAttr.clear();
3918 yyextra->idlProp.clear();
3919 yyextra->current->mtype = yyextra->mtype;
3922 yyextra->current->mtype == MethodTypes::Property)
3924 yyextra->odlProp =
true;
3925 yyextra->current->spec.setGettable(
true).setSettable(
true);
3928 BEGIN( IDLAttribute );
3930 else if (yyextra->insideCS &&
3931 yyextra->current->name.isEmpty())
3933 yyextra->squareCount=1;
3934 yyextra->lastSquareContext = YY_START;
3937 yyextra->current->args.clear();
3938 BEGIN( SkipSquare );
3942 yyextra->current->args += yytext ;
3943 yyextra->squareCount=1;
3944 yyextra->externLinkage=
FALSE;
3949 yyextra->squareCount++;
3950 yyextra->current->metaData +=
"[";
3952<SliceMetadata>{BN}* {
3955<SliceMetadata>\"[^\"]*\" {
3956 yyextra->current->metaData += yytext;
3959 yyextra->current->metaData += yytext;
3962 yyextra->current->metaData += yytext;
3963 if (--yyextra->squareCount<=0)
3965 BEGIN (yyextra->lastSquareContext);
3969 yyextra->current->type +=
"(";
3970 yyextra->roundCount++;
3972<SliceOptional>[0-9]+ {
3973 yyextra->current->type += yytext;
3976 yyextra->current->type +=
")";
3977 if(--yyextra->roundCount<=0)
3979 BEGIN (yyextra->lastModifierContext);
3984 if (--yyextra->squareCount<=0)
3987 if (yyextra->current->mtype == MethodTypes::Property)
3988 BEGIN( IDLPropName );
3990 BEGIN( yyextra->lastSquareContext );
3993<IDLAttribute>"propput" {
3996 yyextra->current->mtype = MethodTypes::Property;
3998 yyextra->current->spec.setSettable(
true);
4000<IDLAttribute>"propget" {
4003 yyextra->current->mtype = MethodTypes::Property;
4005 yyextra->current->spec.setGettable(
true);
4007<IDLAttribute>"property" {
4008 yyextra->current->spec.setProperty(
true);
4010<IDLAttribute>"attribute" {
4011 yyextra->current->spec.setAttribute(
true);
4013<IDLAttribute>"optional" {
4014 yyextra->current->spec.setOptional(
true);
4016<IDLAttribute>"readonly" {
4019 yyextra->current->spec.setSettable(
false);
4023 yyextra->current->spec.setReadonly(
true);
4026<IDLAttribute>"bound" {
4027 yyextra->current->spec.setBound(
true);
4029<IDLAttribute>"removable" {
4030 yyextra->current->spec.setRemovable(
true);
4032<IDLAttribute>"constrained" {
4033 yyextra->current->spec.setConstrained(
true);
4035<IDLAttribute>"transient" {
4036 yyextra->current->spec.setTransient(
true);
4038<IDLAttribute>"maybevoid" {
4039 yyextra->current->spec.setMaybeVoid(
true);
4041<IDLAttribute>"maybedefault" {
4042 yyextra->current->spec.setMaybeDefault(
true);
4044<IDLAttribute>"maybeambiguous" {
4045 yyextra->current->spec.setMaybeAmbiguous(
true);
4049<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4052 if (yyextra->odlProp)
4054 yyextra->idlProp = yytext;
4057<IDLPropName>{ID}{BN}*"(" {
4058 yyextra->current->name = yytext;
4059 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4060 yyextra->current->startLine = yyextra->yyLineNr;
4061 yyextra->current->startColumn = yyextra->yyColNr;
4064<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4065 if (yyextra->odlProp)
4067 yyextra->idlProp += yytext;
4070<IDLPropName>{ID}{BNopt}/";" {
4071 if (yyextra->odlProp)
4073 yyextra->current->name = yytext;
4074 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4075 yyextra->odlProp =
false;
4080<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4081 yyextra->idlAttr = yytext;
4082 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4085 yyextra->idlProp = yytext;
4087<IDLProp>{BN}*{ID}{BN}*"," {
4088 if (yyextra->current->args.isEmpty())
4089 yyextra->current->args =
"(";
4091 yyextra->current->args +=
", ";
4092 yyextra->current->args += yyextra->idlAttr;
4093 yyextra->current->args +=
" ";
4094 yyextra->current->args += yyextra->idlProp;
4095 yyextra->current->args +=
" ";
4096 yyextra->current->args += yytext;
4097 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4098 yyextra->idlProp.clear();
4099 yyextra->idlAttr.clear();
4102<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4106 yyextra->current->fileName = yyextra->fileName;
4107 yyextra->current->type = yyextra->idlProp;
4108 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4109 if (!yyextra->current->args.isEmpty())
4110 yyextra->current->args +=
")";
4111 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4112 yyextra->current->section = EntryType::makeVariable();
4113 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4115 BEGIN( FindMembers );
4120<Array>"]" { yyextra->current->args += *yytext ;
4121 if (--yyextra->squareCount<=0)
4122 BEGIN( FindMembers ) ;
4124<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4125 if (--yyextra->squareCount<=0)
4126 BEGIN( SFunction ) ;
4128<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4129 yyextra->squareCount++;
4131<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4132<SkipSquare>"[" { yyextra->squareCount++; }
4134 if (--yyextra->squareCount<=0)
4135 BEGIN( yyextra->lastSquareContext );
4138 yyextra->lastStringContext=YY_START;
4139 BEGIN( SkipString );
4141<SkipSquare>[^\n\[\]\"]+
4142<FindMembers>"<" {
addType(yyscanner);
4143 yyextra->current->type += yytext ;
4146<Sharp>">" { yyextra->current->type += *yytext ;
4147 if (--yyextra->sharpCount<=0)
4148 BEGIN( FindMembers ) ;
4150<Sharp>"<" { yyextra->current->type += *yytext ;
4151 yyextra->sharpCount++;
4154 yyextra->current->type +=
' ';
4157<Sharp>. { yyextra->current->type += *yytext ; }
4160 yyextra->current->bodyLine = yyextra->yyLineNr;
4161 yyextra->current->bodyColumn = yyextra->yyColNr;
4162 yyextra->current->name = yytext;
4167 yyextra->lastInitializerContext = YY_START;
4168 yyextra->sharpCount=0;
4169 yyextra->initBracketCount=0;
4170 yyextra->current->initializer.str(
"=");
4171 BEGIN(ReadInitializer);
4174 yyextra->lastInitializerContext = YY_START;
4175 yyextra->sharpCount=0;
4176 yyextra->initBracketCount=0;
4177 yyextra->current->initializer.str(yytext);
4178 BEGIN(ReadInitializer);
4181 if (yyextra->insideJava)
4183 if (!yyextra->current->name.isEmpty())
4185 yyextra->current->fileName = yyextra->fileName;
4186 yyextra->current->startLine = yyextra->yyLineNr;
4187 yyextra->current->startColumn = yyextra->yyColNr;
4188 if (!yyextra->current_root->spec.isEnum())
4190 yyextra->current->type =
"@";
4192 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4193 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4194 yyextra->current->section = EntryType::makeVariable();
4195 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4199 BEGIN( FindMembers );
4210 if (!yyextra->current->name.isEmpty())
4212 yyextra->current->fileName = yyextra->fileName;
4213 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4215 yyextra->current->startLine = yyextra->current->bodyLine;
4216 yyextra->current->startColumn = yyextra->current->bodyColumn;
4220 yyextra->current->startLine = yyextra->yyLineNr;
4221 yyextra->current->startColumn = yyextra->yyColNr;
4223 if (!yyextra->current_root->spec.isEnum())
4225 yyextra->current->type =
"@";
4227 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4228 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4229 yyextra->current->section = EntryType::makeVariable();
4231 if (!yyextra->insideCS && !yyextra->insideJava &&
4232 !yyextra->current_root->spec.isStrong())
4239 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4241 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4246 yyextra->current->reset();
4251 yyextra->squareCount=1;
4252 yyextra->lastSquareContext = YY_START;
4255<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4256<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4257<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4260 yyextra->current->program << yytext ;
4263<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4264 yyextra->current->program << yytext ;
4265 yyextra->pSkipInterpString = &yyextra->current->program;
4266 yyextra->lastSkipInterpStringContext=YY_START;
4267 BEGIN( SkipInterpString );
4269<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})* {
4270 *yyextra->pSkipInterpString << yytext;
4272<SkipInterpString>\" {
4273 *yyextra->pSkipInterpString << *yytext;
4274 BEGIN( yyextra->lastSkipInterpStringContext );
4277<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4278 yyextra->current->program << yytext ;
4279 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4280 yyextra->lastSkipInterpVerbStringContext=YY_START;
4281 BEGIN( SkipInterpVerbString );
4283<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4284 *yyextra->pSkipInterpVerbString << yytext;
4286<SkipInterpString>"{"[^}]*"}" {
4287 *yyextra->pSkipInterpString << yytext;
4289<SkipInterpVerbString>"{"[^}]*"}" {
4290 *yyextra->pSkipInterpVerbString << yytext;
4292<SkipInterpVerbString>\" {
4293 *yyextra->pSkipInterpVerbString << *yytext;
4294 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4296<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4297<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4298 yyextra->pSkipVerbString = &yyextra->current->program;
4299 yyextra->lastSkipVerbStringContext=YY_START;
4300 BEGIN( SkipVerbString );
4302<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4304 yyextra->current->program << yytext ;
4305 yyextra->pCopyHereDocGString = &yyextra->current->program;
4306 yyextra->lastHereDocContext=YY_START;
4307 BEGIN( CopyHereDoc );
4314<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4315 yyextra->current->program << yytext;
4317 yyextra->lastRawStringContext = YY_START;
4318 yyextra->pCopyRawGString = &yyextra->current->program;
4321<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4322 yyextra->pCopyQuotedGString = &yyextra->current->program;
4323 yyextra->lastStringContext=YY_START;
4324 yyextra->stopAtInvalidString=
false;
4325 BEGIN( CopyGString );
4327<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4328<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4329 yyextra->lastContext = YY_START ;
4332<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4333 ++yyextra->yyLineNr ;
4334 yyextra->lastContext = YY_START ;
4337<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4338 if (!yyextra->insidePHP)
4340 yyextra->current->program << yytext;
4344 yyextra->current->program << yytext;
4345 yyextra->pCopyQuotedGString = &yyextra->current->program;
4346 yyextra->lastStringContext=YY_START;
4347 BEGIN(CopyPHPGString);
4350<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4351 if (yyextra->insidePHP)
4358 yyextra->current->program << yytext;
4361<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4362 ++yyextra->curlyCount ;
4365 yyextra->current->program << yytext ;
4366 --yyextra->curlyCount ;
4368<ReadBody,ReadNSBody>"}" {
4369 if ( yyextra->curlyCount>0 )
4371 yyextra->current->program << yytext ;
4372 --yyextra->curlyCount ;
4376 yyextra->current->endBodyLine = yyextra->yyLineNr;
4377 std::shared_ptr<Entry> original_root = yyextra->current_root;
4378 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4382 QCString doc = yyextra->current->doc;
4383 int docLine = yyextra->current->docLine;
4384 QCString docFile = yyextra->current->docFile;
4385 QCString brief = yyextra->current->brief;
4386 int briefLine = yyextra->current->briefLine;
4387 QCString briefFile = yyextra->current->briefFile;
4389 yyextra->current->doc =
"";
4390 yyextra->current->docLine = 0;
4391 yyextra->current->docFile =
"";
4392 yyextra->current->brief =
"";
4393 yyextra->current->briefLine = 0;
4394 yyextra->current->briefFile =
"";
4395 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4397 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4398 yyextra->current->program.str(std::string());
4399 new_current->name = yyextra->current->name.mid(split_point + 2);
4400 yyextra->current->name = yyextra->current->name.left(split_point);
4401 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4403 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4404 yyextra->current_root = yyextra->current;
4405 yyextra->current = new_current;
4408 yyextra->current->doc = doc;
4409 yyextra->current->docLine = docLine;
4410 yyextra->current->docFile = docFile;
4411 yyextra->current->brief = brief;
4412 yyextra->current->briefLine = briefLine;
4413 yyextra->current->briefFile = briefFile;
4415 QCString &cn = yyextra->current->name;
4416 QCString rn = yyextra->current_root->name;
4422 if (yyextra->isTypedef && cn.
isEmpty())
4425 BEGIN( TypedefName );
4429 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4431 yyextra->current->program <<
',';
4436 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4437 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4439 if (yyextra->insideObjC &&
4440 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4443 BEGIN( ReadBodyIntf ) ;
4447 yyextra->memspecEntry = yyextra->current;
4448 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4449 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4450 if (yyextra->current->section.isNamespace() ||
4451 yyextra->current->spec.isInterface() ||
4452 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4453 yyextra->insideSlice
4456 yyextra->current->reset();
4457 yyextra->current_root = std::move(original_root);
4459 yyextra->memspecEntry.reset();
4460 BEGIN( FindMembers ) ;
4464 static const reg::Ex re(R
"(@\d+$)");
4465 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4466 !
reg::search(yyextra->memspecEntry->name.str(),re))
4469 yyextra->current->doc.clear();
4470 yyextra->current->brief.clear();
4472 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.
4478<ReadBody>"}"{BN}+"typedef"{BN}+ {
4480 if ( yyextra->curlyCount>0 )
4482 yyextra->current->program << yytext ;
4483 --yyextra->curlyCount ;
4487 yyextra->isTypedef =
TRUE;
4488 yyextra->current->endBodyLine = yyextra->yyLineNr;
4489 QCString &cn = yyextra->current->name;
4490 QCString rn = yyextra->current_root->name;
4495 BEGIN( TypedefName );
4498<TypedefName>("const"|"volatile"){BN} {
4500 yyextra->current->type.prepend(yytext);
4503 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4505 yyextra->current->program <<
",";
4507 yyextra->current->name=yytext;
4509 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4510 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4512 if (!yyextra->firstTypedefEntry)
4514 yyextra->firstTypedefEntry = yyextra->current;
4516 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4518 yyextra->isTypedef=
TRUE;
4519 BEGIN(MemberSpecSkip);
4523 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4525 yyextra->current->program <<
',';
4528 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4529 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4530 yyextra->memspecEntry = yyextra->current;
4531 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4534 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4536<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4538 int i=0,l=(int)yyleng,j;
4539 while (i<l && (!
isId(yytext[i]))) i++;
4541 j=yyextra->msName.
find(
"[");
4544 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4545 yyextra->msName=yyextra->msName.left(j);
4550 if (yyextra->firstTypedefEntry)
4552 if (yyextra->firstTypedefEntry->spec.isStruct())
4554 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4556 else if (yyextra->firstTypedefEntry->spec.isUnion())
4558 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4560 else if (yyextra->firstTypedefEntry->section.isEnum())
4562 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4566 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4572 yyextra->current->name = yyextra->msName;
4578 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4584 const Entry *p=yyextra->current.get();
4592 int pi = (i==-1) ? 0 : i+2;
4602 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4606 if (!yyextra->msName.isEmpty()
4612 if (typedefHidesStruct &&
4613 yyextra->isTypedef &&
4614 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4615 yyextra->msType.stripWhiteSpace().isEmpty() &&
4616 yyextra->memspecEntry)
4618 yyextra->memspecEntry->name=yyextra->msName;
4622 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4623 varEntry->lang = yyextra->language;
4624 varEntry->protection = yyextra->current->protection ;
4625 varEntry->mtype = yyextra->current->mtype;
4626 varEntry->virt = yyextra->current->virt;
4627 varEntry->isStatic = yyextra->current->isStatic;
4628 varEntry->section = EntryType::makeVariable();
4629 varEntry->name = yyextra->msName.stripWhiteSpace();
4630 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4631 varEntry->args = yyextra->msArgs;
4632 if (yyextra->isTypedef)
4634 varEntry->type.prepend(
"typedef ");
4637 if (typedefHidesStruct &&
4638 yyextra->isTypedef &&
4639 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4640 yyextra->memspecEntry
4643 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4647 varEntry->type+=yyextra->current->name+yyextra->msType;
4649 varEntry->fileName = yyextra->fileName;
4650 varEntry->startLine = yyextra->yyLineNr;
4651 varEntry->startColumn = yyextra->yyColNr;
4652 varEntry->doc = yyextra->current->doc;
4653 varEntry->brief = yyextra->current->brief;
4654 varEntry->mGrpId = yyextra->current->mGrpId;
4655 varEntry->initializer.str(yyextra->current->initializer.str());
4656 varEntry->groups = yyextra->current->groups;
4657 varEntry->sli = yyextra->current->sli;
4662 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4667 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4669 if (!yyextra->current->doc.isEmpty())
4671 yyextra->memspecEntry->doc += yyextra->current->doc;
4673 if (!yyextra->current->brief.isEmpty())
4675 yyextra->memspecEntry->brief += yyextra->current->brief;
4678 yyextra->msType.clear();
4679 yyextra->msName.clear();
4680 yyextra->msArgs.clear();
4681 yyextra->isTypedef=
FALSE;
4682 yyextra->firstTypedefEntry.reset();
4683 yyextra->memspecEntry.reset();
4684 yyextra->current->reset();
4686 BEGIN( FindMembers );
4690 yyextra->current->doc.clear();
4691 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 constexpr bool isCompound() const noexcept
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
4696 yyextra->lastInitializerContext=YY_START;
4697 yyextra->sharpCount=0;
4698 yyextra->initBracketCount=0;
4699 yyextra->current->initializer.str(yytext);
4700 BEGIN(ReadInitializer);
4711<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4712<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4713<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4716<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4717 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4719 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4720 yyextra->insideObjC=
FALSE;
4721 BEGIN( FindMembers );
4723<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4724<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4726<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4727<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4728 if (yyextra->insidePHP)
4734 yyextra->current->bodyLine = yyextra->yyLineNr;
4735 yyextra->current->bodyColumn = yyextra->yyColNr;
4738 yyextra->funcPtrType=yytext;
4739 yyextra->roundCount=0;
4744<FuncPtr>{SCOPENAME} {
4745 yyextra->current->name = yytext;
4748 BEGIN( FuncPtrOperator );
4752 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4754 yyextra->funcPtrType += yyextra->current->name;
4758 BEGIN( EndFuncPtr );
4765<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4766 yyextra->current->name += yytext;
4767 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4770<FuncPtrOperator>\n {
4772 yyextra->current->name += *yytext;
4774<FuncPtrOperator>"(" {
4776 BEGIN( EndFuncPtr );
4779 yyextra->current->name += *yytext;
4781<EndFuncPtr>")"{BNopt}/";" {
4783 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4786<EndFuncPtr>")"{BNopt}/"(" {
4788 if (yyextra->funcPtrType!=
"(")
4790 yyextra->current->type+=yyextra->funcPtrType+
")";
4794<EndFuncPtr>")"{BNopt}/"[" {
4796 yyextra->current->type+=yyextra->funcPtrType;
4797 yyextra->current->args +=
")";
4802 yyextra->current->args += *yytext ;
4805 yyextra->current->bodyLine = yyextra->yyLineNr;
4806 yyextra->current->bodyColumn = yyextra->yyColNr;
4807 yyextra->currentArgumentContext = FuncFuncEnd;
4808 yyextra->fullArgString=yyextra->current->args;
4809 yyextra->copyArgString=&yyextra->current->args;
4810 BEGIN( ReadFuncArgType ) ;
4812<EndFuncPtr>"["[^\n\]]*"]" {
4813 yyextra->funcPtrType+=yytext;
4819 yyextra->current->args += *yytext ;
4820 ++yyextra->roundCount;
4823 yyextra->current->args += *yytext ;
4824 if ( yyextra->roundCount )
4825 --yyextra->roundCount;
4831<FuncFuncEnd>")"{BN}*"(" {
4833 yyextra->current->type+=yyextra->funcPtrType+
")(";
4834 BEGIN(FuncFuncType);
4836<FuncFuncEnd>")"{BNopt}/[;{] {
4838 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4841<FuncFuncEnd>")"{BNopt}/"[" {
4843 yyextra->current->type+=yyextra->funcPtrType;
4844 yyextra->current->args+=
")";
4845 BEGIN(FuncFuncArray);
4848 yyextra->current->args += *yytext;
4851 yyextra->current->type += *yytext;
4852 yyextra->roundCount++;
4855 yyextra->current->type += *yytext;
4856 if (yyextra->roundCount)
4857 --yyextra->roundCount;
4861<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4862<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4864 yyextra->current->type += *yytext;
4866<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4867 if (yyextra->current->type.startsWith(
"typedef") &&
4868 yyextra->current->bodyLine==-1)
4871 yyextra->current->bodyLine = yyextra->yyLineNr;
4872 yyextra->current->bodyColumn = yyextra->yyColNr;
4873 BEGIN( GetCallType );
4875 else if (!yyextra->current->name.isEmpty())
4877 yyextra->current->args = yytext;
4878 yyextra->current->bodyLine = yyextra->yyLineNr;
4879 yyextra->current->bodyColumn = yyextra->yyColNr;
4880 yyextra->currentArgumentContext = FuncQual;
4881 yyextra->fullArgString=yyextra->current->args;
4882 yyextra->copyArgString=&yyextra->current->args;
4883 BEGIN( ReadFuncArgType ) ;
4887<GetCallType>{BN}*{ID}{BN}*"*" {
4890 yyextra->funcPtrType=
"(";
4891 yyextra->funcPtrType+=yytext;
4892 yyextra->roundCount=0;
4896 if (!yyextra->current->name.isEmpty())
4898 yyextra->current->args = yytext;
4899 yyextra->current->bodyLine = yyextra->yyLineNr;
4900 yyextra->current->bodyColumn = yyextra->yyColNr;
4901 yyextra->currentArgumentContext = FuncQual;
4902 yyextra->fullArgString=yyextra->current->args;
4903 yyextra->copyArgString=&yyextra->current->args;
4904 BEGIN( ReadFuncArgType ) ;
4918<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4919 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4920 else yyextra->fullArgString+=yytext;
4922<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4923 yyextra->fullArgString+=yytext;
4925<CopyArgRound>[^\/\n\)\(\"\']+ {
4926 *yyextra->copyArgString+=yytext;
4927 yyextra->fullArgString+=yytext;
4929<CopyArgSquare>[^\/\n\]\[\"\']+ {
4930 *yyextra->copyArgString+=yytext;
4931 yyextra->fullArgString+=yytext;
4933<ReadFuncArgType,ReadTempArgs>{BN}* {
4934 *yyextra->copyArgString+=
" ";
4935 yyextra->fullArgString+=
" ";
4938<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4940 yyextra->lastRawStringContext = YY_START;
4941 yyextra->pCopyRawString = yyextra->copyArgString;
4942 *yyextra->pCopyRawString+=yytext;
4943 yyextra->fullArgString+=yytext;
4946<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4947 *yyextra->copyArgString+=*yytext;
4948 yyextra->fullArgString+=*yytext;
4949 yyextra->lastCopyArgStringContext = YY_START;
4950 BEGIN( CopyArgString );
4952<ReadFuncArgType>"[" {
4953 if (!yyextra->insidePHP) REJECT;
4954 *yyextra->copyArgString+=*yytext;
4955 yyextra->fullArgString+=*yytext;
4956 yyextra->argSquareCount=0;
4957 yyextra->lastCopyArgContext = YY_START;
4958 BEGIN( CopyArgSquare );
4960<ReadFuncArgType,ReadTempArgs>"(" {
4961 *yyextra->copyArgString+=*yytext;
4962 yyextra->fullArgString+=*yytext;
4963 yyextra->argRoundCount=0;
4964 yyextra->lastCopyArgContext = YY_START;
4965 BEGIN( CopyArgRound );
4967<ReadFuncArgType>")" {
4968 *yyextra->copyArgString+=*yytext;
4969 yyextra->fullArgString+=*yytext;
4971 if (yyextra->insideJS)
4982 yyextra->docBackup = yyextra->current->doc;
4983 yyextra->briefBackup = yyextra->current->brief;
4985 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4988<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4989 if (yyextra->currentArgumentContext==DefineEnd)
4993 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4999 BEGIN( yyextra->currentArgumentContext );
5005 yyextra->fullArgString+=yytext;
5006 yyextra->lastCopyArgChar=0;
5007 yyextra->lastCommentInArgContext=YY_START;
5009 BEGIN( CopyArgCommentLine );
5011 BEGIN( CopyArgComment );
5015<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5016<ReadFuncArgType,ReadTempArgs>{CCS} {
5017 yyextra->lastCContext = YY_START;
5018 BEGIN( SkipComment );
5020<ReadFuncArgType,ReadTempArgs>{CPPC} {
5021 yyextra->lastCContext = YY_START;
5022 BEGIN( SkipCxxComment );
5038<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5040 if (yyextra->currentArgumentContext==DefineEnd)
5044 int i;
for (i=(
int)yyleng-1;i>0;i--)
5048 *yyextra->copyArgString+=*yytext;
5049 yyextra->fullArgString+=*yytext;
5052 BEGIN( yyextra->currentArgumentContext );
5058 yyextra->lastCopyArgChar=*yytext;
5061 yyextra->lastCommentInArgContext=YY_START;
5062 yyextra->fullArgString+=text;
5063 if (text.
find(
"//")!=-1)
5064 BEGIN( CopyArgCommentLine );
5066 BEGIN( CopyArgComment );
5069<CopyArgComment>^{B}*"*"+/{BN}+
5070<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5071<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5072 if (yyextra->lastCopyArgChar!=0)
5073 unput(yyextra->lastCopyArgChar);
5074 BEGIN( yyextra->lastCommentInArgContext );
5076<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5078 if (yyextra->lastCopyArgChar!=0)
5079 unput(yyextra->lastCopyArgChar);
5080 BEGIN( yyextra->lastCommentInArgContext );
5082<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5083 yyextra->docBlockName=
"uml";
5084 yyextra->fullArgString+=yytext;
5085 BEGIN(CopyArgVerbatim);
5087<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5088 yyextra->docBlockName=&yytext[1];
5089 yyextra->fullArgString+=yytext;
5090 BEGIN(CopyArgVerbatim);
5092<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5093 yyextra->docBlockName=&yytext[1];
5094 if (yyextra->docBlockName.at(1)==
'[')
5096 yyextra->docBlockName.at(1)=
']';
5098 if (yyextra->docBlockName.at(1)==
'{')
5100 yyextra->docBlockName.at(1)=
'}';
5102 if (yyextra->docBlockName.at(1)==
'(')
5104 yyextra->docBlockName.at(1)=
')';
5106 yyextra->fullArgString+=yytext;
5107 BEGIN(CopyArgVerbatim);
5109<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5110 yyextra->fullArgString+=yytext;
5111 if (&yytext[4]==yyextra->docBlockName)
5113 yyextra->docBlockName=
"";
5114 BEGIN(CopyArgCommentLine);
5117<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5118 yyextra->fullArgString+=yytext;
5119 if (yyextra->docBlockName==&yytext[1])
5121 yyextra->docBlockName=
"";
5122 BEGIN(CopyArgCommentLine);
5125<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5126<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5127<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5128<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5129<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5130 warn(yyextra->fileName,yyextra->yyLineNr,
5131 "Ignoring {:c}brief command inside argument documentation",*yytext
5133 yyextra->fullArgString+=
' ';
5136 *yyextra->copyArgString+=*yytext;
5137 yyextra->fullArgString+=*yytext;
5138 yyextra->argSharpCount=1;
5139 BEGIN( CopyArgSharp );
5142 *yyextra->copyArgString+=*yytext;
5143 yyextra->fullArgString+=*yytext;
5145 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5147 BEGIN( yyextra->currentArgumentContext );
5150 yyextra->argRoundCount++;
5151 *yyextra->copyArgString+=*yytext;
5152 yyextra->fullArgString+=*yytext;
5155 *yyextra->copyArgString+=*yytext;
5156 yyextra->fullArgString+=*yytext;
5157 if (yyextra->argRoundCount>0)
5158 yyextra->argRoundCount--;
5160 BEGIN( yyextra->lastCopyArgContext );
5163 yyextra->argSquareCount++;
5164 *yyextra->copyArgString+=*yytext;
5165 yyextra->fullArgString+=*yytext;
5168 *yyextra->copyArgString+=*yytext;
5169 yyextra->fullArgString+=*yytext;
5170 if (yyextra->argSquareCount>0)
5171 yyextra->argSquareCount--;
5173 BEGIN( yyextra->lastCopyArgContext );
5176 *yyextra->copyArgString+=*yytext;
5177 yyextra->fullArgString+=*yytext;
5178 yyextra->argRoundCount=0;
5179 yyextra->lastCopyArgContext = YY_START;
5180 BEGIN( CopyArgRound );
5183 yyextra->argSharpCount++;
5185 *yyextra->copyArgString+=*yytext;
5186 yyextra->fullArgString+=*yytext;
5189 *yyextra->copyArgString+=*yytext;
5190 yyextra->fullArgString+=*yytext;
5191 yyextra->argSharpCount--;
5192 if (yyextra->argSharpCount>0)
5198 BEGIN( ReadTempArgs );
5202<CopyArgString,CopyArgPHPString>\\. {
5203 *yyextra->copyArgString+=yytext;
5204 yyextra->fullArgString+=yytext;
5207 *yyextra->copyArgString+=*yytext;
5208 yyextra->fullArgString+=*yytext;
5209 BEGIN( yyextra->lastCopyArgStringContext );
5211<CopyArgPHPString>\' {
5212 *yyextra->copyArgString+=*yytext;
5213 yyextra->fullArgString+=*yytext;
5214 BEGIN( yyextra->lastCopyArgStringContext );
5216<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5217 if (yyextra->insidePHP)
5223 *yyextra->copyArgString+=yytext;
5224 yyextra->fullArgString+=yytext;
5227<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5228 *yyextra->copyArgString+=yytext;
5229 yyextra->fullArgString+=yytext;
5230 if (yyextra->insidePHP)
5232 yyextra->lastCopyArgStringContext=YY_START;
5233 BEGIN(CopyArgPHPString);
5236<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5237 *yyextra->copyArgString+=yytext;
5238 yyextra->fullArgString+=yytext;
5240<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5242 *yyextra->copyArgString+=*yytext;
5243 yyextra->fullArgString+=*yytext;
5245<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5246 *yyextra->copyArgString+=yytext;
5247 yyextra->fullArgString+=yytext;
5249<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5250 *yyextra->copyArgString+=*yytext;
5251 yyextra->fullArgString+=*yytext;
5259<FuncRound>"(" { yyextra->current->args += *yytext ;
5260 ++yyextra->roundCount ;
5262<FuncRound>")" { yyextra->current->args += *yytext ;
5263 if ( yyextra->roundCount )
5264 --yyextra->roundCount ;
5276 if (
qstrcmp(yytext,
";")==0 &&
5277 ((yyextra->insideJS || yyextra->insidePHP) &&
5280 yyextra->current->reset();
5282 BEGIN( FindMembers );
5286 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5289<FuncQual>{BN}*"abstract"{BN}* {
5291 yyextra->current->virt = Specifier::Pure;
5292 yyextra->current->args +=
" override ";
5294<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5296 yyextra->current->spec.setOverride(
true);
5297 yyextra->current->args +=
" override ";
5298 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5301<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5303 yyextra->current->spec.setFinal(
true);
5304 yyextra->current->args +=
" final ";
5305 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5308<FuncQual>{BN}*"sealed"{BN}* {
5310 yyextra->current->spec.setSealed(
true);
5311 yyextra->current->args +=
" sealed ";
5313<FuncQual>{BN}*"new"{BN}* {
5315 yyextra->current->spec.setNew(
true);
5316 yyextra->current->args +=
" new ";
5318<FuncQual>{BN}*"const"{BN}* {
5320 yyextra->current->args +=
" const ";
5321 yyextra->current->argList.setConstSpecifier(
TRUE);
5323<FuncQual>{BN}*"volatile"{BN}* {
5325 yyextra->current->args +=
" volatile ";
5326 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5328<FuncQual>{BN}*"noexcept"{BN}* {
5330 yyextra->current->args +=
" noexcept ";
5331 yyextra->current->spec.setNoExcept(
true);
5333<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5335 yyextra->current->args +=
" noexcept(false)";
5337<FuncQual>{BN}*"noexcept"{BN}*"(" {
5339 yyextra->current->args +=
" noexcept(";
5340 yyextra->current->spec.setNoExcept(
true);
5341 yyextra->lastRoundContext=FuncQual;
5342 yyextra->pCopyRoundString=&yyextra->current->args;
5343 yyextra->roundCount=0;
5347 yyextra->current->args +=
" &";
5350<FuncQual>{BN}*"&&" {
5351 yyextra->current->args +=
" &&";
5355<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5357 yyextra->current->args +=
" = 0";
5358 yyextra->current->virt = Specifier::Pure;
5359 yyextra->current->argList.setPureSpecifier(
TRUE);
5360 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5363<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5365 yyextra->current->args +=
" = delete";
5366 yyextra->current->spec.setDelete(
true);
5367 yyextra->current->argList.setIsDeleted(
TRUE);
5368 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5371<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5373 yyextra->current->args +=
" = default";
5374 yyextra->current->spec.setDefault(
true);
5375 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5378<FuncQual>{BN}*"->"{BN}* {
5380 yyextra->current->argList.setTrailingReturnType(
" -> ");
5381 yyextra->current->args +=
" -> ";
5382 yyextra->roundCount=0;
5383 BEGIN(TrailingReturn);
5385<TrailingReturn>[{;] {
5386 if (yyextra->roundCount>0) REJECT;
5388 yyextra->current->argList.finishTrailingReturnType();
5391<TrailingReturn>"requires"{BN}+ {
5392 if (yyextra->insideJava) REJECT;
5393 yyextra->requiresContext = FuncQual;
5394 yyextra->current->req+=
' ';
5395 yyextra->current->argList.finishTrailingReturnType();
5396 BEGIN(RequiresClause);
5398<TrailingReturn>"(" {
5399 yyextra->roundCount++;
5400 yyextra->current->argList.appendTrailingReturnType(yytext);
5401 yyextra->current->args+=yytext;
5403<TrailingReturn>")" {
5404 if (yyextra->roundCount>0)
5406 yyextra->roundCount--;
5410 warn(yyextra->fileName,yyextra->yyLineNr,
5411 "Found ')' without opening '(' for trailing return type '{})...'",
5412 yyextra->current->argList.trailingReturnType());
5414 yyextra->current->argList.appendTrailingReturnType(yytext);
5415 yyextra->current->args+=yytext;
5418 yyextra->current->argList.appendTrailingReturnType(yytext);
5419 yyextra->current->args+=yytext;
5423 yyextra->current->argList.appendTrailingReturnType(yytext);
5424 yyextra->current->args+=
' ';
5426<FuncRound,FuncFunc>{BN}*","{BN}* {
5428 yyextra->current->args +=
", " ;
5430<FuncQual,FuncRound,FuncFunc>{BN}+ {
5432 yyextra->current->args +=
' ' ;
5434<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5436 yyextra->lastCPPContext = YY_START;
5440 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5447 yyextra->lastInitializerContext=YY_START;
5448 yyextra->sharpCount=0;
5449 yyextra->initBracketCount=0;
5450 yyextra->current->initializer.str(yytext);
5451 BEGIN(ReadInitializer);
5466 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5469 yyextra->requiresContext = YY_START;
5470 yyextra->current->req+=
' ';
5471 BEGIN(RequiresClause);
5473 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5476 yyextra->current->typeConstr.clear();
5477 yyextra->current->typeConstr.push_back(
Argument());
5478 yyextra->lastCSConstraint = YY_START;
5479 BEGIN( CSConstraintName );
5483 yyextra->current->args = yytext;
5484 yyextra->oldStyleArgType.clear();
5485 BEGIN(OldStyleArgs);
5489 yyextra->current->args += yytext;
5495 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5497 if (yyextra->current->doc!=yyextra->docBackup)
5499 doc=yyextra->current->doc;
5500 yyextra->current->doc=yyextra->docBackup;
5502 if (yyextra->current->brief!=yyextra->briefBackup)
5504 brief=yyextra->current->brief;
5505 yyextra->current->brief=yyextra->briefBackup;
5507 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5508 oldStyleArgName,brief,doc);
5509 yyextra->current->args.clear();
5510 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5512<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5514 if (yyextra->current->argList.empty())
5516 yyextra->current->argList.setNoParameters(
TRUE);
5522<OldStyleArgs>. { yyextra->current->args += *yytext; }
5523<FuncQual,FuncRound,FuncFunc>\" {
5524 if (yyextra->insideIDL && yyextra->insideCppQuote)
5530 yyextra->current->args += *yytext;
5533<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5534<FuncQual>{BN}*"try:" |
5535<FuncQual>{BN}*"try"{BN}+ {
5536 yyextra->insideTryBlock=
TRUE;
5538 if (yytext[yyleng-1]==
':')
5544<FuncQual>{BN}*"throw"{BN}*"(" {
5545 yyextra->current->exception =
" throw (" ;
5546 yyextra->roundCount=0;
5548 BEGIN( ExcpRound ) ;
5550<FuncQual>{BN}*"raises"{BN}*"(" {
5551 yyextra->current->exception =
" raises (" ;
5553 yyextra->roundCount=0;
5554 BEGIN( ExcpRound ) ;
5556<FuncQual>{BN}*"throws"{BN}+ {
5557 yyextra->current->exception =
" throws " ;
5561<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5562 ++yyextra->roundCount ;
5564<ExcpRound>")" { yyextra->current->exception += *yytext ;
5565 if ( yyextra->roundCount )
5566 --yyextra->roundCount ;
5571 yyextra->current->exception += *yytext;
5574 unput(
'{'); BEGIN( FuncQual );
5577 unput(
';'); BEGIN( FuncQual );
5580 yyextra->current->exception +=
' ';
5584 yyextra->current->exception += *yytext;
5586<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5587 yyextra->current->name = yyextra->current->args ;
5588 yyextra->current->args = yytext ;
5589 yyextra->roundCount=0;
5590 BEGIN( FuncRound ) ;
5593 if (!yyextra->insidePHP) BEGIN(SkipInits);
5599 yyextra->current->fileName = yyextra->fileName;
5600 yyextra->current->startLine = yyextra->yyBegLineNr;
5601 yyextra->current->startColumn = yyextra->yyBegColNr;
5602 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5604 std::string type = yyextra->current->type.str();
5608 ti = (int)
match.position();
5612 int di = yyextra->current->type.find(
"decltype(");
5613 if (di!=-1 && di<ti)
5618 int ts=yyextra->current->type.find(
'<');
5619 int te=yyextra->current->type.findRev(
'>');
5622 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5623 bool isFunction = ti==-1 ||
5624 (ts!=-1 && ts<te && ts<ti && ti<te);
5625 bool isVariable = !yyextra->current->type.isEmpty() &&
5626 (!isFunction || startsWithTypedef);
5631 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5636 if (yyextra->isTypedef && !startsWithTypedef)
5638 yyextra->current->type.prepend(
"typedef ");
5640 yyextra->current->section = EntryType::makeVariable() ;
5645 yyextra->current->section = EntryType::makeFunction() ;
5646 yyextra->current->proto = *yytext==
';';
5654 if (yyextra->isTypedef && !startsWithTypedef)
5656 yyextra->current->type.prepend(
"typedef ");
5659 yyextra->current->section = EntryType::makeVariable();
5664 yyextra->current->section = EntryType::makeFunction();
5665 yyextra->current->proto =
TRUE;
5669 if ( yyextra->insidePHP)
5673 yyextra->current->spec.setFinal(
true);
5677 yyextra->current->spec.setAbstract(
true);
5680 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5683 if ( *yytext ==
'{' )
5685 yyextra->lastCurlyContext = FindMembers;
5686 yyextra->curlyCount=0;
5691 BEGIN( FindMembers );
5696 if ( yyextra->insidePHP)
5700 yyextra->previous = yyextra->current;
5701 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5704 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5706 yyextra->current->spec.setOptional(
true).setRequired(
true);
5708 yyextra->lastCurlyContext = FindMembers;
5709 if ( *yytext ==
',' )
5711 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5713 if ( *yytext ==
'{' )
5715 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5717 yyextra->previous->spec.setInline(
true);
5720 yyextra->curlyCount=0;
5721 BEGIN( SkipCurly ) ;
5725 if (!yyextra->previous->section.isVariable())
5726 yyextra->previous->bodyLine=-1;
5727 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...
5731<SkipInits>">"{BN}*"{" {
5733 yyextra->curlyCount=1;
5734 BEGIN(SkipC11Inits);
5736<SkipInits>{ID}{BN}*"{" {
5738 yyextra->curlyCount=1;
5739 BEGIN(SkipC11Inits);
5742 ++yyextra->curlyCount;
5745 if ( --yyextra->curlyCount<=0 )
5750<SkipC11Attribute>"]]" {
5751 BEGIN(yyextra->lastC11AttributeContext);
5759 ++yyextra->curlyCount ;
5761<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5764 if( yyextra->curlyCount )
5766 --yyextra->curlyCount ;
5770 if (!yyextra->current->sli.empty() && yyextra->previous)
5772 yyextra->previous->sli = yyextra->current->sli;
5773 yyextra->current->sli.clear();
5775 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5776 BEGIN( yyextra->lastCurlyContext ) ;
5779<SkipCurly>"}"{BN}*{DCOMM}"<" {
5781 if ( yyextra->curlyCount )
5784 --yyextra->curlyCount ;
5788 yyextra->current->endBodyLine=yyextra->yyLineNr;
5789 yyextra->tempEntry = yyextra->current;
5790 yyextra->current = yyextra->previous;
5792 yyextra->docBlockContext = SkipCurlyEndDoc;
5793 yyextra->docBlockInBody =
FALSE;
5794 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5796 yyextra->docBlock.str(std::string());
5797 yyextra->docBlockTerm =
'}';
5798 if (yytext[yyleng-3]==
'/')
5810<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5811 yyextra->docBlockContext = SkipCurlyEndDoc;
5812 yyextra->docBlockInBody =
FALSE;
5813 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5815 yyextra->docBlock.str(std::string());
5816 yyextra->docBlockTerm =
'}';
5817 if (yytext[yyleng-3]==
'/')
5828<SkipCurlyEndDoc>"}" {
5830 if (yyextra->tempEntry)
5832 yyextra->current = yyextra->tempEntry;
5833 yyextra->tempEntry.reset();
5835 BEGIN( yyextra->lastCurlyContext );
5839 yyextra->lastStringContext=SkipCurly;
5840 BEGIN( SkipString );
5842<SkipCurly>^{B}*"#" {
5843 if (yyextra->insidePHP)
5846 BEGIN( SkipCurlyCpp );
5848<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5852<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5853 if (!yyextra->insidePHP)
5859 yyextra->lastHereDocContext = YY_START;
5863<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5865 yyextra->lastRawStringContext = YY_START;
5866 yyextra->dummyRawString.clear();
5867 yyextra->pCopyRawString = &yyextra->dummyRawString;
5868 *yyextra->pCopyRawString += yytext;
5871<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
5875<SkipCurly,SkipCurlyCpp>"\$" {}
5879 yyextra->lastCurlyContext = FindMembers;
5882<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5886<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5888 yyextra->lastCContext = YY_START;
5891<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5893 yyextra->lastCContext = YY_START;
5894 BEGIN(SkipCxxComment);
5896<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5897 yyextra->roundCount=0;
5898 yyextra->lastSkipRoundContext=YY_START;
5901<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5902 yyextra->lastStringContext=YY_START;
5903 BEGIN( SkipString );
5906 warn(yyextra->fileName,yyextra->yyLineNr,
5907 "Found ';' while parsing initializer list! "
5908 "(doxygen could be confused by a macro call without semicolon)"
5910 BEGIN( FindMembers );
5912<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5913 if (!yyextra->insidePHP)
5916 yyextra->lastCContext = YY_START;
5917 BEGIN(SkipCxxComment);
5919<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5920 if (!yyextra->insideCS) REJECT;
5923 yyextra->lastSkipVerbStringContext=YY_START;
5924 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5925 yyextra->dummyTextStream.clear();
5926 BEGIN(SkipVerbString);
5928<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5929 if (yyextra->insidePHP) REJECT;
5931<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5932 if (yyextra->insidePHP)
5934 yyextra->lastStringContext=YY_START;
5935 BEGIN(SkipPHPString);
5938<SkipC11Attribute>{ID} {
5941 yyextra->current->spec.setNoDiscard(
true);
5944<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5945<SkipString,SkipPHPString>\\. { }
5947 BEGIN( yyextra->lastStringContext );
5950 BEGIN( yyextra->lastStringContext );
5952<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5953<SkipString,SkipPHPString>\n {
5957<SkipString,SkipPHPString>. { }
5963 yyextra->current->section = EntryType::makeEmpty() ;
5964 yyextra->current->type.clear() ;
5965 yyextra->current->name.clear() ;
5966 yyextra->current->args.clear() ;
5967 yyextra->current->argList.clear();
5968 BEGIN( FindMembers ) ;
5971 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5975 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5979 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5981 if (!yyextra->baseName.isEmpty())
5983 yyextra->current->extends.emplace_back(
5984 yyextra->baseName,Protection::Public,Specifier::Normal);
5985 yyextra->baseName.clear();
5987 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5992 yyextra->current->section = EntryType::makeEmpty() ;
5993 yyextra->current->type.clear() ;
5994 yyextra->current->name.clear() ;
5995 yyextra->current->args.clear() ;
5996 yyextra->current->argList.clear();
5998 BEGIN( FindMembers ) ;
6000<CompoundName>{SCOPENAME}/{BN}*"<" {
6001 yyextra->sharpCount = 0;
6002 yyextra->current->name = yytext ;
6004 if (yyextra->current->spec.isProtocol())
6006 yyextra->current->name+=
"-p";
6009 yyextra->lastClassTemplSpecContext = ClassVar;
6010 if (yyextra->insideObjC)
6012 BEGIN( ObjCProtocolList );
6014 else if (yyextra->insideCS)
6021 yyextra->roundCount=0;
6022 BEGIN( ClassTemplSpec );
6029 yyextra->current->tArgLists.
push_back(al);
6030 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6031 yyextra->templateStr=
"<";
6032 yyextra->current->name +=
"<";
6033 yyextra->fullArgString = yyextra->templateStr;
6034 yyextra->copyArgString = &yyextra->current->name;
6036 yyextra->currentArgumentContext = ClassVar;
6037 BEGIN( ReadTempArgs );
6039<ObjCProtocolList>"<" {
6040 yyextra->insideProtocolList=
TRUE;
6043<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6044 yyextra->current->name += yytext;
6046 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6049 if (yyextra->current->spec.isProtocol())
6056 BEGIN( yyextra->lastClassTemplSpecContext );
6060<ClassTemplSpec>"<" {
6061 yyextra->current->name += yytext;
6062 if (yyextra->roundCount==0) yyextra->sharpCount++;
6065 yyextra->current->name += yytext;
6067<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6068 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6072 yyextra->current->name =
substitute(yytext,
".",
"::");
6073 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6078 else if (!yyextra->current->tArgLists.empty())
6082 yyextra->current->name = yytext;
6083 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6086 QCString rn = yyextra->current_root->name;
6088 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6092 yyextra->current->spec.setForwardDecl(
true);
6093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6095 else if (yyextra->insideIDL &&
6096 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6097 yyextra->current->spec.isInterface()) ||
6098 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6099 yyextra->current->spec.isService())
6107 yyextra->current->name = yytext;
6108 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6109 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6112 yyextra->current->spec.setInterface(
false).setService(
false);
6116 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6119 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6122 yyextra->current->reset();
6124 if (yyextra->insideObjC)
6126 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6127 yyextra->insideObjC =
FALSE;
6129 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6131 yyextra->current->type.prepend(
"typedef");
6133 BEGIN( FindMembers );
Wrapper class for the Entry type.
6136<CompoundName>{SCOPENAME}/{BN}*"(" {
6137 yyextra->current->name = yytext ;
6140 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6142 yyextra->lastAlignAsContext = YY_START;
6147 if (yyextra->current->spec.isProtocol())
6149 yyextra->current->name +=
"-p";
6154<AlignAs>"(" { yyextra->roundCount=0;
6155 BEGIN( AlignAsEnd );
6159<AlignAsEnd>"(" { yyextra->roundCount++; }
6160<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6162 BEGIN( yyextra->lastAlignAsContext );
6168 yyextra->current->name = yytext ;
6172 yyextra->current->bodyLine = yyextra->yyLineNr;
6173 yyextra->current->bodyColumn = yyextra->yyColNr;
6174 yyextra->current->initializer.str(std::string());
6175 yyextra->lastInitializerContext = FindMembers;
6176 yyextra->sharpCount=0;
6177 yyextra->initBracketCount=0;
6178 BEGIN(ReadInitializer);
6180<CompoundName>{SCOPENAME}/{BN}*"," {
6182 yyextra->current->reset();
6185<CompoundName>{SCOPENAME} {
6186 yyextra->current->name = yytext ;
6189 if (yyextra->current->spec.isProtocol())
6191 yyextra->current->name +=
"-p";
6193 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6199<CompoundName>{CSSCOPENAME} {
6200 yyextra->current->name =
substitute(yytext,
".",
"::");
6204<ClassVar>{SCOPENAME}{BNopt}/"(" {
6205 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6208 yyextra->roundCount=0;
6209 BEGIN(SkipUnionSwitch);
6214 yyextra->yyBegColNr=yyextra->yyColNr;
6215 yyextra->yyBegLineNr=yyextra->yyLineNr;
6216 yyextra->current->name = yytext;
6217 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6220 BEGIN( FindMembers );
6224 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6228 yyextra->current->type.prepend(
"typedef ");
6236<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6237 if (yyextra->insideCli)
6240 yyextra->current->spec.setSealedClass(
true);
6242 yyextra->current->spec.setAbstractClass(
true);
6250<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6251 yyextra->yyBegColNr=yyextra->yyColNr;
6252 yyextra->yyBegLineNr=yyextra->yyLineNr;
6255 if (yyextra->current->section.isEnum())
6257 yyextra->current->section = EntryType::makeVariable() ;
6259 yyextra->current->type +=
' ' ;
6260 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...
6269 yyextra->yyBegColNr=yyextra->yyColNr;
6270 yyextra->yyBegLineNr=yyextra->yyLineNr;
6272 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6275 yyextra->roundCount=0;
6276 BEGIN(SkipUnionSwitch);
6278 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6280 yyextra->current->type.clear();
6281 yyextra->baseProt = Protection::Public;
6282 yyextra->baseVirt = Specifier::Normal;
6283 yyextra->baseName.clear();
6284 BEGIN( BasesProt ) ;
6286 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6288 yyextra->current->typeConstr.clear();
6289 yyextra->current->typeConstr.push_back(
Argument());
6290 yyextra->lastCSConstraint = YY_START;
6291 BEGIN( CSConstraintName );
6293 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6295 yyextra->current->spec.setAbstract(
true);
6297 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6299 yyextra->current->spec.setSealed(
true);
6301 else if (
qstrcmp(yytext,
"final")==0)
6303 yyextra->current->spec.setFinal(
true);
6307 if (yyextra->current->section.isEnum())
6309 yyextra->current->section = EntryType::makeVariable() ;
6311 yyextra->current->type +=
' ' ;
6312 yyextra->current->type += yyextra->current->name ;
6313 yyextra->current->name = yytext ;
6322 if (yyextra->insideObjC && *yytext==
'(')
6324 yyextra->current->name+=
'(';
6327 yyextra->current->spec.setCategory(
true);
6329 BEGIN( ClassCategory );
6335 BEGIN( FindMembers );
6338<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6339<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6340 yyextra->fullArgString.clear();
6341 yyextra->lastCopyArgChar=
'#';
6342 yyextra->lastCommentInArgContext=YY_START;
6344 BEGIN( CopyArgCommentLine );
6346 BEGIN( CopyArgComment );
6348<CSConstraintType,CSConstraintName>"#" {
6349 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6351<CSConstraintType>"=>" {
6356 BEGIN( yyextra->lastCSConstraint );
6358<CSConstraintType>"{" {
6362 BEGIN( yyextra->lastCSConstraint );
6364<CSConstraintType,CSConstraintName>";" {
6367 BEGIN( yyextra->lastCSConstraint );
6369<CSConstraintName>":" {
6370 BEGIN( CSConstraintType );
6372<CSConstraintName>{ID} {
6374 yyextra->current->typeConstr.back().name=yytext;
6376<CSConstraintType>"where" {
6377 yyextra->current->typeConstr.push_back(
Argument());
6378 BEGIN( CSConstraintName );
6380<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6381 if (yyextra->current->typeConstr.back().type.isEmpty())
6384 yyextra->current->typeConstr.back().type=yytext;
6388 QCString name = yyextra->current->typeConstr.back().name;
6389 yyextra->current->typeConstr.push_back(
Argument());
6390 yyextra->current->typeConstr.back().name=name;
6391 yyextra->current->typeConstr.back().type=yytext;
6394<CSConstraintName,CSConstraintType>\n {
6397<CSConstraintName,CSConstraintType>. {
6399<ClassCategory>{ID} {
6400 yyextra->current->name+=yytext;
6402<ClassCategory>")"/{BN}*"{" {
6403 yyextra->current->name+=
')';
6406<ClassCategory>")"/{BN}*"<" {
6407 yyextra->current->name+=
')';
6408 BEGIN( ObjCProtocolList );
6411 yyextra->current->name+=
')';
6412 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6424 if (yyextra->current->section.isVariable())
6426 yyextra->current->bitfields+=
":";
6427 yyextra->current->args.clear();
6430 else if (yyextra->current->section.isEnum())
6433 yyextra->current->args.clear();
6434 BEGIN(EnumBaseType);
6438 yyextra->current->type.clear();
6439 if (yyextra->current->spec.isInterface() ||
6440 yyextra->current->spec.isStruct() ||
6441 yyextra->current->spec.isRef() ||
6442 yyextra->current->spec.isValue() ||
6443 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6446 yyextra->baseProt = Protection::Public;
6450 yyextra->baseProt = Protection::Private;
6452 yyextra->baseVirt = Specifier::Normal;
6453 yyextra->baseName.clear();
6454 BEGIN( BasesProt ) ;
6458 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6460 yyextra->current->type.prepend(
"typedef");
6462 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6464 yyextra->current->section = EntryType::makeVariable() ;
6466 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6468 yyextra->current->reset();
6475 BEGIN( FindMembers );
6477<Bases,ClassVar>{CPPC}"/"/[^/] {
6478 if (!yyextra->insideObjC)
6485 yyextra->current->program << yytext;
6486 yyextra->current->fileName = yyextra->fileName ;
6487 yyextra->current->startLine = yyextra->yyLineNr ;
6488 yyextra->current->startColumn = yyextra->yyColNr;
6489 yyextra->curlyCount=0;
6490 BEGIN( ReadBodyIntf );
6493<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6494<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6495<Bases,ClassVar>{CPPC}"!" |
6496<Bases,ClassVar>[\-+]{BN}* {
6497 if (!yyextra->insideObjC)
6504 yyextra->current->program << yytext;
6505 yyextra->current->fileName = yyextra->fileName ;
6506 yyextra->current->startLine = yyextra->yyLineNr ;
6507 yyextra->current->startColumn = yyextra->yyColNr;
6508 yyextra->curlyCount=0;
6509 BEGIN( ReadBodyIntf );
6512<CompoundName,ClassVar>{B}*"{"{B}* {
6513 yyextra->current->program.str(std::string());
6514 yyextra->current->fileName = yyextra->fileName ;
6515 yyextra->current->bodyLine = yyextra->yyLineNr;
6516 yyextra->current->bodyColumn = yyextra->yyColNr;
6518 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6520 if (yyextra->current->section.isNamespace())
6524 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6536 yyextra->curlyCount=0;
6537 if (yyextra->current_root &&
6538 !yyextra->current_root->spec.isInterface() &&
6539 (yyextra->current->spec.isInterface() ||
6540 yyextra->current->spec.isProtocol() ||
6541 yyextra->current->spec.isCategory() ||
6542 yyextra->current->section.isObjcImpl()
6547 BEGIN( ReadBodyIntf );
6549 else if (yyextra->current->section.isNamespace())
6551 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6558<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6559<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6560<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6561<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6562<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6563<BasesProt>{BN} {
lineCount(yyscanner); }
6564<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6565<Bases>"decltype"{BN}*"(" {
6567 yyextra->roundCount=0;
6568 yyextra->lastSkipRoundContext=YY_START;
6571<Bases>("\\")?({ID}"\\")*{ID} {
6572 if (!yyextra->insidePHP)
6581 yyextra->baseName += bn;
6582 yyextra->current->args +=
' ';
6583 yyextra->current->args += yytext;
6586<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6592 yyextra->current->typeConstr.clear();
6593 yyextra->current->typeConstr.push_back(
Argument());
6594 yyextra->lastCSConstraint = YY_START;
6595 BEGIN( CSConstraintName );
6599 yyextra->baseName+=yytext;
6600 yyextra->current->args +=
' ';
6601 yyextra->current->args += yytext;
6604<Bases>{BN}*{ID}("."{ID})* {
6606 yyextra->baseName += name;
6607 yyextra->current->args +=
' ';
6608 yyextra->current->args += name;
6610<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6611 if (!yyextra->insideObjC)
6621<ClassVar,Bases>"@end" {
6629<ClassVar>"<" { yyextra->current->name += *yytext;
6630 yyextra->sharpCount=1;
6631 yyextra->roundCount=0;
6632 yyextra->lastSkipSharpContext = YY_START;
6633 yyextra->specName = &yyextra->current->name;
6634 BEGIN ( Specialization );
6638 yyextra->sharpCount=1;
6639 yyextra->roundCount=0;
6640 yyextra->lastSkipSharpContext = YY_START;
6641 if (yyextra->insideObjC)
6651 yyextra->templateStr = yytext;
6652 yyextra->specName = &yyextra->templateStr;
6653 BEGIN ( Specialization );
6656<Specialization>"<" { *yyextra->specName += *yytext;
6657 if (yyextra->roundCount==0) yyextra->sharpCount++;
6659<Specialization>">" {
6660 *yyextra->specName += *yytext;
6661 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6664 BEGIN(yyextra->lastSkipSharpContext);
6667<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6668<Specialization>"<<" { *yyextra->specName += yytext; }
6669<Specialization>">>"/{B}*"::" {
6674<Specialization>">>" {
6675 if (yyextra->insideCS)
6685 if (yyextra->roundCount>0)
6687 *yyextra->specName += yytext;
6697<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6698<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6699<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6701<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6702<Specialization>"\\'" { *yyextra->specName += *yytext;}
6703<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6704<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6705<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6706<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6707<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6708<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6709<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6710<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6711<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6714 *yyextra->specName += *yytext;
6716<SkipRound>"(" { ++yyextra->roundCount; }
6717<SkipRound>")" {
if (--yyextra->roundCount<0)
6718 BEGIN ( yyextra->lastSkipRoundContext );
6721 yyextra->lastStringContext=SkipRound;
6724<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6725 if (yyextra->insideProtocolList)
6727 yyextra->baseName+=
"-p";
6731 yyextra->current->args +=
',' ;
6734 if (!yyextra->baseName.isEmpty())
6736 yyextra->current->extends.emplace_back(
6737 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6740 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6741 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6742 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6744 yyextra->baseProt=Protection::Public;
6748 yyextra->baseProt=Protection::Private;
6750 yyextra->baseVirt=Specifier::Normal;
6751 yyextra->baseName.clear();
6754 yyextra->insideProtocolList=
FALSE;
6766 if (*yytext==
',' && yyextra->insideObjC)
6768 yyextra->insideProtocolList=
TRUE;
6774 yyextra->current->program.str(std::string());
6775 yyextra->current->fileName = yyextra->fileName ;
6776 yyextra->current->bodyLine = yyextra->yyLineNr;
6777 yyextra->current->bodyColumn = yyextra->yyColNr;
6779 if (!yyextra->baseName.isEmpty())
6780 yyextra->current->extends.emplace_back(
6781 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6783 yyextra->curlyCount=0;
6784 if (yyextra->insideObjC)
6786 BEGIN( ReadBodyIntf );
6793<SkipUnionSwitch>{B}*"(" {
6794 yyextra->roundCount++;
6796<SkipUnionSwitch>")" {
6797 if (--yyextra->roundCount==0)
6802<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6804<Comment>{BN}+ { yyextra->current->program << yytext ;
6807<Comment>{CCS} { yyextra->current->program << yytext ; }
6808<Comment>{CPPC} { yyextra->current->program << yytext ; }
6809<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6810 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6811 yyextra->current->program << yytext ;
6813<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6814 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6815 yyextra->current->program << yytext ;
6817<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6818<Comment>{CCE} { yyextra->current->program << yytext ;
6819 if (!yyextra->insideCode)
6821 yyextra->doxygenComment=
false;
6822 BEGIN( yyextra->lastContext );
6825<Comment>. { yyextra->current->program << *yytext ; }
6827<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6829 if (!yyextra->current->doc.isEmpty())
6831 yyextra->current->doc+=
"\n\n";
6835 yyextra->current->docLine = yyextra->yyLineNr;
6836 yyextra->current->docFile = yyextra->fileName;
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;
6850 yyextra->docBlock.
str(indent.
str());
6852 if (yyextra->docBlockAutoBrief)
6854 yyextra->current->briefLine = yyextra->yyLineNr;
6855 yyextra->current->briefFile = yyextra->fileName;
6860<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6866 yyextra->lastDocContext = YY_START;
6869 if (yyextra->current_root->section.isScope())
6871 yyextra->current->inside = yyextra->current_root->name+
"::";
6873 yyextra->current->docLine = yyextra->yyLineNr;
6874 yyextra->current->docFile = yyextra->fileName;
6875 yyextra->docBlockContext = YY_START;
6876 yyextra->docBlockInBody = YY_START==SkipCurly;
6878 yyextra->docBlockAutoBrief = javadocAutoBrief;
6882 yyextra->docBlock.
str(indent.
str());
6884 if (yyextra->docBlockAutoBrief)
6886 yyextra->current->briefLine = yyextra->yyLineNr;
6887 yyextra->current->briefFile = yyextra->fileName;
6894 yyextra->current->program << yytext ;
6895 yyextra->lastContext = YY_START ;
6896 yyextra->doxygenComment=
true;
6900<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6905<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6906 yyextra->lastDocContext = YY_START;
6909 if (yyextra->current_root->section.isScope())
6911 yyextra->current->inside = yyextra->current_root->name+
"::";
6913 yyextra->current->docLine = yyextra->yyLineNr;
6914 yyextra->current->docFile = yyextra->fileName;
6915 yyextra->docBlockContext = YY_START;
6916 yyextra->docBlockInBody = YY_START==SkipCurly;
6918 yyextra->docBlockAutoBrief = javadocAutoBrief;
6922 yyextra->docBlock.
str(indent.
str());
6924 if (yyextra->docBlockAutoBrief)
6926 yyextra->current->briefLine = yyextra->yyLineNr;
6927 yyextra->current->briefFile = yyextra->fileName;
6932<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6933 yyextra->lastDocContext = YY_START;
6934 if (yyextra->current_root->section.isScope())
6936 yyextra->current->inside = yyextra->current_root->name+
"::";
6938 yyextra->docBlockContext = YY_START;
6939 yyextra->docBlockInBody = YY_START==SkipCurly;
6940 yyextra->docBlockAutoBrief =
FALSE;
6944 yyextra->docBlock.
str(indent.
str());
6949<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6950 yyextra->lastDocContext = YY_START;
6951 if (yyextra->current_root->section.isScope())
6953 yyextra->current->inside = yyextra->current_root->name+
"::";
6955 yyextra->docBlockContext = YY_START;
6956 yyextra->docBlockInBody = YY_START==SkipCurly;
6957 yyextra->docBlockAutoBrief =
FALSE;
6960 yyextra->docBlock.
str(indent.
str());
6964<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6966 yyextra->externLinkage=
TRUE;
6969 if (yyextra->externLinkage)
6971 yyextra->externLinkage=
FALSE;
6973 else if (yyextra->insideCS &&
6974 !yyextra->current->name.isEmpty() &&
6975 !yyextra->current->type.isEmpty())
6977 if (yyextra->current->mtype == MethodTypes::Event)
6979 yyextra->mtype = MethodTypes::Event;
6983 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6987 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6989 yyextra->current->bodyLine = yyextra->yyLineNr;
6990 yyextra->current->bodyColumn = yyextra->yyColNr;
6991 yyextra->curlyCount=0;
6992 BEGIN( CSAccessorDecl );
6994 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6998 yyextra->current->exception =
" {";
6999 BEGIN(UNOIDLAttributeBlock);
7003 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7004 yyextra->current->name.isEmpty()
7008 yyextra->needsSemi =
FALSE;
7009 if (yyextra->current->isStatic)
7011 yyextra->current->name=
"[static initializer]";
7012 yyextra->current->type.clear();
7016 yyextra->current->name=
"[instance initializer]";
7033 yyextra->current->bodyLine = yyextra->yyLineNr;
7034 yyextra->current->bodyColumn = yyextra->yyColNr;
7035 yyextra->current->initializer.str(yytext);
7036 yyextra->lastInitializerContext = YY_START;
7037 yyextra->sharpCount=0;
7038 yyextra->initBracketCount=1;
7039 BEGIN(ReadInitializer);
7043<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7044<CSAccessorDecl>"}"{B}*"=" {
7046 if (yyextra->curlyCount != 0) REJECT;
7047 yyextra->current->initializer.str(
"=");
7048 yyextra->current->endBodyLine=yyextra->yyLineNr;
7049 yyextra->lastInitializerContext = FindMembers;
7050 BEGIN(ReadInitializer);
7052<CSAccessorDecl>"}" {
7053 if (yyextra->curlyCount)
7055 yyextra->curlyCount--;
7059 yyextra->mtype = MethodTypes::Method;
7060 yyextra->virt = Specifier::Normal;
7062 yyextra->current->endBodyLine=yyextra->yyLineNr;
7067<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7068<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7069<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7070<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7071<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7072<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7073<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7074<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7075<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7076<CSAccessorDecl>{CHARLIT} {}
7077<CSAccessorDecl>"\"" { BEGIN(CSString);}
7078<CSAccessorDecl>"." {}
7079<CSAccessorDecl>\n {
lineCount(yyscanner); }
7080<CSString>"\"" { BEGIN(CSAccessorDecl);}
7088<SliceSequence>{SCOPENAME} {
7089 if (yyextra->current->spec.isLocal())
7091 yyextra->current->type =
"local ";
7093 yyextra->current->type +=
"sequence<";
7094 yyextra->current->type += yytext;
7095 yyextra->current->type +=
">";
7098<SliceSequence>{BN}*">"{BN}* {
7100 BEGIN(SliceSequenceName);
7103<SliceSequenceName>{ID}{BN}* {
7105 yyextra->current->name = yytext ;
7106 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7109<SliceSequenceName>";" {
7110 yyextra->current->section = EntryType::makeVariable();
7111 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7116<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7118 if (yyextra->current->spec.isLocal())
7120 yyextra->current->type =
"local ";
7122 yyextra->current->type +=
"dictionary<";
7123 yyextra->current->type += yytext;
7124 yyextra->current->type +=
">";
7125 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7128<SliceDictionary>{BN}*">"{BN}* {
7130 BEGIN(SliceDictionaryName);
7133<SliceDictionaryName>{ID}{BN}* {
7135 yyextra->current->name = yytext ;
7136 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7139<SliceDictionaryName>";" {
7140 yyextra->current->section = EntryType::makeVariable();
7141 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7151<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7152 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7153 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7156<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7157 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7158 BEGIN( yyextra->docBlockContext );
7160<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7161 yyextra->docBlock << yytext;
7162 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7163 BEGIN( yyextra->docBlockContext );
7165<DocLine>{NONLopt}/"\n" {
7166 yyextra->docBlock << yytext;
7167 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7168 BEGIN( yyextra->docBlockContext );
7173<DocBlock>"*"*{CCE} {
7175 BEGIN(yyextra->docBlockContext);
7177<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7180 yyextra->docBlock <<
"\\ilinebr " << indent;
7182<DocBlock>^{B}*"*"+/[^/] {
7185 yyextra->docBlock << indent;
7187<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7190 yyextra->docBlock << indent;
7192<DocBlock>^{B}*({CPPC}){B}* {
7195 yyextra->docBlock << yytext;
7199 yyextra->docBlock << yytext;
7201<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7202 yyextra->docBlock << yytext;
7204<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7205 yyextra->docBlock << yytext;
7206 char blockName[] =
"f$";
7208 if (c==
'[') blockName[1]=
']';
7209 else if (c==
'{') blockName[1]=
'}';
7210 else if (c==
'(') blockName[1]=
')';
7212 BEGIN(DocCopyBlock);
7214<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7215 yyextra->fileName = &yytext[6];
7216 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7217 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7218 yyextra->docBlock << yytext;
7220<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7221 yyextra->fileName = &yytext[6];
7222 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7223 yyextra->docBlock << yytext;
7225<DocBlock>{CMD}"iline"{LINENR}{B} {
7230 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7234 yyextra->yyLineNr = nr;
7236 yyextra->docBlock << yytext;
7238<DocBlock>{B}*"<"{PRE}">" {
7239 yyextra->docBlock << yytext;
7241 BEGIN(DocCopyBlock);
7243<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7244 yyextra->docBlock << yytext;
7246 BEGIN(DocCopyBlock);
7248<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7249 yyextra->docBlock << yytext;
7251 BEGIN(DocCopyBlock);
7253<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7254 yyextra->docBlock << yytext;
7256 BEGIN(DocCopyBlock);
7258<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7260 yyextra->docBlock <<
"\\ilinebr ";
7261 yyextra->docBlock << pat;
7263 BEGIN(DocCopyBlock);
7265<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7267 yyextra->docBlock << pat;
7269 BEGIN(DocCopyBlock);
7271<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7272<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7273<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7275 yyextra->docBlock <<
"\\ilinebr ";
7276 yyextra->docBlock << pat;
7278 BEGIN(DocCopyBlock);
7280<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7281<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7282<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7284 yyextra->docBlock << pat;
7286 BEGIN(DocCopyBlock);
7289 yyextra->docBlock <<
"```";
7292 yyextra->docBlock << yytext;
7295 yyextra->docBlock << yytext;
7297 BEGIN(DocCopyBlock);
7299<DocBlock>{B}*"<"{CODE}">" {
7300 if (yyextra->insideCS)
7302 yyextra->docBlock << yytext;
7304 BEGIN(DocCopyBlock);
7311<DocBlock>[^@*~`'\/\\\n]+ {
7312 yyextra->docBlock << yytext;
7316 yyextra->docBlock << *yytext;
7319 yyextra->docBlock << *yytext;
7324<DocCopyBlock>"</"{PRE}">" {
7329 yyextra->docBlock << yytext;
7331<DocCopyBlock>"</"{CODE}">" {
7336 yyextra->docBlock << yytext;
7338<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7343 yyextra->docBlock << yytext;
7345<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7350 yyextra->docBlock << yytext;
7352<DocCopyBlock>^{B}*"*"+/{BN}+ {
7353 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7361 yyextra->docBlock << indent;
7364<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7365 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7369 yyextra->docBlock << indent;
7376<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7377 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7381 yyextra->docBlock << indent+
"*";
7388<DocCopyBlock>^{B}*"*"+/{BN}* {
7389 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7392 if (yyextra->nestedComment>0)
7395 yyextra->docBlock << indent+
"*";
7400 yyextra->docBlock << indent;
7408<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7414 yyextra->docBlock << pat;
7416<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7422 yyextra->docBlock << pat;
7424<DocCopyBlock>"```" {
7425 if (yyextra->docBlockName==
"``")
7427 yyextra->docBlock <<
"`";
7429 yyextra->docBlock <<
"``";
7434 yyextra->docBlock << yytext;
7437<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7442 yyextra->docBlock << yytext;
7444<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7449 yyextra->docBlock << yytext;
7451<DocCopyBlock>"`"{1,2} {
7456 yyextra->docBlock << yytext;
7458<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7459 yyextra->docBlock << yytext;
7462 yyextra->docBlock << yytext;
7463 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7467 yyextra->lastStringContext=YY_START;
7468 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7469 yyextra->stopAtInvalidString=
true;
7473<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7476 yyextra->nestedComment++;
7478 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7480 yyextra->nestedComment--;
7482 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7484 warn(yyextra->fileName,yyextra->yyLineNr,
7485 "Found end of C comment inside a '{}' block without matching start of the comment!"
7486 " Maybe the end marker for the block is missing?",
7487 yyextra->docBlockName);
7490 yyextra->docBlock << yytext;
7493 yyextra->docBlock << *yytext;
7497 yyextra->docBlock << *yytext;
7499<DocCopyBlock><<EOF>> {
7500 warn(yyextra->fileName,yyextra->yyLineNr,
7501 "reached end of file while inside a '{}' block!"
7502 " The command that should end the block seems to be missing!",
7503 yyextra->docBlockName);
7510<Prototype>"operator"{B}*"("{B}*")" {
7511 yyextra->current->name+=yytext;
7514 yyextra->current->args+=*yytext;
7515 yyextra->currentArgumentContext = PrototypeQual;
7516 yyextra->fullArgString = yyextra->current->args;
7517 yyextra->copyArgString = &yyextra->current->args;
7518 BEGIN( ReadFuncArgType ) ;
7520<Prototype>"("({ID}"::")*({B}*[&*])+ {
7521 if (yyextra->insidePHP)
7527 yyextra->current->type+=yyextra->current->name+yytext;
7528 yyextra->current->name.clear();
7529 BEGIN( PrototypePtr );
7532<PrototypePtr>{SCOPENAME} {
7533 yyextra->current->name+=yytext;
7536 yyextra->current->args+=*yytext;
7537 yyextra->currentArgumentContext = PrototypeQual;
7538 yyextra->fullArgString = yyextra->current->args;
7539 yyextra->copyArgString = &yyextra->current->args;
7540 BEGIN( ReadFuncArgType ) ;
7543 yyextra->current->type+=
')';
7547 yyextra->current->name+=yytext;
7550 BEGIN( PrototypeSkipLine);
7552<PrototypeQual>{B}*"const"{B}* {
7553 yyextra->current->args +=
" const ";
7554 yyextra->current->argList.setConstSpecifier(
TRUE);
7556<PrototypeQual>{B}*"volatile"{B}* {
7557 yyextra->current->args +=
" volatile ";
7558 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7560<PrototypeQual>{B}*"="{B}*"0"{B}* {
7561 yyextra->current->args +=
" = 0";
7562 yyextra->current->virt = Specifier::Pure;
7563 yyextra->current->argList.setPureSpecifier(
TRUE);
7565<PrototypeQual>"throw"{B}*"(" {
7566 yyextra->current->exception =
"throw(";
7567 BEGIN(PrototypeExc);
7570 yyextra->current->exception +=
')';
7571 BEGIN(PrototypeQual);
7574 yyextra->current->exception += *yytext;
7577 yyextra->current->args += *yytext;
7580 yyextra->current->name += *yytext;
7582<PrototypeSkipLine>. {
7588<SkipCxxComment>.*"\\\n" {
7589 if (yyextra->insideCS)
7598<SkipCxxComment>{ANYopt}/\n {
7599 BEGIN( yyextra->lastCContext ) ;
7601<SkipComment>[^\*\n]+
7606 if (!yyextra->insideCpp) REJECT;
7607 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7608 yyextra->lastC11AttributeContext = YY_START;
7609 BEGIN( SkipC11Attribute );
7614 if (yyextra->insideIDL && yyextra->insideCppQuote)
7618 else if (yyextra->insidePHP)
7620 yyextra->lastStringContext=YY_START;
7625 if (!yyextra->insidePHP)
7627 yyextra->lastCPPContext = YY_START;
7632 yyextra->lastCContext = YY_START ;
7633 BEGIN( SkipCxxComment ) ;
7637 if (!yyextra->insidePHP)
7639 yyextra->lastCContext = YY_START ;
7640 BEGIN( SkipCxxComment ) ;
7643 if (yyextra->insidePHP)
7645 yyextra->lastStringContext=YY_START;
7646 BEGIN(SkipPHPString);
7650 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7652 if (yyextra->current->type.isEmpty())
7654 if (yyextra->current->name.isEmpty())
7655 yyextra->current->name=
"?";
7657 yyextra->current->name+=
"?";
7661 yyextra->current->type+=
"?";
7665<*>"}" { yyextra->exported=
false; }
7667<SkipComment>{CPPC}|{CCS}
7668<*>{CCS} { yyextra->lastCContext = YY_START ;
7669 BEGIN( SkipComment ) ;
7671<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7673 yyextra->lastCContext = YY_START ;
7674 BEGIN( SkipCxxComment ) ;
7677 if (yyextra->insideCS && yyextra->fakeNS)
7681 BEGIN ( ReadNSBody);
7693 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7695 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7697 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7707 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7708 yyextra->outerScopeEntries.clear();
7709 yyextra->baseName.clear();
7710 yyextra->protection = Protection::Public;
7711 yyextra->baseProt = Protection::Public;
7712 yyextra->sharpCount = 0;
7713 yyextra->roundCount = 0;
7714 yyextra->curlyCount = 0;
7715 yyextra->mtype = MethodTypes::Method;
7716 yyextra->isStatic =
FALSE;
7717 yyextra->virt = Specifier::Normal;
7718 yyextra->baseVirt = Specifier::Normal;
7719 yyextra->isTypedef =
FALSE;
7720 yyextra->insideTryBlock =
FALSE;
7721 yyextra->insideFormula =
FALSE;
7722 yyextra->insideCode=
FALSE;
7724 yyextra->previous = 0;
7725 yyextra->firstTypedefEntry.reset();
7726 yyextra->memspecEntry.reset();
7731 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7732 if (yyextra->insideJava)
7734 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7736 yyextra->current->protection = yyextra->protection;
7737 yyextra->current->exported = yyextra->exported ;
7738 yyextra->current->mtype = yyextra->mtype;
7739 yyextra->current->virt = yyextra->virt;
7740 yyextra->current->isStatic = yyextra->isStatic;
7741 yyextra->current->lang = yyextra->language;
7743 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7744 yyextra->isTypedef=
FALSE;
7752 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7753 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7755 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7761 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7764 for (p = yytext ; *p ; ++p )
7768 yyextra->yyLineNr++;
7774 yyextra->column+=tabSize - (yyextra->column%tabSize);
7785static inline int computeIndent(
const char *s,
int startIndent)
7787 int col=startIndent;
7793 if (c==
'\t') col+=tabSize-(col%tabSize);
7794 else if (c==
'\n') col=0;
7802 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7803 yyextra->current->protection = yyextra->protection = prot;
7804 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7805 yyextra->current->type.clear();
7806 yyextra->current->name.clear();
7807 yyextra->current->args.clear();
7808 yyextra->current->argList.clear();
7814 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7815 size_t tl=yyextra->current->type.length();
7816 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7818 yyextra->current->type +=
' ' ;
7820 yyextra->current->type += yyextra->current->name;
7821 yyextra->current->name.clear() ;
7822 tl=yyextra->current->type.length();
7823 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7825 yyextra->current->type +=
' ' ;
7827 yyextra->current->type += yyextra->current->args ;
7828 yyextra->current->args.clear() ;
7829 yyextra->current->argList.clear();
7836 if (s==
nullptr || *s==0)
return name;
7838 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7850 bool funcPtr = i>0 && type[i-1]==
')';
7852 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7853 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7854 return type.
left(i);
7860 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7863 yyextra->docBlock <<
"\\iskip";
7865 yyextra->docBlockName=blockName;
7866 yyextra->fencedSize=fencedSize;
7867 yyextra->isCodeBlock=codeBlock;
7868 yyextra->nestedComment=0;
7874 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7875 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7879 yyextra->docBlock <<
"\\endiskip";
7881 yyextra->docBlockName=
"";
7902 if (i==-1)
return FALSE;
7912 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7914 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7915 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7916 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7917 yyextra->insideD = yyextra->language==SrcLangExt::D;
7918 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7919 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7920 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7921 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7922 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7923 yyextra->language==SrcLangExt::Lex);
7934 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7935 if (yyextra->current_root->section.isScope())
7938 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7940 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7942 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7952 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7953 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7954 if (yyextra->current->argList.empty())
return FALSE;
7955 for (
const Argument &a : yyextra->current->argList)
7966 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7967 if (yyextra->insideJava)
7970 yyextra->current->protection = Protection::Public;
7971 if (text.
find(
"protected")!=-1)
7972 yyextra->current->protection = Protection::Protected;
7973 else if (text.
find(
"private")!=-1)
7974 yyextra->current->protection = Protection::Private;
7975 else if (text.
find(
"package")!=-1)
7976 yyextra->current->protection = Protection::Package;
7983 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7984 int si =
static_cast<int>(yyextra->current->args.length());
7985 if (yyextra->oldStyleArgType.isEmpty())
7987 std::string args = yyextra->current->args.str();
7988 static const reg::Ex re(R
"(\([^)]*\).*)");
7994 bi1=(int)match.position();
7995 size_t secondMatchStart = match.position()+match.length();
7998 bi2=(int)match.position();
8002 if (bi1!=-1 && bi2!=-1)
8005 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8007 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8008 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8010 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8011 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8012 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8017 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8020 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8021 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8023 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8024 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8030 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8033 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8037 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8038 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8051 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8054 oldStyleArgPtr=yyextra->current->args.
left(j);
8073 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8074 for (
Argument &a : yyextra->current->argList)
8083 a.
docs=brief+
"\n\n"+docs;
8115 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8118 yyextra->current->briefFile = yyextra->fileName;
8119 yyextra->current->briefLine = yyextra->yyLineNr;
8123 yyextra->current->docFile = yyextra->fileName;
8124 yyextra->current->docLine = yyextra->yyLineNr;
8132 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8133 if (yyextra->tempEntry==0)
8138 yyextra->previous = yyextra->current;
8139 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8143 yyextra->previous = yyextra->current;
8144 yyextra->current = yyextra->tempEntry;
8145 yyextra->tempEntry.reset();
8152 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8155 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8156 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8159 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8160 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8162 docEntry->inbodyFile = yyextra->fileName;
8163 docEntry->inbodyLine = lineNr;
8167 bool needsEntry=
FALSE;
8169 Markdown markdown(yyextra->fileName,lineNr);
8171 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8172 while (yyextra->commentScanner.parseCommentBlock(
8173 yyextra->thisParser,
8174 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8178 yyextra->docBlockInBody ?
FALSE : brief,
8179 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8180 yyextra->docBlockInBody,
8181 yyextra->protection,
8192 QCString docFile = yyextra->current->docFile;
8194 yyextra->current->docFile = docFile;
8195 yyextra->current->docLine = lineNr;
8203 if (yyextra->docBlockTerm)
8205 unput(yyextra->docBlockTerm);
8206 yyextra->docBlockTerm=0;
8213 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8224 QCString orgDoc = yyextra->current->doc;
8225 QCString orgBrief = yyextra->current->brief;
8226 int orgDocLine = yyextra->current->docLine;
8227 int orgBriefLine = yyextra->current->briefLine;
8229 yyextra->current->doc.
clear();
8230 yyextra->current->brief.clear();
8233 int lineNr = orgDocLine;
8235 Markdown markdown(yyextra->fileName,lineNr);
8237 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8238 while (yyextra->commentScanner.parseCommentBlock(
8239 yyextra->thisParser,
8240 yyextra->current.get(),
8247 yyextra->protection,
8256 if (needsEntry)
newEntry(yyscanner);
8262 a.
docs = yyextra->current->doc;
8265 yyextra->current->doc = orgDoc;
8266 yyextra->current->brief = orgBrief;
8267 yyextra->current->docLine = orgDocLine;
8268 yyextra->current->briefLine = orgBriefLine;
8279 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8280 for (
const auto &ce : rt->children())
8282 if (!ce->program.empty())
8286 yyextra->padCount=0;
8289 yyextra->programStr = ce->program.str();
8290 yyextra->inputString = yyextra->programStr.data();
8291 yyextra->inputPosition = 0;
8292 if (ce->section.isEnum() || ce->spec.isEnum())
8293 BEGIN( FindFields ) ;
8295 BEGIN( FindMembers ) ;
8296 yyextra->current_root = ce;
8297 yyextra->fileName = ce->fileName;
8299 yyextra->yyLineNr = ce->bodyLine;
8300 yyextra->yyColNr = ce->bodyColumn;
8301 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8303 yyextra->current = std::make_shared<Entry>();
8304 yyextra->isStatic =
FALSE;
8309 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8311 ce->groups = rt->groups;
8314 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8316 if ( ce->section.isClass() )
8318 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8320 yyextra->current->protection = yyextra->protection = Protection::Public ;
8322 else if (yyextra->insideJava)
8324 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8326 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8328 if (ce->lang==SrcLangExt::ObjC)
8330 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8334 yyextra->current->protection = yyextra->protection = Protection::Public ;
8339 yyextra->current->protection = yyextra->protection = Protection::Private ;
8342 else if (ce->section.isEnum() )
8344 yyextra->current->protection = yyextra->protection = ce->protection;
8346 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8348 if (ce->section.isNamespace() )
8350 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8352 yyextra->current->protection = yyextra->protection = ce->protection;
8353 yyextra->current->exported = yyextra->exported =
false;
8355 else if (ce->section.isNamespace() )
8357 yyextra->current->protection = yyextra->protection = Protection::Public ;
8358 yyextra->current->exported = yyextra->exported = ce->exported;
8362 yyextra->current->protection = yyextra->protection = Protection::Public ;
8363 yyextra->current->exported = yyextra->exported =
false;
8365 yyextra->mtype = MethodTypes::Method;
8366 yyextra->virt = Specifier::Normal;
8373 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8375 scannerYYlex(yyscanner);
8376 yyextra->lexInit=
TRUE;
8379 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8381 yyextra->programStr.clear();
8382 ce->program.str(std::string());
8398 const char *fileBuf,
8399 const std::shared_ptr<Entry> &rt,
8403 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8406 yyextra->inputString = fileBuf;
8407 yyextra->inputPosition = 0;
8408 yyextra->column = 0;
8409 scannerYYrestart(
nullptr,yyscanner);
8412 yyextra->protection = Protection::Public;
8413 yyextra->mtype = MethodTypes::Method;
8414 yyextra->isStatic =
FALSE;
8415 yyextra->exported =
false;
8416 yyextra->virt = Specifier::Normal;
8417 yyextra->current_root = rt;
8418 yyextra->yyLineNr = 1 ;
8419 yyextra->yyBegLineNr = 1;
8420 yyextra->yyBegColNr = 0;
8421 yyextra->anonCount = 0;
8422 yyextra->anonNSCount = 0;
8423 yyextra->fileName = fileName;
8424 yyextra->clangParser = clangParser;
8426 rt->lang = yyextra->language;
8427 msg(
"Parsing file {}...\n",yyextra->fileName);
8429 yyextra->current_root = rt;
8431 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8432 yyextra->current = std::make_shared<Entry>();
8437 yyextra->current->name = yyextra->fileName;
8438 yyextra->current->section = sec;
8439 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8441 yyextra->current->reset();
8443 if ( yyextra->insidePHP )
8445 BEGIN( FindMembersPHP );
8447 else if ( yyextra->insideJava )
8449 yyextra->current->name=
"java::lang";
8450 yyextra->current->fileName = yyextra->fileName;
8451 yyextra->current->section = EntryType::makeUsingDir();
8452 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8454 BEGIN( FindMembers );
8458 BEGIN( FindMembers );
8461 scannerYYlex(yyscanner);
8462 yyextra->lexInit=
TRUE;
8464 if (YY_START==Comment)
8466 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8470 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8472 yyextra->programStr.clear();
8473 rt->program.str(std::string());
8477 yyextra->anonNSCount++;
8480 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8483 parent->moveToSubEntryAndKeep(child);
8485 yyextra->outerScopeEntries.clear();
8494 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8497 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8500 if (!yyextra->current)
8505 const char *orgInputString;
8506 int orgInputPosition;
8507 YY_BUFFER_STATE orgState;
8510 orgState = YY_CURRENT_BUFFER;
8511 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8512 orgInputString = yyextra->inputString;
8513 orgInputPosition = yyextra->inputPosition;
8516 yyextra->inputString = text.
data();
8517 yyextra->inputPosition = 0;
8518 yyextra->column = 0;
8519 scannerYYrestart(
nullptr, yyscanner);
8521 scannerYYlex(yyscanner);
8522 yyextra->lexInit=
TRUE;
8524 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8525 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8527 yyextra->current->section = EntryType::makeVariableDoc();
8531 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8532 yy_switch_to_buffer(orgState, yyscanner);
8533 yyextra->inputString = orgInputString;
8534 yyextra->inputPosition = orgInputPosition;
8550 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8558 scannerYYlex_destroy(
p->yyscanner);
8562 const char *fileBuf,
8563 const std::shared_ptr<Entry> &root,
8567 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8568 yyextra->thisParser =
this;
8572 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8580 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8581 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8582 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8593#include "scanner.l.h"
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
std::unique_ptr< Private > p
~COutlineParser() override
bool needsPreprocessing(const QCString &extension) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
static bool isFlagSet(const DebugMask mask)
Helper class to process markdown formatted text.
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)
#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)