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
224static inline int computeIndent(
const char *s,
int startIndent);
255#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
258static 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.
270NOTopt (("!"{BNopt})|("not"{BN}+))?
272HEXDIGIT ({DIGIT}|[a-f]|[A-F])
273ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
274SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
275TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
276CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
279CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
280PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
281PHPUSEKW ("public"|"private"|"protected")
282IDLATTR ("["[^\]]*"]"){BN}*
283TYPEDEFPREFIX ((("volatile"|"const"){BN}+)?)
284RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
285RAWEND ")"[^ \t\(\)\\]{0,16}\"
286ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
287ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
288LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
289BITOP "&"|"|"|"^"|"<<"|">>"|"~"
290OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
291FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
292MODULE_ID ({ID}".")*{ID}
293LINENR {B}*[1-9][0-9]*
294FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
295FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
296FILECHARS {FILEICHAR}*{FILEECHAR}+
297HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
298VFILEMASK {FILECHARS}("."{FILECHARS})*
299FILEMASK {VFILEMASK}|{HFILEMASK}
310DCOMMC ("/\*!"|"/\**")
312DCOMMCPP ("/\/!"|"/\/\/")
314DCOMM {DCOMMC}|{DCOMMCPP}
385%x TryFunctionBlockEnd
400%x SkipInterpVerbString
414%x UNOIDLAttributeBlock
443%x SpecializationSingleQuote
444%x SpecializationDoubleQuote
477%x SliceDictionaryName
508<*>"DEPRECATED_ATTRIBUTE" {
509 if (!yyextra->insideObjC) REJECT;
511<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
512 if (!yyextra->insideObjC) REJECT;
513 yyextra->lastDeprecatedContext=YY_START;
514 yyextra->lastStringContext=Deprecated_round;
517<Deprecated_round>")" {
518 BEGIN(yyextra->lastDeprecatedContext);
520<Deprecated_round>{BNopt} {
523<Deprecated_round>. { }
525 yyextra->curlyCount=0;
526 yyextra->needsSemi =
TRUE;
527 BEGIN(SkipCurlyBlock);
530 yyextra->roundCount=0;
531 BEGIN(SkipRoundBlock);
534 ++yyextra->roundCount;
537 if (yyextra->roundCount )
538 --yyextra->roundCount ;
543 ++yyextra->curlyCount ;
546 if( yyextra->curlyCount )
548 --yyextra->curlyCount ;
550 else if (yyextra->needsSemi)
556 BEGIN( FindMembers );
560 if (yyextra->insidePHP)
562 yyextra->lastStringContext=NextSemi;
563 BEGIN(SkipPHPString);
566<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
568 yyextra->lastStringContext=NextSemi;
573 BEGIN( FindMembers );
577 BEGIN( FindMembers );
580 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
584<FindMembers>"<?php" {
585 yyextra->insidePHP =
TRUE;
587<FindMembersPHP>"<?"("php"?) {
588 BEGIN( FindMembers );
590<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
592 BEGIN( FindMembers );
594<FindMembers>"?>"|"</script>" {
595 if (yyextra->insidePHP)
596 BEGIN( FindMembersPHP );
600<FindMembersPHP>[^\n<]+ {
607<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
612<FindMembers>"%{"[^\n]* {
613 if (!yyextra->insideIDL)
617 if (!yyextra->insideIDL)
620<FindMembers>{B}*("properties"){BN}*":"{BN}* {
622 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
625<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
627 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
630<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
632 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
635<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
637 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
640<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
642 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
645<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
647 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
649<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
652<FindMembers>{B}*"internal"{BN}*":"{BN}* {
653 if (yyextra->insideCli)
662<FindMembers>{B}*"protected"{BN}*":"{BN}* {
665<FindMembers>{B}*"private"{BN}*":"{BN}* {
668<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
669 if (!yyextra->insideCpp) REJECT;
673<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
674 if (!yyextra->insideCpp) REJECT;
678<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
679 if (!yyextra->insideCpp) REJECT;
691<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
692<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
693 BEGIN( SkipComment ) ;
695<CppProt>("slots"|"Q_SLOTS") {
696 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
698<FindMembers>{B}*"event"{BN}+ {
699 if (yyextra->insideCli)
703 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
704 yyextra->current->bodyLine = yyextra->yyLineNr;
705 yyextra->current->bodyColumn = yyextra->yyColNr;
706 yyextra->curlyCount=0;
707 BEGIN( CliPropertyType );
709 else if (yyextra->insideCS)
712 yyextra->current->mtype = MethodTypes::Event;
713 yyextra->current->bodyLine = yyextra->yyLineNr;
714 yyextra->current->bodyColumn = yyextra->yyColNr;
721<FindMembers>{B}*"property"{BN}+ {
722 if (yyextra->insideCli)
726 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
727 yyextra->current->bodyLine = yyextra->yyLineNr;
728 yyextra->current->bodyColumn = yyextra->yyColNr;
729 yyextra->curlyCount=0;
730 BEGIN( CliPropertyType );
737<CliPropertyType>{ID} {
739 yyextra->current->name = yytext;
741<CliPropertyType>"[" {
742 yyextra->current->args =
"[";
743 BEGIN( CliPropertyIndex );
745<CliPropertyType>"{" {
746 yyextra->curlyCount=0;
748 BEGIN( CSAccessorDecl );
750<CliPropertyType>";" {
752 BEGIN( FindMembers );
757<CliPropertyType>{B}* {
761 yyextra->current->type += yytext;
763<CliPropertyIndex>"]" {
764 BEGIN( CliPropertyType );
765 yyextra->current->args+=yytext;
768 yyextra->current->args+=yytext;
783<FindMembers>{B}*"@private"{BN}+ {
786<FindMembers>{B}*"@protected"{BN}+ {
789<FindMembers>{B}*"@public"{BN}+ {
792<FindMembers>[\-+]{BN}* {
793 if (!yyextra->insideObjC)
799 yyextra->current->fileName = yyextra->fileName;
800 yyextra->current->startLine = yyextra->yyLineNr;
801 yyextra->current->startColumn = yyextra->yyColNr;
802 yyextra->current->bodyLine = yyextra->yyLineNr;
803 yyextra->current->bodyColumn = yyextra->yyColNr;
804 yyextra->current->section = EntryType::makeFunction();
805 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
806 yyextra->insideObjC =
TRUE;
807 yyextra->yyBegColNr = yyextra->yyColNr;
808 yyextra->yyBegLineNr = yyextra->yyLineNr;
809 yyextra->current->virt = Specifier::Virtual;
811 yyextra->current->isStatic=yytext[0]==
'+';
817 BEGIN( ObjCReturnType );
818 yyextra->current->type.clear();
819 yyextra->roundCount=0;
822 if (yyextra->current->type.isEmpty())
824 yyextra->current->type +=
"id";
826 yyextra->current->name = yytext;
830 yyextra->current->name +=
':';
832 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
835<ObjCReturnType>[^()]* {
836 yyextra->current->type += yytext;
838<ObjCReturnType>"(^)(" {
839 yyextra->current->type += yytext;
840 yyextra->roundCount++;
843 yyextra->current->type += yytext;
844 yyextra->roundCount++;
847 if (yyextra->roundCount<=0)
853 yyextra->current->type += yytext;
854 yyextra->roundCount--;
857<ObjCParams>({ID})?{BN}*":" {
862 yyextra->current->name +=
" :";
866 yyextra->current->name += keyw+
":";
868 if (yyextra->current->argList.back().type.isEmpty())
870 yyextra->current->argList.back().type=
"id";
874 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
876<ObjCParams>{ID}{BN}* {
880<ObjCParams>","{BN}*"..." {
887 yyextra->current->argList.push_back(a);
895 yyextra->roundCount=0;
896 yyextra->current->argList.back().type.clear();
897 BEGIN( ObjCParamType );
900 yyextra->roundCount++;
901 yyextra->current->argList.back().type+=yytext;
903<ObjCParamType>")"/{B}* {
904 if (yyextra->roundCount<=0)
910 yyextra->current->argList.back().type+=yytext;
911 yyextra->roundCount--;
914<ObjCParamType>[^()]* {
917<ObjCMethod,ObjCParams>";" {
918 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
920 yyextra->current->argList.back().type=
"id";
922 if (yyextra->current->argList.empty())
924 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
931<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
936 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
938 yyextra->current->argList.back().type=
"id";
940 if (yyextra->current->argList.empty())
942 yyextra->current->argList.setNoParameters(
TRUE);
948<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
949 if (yyextra->insideSlice)
952 yyextra->current->bodyLine = yyextra->yyLineNr;
953 yyextra->current->bodyColumn = yyextra->yyColNr;
954 yyextra->current->fileName = yyextra->fileName ;
955 yyextra->current->startLine = yyextra->yyLineNr ;
956 yyextra->current->startColumn = yyextra->yyColNr;
957 yyextra->current->args.clear();
958 yyextra->current->section = EntryType::makeTypedef();
959 yyextra->isTypedef =
TRUE;
960 BEGIN( SliceSequence );
965<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
966 if (yyextra->insideSlice)
969 yyextra->current->bodyLine = yyextra->yyLineNr;
970 yyextra->current->bodyColumn = yyextra->yyColNr;
971 yyextra->current->fileName = yyextra->fileName ;
972 yyextra->current->startLine = yyextra->yyLineNr ;
973 yyextra->current->startColumn = yyextra->yyColNr;
974 yyextra->current->args.clear();
975 yyextra->current->section = EntryType::makeTypedef() ;
976 yyextra->isTypedef =
TRUE;
977 BEGIN( SliceDictionary );
982<FindMembers>{BN}{1,80} {
985<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
986 if (yyextra->insideJava)
989 yyextra->lastSkipRoundContext = YY_START;
990 yyextra->roundCount=0;
995 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
996 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
997 yyextra->current->protection = Protection::Public ;
999 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
1006<ObjCPropAttr>"getter="{ID} {
1007 yyextra->current->read = yytext+7;
1009<ObjCPropAttr>"setter="{ID} {
1010 yyextra->current->write = yytext+7;
1012<ObjCPropAttr>"readonly" {
1013 yyextra->current->spec.setWritable(
false);
1015<ObjCPropAttr>"readwrite" {
1017<ObjCPropAttr>"assign" {
1019<ObjCPropAttr>"unsafe_unretained" {
1020 yyextra->current->spec.setAssign(
false);
1021 yyextra->current->spec.setUnretained(
true);
1023<ObjCPropAttr>"retain" {
1024 yyextra->current->spec.setAssign(
false);
1025 yyextra->current->spec.setRetain(
true);
1027<ObjCPropAttr>"copy" {
1028 yyextra->current->spec.setAssign(
false);
1029 yyextra->current->spec.setCopy(
true);
1031<ObjCPropAttr>"weak" {
1032 yyextra->current->spec.setAssign(
false);
1033 yyextra->current->spec.setWeak(
true);
1035<ObjCPropAttr>"strong" {
1036 yyextra->current->spec.setAssign(
false);
1037 yyextra->current->spec.setStrong(
true);
1039<ObjCPropAttr>"nonatomic" {
1040 yyextra->current->spec.setNonAtomic(
true);
1045<FindMembers>"@"{ID}("."{ID})+ {
1046 if (yyextra->insideJava)
1055<FindMembers>"@"{ID} {
1056 if (yyextra->insideJava)
1060 else if (
qstrcmp(yytext,
"@property")==0)
1062 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1063 yyextra->current->spec.setWritable(
true).setReadable(
true);
1064 yyextra->current->protection = Protection::Public ;
1066 else if (
qstrcmp(yytext,
"@synthesize")==0)
1068 BEGIN( ObjCSkipStatement );
1070 else if (
qstrcmp(yytext,
"@dynamic")==0)
1072 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1079<ObjCSkipStatement>";" {
1082<PackageName>{ID}(("."|"\\"){ID})* {
1083 yyextra->isTypedef=
FALSE;
1085 yyextra->current->name = yytext;
1086 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1087 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1088 yyextra->current->section = EntryType::makeNamespace();
1089 yyextra->current->type =
"namespace" ;
1090 yyextra->current->fileName = yyextra->fileName;
1091 yyextra->current->startLine = yyextra->yyLineNr;
1092 yyextra->current->startColumn = yyextra->yyColNr;
1093 yyextra->current->bodyLine = yyextra->yyLineNr;
1094 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
1098 std::shared_ptr<Entry> tmp = yyextra->current;
1099 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1100 yyextra->current_root = std::move(tmp);
1105 yyextra->curlyCount=0;
1106 BEGIN( ReadNSBody );
1108<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1109 if (!yyextra->insideCpp) REJECT;
1111 yyextra->current->exported =
true;
1113 BEGIN( ModuleName );
1115<FindMembers>{B}*"module"{BN}*";" {
1116 if (!yyextra->insideCpp) REJECT;
1117 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1120 BEGIN( FindMembers );
1122<FindMembers>{B}*"module"{BN}+ {
1123 if (!yyextra->insideCpp) REJECT;
1125 yyextra->current->exported =
false;
1127 BEGIN( ModuleName );
1129<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1130 if (!yyextra->insideCpp) REJECT;
1131 yyextra->current->exported =
true;
1133 BEGIN( ModuleImport );
1135<FindMembers>{B}*"import"{BN}+ {
1136 if (!yyextra->insideCpp) REJECT;
1138 BEGIN( ModuleImport );
1140<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1142 int i = name.
find(
':');
1148 yyextra->current->exported,
1151 yyextra->current->section = EntryType::makeModuleDoc();
1152 yyextra->isTypedef=
FALSE;
1154 yyextra->current->type +=
" module";
1155 yyextra->current->fileName = yyextra->fileName;
1156 yyextra->current->startLine = yyextra->yyLineNr;
1157 yyextra->current->startColumn = yyextra->yyColNr;
1158 yyextra->current->bodyLine = yyextra->yyLineNr;
1159 yyextra->current->bodyColumn = yyextra->yyColNr;
1160 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
1163<ModuleName>{MODULE_ID} {
1167 yyextra->current->exported,
1169 yyextra->current->section = EntryType::makeModuleDoc();
1170 yyextra->isTypedef=
FALSE;
1172 yyextra->current->type +=
" module";
1173 yyextra->current->fileName = yyextra->fileName;
1174 yyextra->current->startLine = yyextra->yyLineNr;
1175 yyextra->current->startColumn = yyextra->yyColNr;
1176 yyextra->current->bodyLine = yyextra->yyLineNr;
1177 yyextra->current->bodyColumn = yyextra->yyColNr;
1178 yyextra->current->name = yytext;
1181<ModuleName>":"{BN}+"private" {
1182 yyextra->current->exported = yyextra->exported =
false;
1185<ModuleName>";" { unput(
';');
1190<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1196<ModuleImport>"<"[^>\n]*">" {
1202<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1204 int i = name.
find(
':');
1210 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1214<ModuleImport>{MODULE_ID} {
1218 yyextra->current->exported);
1221<ModuleImport>";" { BEGIN(FindMembers); }
1222<ModuleImport>\n {
lineCount(yyscanner); }
1224<FindMembers>{B}*"export"{BN}+"{" {
1225 yyextra->current->exported = yyextra->exported =
true;
1227<FindMembers>{B}*"export"{BN}+ {
1228 if (!yyextra->insideCpp) REJECT;
1229 yyextra->current->exported=
true;
1231<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1232 yyextra->current->type +=
" initonly ";
1233 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1236<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1237 yyextra->current->isStatic =
TRUE;
1240<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1241 yyextra->current->isStatic =
TRUE;
1244<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1245 yyextra->current->isStatic =
FALSE;
1246 yyextra->current->explicitExternal =
TRUE;
1249<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1251 yyextra->current->type +=
" const ";
1252 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1260<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1261 yyextra->current->type +=
" virtual ";
1262 yyextra->current->virt = Specifier::Virtual;
1265<FindMembers>{B}*"constexpr"{BN}+ {
1266 if (yyextra->insideCpp)
1268 yyextra->current->spec.setConstExpr(
true);
1272<FindMembers>{B}*"consteval"{BN}+ {
1273 if (yyextra->insideCpp)
1275 yyextra->current->spec.setConstEval(
true);
1279<FindMembers>{B}*"constinit"{BN}+ {
1280 if (yyextra->insideCpp)
1282 yyextra->current->spec.setConstInit(
true);
1286<FindMembers>{B}*"published"{BN}+ {
1287 if (yyextra->insideIDL)
1290 yyextra->current->spec.setPublished(
true);
1297<FindMembers>{B}*"sealed"{BN}+ {
1298 if (yyextra->insideCS)
1300 yyextra->current->spec.setSealed(
true);
1307<FindMembers>{B}*"abstract"{BN}+ {
1308 if (yyextra->insidePHP || yyextra->insideCS)
1310 yyextra->current->spec.setAbstract(
true);
1314 if (yyextra->insideCpp) REJECT;
1315 yyextra->current->type +=
" abstract ";
1316 if (!yyextra->insideJava)
1318 yyextra->current->virt = Specifier::Pure;
1322 yyextra->current->spec.setAbstract(
true);
1327<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1328 yyextra->current->spec.setInline(
true);
1331<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1332 yyextra->current->spec.setMutable(
true);
1335<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1336 yyextra->current->spec.setThreadLocal(
true);
1339<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1340 yyextra->current->spec.setExplicit(
true);
1343<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1344 yyextra->current->spec.setLocal(
true);
1347<FindMembers>{B}*"@required"{BN}+ {
1348 yyextra->current->spec.setOptional(
false).setRequired(
true);
1351<FindMembers>{B}*"@optional"{BN}+ {
1352 yyextra->current->spec.setRequired(
false).setOptional(
true);
1360<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1361<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1362 yyextra->isTypedef=
FALSE;
1363 yyextra->current->section = EntryType::makeNamespace();
1364 yyextra->current->type =
"namespace" ;
1365 yyextra->current->fileName = yyextra->fileName;
1366 yyextra->current->startLine = yyextra->yyLineNr;
1367 yyextra->current->startColumn = yyextra->yyColNr;
1368 yyextra->current->bodyLine = yyextra->yyLineNr;
1369 yyextra->current->bodyColumn = yyextra->yyColNr;
1371 if (yyextra->insidePHP)
1373 BEGIN( PackageName );
1377 BEGIN( CompoundName );
1380<FindMembers>{B}*"module"{BN}+ {
1382 if (yyextra->insideIDL || yyextra->insideSlice)
1384 yyextra->isTypedef=
FALSE;
1385 yyextra->current->section = EntryType::makeNamespace();
1386 yyextra->current->type =
"module" ;
1387 yyextra->current->fileName = yyextra->fileName;
1388 yyextra->current->startLine = yyextra->yyLineNr;
1389 yyextra->current->startColumn = yyextra->yyColNr;
1390 yyextra->current->bodyLine = yyextra->yyLineNr;
1391 yyextra->current->bodyColumn = yyextra->yyColNr;
1392 BEGIN( CompoundName );
1394 else if (yyextra->insideD)
1405<FindMembers>{B}*"library"{BN}+ {
1407 if (yyextra->insideIDL)
1409 yyextra->isTypedef=
FALSE;
1410 yyextra->current->section = EntryType::makeNamespace();
1411 yyextra->current->type =
"library" ;
1412 yyextra->current->fileName = yyextra->fileName;
1413 yyextra->current->startLine = yyextra->yyLineNr;
1414 yyextra->current->startColumn = yyextra->yyColNr;
1415 yyextra->current->bodyLine = yyextra->yyLineNr;
1416 yyextra->current->bodyColumn = yyextra->yyColNr;
1417 BEGIN( CompoundName );
1425<FindMembers>{B}*"constants"{BN}+ {
1427 if (yyextra->insideIDL)
1429 yyextra->isTypedef=
FALSE;
1430 yyextra->current->section = EntryType::makeNamespace();
1431 yyextra->current->type =
"constants";
1432 yyextra->current->fileName = yyextra->fileName;
1433 yyextra->current->startLine = yyextra->yyLineNr;
1434 yyextra->current->startColumn = yyextra->yyColNr;
1435 yyextra->current->bodyLine = yyextra->yyLineNr;
1436 yyextra->current->bodyColumn = yyextra->yyColNr;
1437 BEGIN( CompoundName );
1445<FindMembers>{BN}*("service"){BN}+ {
1447 if (yyextra->insideIDL)
1449 yyextra->isTypedef=
FALSE;
1450 yyextra->current->section = EntryType::makeClass();
1454 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1456 yyextra->current->type +=
" service " ;
1457 yyextra->current->fileName = yyextra->fileName;
1458 yyextra->current->startLine = yyextra->yyLineNr;
1459 yyextra->current->bodyLine = yyextra->yyLineNr;
1460 yyextra->current->bodyColumn = yyextra->yyColNr;
1461 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1469<FindMembers>{BN}*("singleton"){BN}+ {
1471 if (yyextra->insideIDL)
1473 yyextra->isTypedef=
FALSE;
1474 yyextra->current->section = EntryType::makeClass();
1476 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1477 setPublished(spec.isPublished());
1479 yyextra->current->type +=
" singleton " ;
1480 yyextra->current->fileName = yyextra->fileName;
1481 yyextra->current->startLine = yyextra->yyLineNr;
1482 yyextra->current->bodyLine = yyextra->yyLineNr;
1483 yyextra->current->bodyColumn = yyextra->yyColNr;
1484 BEGIN( CompoundName );
1492<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1494 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1496 yyextra->isTypedef=
FALSE;
1497 yyextra->current->section = EntryType::makeClass();
1499 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1501 setOptional(spec.isOptional()).
1502 setPublished(spec.isPublished()).
1503 setLocal(spec.isLocal());
1505 yyextra->current->type +=
" interface" ;
1506 yyextra->current->fileName = yyextra->fileName;
1507 yyextra->current->startLine = yyextra->yyLineNr;
1508 yyextra->current->startColumn = yyextra->yyColNr;
1509 yyextra->current->bodyLine = yyextra->yyLineNr;
1510 yyextra->current->bodyColumn = yyextra->yyColNr;
1512 BEGIN( CompoundName );
1520<FindMembers>{B}*"@implementation"{BN}+ {
1522 yyextra->isTypedef=
FALSE;
1523 yyextra->current->section = EntryType::makeObjcImpl();
1524 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1525 yyextra->insideObjC =
TRUE;
1526 yyextra->current->protection = yyextra->protection = Protection::Public ;
1528 yyextra->current->type +=
" implementation" ;
1529 yyextra->current->fileName = yyextra->fileName;
1530 yyextra->current->startLine = yyextra->yyLineNr;
1531 yyextra->current->bodyLine = yyextra->yyLineNr;
1532 yyextra->current->bodyColumn = yyextra->yyColNr;
1533 BEGIN( CompoundName );
1535<FindMembers>{B}*"@interface"{BN}+ {
1537 yyextra->isTypedef=
FALSE;
1538 yyextra->current->section = EntryType::makeClass();
1539 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1540 if (!yyextra->insideJava)
1542 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1543 yyextra->insideObjC =
TRUE;
1545 yyextra->current->protection = yyextra->protection = Protection::Public ;
1547 yyextra->current->type +=
" interface" ;
1548 yyextra->current->fileName = yyextra->fileName;
1549 yyextra->current->startLine = yyextra->yyLineNr;
1550 yyextra->current->startColumn = yyextra->yyColNr;
1551 yyextra->current->bodyLine = yyextra->yyLineNr;
1552 yyextra->current->bodyColumn = yyextra->yyColNr;
1553 BEGIN( CompoundName );
1555<FindMembers>{B}*"@protocol"{BN}+ {
1557 yyextra->isTypedef=
FALSE;
1558 yyextra->current->section = EntryType::makeClass();
1560 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1561 yyextra->insideObjC =
TRUE;
1562 yyextra->current->protection = yyextra->protection = Protection::Public ;
1564 yyextra->current->type +=
" protocol" ;
1565 yyextra->current->fileName = yyextra->fileName;
1566 yyextra->current->startLine = yyextra->yyLineNr;
1567 yyextra->current->startColumn = yyextra->yyColNr;
1568 yyextra->current->bodyLine = yyextra->yyLineNr;
1569 yyextra->current->bodyColumn = yyextra->yyColNr;
1570 BEGIN( CompoundName );
1572<FindMembers>{B}*"exception"{BN}+ {
1573 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1574 yyextra->isTypedef=
FALSE;
1575 yyextra->current->section = EntryType::makeClass();
1578 yyextra->current->spec =
TypeSpecifier().setException(
true).
1579 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1581 yyextra->current->type +=
" exception" ;
1582 yyextra->current->fileName = yyextra->fileName;
1583 yyextra->current->startLine = yyextra->yyLineNr;
1584 yyextra->current->startColumn = yyextra->yyColNr;
1585 yyextra->current->bodyLine = yyextra->yyLineNr;
1586 yyextra->current->bodyColumn = yyextra->yyColNr;
1588 BEGIN( CompoundName );
1590<FindMembers>"@class" |
1591<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1592<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1594 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1595 bool isConst=decl.
find(
"const")!=-1;
1596 bool isVolatile=decl.
find(
"volatile")!=-1;
1597 yyextra->current->section = EntryType::makeClass();
1599 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1602 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1604 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1606 yyextra->current->spec.setLocal(
true);
1610 yyextra->current->type +=
" const";
1612 else if (isVolatile)
1614 yyextra->current->type +=
" volatile";
1616 yyextra->current->type +=
" class" ;
1617 yyextra->current->fileName = yyextra->fileName;
1618 yyextra->current->startLine = yyextra->yyLineNr;
1619 yyextra->current->startColumn = yyextra->yyColNr;
1620 yyextra->current->bodyLine = yyextra->yyLineNr;
1621 yyextra->current->bodyColumn = yyextra->yyColNr;
1624 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1625 yyextra->insideObjC =
TRUE;
1628 if (yytext[yyleng-1]==
'{') unput(
'{');
1629 BEGIN( CompoundName ) ;
1631<FindMembers>{B}*"value class{" |
1632<FindMembers>{B}*"value class"{BN}+ {
1633 yyextra->isTypedef=
FALSE;
1634 yyextra->current->section = EntryType::makeClass();
1637 yyextra->current->type +=
" value class" ;
1638 yyextra->current->fileName = yyextra->fileName;
1639 yyextra->current->startLine = yyextra->yyLineNr;
1640 yyextra->current->startColumn = yyextra->yyColNr;
1641 yyextra->current->bodyLine = yyextra->yyLineNr;
1642 yyextra->current->bodyColumn = yyextra->yyColNr;
1644 if (yytext[yyleng-1]==
'{') unput(
'{');
1645 BEGIN( CompoundName ) ;
1647<FindMembers>{B}*"ref class{" |
1648<FindMembers>{B}*"ref class"{BN}+ {
1649 yyextra->isTypedef=
FALSE;
1650 yyextra->current->section = EntryType::makeClass();
1653 yyextra->current->type +=
" ref class" ;
1654 yyextra->current->fileName = yyextra->fileName;
1655 yyextra->current->startLine = yyextra->yyLineNr;
1656 yyextra->current->startColumn = yyextra->yyColNr;
1657 yyextra->current->bodyLine = yyextra->yyLineNr;
1658 yyextra->current->bodyColumn = yyextra->yyColNr;
1660 if (yytext[yyleng-1]==
'{') unput(
'{');
1661 BEGIN( CompoundName ) ;
1663<FindMembers>{B}*"interface class{" |
1664<FindMembers>{B}*"interface class"{BN}+ {
1665 yyextra->isTypedef=
FALSE;
1666 yyextra->current->section = EntryType::makeClass();
1667 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1669 yyextra->current->type +=
" interface class" ;
1670 yyextra->current->fileName = yyextra->fileName;
1671 yyextra->current->startLine = yyextra->yyLineNr;
1672 yyextra->current->startColumn = yyextra->yyColNr;
1673 yyextra->current->bodyLine = yyextra->yyLineNr;
1674 yyextra->current->bodyColumn = yyextra->yyColNr;
1676 if (yytext[yyleng-1]==
'{') unput(
'{');
1677 BEGIN( CompoundName ) ;
1679<FindMembers>{B}*"coclass"{BN}+ {
1680 if (yyextra->insideIDL)
1682 yyextra->isTypedef=
FALSE;
1683 yyextra->current->section = EntryType::makeClass();
1685 yyextra->current->type +=
" coclass" ;
1686 yyextra->current->fileName = yyextra->fileName;
1687 yyextra->current->startLine = yyextra->yyLineNr;
1688 yyextra->current->startColumn = yyextra->yyColNr;
1689 yyextra->current->bodyLine = yyextra->yyLineNr;
1690 yyextra->current->bodyColumn = yyextra->yyColNr;
1692 BEGIN( CompoundName ) ;
1697 yyextra->current->name = yytext;
1698 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1702<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1703<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1704 if (yyextra->insideJava) REJECT;
1706 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1707 bool isConst=decl.
find(
"const")!=-1;
1708 bool isVolatile=decl.
find(
"volatile")!=-1;
1709 yyextra->current->section = EntryType::makeClass() ;
1713 setPublished(spec.isPublished()).
1714 setInline(spec.isInline()).
1715 setLocal(spec.isLocal());
1721 yyextra->current->type +=
" const";
1723 else if (isVolatile)
1725 yyextra->current->type +=
" volatile";
1727 yyextra->current->type +=
" struct" ;
1728 yyextra->current->fileName = yyextra->fileName;
1729 yyextra->current->startLine = yyextra->yyLineNr;
1730 yyextra->current->startColumn = yyextra->yyColNr;
1731 yyextra->current->bodyLine = yyextra->yyLineNr;
1732 yyextra->current->bodyColumn = yyextra->yyColNr;
1734 if (yytext[yyleng-1]==
'{') unput(
'{');
1735 BEGIN( CompoundName ) ;
1737<FindMembers>{B}*"value struct{" |
1738<FindMembers>{B}*"value struct"{BN}+ {
1739 yyextra->isTypedef=
FALSE;
1740 yyextra->current->section = EntryType::makeClass();
1741 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1743 yyextra->current->type +=
" value struct" ;
1744 yyextra->current->fileName = yyextra->fileName;
1745 yyextra->current->startLine = yyextra->yyLineNr;
1746 yyextra->current->startColumn = yyextra->yyColNr;
1747 yyextra->current->bodyLine = yyextra->yyLineNr;
1748 yyextra->current->bodyColumn = yyextra->yyColNr;
1750 if (yytext[yyleng-1]==
'{') unput(
'{');
1751 BEGIN( CompoundName ) ;
1753<FindMembers>{B}*"ref struct{" |
1754<FindMembers>{B}*"ref struct"{BN}+ {
1755 yyextra->isTypedef=
FALSE;
1756 yyextra->current->section = EntryType::makeClass();
1757 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1759 yyextra->current->type +=
" ref struct" ;
1760 yyextra->current->fileName = yyextra->fileName;
1761 yyextra->current->startLine = yyextra->yyLineNr;
1762 yyextra->current->startColumn = yyextra->yyColNr;
1763 yyextra->current->bodyLine = yyextra->yyLineNr;
1764 yyextra->current->bodyColumn = yyextra->yyColNr;
1766 if (yytext[yyleng-1]==
'{') unput(
'{');
1767 BEGIN( CompoundName ) ;
1769<FindMembers>{B}*"interface struct{" |
1770<FindMembers>{B}*"interface struct"{BN}+ {
1771 yyextra->isTypedef=
FALSE;
1772 yyextra->current->section = EntryType::makeClass();
1773 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1775 yyextra->current->type +=
" interface struct";
1776 yyextra->current->fileName = yyextra->fileName;
1777 yyextra->current->startLine = yyextra->yyLineNr;
1778 yyextra->current->startColumn = yyextra->yyColNr;
1779 yyextra->current->bodyLine = yyextra->yyLineNr;
1780 yyextra->current->bodyColumn = yyextra->yyColNr;
1782 if (yytext[yyleng-1]==
'{') unput(
'{');
1783 BEGIN( CompoundName ) ;
1785<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1786<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1787 if (yyextra->insideJava) REJECT;
1789 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1790 bool isConst=decl.
find(
"const")!=-1;
1791 bool isVolatile=decl.
find(
"volatile")!=-1;
1792 yyextra->current->section = EntryType::makeClass();
1799 yyextra->current->type +=
" const";
1801 else if (isVolatile)
1803 yyextra->current->type +=
" volatile";
1805 yyextra->current->type +=
" union" ;
1806 yyextra->current->fileName = yyextra->fileName;
1807 yyextra->current->startLine = yyextra->yyLineNr;
1808 yyextra->current->startColumn = yyextra->yyColNr;
1809 yyextra->current->bodyLine = yyextra->yyLineNr;
1810 yyextra->current->bodyColumn = yyextra->yyColNr;
1812 if (yytext[yyleng-1]==
'{') unput(
'{');
1813 BEGIN( CompoundName ) ;
1815<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1816<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1818 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1819 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1820 bool isEnumSytruct = text.
find(
"struct")!=-1;
1821 if (yyextra->insideJava)
1823 yyextra->current->section = EntryType::makeClass();
1829 yyextra->current->section = EntryType::makeEnum() ;
1832 yyextra->current->type +=
" enum";
1835 yyextra->current->spec.setStrong(
true);
1839 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1841 yyextra->current->fileName = yyextra->fileName;
1842 yyextra->current->startLine = yyextra->yyLineNr;
1843 yyextra->current->startColumn = yyextra->yyColNr;
1844 yyextra->current->bodyLine = yyextra->yyLineNr;
1845 yyextra->current->bodyColumn = yyextra->yyColNr;
1847 if (yytext[yyleng-1]==
'{') unput(
'{');
1848 BEGIN( CompoundName ) ;
1850<FindMembers>{B}*"concept"{BN}+ {
1851 if (yyextra->insideJava) REJECT;
1852 yyextra->isTypedef=
FALSE;
1853 yyextra->current->section = EntryType::makeConcept();
1855 yyextra->current->type +=
" concept";
1856 yyextra->current->fileName = yyextra->fileName;
1857 yyextra->current->startLine = yyextra->yyLineNr;
1858 yyextra->current->startColumn = yyextra->yyColNr;
1859 yyextra->current->bodyLine = yyextra->yyLineNr;
1860 yyextra->current->bodyColumn = yyextra->yyColNr;
1861 yyextra->current->args = yyextra->fullArgString;
1862 yyextra->keepComment =
true;
1864 BEGIN( ConceptName ) ;
1866<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1868 yyextra->current->name +=
"()";
1869 BEGIN( FindMembers );
1871<Operator>"("{BN}*")"{BNopt}/"(" {
1873 yyextra->current->name += yytext ;
1874 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1875 BEGIN( FindMembers ) ;
1879 BEGIN( FindMembers ) ;
1883 yyextra->current->name += *yytext ;
1885<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1886 if (!yyextra->current->type.startsWith(
"friend "))
1888 yyextra->current->name += yytext;
1892 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1894 BEGIN( FindMembers ) ;
1896<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1899 yyextra->current->tArgLists.
push_back(al);
1900 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1901 yyextra->templateStr=
"<";
1902 yyextra->fullArgString = yyextra->templateStr;
1903 yyextra->copyArgString = &yyextra->templateStr;
1904 yyextra->currentArgumentContext = FindMembers;
1905 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1907<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1908 if (yyextra->insideJava) REJECT;
1910 BEGIN( NSAliasName );
1913 yyextra->aliasName = yytext;
1914 BEGIN( NSAliasArg );
1916<NSAliasArg>({ID}"::")*{ID} {
1918 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1929 BEGIN( FindMembers );
1931<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1933 yyextra->aliasName=yytext;
1936<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1940 yyextra->current->fileName = yyextra->fileName;
1942 yyextra->current->section = EntryType::makeUsingDecl();
1943 yyextra->current_root->copyToSubEntry(yyextra->current);
1945 yyextra->current->section = EntryType::makeUsingDir();
1946 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1948 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1950<PHPUseAs>{BN}+"as"{BN}+ {
1953<PHPUseAs>{PHPUSEKW} {
1957 if (!yyextra->aliasName.isEmpty())
1962 yyextra->aliasName.clear();
const std::string & str() const
1964<PHPUse,PHPUseAs>[,;] {
1974<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1978 yyextra->current->fileName = yyextra->fileName;
1985 yyextra->current->section = EntryType::makeUsingDir();
1986 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)
1990<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1994 yyextra->current->fileName = yyextra->fileName;
2006 if (yyextra->insideD)
2008 yyextra->current->section = EntryType::makeUsingDir();
2013 yyextra->current->section = EntryType::makeUsingDecl();
2015 yyextra->previous = yyextra->current;
2016 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2020<IDLImport>"\""[^"]*"\"" {
2021 QCString fileName(&yytext[1],yyleng-2);
2037<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2038 if (yyextra->insideJava) REJECT;
2039 yyextra->current->startLine=yyextra->yyLineNr;
2040 yyextra->current->startColumn = yyextra->yyColNr;
2044<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2045<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2047 yyextra->current->name=yytext;
2048 yyextra->current->fileName = yyextra->fileName;
2049 yyextra->current->section = EntryType::makeUsingDecl();
2050 yyextra->current->startLine = yyextra->yyLineNr;
2051 yyextra->previous = yyextra->current;
2052 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2054 if (yyextra->insideCS)
2059 yyextra->current->name=yytext;
2060 yyextra->current->fileName = yyextra->fileName;
2061 yyextra->current->startLine = yyextra->yyLineNr;
2062 yyextra->current->startColumn = yyextra->yyColNr;
2063 yyextra->current->section = EntryType::makeUsingDir();
2064 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2069<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2071 yyextra->current->fileName = yyextra->fileName;
2072 yyextra->current->section = EntryType::makeUsingDecl();
2073 yyextra->current->startLine = yyextra->yyLineNr;
2074 yyextra->current->bodyLine = yyextra->yyLineNr;
2075 yyextra->current->bodyColumn = yyextra->yyColNr;
2076 yyextra->lastInitializerContext = UsingAlias;
2077 yyextra->sharpCount=0;
2078 yyextra->initBracketCount=0;
2080 BEGIN(ReadInitializer);
2083 yyextra->current->section = EntryType::makeVariable();
2085 init.stripPrefix(
"class ");
2086 init.stripPrefix(
"struct ");
2088 yyextra->current->type =
"typedef "+
init;
2089 yyextra->current->args.clear();
2090 yyextra->current->spec.setAlias(
true);
2091 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2096 yyextra->current->initializer << yytext;
2099 yyextra->current->initializer << yytext;
2103 yyextra->current->fileName = yyextra->fileName;
2104 yyextra->current->section = EntryType::makeUsingDir();
2105 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2109<Using>";" { BEGIN(FindMembers); }
2110<FindMembers>{SCOPENAME}{BN}*"<>" {
2115<FindMembers>{SCOPENAME}{BNopt}/"<" {
2117 if (yyextra->insideCpp && name==
"import") REJECT;
2118 yyextra->roundCount=0;
2119 yyextra->sharpCount=0;
2122 yyextra->current->name=name;
2128 BEGIN( EndTemplate );
2130<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2131 yyextra->sharpCount=0;
2132 yyextra->roundCount=0;
2140 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...
2143 if (!yyextra->insidePHP)
2149 yyextra->lastHereDocContext = YY_START;
2153<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2154 yyextra->current->name+=yytext;
2158 if (yyextra->roundCount==0)
2161 yyextra->sharpCount++;
2163 yyextra->current->name+=yytext;
2165<ClassTemplSpec,EndTemplate>">=" {
2166 yyextra->current->name+=yytext;
2168<ClassTemplSpec,EndTemplate>(">>") {
2169 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2177 yyextra->current->name+=yytext;
2182 yyextra->current->name+=
'>';
2184 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2186 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2191<EndTemplate>">"{BN}*"(" {
2193 yyextra->current->name+=
'>';
2195 if (yyextra->roundCount==0)
2197 --yyextra->sharpCount;
2199 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2201 yyextra->current->bodyLine = yyextra->yyLineNr;
2202 yyextra->current->bodyColumn = yyextra->yyColNr;
2203 yyextra->current->args =
"(";
2204 yyextra->currentArgumentContext = FuncQual;
2205 yyextra->fullArgString = yyextra->current->args;
2206 yyextra->copyArgString = &yyextra->current->args;
2208 BEGIN( ReadFuncArgType ) ;
2212 yyextra->current->name+=
"(";
2213 yyextra->roundCount++;
2216<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2218 yyextra->current->name+=
'>';
2219 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2224<EndTemplate>">"{BNopt}/"::" {
2226 yyextra->current->name+=
'>';
2228 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2230 BEGIN(FindMemberName);
2233<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2234 yyextra->roundCount++;
2236<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2237 if (yyextra->roundCount>0) yyextra->roundCount--;
2240 yyextra->current->name+=*yytext;
2243<FindMembers>"define"{BN}*"("{BN}*["'] {
2244 if (yyextra->insidePHP)
2246 yyextra->current->bodyLine = yyextra->yyLineNr;
2247 yyextra->current->bodyColumn = yyextra->yyColNr;
2254 yyextra->delimiter = yytext;
2255 *yyextra->pCopyHereDocGString << yytext;
2256 BEGIN(CopyHereDocEnd);
2258<CopyHereDoc>"\""{ID}/"\"" {
2259 yyextra->delimiter = &yytext[1];
2260 *yyextra->pCopyHereDocGString << yytext;
2261 BEGIN(CopyHereDocEnd);
2263<CopyHereDoc>"'"{ID}/"'" {
2264 yyextra->delimiter = &yytext[1];
2265 *yyextra->pCopyHereDocGString << yytext;
2266 BEGIN(CopyHereDocEnd);
2269 yyextra->delimiter = yytext;
2272<HereDoc>"\""{ID}/"\"" {
2273 yyextra->delimiter = &yytext[1];
2276<HereDoc>"'"{ID}/"'" {
2277 yyextra->delimiter = &yytext[1];
2280<HereDocEnd>^{Bopt}{ID} {
2283 BEGIN(yyextra->lastHereDocContext);
2287<CopyHereDocEnd>^{Bopt}{ID} {
2288 *yyextra->pCopyHereDocGString << yytext;
2291 BEGIN(yyextra->lastHereDocContext);
2296 *yyextra->pCopyHereDocGString << yytext;
2298<CopyHereDocEnd>{ID} {
2299 *yyextra->pCopyHereDocGString << yytext;
2302 *yyextra->pCopyHereDocGString << yytext;
2304<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2306<FindMembers>"Q_PROPERTY" {
2307 yyextra->yyBegLineNr = yyextra->yyLineNr;
2308 yyextra->yyBegColNr = yyextra->yyColNr;
2309 yyextra->current->protection = Protection::Public ;
2310 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2311 yyextra->current->type.clear();
2321 yyextra->current->name+=yytext;
2324 yyextra->current->type+= yyextra->current->name;
2325 yyextra->current->type+= yytext;
2326 yyextra->current->name=
"";
2328<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2329 yyextra->current->type+= yyextra->current->name;
2330 yyextra->current->name=yytext;
2332<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2333 yyextra->current->spec.setReadable(
true);
2336<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2337 yyextra->current->spec.setWritable(
true);
2340<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2341<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2342<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2343<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2344<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2345<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2346<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2347<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2348<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2349<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2353 yyextra->current->read = yytext;
2357 yyextra->current->write = yytext;
2360<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2361 yyextra->current->name=yytext;
2365<FindMembers>"requires" {
2366 if (yyextra->insideJava) REJECT;
2367 yyextra->current->req.clear();
2368 yyextra->requiresContext = YY_START;
2369 BEGIN(RequiresClause);
2371<RequiresClause>"requires"{BN}*/"{" {
2372 if (yyextra->insideJava) REJECT;
2374 yyextra->current->req+=yytext;
2375 BEGIN( RequiresExpression ) ;
2377<RequiresClause>"requires"{BN}*"(" {
2378 if (yyextra->insideJava) REJECT;
2380 yyextra->current->req+=yytext;
2381 yyextra->lastRoundContext=RequiresExpression;
2382 yyextra->pCopyRoundString=&yyextra->current->req;
2383 yyextra->roundCount=0;
2384 BEGIN( CopyRound ) ;
2386<RequiresExpression>"{" {
2387 yyextra->current->req+=yytext;
2388 yyextra->lastCurlyContext=RequiresClause;
2389 yyextra->pCopyCurlyString=&yyextra->current->req;
2390 yyextra->curlyCount=0;
2391 BEGIN( CopyCurly ) ;
2393<RequiresExpression>\n {
2394 yyextra->current->req+=
' ';
2397<RequiresExpression>. {
2398 yyextra->current->req+=yytext;
2400<RequiresClause>"(" {
2401 yyextra->current->req+=yytext;
2402 yyextra->lastRoundContext=RequiresClause;
2403 yyextra->pCopyRoundString=&yyextra->current->req;
2404 yyextra->roundCount=0;
2405 BEGIN( CopyRound ) ;
2407<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2411 yyextra->current->req+=yytext;
2412 yyextra->lastRoundContext=RequiresClause;
2413 yyextra->pCopyRoundString=&yyextra->current->req;
2414 yyextra->roundCount=0;
2422<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2426 yyextra->current->req+=yytext;
2427 yyextra->lastSharpContext=RequiresClause;
2428 yyextra->pCopySharpString=&yyextra->current->req;
2429 yyextra->sharpCount=0;
2437<RequiresClause>{NOTopt}{SCOPENAME} {
2441 yyextra->current->req=yytext;
2442 BEGIN(yyextra->requiresContext);
2449<RequiresClause>{NOTopt}"::"{ID} {
2451 yyextra->current->req+=yytext;
2453<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2455 yyextra->current->req+=yytext;
2457<RequiresClause>{BN}+ {
2458 yyextra->current->req+=
' ';
2463 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2464 BEGIN(yyextra->requiresContext);
2466<FindMembers,FindMemberName>{SCOPENAME} {
2468 yyextra->yyBegColNr=yyextra->yyColNr;
2469 yyextra->yyBegLineNr=yyextra->yyLineNr;
2471 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2475 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2477 if (yyextra->insideIDL)
2482 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2486 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2491 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2493 BEGIN(IDLUnionCase);
2495 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2497 yyextra->insideTryBlock=
FALSE;
2498 BEGIN(TryFunctionBlock);
2500 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2502 yyextra->lastAlignAsContext = YY_START;
2505 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2507 yyextra->current->type=
"var";
2509 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2511 yyextra->current->type=
"function";
2513 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2517 yyextra->current->name=
"this";
2520 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2523 BEGIN(StaticAssert);
2525 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2529 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2530 yyextra->current->type+=yytext;
2533 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2535 if (yyextra->current->type.isEmpty())
2537 yyextra->current->type =
"optional";
2541 yyextra->current->type +=
" optional";
2543 yyextra->lastModifierContext = YY_START;
2544 BEGIN(SliceOptional);
2548 if (YY_START==FindMembers)
2552 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2553 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2555 yyextra->current->protection = Protection::Public;
2557 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2559 yyextra->current->protection = Protection::Protected;
2561 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2563 yyextra->current->protection = Protection::Package;
2565 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2567 yyextra->current->protection = Protection::Private;
2569 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2571 if (YY_START==FindMembers)
2572 yyextra->current->name = yytext;
2574 yyextra->current->name += yytext;
2575 yyextra->current->isStatic =
TRUE;
2579 if (YY_START==FindMembers)
2580 yyextra->current->name = yytext;
2582 yyextra->current->name += yytext;
2583 if (yyextra->current->name.startsWith(
"static "))
2585 yyextra->current->isStatic =
TRUE;
2586 yyextra->current->name= yyextra->current->name.mid(7);
2588 else if (yyextra->current->name.startsWith(
"inline "))
2590 if (yyextra->current->type.isEmpty())
2592 yyextra->current->type=
"inline";
2596 yyextra->current->type+=
"inline ";
2598 yyextra->current->name= yyextra->current->name.mid(7);
2600 else if (yyextra->current->name.startsWith(
"constexpr "))
2602 if (yyextra->current->type.isEmpty())
2604 yyextra->current->type=
"constexpr";
2608 yyextra->current->type+=
"constexpr ";
2610 yyextra->current->name=yyextra->current->name.mid(10);
2612 else if (yyextra->current->name.startsWith(
"consteval "))
2614 if (yyextra->current->type.isEmpty())
2616 yyextra->current->type=
"consteval";
2620 yyextra->current->type+=
"consteval ";
2622 yyextra->current->name=yyextra->current->name.mid(10);
2624 else if (yyextra->current->name.startsWith(
"constinit "))
2626 if (yyextra->current->type.isEmpty())
2628 yyextra->current->type=
"constinit";
2632 yyextra->current->type+=
"constinit ";
2634 yyextra->current->name=yyextra->current->name.mid(10);
2636 else if (yyextra->current->name.startsWith(
"const "))
2638 if (yyextra->current->type.isEmpty())
2640 yyextra->current->type=
"const";
2644 yyextra->current->type+=
"const ";
2646 yyextra->current->name=yyextra->current->name.mid(6);
2648 else if (yyextra->current->name.startsWith(
"volatile "))
2650 if (yyextra->current->type.isEmpty())
2652 yyextra->current->type=
"volatile";
2656 yyextra->current->type+=
"volatile ";
2658 yyextra->current->name=yyextra->current->name.mid(9);
2660 else if (yyextra->current->name.startsWith(
"typedef"))
2662 if (yyextra->current->type.isEmpty())
2664 yyextra->current->type=
"typedef";
2668 yyextra->current->type+=
"typedef ";
2670 yyextra->current->name=yyextra->current->name.mid(8);
2680 yyextra->externLinkage=
FALSE;
2684 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2687 yyextra->lastSkipRoundContext = FindMembers;
2688 yyextra->roundCount=0;
2691<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2697 yyextra->current->type+=yytext;
2698 yyextra->lastRoundContext=FindMembers;
2699 yyextra->pCopyRoundString=&yyextra->current->type;
2700 yyextra->roundCount=0;
2703<DeclType>{BN}+ {
lineCount(yyscanner); }
2708<CSIndexer>"["[^\n\]]*"]" {
2712<FindMembers>[0-9]{ID} {
2715 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2717 yyextra->current->name+=
".";
2721 yyextra->current->name+=yytext;
2723<CppQuote>"("{B}*"\"" {
2724 yyextra->insideCppQuote=
TRUE;
2728<IDLUnionCase>":" { BEGIN(FindMembers); }
2729<IDLUnionCase>\n {
lineCount(yyscanner); }
2731<TryFunctionBlock>\n {
lineCount(yyscanner); }
2732<TryFunctionBlock>"{" {
2733 yyextra->curlyCount=0;
2734 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2738<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2740<TryFunctionBlockEnd>\n { unput(*yytext);
2741 BEGIN( FindMembers );
2743<TryFunctionBlockEnd>. { unput(*yytext);
2744 BEGIN( FindMembers );
2747 yyextra->insideCppQuote=
FALSE;
2750<FindConceptParts>[^\/\n]* {
2751 yyextra->current->initializer << yytext;
2753<FindConceptParts>. {
2754 yyextra->current->initializer << yytext;
2756<FindConceptParts>\n {
2757 yyextra->current->initializer << yytext;
2758 yyextra->yyLineNr++;
2760<FindConceptParts>{CCS} {
2761 yyextra->current->initializer << yytext;
2763<FindConceptParts>{CPPC} {
2764 yyextra->current->initializer << yytext;
2766<FindConceptParts>^[ \t]*{CCS}[!*] {
2768 int indent = text.
find(
'/');
2770 if (!yyextra->current->initializer.empty())
2772 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2775 yyextra->current->section = EntryType::makeConceptDocPart();
2776 yyextra->current->startLine = yyextra->yyLineNr;
2777 yyextra->current->startColumn = indent;
2778 yyextra->current->initializer.clear();
2779 BEGIN(FindConceptDocs);
2781<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2782 if (!yyextra->current->initializer.empty())
2784 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2788 int indent = line.find(
'/');
2789 yyextra->current->section = EntryType::makeConceptDocPart();
2790 yyextra->current->startLine = yyextra->yyLineNr;
2791 yyextra->current->startColumn = indent;
2792 yyextra->current->initializer.clear();
2793 yyextra->current->initializer << line.mid(indent+3);
2794 yyextra->yyLineNr++;
2795 BEGIN(FindConceptCxxDocs);
2797<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2799 int p = line.find(
'/');
2800 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2801 yyextra->current->initializer << line.mid(p+2);
2802 yyextra->yyLineNr++;
2804<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2805 yyextra->current->initializer << yytext;
2807<FindConceptCxxDocs>. {
2808 if (!yyextra->current->initializer.empty())
2812 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2816 yyextra->current->section = EntryType::makeConceptCodePart();
2817 yyextra->current->startLine = yyextra->yyLineNr;
2818 BEGIN(FindConceptParts);
2820<FindConceptDocs>^[ \t]*"*"+/[^/] {
2822<FindConceptDocs>[^\*\n]+ {
2823 yyextra->current->initializer << yytext;
2825<FindConceptDocs>\n {
2826 yyextra->current->initializer << yytext;
2827 yyextra->yyLineNr++;
2829<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2830 if (!yyextra->current->initializer.empty())
2834 yyextra->current->section = EntryType::makeConceptDocPart();
2835 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2839 yyextra->current->section = EntryType::makeConceptCodePart();
2840 yyextra->current->startLine = yyextra->yyLineNr;
2841 BEGIN(FindConceptParts);
2843<FindConceptDocs>"*"*{CCE} {
2844 if (!yyextra->current->initializer.empty())
2848 yyextra->current->section = EntryType::makeConceptDocPart();
2849 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2852 yyextra->current->section = EntryType::makeConceptCodePart();
2853 yyextra->current->startLine = yyextra->yyLineNr;
2854 BEGIN(FindConceptParts);
2856<FindConceptParts><<EOF>> {
2857 if (!yyextra->current->initializer.empty())
2859 if (!yyextra->current->section.isConceptCodePart())
2861 yyextra->current->section = EntryType::makeConceptDocPart();
2863 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2868<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2870 yyextra->lastCPPContext = YY_START;
2873<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2874<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2875 if (yyextra->insidePHP)
2877 yyextra->current->bodyLine = yyextra->yyLineNr;
2878 yyextra->current->bodyColumn = yyextra->yyColNr;
2879 yyextra->current->fileName = yyextra->fileName;
2880 yyextra->current->startLine = yyextra->yyLineNr;
2881 yyextra->current->startColumn = yyextra->yyColNr;
2882 yyextra->current->type.clear();
2883 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2884 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2885 yyextra->current->section = EntryType::makeDefine();
2886 yyextra->lastDefineContext = YY_START;
2889<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2890 yyextra->yyLineNr = atoi(&yytext[1]);
2892 yyextra->lastPreLineCtrlContext = YY_START;
2893 if (YY_START==ReadBody ||
2894 YY_START==ReadNSBody ||
2895 YY_START==ReadBodyIntf)
2897 yyextra->current->program << yytext;
2899 BEGIN( PreLineCtrl );
2901<PreLineCtrl>"\""[^\n\"]*"\"" {
2903 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2904 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2905 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2907 yyextra->current->program << yytext;
2911 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2912 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2913 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2915 yyextra->current->program << yytext;
2919 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2920 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2921 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2923 yyextra->current->program << yytext;
2926 BEGIN( yyextra->lastPreLineCtrlContext );
2929<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2930<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2931 BEGIN( yyextra->lastCPPContext) ;
2933<SDefine>{ID}{B}*"(" {
2934 yyextra->current->name = yytext;
2935 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2936 yyextra->current->args =
"(";
2937 yyextra->current->bodyLine = yyextra->yyLineNr;
2938 yyextra->current->bodyColumn = yyextra->yyColNr;
2939 yyextra->currentArgumentContext = DefineEnd;
2940 yyextra->fullArgString=yyextra->current->args;
2941 yyextra->copyArgString=&yyextra->current->args;
2942 BEGIN( ReadFuncArgType ) ;
2957 yyextra->current->bodyLine = yyextra->yyLineNr;
2958 yyextra->current->bodyColumn = yyextra->yyColNr;
2959 yyextra->current->name = yytext;
2966 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2968 BEGIN(yyextra->lastDefineContext);
2972 yyextra->current->fileName = yyextra->fileName;
2973 yyextra->current->startLine = yyextra->yyLineNr;
2974 yyextra->current->startColumn = yyextra->yyColNr;
2975 yyextra->current->type.clear();
2976 yyextra->current->type =
"const";
2980 yyextra->current->initializer.str(
init.str());
2981 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2982 yyextra->current->section = EntryType::makeVariable();
2983 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2988<DefineEnd>\\[\r]?\n {
2990 yyextra->current->endBodyLine = yyextra->yyLineNr;
2993 if (yyextra->insideIDL && yyextra->insideCppQuote)
2999 yyextra->lastStringContext=DefineEnd;
3004<DefinePHP>{ID}["']{BN}*","{BN}* {
3005 yyextra->current->name = yytext;
3006 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3007 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3008 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3009 yyextra->current->bodyLine = yyextra->yyLineNr;
3010 yyextra->current->bodyColumn = yyextra->yyColNr;
3011 yyextra->lastRoundContext = DefinePHPEnd;
3012 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3013 yyextra->roundCount = 0;
3014 BEGIN( GCopyRound );
3018 if (yyextra->insideCli)
3021 yyextra->current->name = yytext ;
3029 yyextra->current->name += yytext ;
3032<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3033 if (yyextra->current->bodyLine==-1)
3035 yyextra->current->bodyLine=yyextra->yyLineNr;
3036 yyextra->current->bodyColumn = yyextra->yyColNr;
3038 yyextra->docBlockContext = YY_START;
3039 yyextra->docBlockInBody =
FALSE;
3040 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3045 yyextra->docBlock.
str(indent.
str());
3049 yyextra->docBlockTerm =
';';
3050 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3052 yyextra->current->bitfields =
":"+yyextra->current->args;
3053 yyextra->current->args.clear();
3054 yyextra->current->section = EntryType::makeVariable();
3056 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
3067<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3068 yyextra->docBlockContext = YY_START;
3069 yyextra->docBlockInBody =
FALSE;
3070 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3075 yyextra->docBlock.
str(indent.
str());
3078 yyextra->docBlockTerm =
',';
3079 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3081 yyextra->current->bitfields =
":"+yyextra->current->args;
3082 yyextra->current->args.clear();
3083 yyextra->current->section = EntryType::makeVariable();
3085 if (yytext[yyleng-3]==
'/')
3096<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3097 if (yyextra->current->bodyLine==-1)
3099 yyextra->current->bodyLine=yyextra->yyLineNr;
3100 yyextra->current->bodyColumn = yyextra->yyColNr;
3102 yyextra->docBlockContext = YY_START;
3103 yyextra->docBlockInBody =
FALSE;
3104 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3108 yyextra->docBlock.
str(indent.
str());
3111 yyextra->docBlockTerm = 0;
3112 if (yytext[yyleng-3]==
'/')
3124<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3126 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3129 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3134 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3140 if (yytext[2]==
'!' || yytext[2]==
'/')
3142 yyextra->docBlockContext = YY_START;
3143 yyextra->docBlockInBody =
FALSE;
3144 yyextra->docBlockAutoBrief =
FALSE;
3145 yyextra->docBlock.str(std::string());
3146 yyextra->docBlockTerm = 0;
3152 yyextra->lastCContext=YY_START;
3153 BEGIN(SkipCxxComment);
3158 if (yytext[2]==
'!' || yytext[2]==
'*')
3160 yyextra->docBlockContext = YY_START;
3161 yyextra->docBlockInBody =
FALSE;
3162 yyextra->docBlock.str(std::string());
3163 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3165 yyextra->docBlockTerm = 0;
3171 yyextra->lastCContext=YY_START;
3176<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3177 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3178 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3182 if (!yyextra->insideCS) REJECT;
3183 yyextra->current->bodyLine = yyextra->yyLineNr;
3184 yyextra->current->bodyColumn = yyextra->yyColNr;
3185 yyextra->current->initializer.str(yytext);
3186 yyextra->lastInitializerContext = YY_START;
3187 yyextra->sharpCount=0;
3188 yyextra->initBracketCount=0;
3189 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3190 yyextra->current->spec.setGettable(
true);
3191 BEGIN(ReadInitializerPtr);
3194 yyextra->current->bodyLine = yyextra->yyLineNr;
3195 yyextra->current->bodyColumn = yyextra->yyColNr;
3196 yyextra->current->initializer.str(
" ");
3197 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3198 yyextra->current->initializer <<
" ";
3199 yyextra->current->initializer <<
"=";
3200 yyextra->lastInitializerContext = YY_START;
3201 yyextra->sharpCount=0;
3202 yyextra->initBracketCount=0;
3203 BEGIN(ReadInitializer);
3205<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3207 yyextra->current->exception +=
" ";
3210<UNOIDLAttributeBlock>"}" {
3211 yyextra->current->exception +=
" }";
3215<ReadInitializer,ReadInitializerPtr>"(" {
3216 yyextra->lastRoundContext=YY_START;
3217 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3218 yyextra->roundCount=0;
3219 yyextra->current->initializer << *yytext;
3222<ReadInitializer,ReadInitializerPtr>"[" {
3223 if (!yyextra->insidePHP) REJECT;
3224 yyextra->lastSquareContext=YY_START;
3225 yyextra->pCopySquareGString=&yyextra->current->initializer;
3226 yyextra->squareCount=0;
3227 yyextra->current->initializer << *yytext;
3230<ReadInitializer,ReadInitializerPtr>"{" {
3231 yyextra->lastCurlyContext=YY_START;
3232 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3233 yyextra->curlyCount=0;
3234 yyextra->current->initializer << *yytext;
3237<ReadInitializer,ReadInitializerPtr>[;,] {
3239 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3241 yyextra->current->fileName = yyextra->fileName;
3242 yyextra->current->startLine = yyextra->yyLineNr;
3243 yyextra->current->startColumn = yyextra->yyColNr;
3244 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3245 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3246 yyextra->current->section = EntryType::makeVariable();
3247 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3251 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3254 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3255 BEGIN(yyextra->lastInitializerContext);
3257 else if (*yytext==
',' && yyextra->initBracketCount==0)
3260 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3261 BEGIN(yyextra->lastInitializerContext);
3265 yyextra->current->initializer << *yytext;
3268<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3269 if (!yyextra->insideCpp)
3275 yyextra->current->initializer << yytext;
3277 yyextra->lastRawStringContext = YY_START;
3278 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3283<ReadInitializer>{CPPC}|{CCS} {
3284 if (yyextra->keepComment)
3286 yyextra->current->initializer << yytext;
3293<RawGString>{RAWEND} {
3296 *yyextra->pCopyRawGString << yytext;
3297 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3304<RawGString>[^)\n]+ {
3305 *yyextra->pCopyRawGString << yytext;
3308 *yyextra->pCopyRawGString << yytext;
3311 *yyextra->pCopyRawGString << yytext;
3314<RawString>{RAWEND} {
3315 *yyextra->pCopyRawString+=yytext;
3316 yyextra->fullArgString+=yytext;
3319 BEGIN(yyextra->lastRawStringContext);
3323 *yyextra->pCopyRawString += yytext;
3324 yyextra->fullArgString+=yytext;
3327 *yyextra->pCopyRawString += yytext;
3328 yyextra->fullArgString+=yytext;
3331 *yyextra->pCopyRawString += yytext;
3332 yyextra->fullArgString+=yytext;
3335<ReadInitializer,ReadInitializerPtr>\" {
3336 if (yyextra->insideIDL && yyextra->insideCppQuote)
3342 yyextra->lastStringContext=YY_START;
3343 yyextra->current->initializer << yytext;
3344 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3345 yyextra->stopAtInvalidString=
false;
3349<ReadInitializer,ReadInitializerPtr>"->" {
3350 yyextra->current->initializer << yytext;
3352<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3353 yyextra->current->initializer << yytext;
3355<ReadInitializer,ReadInitializerPtr>(">>") {
3356 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3359 yyextra->initBracketCount-=2;
3360 yyextra->sharpCount-=2;
3362 yyextra->current->initializer << yytext;
3364<ReadInitializer,ReadInitializerPtr>(">=") {
3365 yyextra->current->initializer << yytext;
3367<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3368 yyextra->initBracketCount++;
3369 yyextra->sharpCount++;
3370 yyextra->current->initializer << *yytext;
3372<ReadInitializer,ReadInitializerPtr>[>\]})] {
3373 yyextra->initBracketCount--;
3374 yyextra->sharpCount--;
3377 yyextra->current->endBodyLine=yyextra->yyLineNr;
3379 yyextra->current->initializer << *yytext;
3381<ReadInitializer,ReadInitializerPtr>\' {
3382 if (yyextra->insidePHP)
3384 yyextra->current->initializer << yytext;
3385 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3386 yyextra->lastStringContext=YY_START;
3387 BEGIN(CopyPHPGString);
3391 yyextra->current->initializer << yytext;
3394<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3395 if (yyextra->insidePHP)
3401 yyextra->current->initializer << yytext;
3404<ReadInitializer,ReadInitializerPtr>\n {
3405 yyextra->current->initializer << *yytext;
3408<ReadInitializer,ReadInitializerPtr>"@\"" {
3410 yyextra->current->initializer << yytext;
3411 if (!yyextra->insideCS && !yyextra->insideObjC)
3418 yyextra->lastSkipVerbStringContext=YY_START;
3419 yyextra->pSkipVerbString=&yyextra->current->initializer;
3420 BEGIN(SkipVerbString);
3423<SkipVerbString>[^\n"\\]+ {
3424 *yyextra->pSkipVerbString << yytext;
3426<SkipVerbString>"\\\\" {
3427 if (yyextra->insideCS) REJECT
3428 *yyextra->pSkipVerbString << yytext;
3430<SkipVerbString>"\\\"" {
3431 if (yyextra->insideCS) REJECT
3432 *yyextra->pSkipVerbString << yytext;
3434<SkipVerbString>"\"\"" {
3435 *yyextra->pSkipVerbString << yytext;
3437<SkipVerbString>"\"" {
3438 *yyextra->pSkipVerbString << *yytext;
3439 BEGIN(yyextra->lastSkipVerbStringContext);
3442 *yyextra->pSkipVerbString << *yytext;
3446 *yyextra->pSkipVerbString << *yytext;
3448<ReadInitializer,ReadInitializerPtr>"?>" {
3449 if (yyextra->insidePHP)
3450 BEGIN( FindMembersPHP );
3452 yyextra->current->initializer << yytext;
3454<ReadInitializer,ReadInitializerPtr>. {
3455 yyextra->current->initializer << *yytext;
3459<CopyString,CopyPHPString>\\. {
3460 *yyextra->pCopyQuotedString+=yytext;
3463 *yyextra->pCopyQuotedString+=*yytext;
3464 BEGIN( yyextra->lastStringContext );
3467 *yyextra->pCopyQuotedString+=*yytext;
3468 BEGIN( yyextra->lastStringContext );
3470<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3471 *yyextra->pCopyQuotedString+=yytext;
3473<CopyString,CopyPHPString>\n {
3474 *yyextra->pCopyQuotedString+=*yytext;
3477<CopyString,CopyPHPString>. {
3478 *yyextra->pCopyQuotedString+=*yytext;
3482<CopyGString,CopyPHPGString>\\. {
3483 *yyextra->pCopyQuotedGString << yytext;
3486 *yyextra->pCopyQuotedGString << *yytext;
3487 BEGIN( yyextra->lastStringContext );
3490 *yyextra->pCopyQuotedGString << *yytext;
3491 BEGIN( yyextra->lastStringContext );
3493<CopyGString,CopyPHPGString>"<?php" {
3494 *yyextra->pCopyQuotedGString << yytext;
3495 BEGIN( yyextra->lastStringContext );
3497<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3498 *yyextra->pCopyQuotedGString << yytext;
3500<CopyGString,CopyPHPGString>\n {
3501 *yyextra->pCopyQuotedGString << *yytext;
3502 if (yyextra->stopAtInvalidString)
3504 BEGIN( yyextra->lastStringContext );
3511<CopyGString,CopyPHPGString>. {
3512 *yyextra->pCopyQuotedGString << *yytext;
3517 *yyextra->pCopyRoundString += *yytext;
3518 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3519 yyextra->lastStringContext=YY_START;
3523 *yyextra->pCopyRoundString += *yytext;
3524 yyextra->roundCount++;
3527 *yyextra->pCopyRoundString += *yytext;
3528 if (--yyextra->roundCount<0)
3529 BEGIN(yyextra->lastRoundContext);
3533 *yyextra->pCopyRoundString += *yytext;
3536 if (yyextra->insidePHP)
3538 yyextra->current->initializer << yytext;
3539 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3540 yyextra->lastStringContext=YY_START;
3541 BEGIN(CopyPHPString);
3545 *yyextra->pCopyRoundString += yytext;
3548<CopyRound>{CHARLIT} {
3549 if (yyextra->insidePHP)
3555 *yyextra->pCopyRoundString+=yytext;
3558<CopyRound>[^"'()\n,]+ {
3559 *yyextra->pCopyRoundString+=yytext;
3562 *yyextra->pCopyRoundString+=*yytext;
3567 *yyextra->pCopySharpString += *yytext;
3568 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3569 yyextra->lastStringContext=YY_START;
3573 *yyextra->pCopySharpString += *yytext;
3574 yyextra->sharpCount++;
3577 *yyextra->pCopySharpString += *yytext;
3578 if (--yyextra->sharpCount<0)
3580 BEGIN(yyextra->lastSharpContext);
3585 *yyextra->pCopySharpString += *yytext;
3588 if (yyextra->insidePHP)
3590 yyextra->current->initializer << yytext;
3591 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3592 yyextra->lastStringContext=YY_START;
3593 BEGIN(CopyPHPString);
3597 *yyextra->pCopySharpString += yytext;
3600<CopySharp>{CHARLIT} {
3601 if (yyextra->insidePHP)
3607 *yyextra->pCopySharpString+=yytext;
3610<CopySharp>[^"'<>\n,]+ {
3611 *yyextra->pCopySharpString+=yytext;
3614 *yyextra->pCopySharpString+=*yytext;
3620 *yyextra->pCopyRoundGString << *yytext;
3621 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3622 yyextra->lastStringContext=YY_START;
3626 *yyextra->pCopyRoundGString << *yytext;
3627 yyextra->roundCount++;
3630 *yyextra->pCopyRoundGString << *yytext;
3631 if (--yyextra->roundCount<0)
3632 BEGIN(yyextra->lastRoundContext);
3636 *yyextra->pCopyRoundGString << *yytext;
3639 if (yyextra->insidePHP)
3641 yyextra->current->initializer << yytext;
3642 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3643 yyextra->lastStringContext=YY_START;
3644 BEGIN(CopyPHPGString);
3648 *yyextra->pCopyRoundGString << yytext;
3651<GCopyRound>{CHARLIT} {
3652 if (yyextra->insidePHP)
3658 *yyextra->pCopyRoundGString << yytext;
3662 if (!yyextra->insideCS) REJECT;
3663 *yyextra->pCopyRoundGString << yytext;
3664 yyextra->lastSkipVerbStringContext=YY_START;
3665 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3666 BEGIN(SkipVerbString);
3668<GCopyRound>[^"'()\n\/,R]+ {
3669 *yyextra->pCopyRoundGString << yytext;
3671<GCopyRound>{RAWBEGIN} {
3672 *yyextra->pCopyRoundGString << yytext;
3674 yyextra->lastRawStringContext = YY_START;
3675 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3679 *yyextra->pCopyRoundGString << *yytext;
3684 *yyextra->pCopySquareGString << *yytext;
3685 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3686 yyextra->lastStringContext=YY_START;
3690 *yyextra->pCopySquareGString << *yytext;
3691 if (yyextra->insidePHP)
3693 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3694 yyextra->lastStringContext=YY_START;
3695 BEGIN(CopyPHPGString);
3699 *yyextra->pCopySquareGString << *yytext;
3700 yyextra->squareCount++;
3703 *yyextra->pCopySquareGString << *yytext;
3704 if (--yyextra->squareCount<0)
3705 BEGIN(yyextra->lastSquareContext);
3709 *yyextra->pCopySquareGString << *yytext;
3712 if (yyextra->insidePHP)
3714 yyextra->current->initializer << yytext;
3715 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3716 yyextra->lastStringContext=YY_START;
3717 BEGIN(CopyPHPGString);
3721 *yyextra->pCopySquareGString << yytext;
3724<GCopySquare>{CHARLIT} {
3725 if (yyextra->insidePHP)
3731 *yyextra->pCopySquareGString << yytext;
3734<GCopySquare>[^"'\[\]\n\/,]+ {
3735 *yyextra->pCopySquareGString << yytext;
3738 *yyextra->pCopySquareGString << *yytext;
3743 *yyextra->pCopyCurlyString += *yytext;
3744 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3745 yyextra->lastStringContext=YY_START;
3746 yyextra->keepComment=
false;
3750 *yyextra->pCopyCurlyString += *yytext;
3751 if (yyextra->insidePHP)
3753 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3754 yyextra->lastStringContext=YY_START;
3755 yyextra->keepComment=
false;
3756 BEGIN(CopyPHPString);
3760 *yyextra->pCopyCurlyString += *yytext;
3761 yyextra->curlyCount++;
3764 *yyextra->pCopyCurlyString += *yytext;
3765 if (--yyextra->curlyCount<0)
3767 yyextra->keepComment=
false;
3768 BEGIN(yyextra->lastCurlyContext);
3771<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3777 *yyextra->pCopyCurlyString += yytext;
3780<CopyCurly>[^"'{}\/\n,]+ {
3781 *yyextra->pCopyCurlyString += yytext;
3783<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3786 *yyextra->pCopyCurlyString += *yytext;
3789 *yyextra->pCopyCurlyString += *yytext;
3791<CopyCurly>{CPPC}[^\n]* {
3792 if (yyextra->keepComment)
3794 *yyextra->pCopyCurlyString += yytext;
3802 if (yyextra->keepComment)
3804 *yyextra->pCopyCurlyString += yytext;
3813 *yyextra->pCopyCurlyString += yytext;
3818 *yyextra->pCopyCurlyString += *yytext;
3821 *yyextra->pCopyCurlyString += *yytext;
3823<CopyComment><<EOF>> {
3824 warn(yyextra->fileName,yyextra->yyLineNr,
3825 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3830<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3832<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3834 int s = line.
find(
' ');
3835 int e = line.
find(
'"',s);
3836 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3837 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3844 *yyextra->pCopyCurlyGString << *yytext;
3845 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3846 yyextra->lastStringContext=YY_START;
3847 yyextra->keepComment =
false;
3851 *yyextra->pCopyCurlyGString << *yytext;
3852 if (yyextra->insidePHP)
3854 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3855 yyextra->lastStringContext=YY_START;
3856 yyextra->keepComment =
false;
3857 BEGIN(CopyPHPGString);
3861 *yyextra->pCopyCurlyGString << *yytext;
3862 yyextra->curlyCount++;
3865 *yyextra->pCopyCurlyGString << *yytext;
3866 if (--yyextra->curlyCount<0)
3868 yyextra->current->endBodyLine = yyextra->yyLineNr;
3869 yyextra->keepComment =
false;
3870 BEGIN(yyextra->lastCurlyContext);
3873<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3879 *yyextra->pCopyCurlyGString << yytext;
3882<GCopyCurly>[^"'{}\/\n,]+ {
3883 *yyextra->pCopyCurlyGString << yytext;
3886 *yyextra->pCopyCurlyGString << yytext;
3888<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3891 *yyextra->pCopyCurlyGString << *yytext;
3894 *yyextra->pCopyCurlyGString << *yytext;
3896<GCopyCurly>{CPPC}[^\n]* {
3897 if (yyextra->keepComment)
3899 *yyextra->pCopyCurlyGString << yytext;
3907 if (yyextra->keepComment)
3909 *yyextra->pCopyCurlyGString << yytext;
3910 BEGIN(GCopyComment);
3917<GCopyComment>{CCE} {
3918 *yyextra->pCopyCurlyGString << yytext;
3923 *yyextra->pCopyCurlyGString << *yytext;
3926 *yyextra->pCopyCurlyGString << *yytext;
3928<GCopyComment><<EOF>> {
3929 warn(yyextra->fileName,yyextra->yyLineNr,
3930 "reached end of file while inside a C style comment block!");
3938 if (yyextra->current->type.isEmpty() &&
3939 yyextra->current->name==
"enum")
3941 yyextra->current->section = EntryType::makeEnum();
3942 yyextra->current->name.clear();
3943 yyextra->current->args.clear();
3944 BEGIN(EnumBaseType);
3948 if (yyextra->current->type.isEmpty())
3951 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3954 yyextra->current->bitfields+=
":";
3958 yyextra->current->bitfields+=*yytext;
3961 yyextra->current->args+=*yytext;
3965 yyextra->current->args+=
' ';
3968 QCString oldType = yyextra->current->type;
3969 if (yyextra->current->bodyLine==-1)
3971 yyextra->current->bodyLine = yyextra->yyLineNr;
3972 yyextra->current->bodyColumn = yyextra->yyColNr;
3974 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3976 yyextra->current->type = yyextra->current->type.mid(3);
3978 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3980 yyextra->current->type.prepend(
"typedef ");
3982 bool isStatic = yyextra->current->isStatic;
3983 Protection prot = yyextra->current->protection;
3984 bool isConcept = yyextra->current->section.isConcept();
3985 bool isModule = yyextra->current->section.isModuleDoc();
3988 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3993 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3996 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3998 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4000 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4001 if (yyextra->current->section.isClass())
4005 yyextra->current->section = EntryType::makeVariable() ;
4006 yyextra->current->fileName = yyextra->fileName;
4007 yyextra->current->startLine = yyextra->yyBegLineNr;
4008 yyextra->current->startColumn = yyextra->yyBegColNr;
4009 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4012 if ( *yytext ==
',')
4014 yyextra->current->isStatic = isStatic;
4015 yyextra->current->protection = prot;
4016 yyextra->current->name.clear();
4017 yyextra->current->args.clear();
4018 yyextra->current->brief.clear();
4019 yyextra->current->doc.clear();
4020 yyextra->current->initializer.str(std::string());
4021 yyextra->current->bitfields.clear();
4026 yyextra->mtype = MethodTypes::Method;
4027 yyextra->virt = Specifier::Normal;
4028 yyextra->current->bodyLine = -1;
4029 yyextra->current->bodyColumn = 1;
4030 yyextra->current->groups.clear();
4036 if (yyextra->insideSlice)
4038 yyextra->squareCount=1;
4039 yyextra->lastSquareContext = YY_START;
4040 yyextra->current->metaData +=
"[";
4041 BEGIN( SliceMetadata );
4043 else if (!yyextra->insideCS &&
4044 (yyextra->current->name.isEmpty() ||
4045 yyextra->current->name==
"typedef"
4049 yyextra->squareCount=1;
4050 yyextra->lastSquareContext = YY_START;
4051 yyextra->idlAttr.clear();
4052 yyextra->idlProp.clear();
4053 yyextra->current->mtype = yyextra->mtype;
4056 yyextra->current->mtype == MethodTypes::Property)
4058 yyextra->odlProp =
true;
4059 yyextra->current->spec.setGettable(
true).setSettable(
true);
4062 BEGIN( IDLAttribute );
4064 else if (yyextra->insideCS &&
4065 yyextra->current->name.isEmpty())
4067 yyextra->squareCount=1;
4068 yyextra->lastSquareContext = YY_START;
4071 yyextra->current->args.clear();
4072 BEGIN( SkipSquare );
4076 yyextra->current->args += yytext ;
4077 yyextra->squareCount=1;
4078 yyextra->externLinkage=
FALSE;
4083 yyextra->squareCount++;
4084 yyextra->current->metaData +=
"[";
4086<SliceMetadata>{BN}* {
4089<SliceMetadata>\"[^\"]*\" {
4090 yyextra->current->metaData += yytext;
4093 yyextra->current->metaData += yytext;
4096 yyextra->current->metaData += yytext;
4097 if (--yyextra->squareCount<=0)
4099 BEGIN (yyextra->lastSquareContext);
4103 yyextra->current->type +=
"(";
4104 yyextra->roundCount++;
4106<SliceOptional>[0-9]+ {
4107 yyextra->current->type += yytext;
4110 yyextra->current->type +=
")";
4111 if(--yyextra->roundCount<=0)
4113 BEGIN (yyextra->lastModifierContext);
4118 if (--yyextra->squareCount<=0)
4121 if (yyextra->current->mtype == MethodTypes::Property)
4122 BEGIN( IDLPropName );
4124 BEGIN( yyextra->lastSquareContext );
4127<IDLAttribute>"propput" {
4130 yyextra->current->mtype = MethodTypes::Property;
4132 yyextra->current->spec.setSettable(
true);
4134<IDLAttribute>"propget" {
4137 yyextra->current->mtype = MethodTypes::Property;
4139 yyextra->current->spec.setGettable(
true);
4141<IDLAttribute>"property" {
4142 yyextra->current->spec.setProperty(
true);
4144<IDLAttribute>"attribute" {
4145 yyextra->current->spec.setAttribute(
true);
4147<IDLAttribute>"optional" {
4148 yyextra->current->spec.setOptional(
true);
4150<IDLAttribute>"readonly" {
4153 yyextra->current->spec.setSettable(
false);
4157 yyextra->current->spec.setReadonly(
true);
4160<IDLAttribute>"bound" {
4161 yyextra->current->spec.setBound(
true);
4163<IDLAttribute>"removable" {
4164 yyextra->current->spec.setRemovable(
true);
4166<IDLAttribute>"constrained" {
4167 yyextra->current->spec.setConstrained(
true);
4169<IDLAttribute>"transient" {
4170 yyextra->current->spec.setTransient(
true);
4172<IDLAttribute>"maybevoid" {
4173 yyextra->current->spec.setMaybeVoid(
true);
4175<IDLAttribute>"maybedefault" {
4176 yyextra->current->spec.setMaybeDefault(
true);
4178<IDLAttribute>"maybeambiguous" {
4179 yyextra->current->spec.setMaybeAmbiguous(
true);
4183<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4186 if (yyextra->odlProp)
4188 yyextra->idlProp = yytext;
4191<IDLPropName>{ID}{BN}*"(" {
4192 yyextra->current->name = yytext;
4193 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4194 yyextra->current->startLine = yyextra->yyLineNr;
4195 yyextra->current->startColumn = yyextra->yyColNr;
4198<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4199 if (yyextra->odlProp)
4201 yyextra->idlProp += yytext;
4204<IDLPropName>{ID}{BNopt}/";" {
4205 if (yyextra->odlProp)
4207 yyextra->current->name = yytext;
4208 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4209 yyextra->odlProp =
false;
4214<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4215 yyextra->idlAttr = yytext;
4216 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4219 yyextra->idlProp = yytext;
4221<IDLProp>{BN}*{ID}{BN}*"," {
4222 if (yyextra->current->args.isEmpty())
4223 yyextra->current->args =
"(";
4225 yyextra->current->args +=
", ";
4226 yyextra->current->args += yyextra->idlAttr;
4227 yyextra->current->args +=
" ";
4228 yyextra->current->args += yyextra->idlProp;
4229 yyextra->current->args +=
" ";
4230 yyextra->current->args += yytext;
4231 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4232 yyextra->idlProp.clear();
4233 yyextra->idlAttr.clear();
4236<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4240 yyextra->current->fileName = yyextra->fileName;
4241 yyextra->current->type = yyextra->idlProp;
4242 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4243 if (!yyextra->current->args.isEmpty())
4244 yyextra->current->args +=
")";
4245 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4246 yyextra->current->section = EntryType::makeVariable();
4247 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4249 BEGIN( FindMembers );
4254<Array>"]" { yyextra->current->args += *yytext ;
4255 if (--yyextra->squareCount<=0)
4256 BEGIN( FindMembers ) ;
4258<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4259 if (--yyextra->squareCount<=0)
4260 BEGIN( SFunction ) ;
4262<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4263 yyextra->squareCount++;
4265<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4266<SkipSquare>"[" { yyextra->squareCount++; }
4268 if (--yyextra->squareCount<=0)
4269 BEGIN( yyextra->lastSquareContext );
4272 yyextra->lastStringContext=YY_START;
4273 BEGIN( SkipString );
4275<SkipSquare>[^\n\[\]\"]+
4276<FindMembers>"<" {
addType(yyscanner);
4277 yyextra->current->type += yytext ;
4280<Sharp>">" { yyextra->current->type += *yytext ;
4281 if (--yyextra->sharpCount<=0)
4282 BEGIN( FindMembers ) ;
4284<Sharp>"<" { yyextra->current->type += *yytext ;
4285 yyextra->sharpCount++;
4288 yyextra->current->type +=
' ';
4291<Sharp>. { yyextra->current->type += *yytext ; }
4294 yyextra->current->bodyLine = yyextra->yyLineNr;
4295 yyextra->current->bodyColumn = yyextra->yyColNr;
4296 yyextra->current->name = yytext;
4301 yyextra->lastInitializerContext = YY_START;
4302 yyextra->sharpCount=0;
4303 yyextra->initBracketCount=0;
4304 yyextra->current->initializer.str(
"=");
4305 BEGIN(ReadInitializer);
4308 yyextra->lastInitializerContext = YY_START;
4309 yyextra->sharpCount=0;
4310 yyextra->initBracketCount=0;
4311 yyextra->current->initializer.str(yytext);
4312 BEGIN(ReadInitializer);
4315 if (yyextra->insideJava)
4317 if (!yyextra->current->name.isEmpty())
4319 yyextra->current->fileName = yyextra->fileName;
4320 yyextra->current->startLine = yyextra->yyLineNr;
4321 yyextra->current->startColumn = yyextra->yyColNr;
4322 if (!yyextra->current_root->spec.isEnum())
4324 yyextra->current->type =
"@";
4326 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4327 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4328 yyextra->current->section = EntryType::makeVariable();
4329 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4333 BEGIN( FindMembers );
4344 if (!yyextra->current->name.isEmpty())
4346 yyextra->current->fileName = yyextra->fileName;
4347 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4349 yyextra->current->startLine = yyextra->current->bodyLine;
4350 yyextra->current->startColumn = yyextra->current->bodyColumn;
4354 yyextra->current->startLine = yyextra->yyLineNr;
4355 yyextra->current->startColumn = yyextra->yyColNr;
4357 if (!yyextra->current_root->spec.isEnum())
4359 yyextra->current->type =
"@";
4361 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4362 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4363 yyextra->current->section = EntryType::makeVariable();
4365 if (!yyextra->insideCS && !yyextra->insideJava &&
4366 !yyextra->current_root->spec.isStrong())
4373 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4375 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4380 yyextra->current->reset();
4385 yyextra->squareCount=1;
4386 yyextra->lastSquareContext = YY_START;
4389<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4390<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4391<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4394 yyextra->current->program << yytext ;
4397<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4398 yyextra->current->program << yytext ;
4399 yyextra->pSkipInterpString = &yyextra->current->program;
4400 yyextra->lastSkipInterpStringContext=YY_START;
4401 BEGIN( SkipInterpString );
4403<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})* {
4404 *yyextra->pSkipInterpString << yytext;
4406<SkipInterpString>\" {
4407 *yyextra->pSkipInterpString << *yytext;
4408 BEGIN( yyextra->lastSkipInterpStringContext );
4411<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4412 yyextra->current->program << yytext ;
4413 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4414 yyextra->lastSkipInterpVerbStringContext=YY_START;
4415 BEGIN( SkipInterpVerbString );
4417<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4418 *yyextra->pSkipInterpVerbString << yytext;
4420<SkipInterpString>"{"[^}]*"}" {
4421 *yyextra->pSkipInterpString << yytext;
4423<SkipInterpVerbString>"{"[^}]*"}" {
4424 *yyextra->pSkipInterpVerbString << yytext;
4426<SkipInterpVerbString>\" {
4427 *yyextra->pSkipInterpVerbString << *yytext;
4428 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4430<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4431<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4432 yyextra->pSkipVerbString = &yyextra->current->program;
4433 yyextra->lastSkipVerbStringContext=YY_START;
4434 BEGIN( SkipVerbString );
4436<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4438 yyextra->current->program << yytext ;
4439 yyextra->pCopyHereDocGString = &yyextra->current->program;
4440 yyextra->lastHereDocContext=YY_START;
4441 BEGIN( CopyHereDoc );
4448<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4449 yyextra->current->program << yytext;
4451 yyextra->lastRawStringContext = YY_START;
4452 yyextra->pCopyRawGString = &yyextra->current->program;
4455<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4456 yyextra->pCopyQuotedGString = &yyextra->current->program;
4457 yyextra->lastStringContext=YY_START;
4458 yyextra->stopAtInvalidString=
false;
4459 BEGIN( CopyGString );
4461<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4462<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4463 yyextra->lastContext = YY_START ;
4466<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4467 ++yyextra->yyLineNr ;
4468 yyextra->lastContext = YY_START ;
4471<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4472 if (!yyextra->insidePHP)
4474 yyextra->current->program << yytext;
4478 yyextra->current->program << yytext;
4479 yyextra->pCopyQuotedGString = &yyextra->current->program;
4480 yyextra->lastStringContext=YY_START;
4481 BEGIN(CopyPHPGString);
4484<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4485 if (yyextra->insidePHP)
4492 yyextra->current->program << yytext;
4495<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4496 ++yyextra->curlyCount ;
4499 yyextra->current->program << yytext ;
4500 --yyextra->curlyCount ;
4502<ReadBody,ReadNSBody>"}" {
4503 if ( yyextra->curlyCount>0 )
4505 yyextra->current->program << yytext ;
4506 --yyextra->curlyCount ;
4510 yyextra->current->endBodyLine = yyextra->yyLineNr;
4511 std::shared_ptr<Entry> original_root = yyextra->current_root;
4512 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4516 QCString doc = yyextra->current->doc;
4517 int docLine = yyextra->current->docLine;
4518 QCString docFile = yyextra->current->docFile;
4519 QCString brief = yyextra->current->brief;
4520 int briefLine = yyextra->current->briefLine;
4521 QCString briefFile = yyextra->current->briefFile;
4523 yyextra->current->doc =
"";
4524 yyextra->current->docLine = 0;
4525 yyextra->current->docFile =
"";
4526 yyextra->current->brief =
"";
4527 yyextra->current->briefLine = 0;
4528 yyextra->current->briefFile =
"";
4529 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4531 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4532 yyextra->current->program.str(std::string());
4533 new_current->name = yyextra->current->name.mid(split_point + 2);
4534 yyextra->current->name = yyextra->current->name.left(split_point);
4535 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4537 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4538 yyextra->current_root = yyextra->current;
4539 yyextra->current = new_current;
4542 yyextra->current->doc = doc;
4543 yyextra->current->docLine = docLine;
4544 yyextra->current->docFile = docFile;
4545 yyextra->current->brief = brief;
4546 yyextra->current->briefLine = briefLine;
4547 yyextra->current->briefFile = briefFile;
4549 QCString &cn = yyextra->current->name;
4550 QCString rn = yyextra->current_root->name;
4556 if (yyextra->isTypedef && cn.
isEmpty())
4559 BEGIN( TypedefName );
4563 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4565 yyextra->current->program <<
',';
4570 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4571 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4573 if (yyextra->insideObjC &&
4574 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4577 BEGIN( ReadBodyIntf ) ;
4581 yyextra->memspecEntry = yyextra->current;
4582 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4583 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4584 if (yyextra->current->section.isNamespace() ||
4585 yyextra->current->spec.isInterface() ||
4586 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4587 yyextra->insideSlice
4590 yyextra->current->reset();
4591 yyextra->current_root = std::move(original_root);
4593 yyextra->memspecEntry.reset();
4594 BEGIN( FindMembers ) ;
4598 static const reg::Ex re(R
"(@\d+$)");
4599 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4600 !
reg::search(yyextra->memspecEntry->name.str(),re))
4603 yyextra->current->doc.clear();
4604 yyextra->current->brief.clear();
4606 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.
4612<ReadBody>"}"{BN}+"typedef"{BN}+ {
4614 if ( yyextra->curlyCount>0 )
4616 yyextra->current->program << yytext ;
4617 --yyextra->curlyCount ;
4621 yyextra->isTypedef =
TRUE;
4622 yyextra->current->endBodyLine = yyextra->yyLineNr;
4623 QCString &cn = yyextra->current->name;
4624 QCString rn = yyextra->current_root->name;
4629 BEGIN( TypedefName );
4632<TypedefName>("const"|"volatile"){BN} {
4634 yyextra->current->type.prepend(yytext);
4637 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4639 yyextra->current->program <<
",";
4641 yyextra->current->name=yytext;
4643 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4644 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4646 if (!yyextra->firstTypedefEntry)
4648 yyextra->firstTypedefEntry = yyextra->current;
4650 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4652 yyextra->isTypedef=
TRUE;
4653 BEGIN(MemberSpecSkip);
4657 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4659 yyextra->current->program <<
',';
4662 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4663 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4664 yyextra->memspecEntry = yyextra->current;
4665 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4668 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4670<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4672 int i=0,l=(int)yyleng,j;
4673 while (i<l && (!
isId(yytext[i]))) i++;
4675 j=yyextra->msName.
find(
"[");
4678 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4679 yyextra->msName=yyextra->msName.left(j);
4684 if (yyextra->firstTypedefEntry)
4686 if (yyextra->firstTypedefEntry->spec.isStruct())
4688 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4690 else if (yyextra->firstTypedefEntry->spec.isUnion())
4692 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4694 else if (yyextra->firstTypedefEntry->section.isEnum())
4696 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4700 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4706 yyextra->current->name = yyextra->msName;
4712 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4718 const Entry *p=yyextra->current.get();
4726 int pi = (i==-1) ? 0 : i+2;
4736 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4740 if (!yyextra->msName.isEmpty()
4746 if (typedefHidesStruct &&
4747 yyextra->isTypedef &&
4748 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4749 yyextra->msType.stripWhiteSpace().isEmpty() &&
4750 yyextra->memspecEntry)
4752 yyextra->memspecEntry->name=yyextra->msName;
4756 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4757 varEntry->lang = yyextra->language;
4758 varEntry->protection = yyextra->current->protection ;
4759 varEntry->mtype = yyextra->current->mtype;
4760 varEntry->virt = yyextra->current->virt;
4761 varEntry->isStatic = yyextra->current->isStatic;
4762 varEntry->section = EntryType::makeVariable();
4763 varEntry->name = yyextra->msName.stripWhiteSpace();
4764 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4765 varEntry->args = yyextra->msArgs;
4766 if (yyextra->isTypedef)
4768 varEntry->type.prepend(
"typedef ");
4771 if (typedefHidesStruct &&
4772 yyextra->isTypedef &&
4773 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4774 yyextra->memspecEntry
4777 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4781 varEntry->type+=yyextra->current->name+yyextra->msType;
4783 varEntry->fileName = yyextra->fileName;
4784 varEntry->startLine = yyextra->yyLineNr;
4785 varEntry->startColumn = yyextra->yyColNr;
4786 varEntry->doc = yyextra->current->doc;
4787 varEntry->brief = yyextra->current->brief;
4788 varEntry->mGrpId = yyextra->current->mGrpId;
4789 varEntry->initializer.str(yyextra->current->initializer.str());
4790 varEntry->groups = yyextra->current->groups;
4791 varEntry->sli = yyextra->current->sli;
4796 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4801 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4803 if (!yyextra->current->doc.isEmpty())
4805 yyextra->memspecEntry->doc += yyextra->current->doc;
4807 if (!yyextra->current->brief.isEmpty())
4809 yyextra->memspecEntry->brief += yyextra->current->brief;
4812 yyextra->msType.clear();
4813 yyextra->msName.clear();
4814 yyextra->msArgs.clear();
4815 yyextra->isTypedef=
FALSE;
4816 yyextra->firstTypedefEntry.reset();
4817 yyextra->memspecEntry.reset();
4818 yyextra->current->reset();
4820 BEGIN( FindMembers );
4824 yyextra->current->doc.clear();
4825 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
4830 yyextra->lastInitializerContext=YY_START;
4831 yyextra->sharpCount=0;
4832 yyextra->initBracketCount=0;
4833 yyextra->current->initializer.str(yytext);
4834 BEGIN(ReadInitializer);
4845<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4846<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4847<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4850<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4851 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4853 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4854 yyextra->insideObjC=
FALSE;
4855 BEGIN( FindMembers );
4857<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4858<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4860<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4861<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4862 if (yyextra->insidePHP)
4868 yyextra->current->bodyLine = yyextra->yyLineNr;
4869 yyextra->current->bodyColumn = yyextra->yyColNr;
4872 yyextra->funcPtrType=yytext;
4873 yyextra->roundCount=0;
4878<FuncPtr>{SCOPENAME} {
4879 yyextra->current->name = yytext;
4882 BEGIN( FuncPtrOperator );
4886 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4888 yyextra->funcPtrType += yyextra->current->name;
4892 BEGIN( EndFuncPtr );
4899<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4900 yyextra->current->name += yytext;
4901 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4904<FuncPtrOperator>\n {
4906 yyextra->current->name += *yytext;
4908<FuncPtrOperator>"(" {
4910 BEGIN( EndFuncPtr );
4913 yyextra->current->name += *yytext;
4915<EndFuncPtr>")"{BNopt}/";" {
4917 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4920<EndFuncPtr>")"{BNopt}/"(" {
4922 if (yyextra->funcPtrType!=
"(")
4924 yyextra->current->type+=yyextra->funcPtrType+
")";
4928<EndFuncPtr>")"{BNopt}/"[" {
4930 yyextra->current->type+=yyextra->funcPtrType;
4931 yyextra->current->args +=
")";
4936 yyextra->current->args += *yytext ;
4939 yyextra->current->bodyLine = yyextra->yyLineNr;
4940 yyextra->current->bodyColumn = yyextra->yyColNr;
4941 yyextra->currentArgumentContext = FuncFuncEnd;
4942 yyextra->fullArgString=yyextra->current->args;
4943 yyextra->copyArgString=&yyextra->current->args;
4944 BEGIN( ReadFuncArgType ) ;
4946<EndFuncPtr>"["[^\n\]]*"]" {
4947 yyextra->funcPtrType+=yytext;
4953 yyextra->current->args += *yytext ;
4954 ++yyextra->roundCount;
4957 yyextra->current->args += *yytext ;
4958 if ( yyextra->roundCount )
4959 --yyextra->roundCount;
4965<FuncFuncEnd>")"{BN}*"(" {
4967 yyextra->current->type+=yyextra->funcPtrType+
")(";
4968 BEGIN(FuncFuncType);
4970<FuncFuncEnd>")"{BNopt}/[;{] {
4972 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4975<FuncFuncEnd>")"{BNopt}/"[" {
4977 yyextra->current->type+=yyextra->funcPtrType;
4978 yyextra->current->args+=
")";
4979 BEGIN(FuncFuncArray);
4982 yyextra->current->args += *yytext;
4985 yyextra->current->type += *yytext;
4986 yyextra->roundCount++;
4989 yyextra->current->type += *yytext;
4990 if (yyextra->roundCount)
4991 --yyextra->roundCount;
4995<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4996<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4998 yyextra->current->type += *yytext;
5000<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5001 if (yyextra->current->type.startsWith(
"typedef") &&
5002 yyextra->current->bodyLine==-1)
5005 yyextra->current->bodyLine = yyextra->yyLineNr;
5006 yyextra->current->bodyColumn = yyextra->yyColNr;
5007 BEGIN( GetCallType );
5009 else if (!yyextra->current->name.isEmpty())
5011 yyextra->current->args = yytext;
5012 yyextra->current->bodyLine = yyextra->yyLineNr;
5013 yyextra->current->bodyColumn = yyextra->yyColNr;
5014 yyextra->currentArgumentContext = FuncQual;
5015 yyextra->fullArgString=yyextra->current->args;
5016 yyextra->copyArgString=&yyextra->current->args;
5017 BEGIN( ReadFuncArgType ) ;
5021<GetCallType>{BN}*{ID}{BN}*"*" {
5024 yyextra->funcPtrType=
"(";
5025 yyextra->funcPtrType+=yytext;
5026 yyextra->roundCount=0;
5030 if (!yyextra->current->name.isEmpty())
5032 yyextra->current->args = yytext;
5033 yyextra->current->bodyLine = yyextra->yyLineNr;
5034 yyextra->current->bodyColumn = yyextra->yyColNr;
5035 yyextra->currentArgumentContext = FuncQual;
5036 yyextra->current->req.clear();
5037 yyextra->fullArgString=yyextra->current->args;
5038 yyextra->copyArgString=&yyextra->current->args;
5039 BEGIN( ReadFuncArgType ) ;
5053<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5054 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5055 else yyextra->fullArgString+=yytext;
5057<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5058 yyextra->fullArgString+=yytext;
5060<CopyArgRound>[^\/\n\)\(\"\']+ {
5061 *yyextra->copyArgString+=yytext;
5062 yyextra->fullArgString+=yytext;
5064<CopyArgSquare>[^\/\n\]\[\"\']+ {
5065 *yyextra->copyArgString+=yytext;
5066 yyextra->fullArgString+=yytext;
5068<ReadFuncArgType,ReadTempArgs>{BN}* {
5069 *yyextra->copyArgString+=
" ";
5070 yyextra->fullArgString+=
" ";
5073<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5075 yyextra->lastRawStringContext = YY_START;
5076 yyextra->pCopyRawString = yyextra->copyArgString;
5077 *yyextra->pCopyRawString+=yytext;
5078 yyextra->fullArgString+=yytext;
5081<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5082 *yyextra->copyArgString+=*yytext;
5083 yyextra->fullArgString+=*yytext;
5084 yyextra->lastCopyArgStringContext = YY_START;
5085 BEGIN( CopyArgString );
5087<ReadFuncArgType>"[" {
5088 if (!yyextra->insidePHP) REJECT;
5089 *yyextra->copyArgString+=*yytext;
5090 yyextra->fullArgString+=*yytext;
5091 yyextra->argSquareCount=0;
5092 yyextra->lastCopyArgContext = YY_START;
5093 BEGIN( CopyArgSquare );
5095<ReadFuncArgType,ReadTempArgs>"(" {
5096 *yyextra->copyArgString+=*yytext;
5097 yyextra->fullArgString+=*yytext;
5098 yyextra->argRoundCount=0;
5099 yyextra->lastCopyArgContext = YY_START;
5100 BEGIN( CopyArgRound );
5102<ReadFuncArgType>")" {
5103 *yyextra->copyArgString+=*yytext;
5104 yyextra->fullArgString+=*yytext;
5106 if (yyextra->insideJS)
5117 yyextra->docBackup = yyextra->current->doc;
5118 yyextra->briefBackup = yyextra->current->brief;
5120 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5123<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5124 if (yyextra->currentArgumentContext==DefineEnd)
5128 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5134 BEGIN( yyextra->currentArgumentContext );
5140 yyextra->fullArgString+=yytext;
5141 yyextra->lastCopyArgChar=0;
5142 yyextra->lastCommentInArgContext=YY_START;
5144 BEGIN( CopyArgCommentLine );
5146 BEGIN( CopyArgComment );
5150<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5151<ReadFuncArgType,ReadTempArgs>{CCS} {
5152 yyextra->lastCContext = YY_START;
5153 BEGIN( SkipComment );
5155<ReadFuncArgType,ReadTempArgs>{CPPC} {
5156 yyextra->lastCContext = YY_START;
5157 BEGIN( SkipCxxComment );
5173<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5175 if (yyextra->currentArgumentContext==DefineEnd)
5179 int i;
for (i=(
int)yyleng-1;i>0;i--)
5183 *yyextra->copyArgString+=*yytext;
5184 yyextra->fullArgString+=*yytext;
5187 BEGIN( yyextra->currentArgumentContext );
5193 yyextra->lastCopyArgChar=*yytext;
5196 yyextra->lastCommentInArgContext=YY_START;
5197 yyextra->fullArgString+=text;
5198 if (text.
find(
"//")!=-1)
5199 BEGIN( CopyArgCommentLine );
5201 BEGIN( CopyArgComment );
5204<CopyArgComment>^{B}*"*"+/{BN}+
5205<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5206<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5207 if (yyextra->lastCopyArgChar!=0)
5208 unput(yyextra->lastCopyArgChar);
5209 BEGIN( yyextra->lastCommentInArgContext );
5211<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5213 if (yyextra->lastCopyArgChar!=0)
5214 unput(yyextra->lastCopyArgChar);
5215 BEGIN( yyextra->lastCommentInArgContext );
5217<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5218 yyextra->docBlockName=
"uml";
5219 yyextra->fullArgString+=yytext;
5220 BEGIN(CopyArgVerbatim);
5222<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5223 yyextra->docBlockName=&yytext[1];
5224 yyextra->fullArgString+=yytext;
5225 BEGIN(CopyArgVerbatim);
5227<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5228 yyextra->docBlockName=&yytext[1];
5229 if (yyextra->docBlockName.at(1)==
'[')
5231 yyextra->docBlockName.at(1)=
']';
5233 if (yyextra->docBlockName.at(1)==
'{')
5235 yyextra->docBlockName.at(1)=
'}';
5237 if (yyextra->docBlockName.at(1)==
'(')
5239 yyextra->docBlockName.at(1)=
')';
5241 yyextra->fullArgString+=yytext;
5242 BEGIN(CopyArgVerbatim);
5244<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5245 yyextra->fullArgString+=yytext;
5246 if (&yytext[4]==yyextra->docBlockName)
5248 yyextra->docBlockName=
"";
5249 BEGIN(CopyArgCommentLine);
5252<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5253 yyextra->fullArgString+=yytext;
5254 if (yyextra->docBlockName==&yytext[1])
5256 yyextra->docBlockName=
"";
5257 BEGIN(CopyArgCommentLine);
5260<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5261<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5262<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5263<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5264<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5265 warn(yyextra->fileName,yyextra->yyLineNr,
5266 "Ignoring {:c}brief command inside argument documentation",*yytext
5268 yyextra->fullArgString+=
' ';
5271 *yyextra->copyArgString+=*yytext;
5272 yyextra->fullArgString+=*yytext;
5273 yyextra->argSharpCount=1;
5274 BEGIN( CopyArgSharp );
5277 *yyextra->copyArgString+=*yytext;
5278 yyextra->fullArgString+=*yytext;
5280 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5282 BEGIN( yyextra->currentArgumentContext );
5285 yyextra->argRoundCount++;
5286 *yyextra->copyArgString+=*yytext;
5287 yyextra->fullArgString+=*yytext;
5290 *yyextra->copyArgString+=*yytext;
5291 yyextra->fullArgString+=*yytext;
5292 if (yyextra->argRoundCount>0)
5293 yyextra->argRoundCount--;
5295 BEGIN( yyextra->lastCopyArgContext );
5298 yyextra->argSquareCount++;
5299 *yyextra->copyArgString+=*yytext;
5300 yyextra->fullArgString+=*yytext;
5303 *yyextra->copyArgString+=*yytext;
5304 yyextra->fullArgString+=*yytext;
5305 if (yyextra->argSquareCount>0)
5306 yyextra->argSquareCount--;
5308 BEGIN( yyextra->lastCopyArgContext );
5311 *yyextra->copyArgString+=*yytext;
5312 yyextra->fullArgString+=*yytext;
5313 yyextra->argRoundCount=0;
5314 yyextra->lastCopyArgContext = YY_START;
5315 BEGIN( CopyArgRound );
5318 yyextra->argSharpCount++;
5320 *yyextra->copyArgString+=*yytext;
5321 yyextra->fullArgString+=*yytext;
5324 *yyextra->copyArgString+=*yytext;
5325 yyextra->fullArgString+=*yytext;
5326 yyextra->argSharpCount--;
5327 if (yyextra->argSharpCount>0)
5333 BEGIN( ReadTempArgs );
5337<CopyArgString,CopyArgPHPString>\\. {
5338 *yyextra->copyArgString+=yytext;
5339 yyextra->fullArgString+=yytext;
5342 *yyextra->copyArgString+=*yytext;
5343 yyextra->fullArgString+=*yytext;
5344 BEGIN( yyextra->lastCopyArgStringContext );
5346<CopyArgPHPString>\' {
5347 *yyextra->copyArgString+=*yytext;
5348 yyextra->fullArgString+=*yytext;
5349 BEGIN( yyextra->lastCopyArgStringContext );
5351<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5352 if (yyextra->insidePHP)
5358 *yyextra->copyArgString+=yytext;
5359 yyextra->fullArgString+=yytext;
5362<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5363 *yyextra->copyArgString+=yytext;
5364 yyextra->fullArgString+=yytext;
5365 if (yyextra->insidePHP)
5367 yyextra->lastCopyArgStringContext=YY_START;
5368 BEGIN(CopyArgPHPString);
5371<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5372 *yyextra->copyArgString+=yytext;
5373 yyextra->fullArgString+=yytext;
5375<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5377 *yyextra->copyArgString+=*yytext;
5378 yyextra->fullArgString+=*yytext;
5380<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5381 *yyextra->copyArgString+=yytext;
5382 yyextra->fullArgString+=yytext;
5384<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5385 *yyextra->copyArgString+=*yytext;
5386 yyextra->fullArgString+=*yytext;
5394<FuncRound>"(" { yyextra->current->args += *yytext ;
5395 ++yyextra->roundCount ;
5397<FuncRound>")" { yyextra->current->args += *yytext ;
5398 if ( yyextra->roundCount )
5399 --yyextra->roundCount ;
5411 if (
qstrcmp(yytext,
";")==0 &&
5412 ((yyextra->insideJS || yyextra->insidePHP) &&
5415 yyextra->current->reset();
5417 BEGIN( FindMembers );
5421 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5424<FuncQual>{BN}*"abstract"{BN}* {
5426 yyextra->current->virt = Specifier::Pure;
5427 yyextra->current->args +=
" override ";
5429<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5431 yyextra->current->spec.setOverride(
true);
5432 yyextra->current->args +=
" override ";
5433 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5436<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5438 yyextra->current->spec.setFinal(
true);
5439 yyextra->current->args +=
" final ";
5440 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5443<FuncQual>{BN}*"sealed"{BN}* {
5445 yyextra->current->spec.setSealed(
true);
5446 yyextra->current->args +=
" sealed ";
5448<FuncQual>{BN}*"new"{BN}* {
5450 yyextra->current->spec.setNew(
true);
5451 yyextra->current->args +=
" new ";
5453<FuncQual>{BN}*"const"{BN}* {
5455 yyextra->current->args +=
" const ";
5456 yyextra->current->argList.setConstSpecifier(
TRUE);
5458<FuncQual>{BN}*"volatile"{BN}* {
5460 yyextra->current->args +=
" volatile ";
5461 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5463<FuncQual>{BN}*"noexcept"{BN}* {
5465 yyextra->current->args +=
" noexcept ";
5466 yyextra->current->spec.setNoExcept(
true);
5468<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5470 yyextra->current->args +=
" noexcept(false)";
5472<FuncQual>{BN}*"noexcept"{BN}*"(" {
5474 yyextra->current->args +=
" noexcept(";
5475 yyextra->current->spec.setNoExcept(
true);
5476 yyextra->lastRoundContext=FuncQual;
5477 yyextra->pCopyRoundString=&yyextra->current->args;
5478 yyextra->roundCount=0;
5482 yyextra->current->args +=
" &";
5485<FuncQual>{BN}*"&&" {
5486 yyextra->current->args +=
" &&";
5490<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5492 yyextra->current->args +=
" = 0";
5493 yyextra->current->virt = Specifier::Pure;
5494 yyextra->current->argList.setPureSpecifier(
TRUE);
5495 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5498<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5500 yyextra->current->args +=
" = delete";
5501 yyextra->current->spec.setDelete(
true);
5502 yyextra->current->argList.setIsDeleted(
TRUE);
5503 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5506<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5508 yyextra->current->args +=
" = default";
5509 yyextra->current->spec.setDefault(
true);
5510 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5513<FuncQual>{BN}*"->"{BN}* {
5515 yyextra->current->argList.setTrailingReturnType(
" -> ");
5516 yyextra->current->args +=
" -> ";
5517 yyextra->roundCount=0;
5518 BEGIN(TrailingReturn);
5520<TrailingReturn>[{;] {
5521 if (yyextra->roundCount>0) REJECT;
5523 yyextra->current->argList.finishTrailingReturnType();
5526<TrailingReturn>"requires"{BN}+ {
5527 if (yyextra->insideJava) REJECT;
5528 yyextra->requiresContext = FuncQual;
5529 yyextra->current->req+=
' ';
5530 yyextra->current->argList.finishTrailingReturnType();
5531 BEGIN(RequiresClause);
5533<TrailingReturn>"(" {
5534 yyextra->roundCount++;
5535 yyextra->current->argList.appendTrailingReturnType(yytext);
5536 yyextra->current->args+=yytext;
5538<TrailingReturn>")" {
5539 if (yyextra->roundCount>0)
5541 yyextra->roundCount--;
5545 warn(yyextra->fileName,yyextra->yyLineNr,
5546 "Found ')' without opening '(' for trailing return type '{})...'",
5547 yyextra->current->argList.trailingReturnType());
5549 yyextra->current->argList.appendTrailingReturnType(yytext);
5550 yyextra->current->args+=yytext;
5553 yyextra->current->argList.appendTrailingReturnType(yytext);
5554 yyextra->current->args+=yytext;
5558 yyextra->current->argList.appendTrailingReturnType(yytext);
5559 yyextra->current->args+=
' ';
5561<FuncRound,FuncFunc>{BN}*","{BN}* {
5563 yyextra->current->args +=
", " ;
5565<FuncQual,FuncRound,FuncFunc>{BN}+ {
5567 yyextra->current->args +=
' ' ;
5569<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5571 yyextra->lastCPPContext = YY_START;
5575 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5582 yyextra->lastInitializerContext=YY_START;
5583 yyextra->sharpCount=0;
5584 yyextra->initBracketCount=0;
5585 yyextra->current->initializer.str(yytext);
5586 BEGIN(ReadInitializer);
5601 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5604 yyextra->requiresContext = YY_START;
5605 yyextra->current->req+=
' ';
5606 BEGIN(RequiresClause);
5608 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5611 yyextra->current->typeConstr.clear();
5612 yyextra->current->typeConstr.push_back(
Argument());
5613 yyextra->lastCSConstraint = YY_START;
5614 BEGIN( CSConstraintName );
5618 yyextra->current->args = yytext;
5619 yyextra->oldStyleArgType.clear();
5620 BEGIN(OldStyleArgs);
5624 yyextra->current->args += yytext;
5630 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5632 if (yyextra->current->doc!=yyextra->docBackup)
5634 doc=yyextra->current->doc;
5635 yyextra->current->doc=yyextra->docBackup;
5637 if (yyextra->current->brief!=yyextra->briefBackup)
5639 brief=yyextra->current->brief;
5640 yyextra->current->brief=yyextra->briefBackup;
5642 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5643 oldStyleArgName,brief,doc);
5644 yyextra->current->args.clear();
5645 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5647<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5649 if (yyextra->current->argList.empty())
5651 yyextra->current->argList.setNoParameters(
TRUE);
5657<OldStyleArgs>. { yyextra->current->args += *yytext; }
5658<FuncQual,FuncRound,FuncFunc>\" {
5659 if (yyextra->insideIDL && yyextra->insideCppQuote)
5665 yyextra->current->args += *yytext;
5668<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5669<FuncQual>{BN}*"try:" |
5670<FuncQual>{BN}*"try"{BN}+ {
5671 yyextra->insideTryBlock=
TRUE;
5673 if (yytext[yyleng-1]==
':')
5679<FuncQual>{BN}*"throw"{BN}*"(" {
5680 yyextra->current->exception =
" throw (" ;
5681 yyextra->roundCount=0;
5683 BEGIN( ExcpRound ) ;
5685<FuncQual>{BN}*"raises"{BN}*"(" {
5686 yyextra->current->exception =
" raises (" ;
5688 yyextra->roundCount=0;
5689 BEGIN( ExcpRound ) ;
5691<FuncQual>{BN}*"throws"{BN}+ {
5692 yyextra->current->exception =
" throws " ;
5696<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5697 ++yyextra->roundCount ;
5699<ExcpRound>")" { yyextra->current->exception += *yytext ;
5700 if ( yyextra->roundCount )
5701 --yyextra->roundCount ;
5706 yyextra->current->exception += *yytext;
5709 unput(
'{'); BEGIN( FuncQual );
5712 unput(
';'); BEGIN( FuncQual );
5715 yyextra->current->exception +=
' ';
5719 yyextra->current->exception += *yytext;
5721<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5722 yyextra->current->name = yyextra->current->args ;
5723 yyextra->current->args = yytext ;
5724 yyextra->roundCount=0;
5725 BEGIN( FuncRound ) ;
5728 if (!yyextra->insidePHP) BEGIN(SkipInits);
5734 yyextra->current->fileName = yyextra->fileName;
5735 yyextra->current->startLine = yyextra->yyBegLineNr;
5736 yyextra->current->startColumn = yyextra->yyBegColNr;
5737 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5739 std::string type = yyextra->current->type.str();
5743 ti = (int)
match.position();
5747 int di = yyextra->current->type.find(
"decltype(");
5748 if (di!=-1 && di<ti)
5753 int ts=yyextra->current->type.find(
'<');
5754 int te=yyextra->current->type.findRev(
'>');
5757 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5758 bool isFunction = ti==-1 ||
5759 (ts!=-1 && ts<te && ts<ti && ti<te);
5760 bool isVariable = !yyextra->current->type.isEmpty() &&
5761 (!isFunction || startsWithTypedef);
5766 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5771 if (yyextra->isTypedef && !startsWithTypedef)
5773 yyextra->current->type.prepend(
"typedef ");
5775 yyextra->current->section = EntryType::makeVariable() ;
5780 yyextra->current->section = EntryType::makeFunction() ;
5781 yyextra->current->proto = *yytext==
';';
5789 if (yyextra->isTypedef && !startsWithTypedef)
5791 yyextra->current->type.prepend(
"typedef ");
5794 yyextra->current->section = EntryType::makeVariable();
5799 yyextra->current->section = EntryType::makeFunction();
5800 yyextra->current->proto =
TRUE;
5804 if ( yyextra->insidePHP)
5808 yyextra->current->spec.setFinal(
true);
5812 yyextra->current->spec.setAbstract(
true);
5815 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5818 if ( *yytext ==
'{' )
5820 yyextra->lastCurlyContext = FindMembers;
5821 yyextra->curlyCount=0;
5826 BEGIN( FindMembers );
5831 if ( yyextra->insidePHP)
5835 yyextra->previous = yyextra->current;
5836 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5839 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5841 yyextra->current->spec.setOptional(
true).setRequired(
true);
5843 yyextra->lastCurlyContext = FindMembers;
5844 if ( *yytext ==
',' )
5846 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5848 if ( *yytext ==
'{' )
5850 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5852 yyextra->previous->spec.setInline(
true);
5855 yyextra->curlyCount=0;
5856 BEGIN( SkipCurly ) ;
5860 if (!yyextra->previous->section.isVariable())
5861 yyextra->previous->bodyLine=-1;
5862 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...
5866<SkipInits>">"{BN}*"{" {
5868 yyextra->curlyCount=1;
5869 BEGIN(SkipC11Inits);
5871<SkipInits>{ID}{BN}*"{" {
5873 yyextra->curlyCount=1;
5874 BEGIN(SkipC11Inits);
5877 ++yyextra->curlyCount;
5880 if ( --yyextra->curlyCount<=0 )
5885<SkipC11Attribute>"]]" {
5886 BEGIN(yyextra->lastC11AttributeContext);
5894 ++yyextra->curlyCount ;
5896<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5899 if( yyextra->curlyCount )
5901 --yyextra->curlyCount ;
5905 if (!yyextra->current->sli.empty() && yyextra->previous)
5907 yyextra->previous->sli = yyextra->current->sli;
5908 yyextra->current->sli.clear();
5910 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5911 BEGIN( yyextra->lastCurlyContext ) ;
5914<SkipCurly>"}"{BN}*{DCOMM}"<" {
5916 if ( yyextra->curlyCount )
5919 --yyextra->curlyCount ;
5923 yyextra->current->endBodyLine=yyextra->yyLineNr;
5924 yyextra->tempEntry = yyextra->current;
5925 yyextra->current = yyextra->previous;
5927 yyextra->docBlockContext = SkipCurlyEndDoc;
5928 yyextra->docBlockInBody =
FALSE;
5929 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5931 yyextra->docBlock.str(std::string());
5932 yyextra->docBlockTerm =
'}';
5933 if (yytext[yyleng-3]==
'/')
5945<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5946 yyextra->docBlockContext = SkipCurlyEndDoc;
5947 yyextra->docBlockInBody =
FALSE;
5948 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5950 yyextra->docBlock.str(std::string());
5951 yyextra->docBlockTerm =
'}';
5952 if (yytext[yyleng-3]==
'/')
5963<SkipCurlyEndDoc>"}" {
5965 if (yyextra->tempEntry)
5967 yyextra->current = yyextra->tempEntry;
5968 yyextra->tempEntry.reset();
5970 BEGIN( yyextra->lastCurlyContext );
5974 yyextra->lastStringContext=SkipCurly;
5975 BEGIN( SkipString );
5977<SkipCurly>^{B}*"#" {
5978 if (yyextra->insidePHP)
5981 BEGIN( SkipCurlyCpp );
5983<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5987<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5988 if (!yyextra->insidePHP)
5994 yyextra->lastHereDocContext = YY_START;
5998<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6000 yyextra->lastRawStringContext = YY_START;
6001 yyextra->dummyRawString.clear();
6002 yyextra->pCopyRawString = &yyextra->dummyRawString;
6003 *yyextra->pCopyRawString += yytext;
6006<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6010<SkipCurly,SkipCurlyCpp>"\$" {}
6014 yyextra->lastCurlyContext = FindMembers;
6017<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6021<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
6023 yyextra->lastCContext = YY_START;
6026<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
6028 yyextra->lastCContext = YY_START;
6029 BEGIN(SkipCxxComment);
6031<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6032 yyextra->roundCount=0;
6033 yyextra->lastSkipRoundContext=YY_START;
6036<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6037 yyextra->lastStringContext=YY_START;
6038 BEGIN( SkipString );
6041 warn(yyextra->fileName,yyextra->yyLineNr,
6042 "Found ';' while parsing initializer list! "
6043 "(doxygen could be confused by a macro call without semicolon)"
6045 BEGIN( FindMembers );
6047<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6048 if (!yyextra->insidePHP)
6051 yyextra->lastCContext = YY_START;
6052 BEGIN(SkipCxxComment);
6054<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
6055 if (!yyextra->insideCS) REJECT;
6058 yyextra->lastSkipVerbStringContext=YY_START;
6059 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6060 yyextra->dummyTextStream.clear();
6061 BEGIN(SkipVerbString);
6063<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
6064 if (yyextra->insidePHP) REJECT;
6066<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6067 if (yyextra->insidePHP)
6069 yyextra->lastStringContext=YY_START;
6070 BEGIN(SkipPHPString);
6073<SkipC11Attribute>{ID} {
6076 yyextra->current->spec.setNoDiscard(
true);
6079<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
6080<SkipString,SkipPHPString>\\. { }
6082 BEGIN( yyextra->lastStringContext );
6085 BEGIN( yyextra->lastStringContext );
6087<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6088<SkipString,SkipPHPString>\n {
6092<SkipString,SkipPHPString>. { }
6098 yyextra->current->section = EntryType::makeEmpty() ;
6099 yyextra->current->type.clear() ;
6100 yyextra->current->name.clear() ;
6101 yyextra->current->args.clear() ;
6102 yyextra->current->argList.clear();
6103 BEGIN( FindMembers ) ;
6106 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6110 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6114 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6116 if (!yyextra->baseName.isEmpty())
6118 yyextra->current->extends.emplace_back(
6119 yyextra->baseName,Protection::Public,Specifier::Normal);
6120 yyextra->baseName.clear();
6122 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6127 yyextra->current->section = EntryType::makeEmpty() ;
6128 yyextra->current->type.clear() ;
6129 yyextra->current->name.clear() ;
6130 yyextra->current->args.clear() ;
6131 yyextra->current->argList.clear();
6133 BEGIN( FindMembers ) ;
6135<CompoundName>{SCOPENAME}/{BN}*"<" {
6136 yyextra->sharpCount = 0;
6137 yyextra->current->name = yytext ;
6139 if (yyextra->current->spec.isProtocol())
6141 yyextra->current->name+=
"-p";
6144 yyextra->lastClassTemplSpecContext = ClassVar;
6145 if (yyextra->insideObjC)
6147 BEGIN( ObjCProtocolList );
6149 else if (yyextra->insideCS)
6156 yyextra->roundCount=0;
6157 BEGIN( ClassTemplSpec );
6164 yyextra->current->tArgLists.
push_back(al);
6165 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6166 yyextra->templateStr=
"<";
6167 yyextra->current->name +=
"<";
6168 yyextra->fullArgString = yyextra->templateStr;
6169 yyextra->copyArgString = &yyextra->current->name;
6171 yyextra->currentArgumentContext = ClassVar;
6172 BEGIN( ReadTempArgs );
6174<ObjCProtocolList>"<" {
6175 yyextra->insideProtocolList=
TRUE;
6178<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6179 yyextra->current->name += yytext;
6181 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6184 if (yyextra->current->spec.isProtocol())
6191 BEGIN( yyextra->lastClassTemplSpecContext );
6195<ClassTemplSpec>"<" {
6196 yyextra->current->name += yytext;
6197 if (yyextra->roundCount==0) yyextra->sharpCount++;
6200 yyextra->current->name += yytext;
6202<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6203 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6207 yyextra->current->name =
substitute(yytext,
".",
"::");
6208 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6213 else if (!yyextra->current->tArgLists.empty())
6217 yyextra->current->name = yytext;
6218 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6221 QCString rn = yyextra->current_root->name;
6223 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6227 yyextra->current->spec.setForwardDecl(
true);
6228 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6230 else if (yyextra->insideIDL &&
6231 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6232 yyextra->current->spec.isInterface()) ||
6233 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6234 yyextra->current->spec.isService())
6242 yyextra->current->name = yytext;
6243 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6244 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6247 yyextra->current->spec.setInterface(
false).setService(
false);
6251 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6254 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6257 yyextra->current->reset();
6259 if (yyextra->insideObjC)
6261 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6262 yyextra->insideObjC =
FALSE;
6264 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6266 yyextra->current->type.prepend(
"typedef");
6268 BEGIN( FindMembers );
Wrapper class for the Entry type.
6271<CompoundName>{SCOPENAME}/{BN}*"(" {
6272 yyextra->current->name = yytext ;
6275 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6277 yyextra->lastAlignAsContext = YY_START;
6282 if (yyextra->current->spec.isProtocol())
6284 yyextra->current->name +=
"-p";
6289<AlignAs>"(" { yyextra->roundCount=0;
6290 BEGIN( AlignAsEnd );
6294<AlignAsEnd>"(" { yyextra->roundCount++; }
6295<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6297 BEGIN( yyextra->lastAlignAsContext );
6303 yyextra->current->name = yytext ;
6307 yyextra->current->bodyLine = yyextra->yyLineNr;
6308 yyextra->current->bodyColumn = yyextra->yyColNr;
6309 yyextra->current->initializer.str(std::string());
6310 yyextra->lastInitializerContext = FindMembers;
6311 yyextra->sharpCount=0;
6312 yyextra->initBracketCount=0;
6313 BEGIN(ReadInitializer);
6315<CompoundName>{SCOPENAME}/{BN}*"," {
6317 yyextra->current->reset();
6320<CompoundName>{SCOPENAME} {
6321 yyextra->current->name = yytext ;
6324 if (yyextra->current->spec.isProtocol())
6326 yyextra->current->name +=
"-p";
6328 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6334<CompoundName>{CSSCOPENAME} {
6335 yyextra->current->name =
substitute(yytext,
".",
"::");
6339<ClassVar>{SCOPENAME}{BNopt}/"(" {
6340 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6343 yyextra->roundCount=0;
6344 BEGIN(SkipUnionSwitch);
6349 yyextra->yyBegColNr=yyextra->yyColNr;
6350 yyextra->yyBegLineNr=yyextra->yyLineNr;
6351 yyextra->current->name = yytext;
6352 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6355 BEGIN( FindMembers );
6359 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6363 yyextra->current->type.prepend(
"typedef ");
6371<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6372 if (yyextra->insideCli)
6375 yyextra->current->spec.setSealedClass(
true);
6377 yyextra->current->spec.setAbstractClass(
true);
6385<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6386 yyextra->yyBegColNr=yyextra->yyColNr;
6387 yyextra->yyBegLineNr=yyextra->yyLineNr;
6390 if (yyextra->current->section.isEnum())
6392 yyextra->current->section = EntryType::makeVariable() ;
6394 yyextra->current->type +=
' ' ;
6395 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...
6404 yyextra->yyBegColNr=yyextra->yyColNr;
6405 yyextra->yyBegLineNr=yyextra->yyLineNr;
6407 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6410 yyextra->roundCount=0;
6411 BEGIN(SkipUnionSwitch);
6413 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6415 yyextra->current->type.clear();
6416 yyextra->baseProt = Protection::Public;
6417 yyextra->baseVirt = Specifier::Normal;
6418 yyextra->baseName.clear();
6419 BEGIN( BasesProt ) ;
6421 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6423 yyextra->current->typeConstr.clear();
6424 yyextra->current->typeConstr.push_back(
Argument());
6425 yyextra->lastCSConstraint = YY_START;
6426 BEGIN( CSConstraintName );
6428 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6430 yyextra->current->spec.setAbstract(
true);
6432 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6434 yyextra->current->spec.setSealed(
true);
6436 else if (
qstrcmp(yytext,
"final")==0)
6438 yyextra->current->spec.setFinal(
true);
6442 if (yyextra->current->section.isEnum())
6444 yyextra->current->section = EntryType::makeVariable() ;
6446 yyextra->current->type +=
' ' ;
6447 yyextra->current->type += yyextra->current->name ;
6448 yyextra->current->name = yytext ;
6457 if (yyextra->insideObjC && *yytext==
'(')
6459 yyextra->current->name+=
'(';
6462 yyextra->current->spec.setCategory(
true);
6464 BEGIN( ClassCategory );
6470 BEGIN( FindMembers );
6473<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6474<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6475 yyextra->fullArgString.clear();
6476 yyextra->lastCopyArgChar=
'#';
6477 yyextra->lastCommentInArgContext=YY_START;
6479 BEGIN( CopyArgCommentLine );
6481 BEGIN( CopyArgComment );
6483<CSConstraintType,CSConstraintName>"#" {
6484 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6486<CSConstraintType>"=>" {
6491 BEGIN( yyextra->lastCSConstraint );
6493<CSConstraintType>"{" {
6497 BEGIN( yyextra->lastCSConstraint );
6499<CSConstraintType,CSConstraintName>";" {
6502 BEGIN( yyextra->lastCSConstraint );
6504<CSConstraintName>":" {
6505 BEGIN( CSConstraintType );
6507<CSConstraintName>{ID} {
6509 yyextra->current->typeConstr.back().name=yytext;
6511<CSConstraintType>"where" {
6512 yyextra->current->typeConstr.push_back(
Argument());
6513 BEGIN( CSConstraintName );
6515<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6516 if (yyextra->current->typeConstr.back().type.isEmpty())
6519 yyextra->current->typeConstr.back().type=yytext;
6523 QCString name = yyextra->current->typeConstr.back().name;
6524 yyextra->current->typeConstr.push_back(
Argument());
6525 yyextra->current->typeConstr.back().name=name;
6526 yyextra->current->typeConstr.back().type=yytext;
6529<CSConstraintName,CSConstraintType>\n {
6532<CSConstraintName,CSConstraintType>. {
6534<ClassCategory>{ID} {
6535 yyextra->current->name+=yytext;
6537<ClassCategory>")"/{BN}*"{" {
6538 yyextra->current->name+=
')';
6541<ClassCategory>")"/{BN}*"<" {
6542 yyextra->current->name+=
')';
6543 BEGIN( ObjCProtocolList );
6546 yyextra->current->name+=
')';
6547 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6559 if (yyextra->current->section.isVariable())
6561 yyextra->current->bitfields+=
":";
6562 yyextra->current->args.clear();
6565 else if (yyextra->current->section.isEnum())
6568 yyextra->current->args.clear();
6569 BEGIN(EnumBaseType);
6573 yyextra->current->type.clear();
6574 if (yyextra->current->spec.isInterface() ||
6575 yyextra->current->spec.isStruct() ||
6576 yyextra->current->spec.isRef() ||
6577 yyextra->current->spec.isValue() ||
6578 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6581 yyextra->baseProt = Protection::Public;
6585 yyextra->baseProt = Protection::Private;
6587 yyextra->baseVirt = Specifier::Normal;
6588 yyextra->baseName.clear();
6589 BEGIN( BasesProt ) ;
6593 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef"))
6595 yyextra->current->type.prepend(
"typedef");
6597 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6599 yyextra->current->section = EntryType::makeVariable() ;
6601 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6603 yyextra->current->reset();
6610 BEGIN( FindMembers );
6612<Bases,ClassVar>{CPPC}"/"/[^/] {
6613 if (!yyextra->insideObjC)
6620 yyextra->current->program << yytext;
6621 yyextra->current->fileName = yyextra->fileName ;
6622 yyextra->current->startLine = yyextra->yyLineNr ;
6623 yyextra->current->startColumn = yyextra->yyColNr;
6624 yyextra->curlyCount=0;
6625 BEGIN( ReadBodyIntf );
6628<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6629<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6630<Bases,ClassVar>{CPPC}"!" |
6631<Bases,ClassVar>[\-+]{BN}* {
6632 if (!yyextra->insideObjC)
6639 yyextra->current->program << yytext;
6640 yyextra->current->fileName = yyextra->fileName ;
6641 yyextra->current->startLine = yyextra->yyLineNr ;
6642 yyextra->current->startColumn = yyextra->yyColNr;
6643 yyextra->curlyCount=0;
6644 BEGIN( ReadBodyIntf );
6647<CompoundName,ClassVar>{B}*"{"{B}* {
6648 yyextra->current->program.str(std::string());
6649 yyextra->current->fileName = yyextra->fileName ;
6650 yyextra->current->bodyLine = yyextra->yyLineNr;
6651 yyextra->current->bodyColumn = yyextra->yyColNr;
6653 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6655 if (yyextra->current->section.isNamespace())
6659 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6671 yyextra->curlyCount=0;
6672 if (yyextra->current_root &&
6673 !yyextra->current_root->spec.isInterface() &&
6674 (yyextra->current->spec.isInterface() ||
6675 yyextra->current->spec.isProtocol() ||
6676 yyextra->current->spec.isCategory() ||
6677 yyextra->current->section.isObjcImpl()
6682 BEGIN( ReadBodyIntf );
6684 else if (yyextra->current->section.isNamespace())
6686 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6693<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6694<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6695<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6696<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6697<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6698<BasesProt>{BN} {
lineCount(yyscanner); }
6699<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6700<Bases>"decltype"{BN}*"(" {
6702 yyextra->roundCount=0;
6703 yyextra->lastSkipRoundContext=YY_START;
6706<Bases>("\\")?({ID}"\\")*{ID} {
6707 if (!yyextra->insidePHP)
6716 yyextra->baseName += bn;
6717 yyextra->current->args +=
' ';
6718 yyextra->current->args += yytext;
6721<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6727 yyextra->current->typeConstr.clear();
6728 yyextra->current->typeConstr.push_back(
Argument());
6729 yyextra->lastCSConstraint = YY_START;
6730 BEGIN( CSConstraintName );
6734 yyextra->baseName+=yytext;
6735 yyextra->current->args +=
' ';
6736 yyextra->current->args += yytext;
6739<Bases>{BN}*{ID}("."{ID})* {
6741 yyextra->baseName += name;
6742 yyextra->current->args +=
' ';
6743 yyextra->current->args += name;
6745<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6746 if (!yyextra->insideObjC)
6756<ClassVar,Bases>"@end" {
6764<ClassVar>"<" { yyextra->current->name += *yytext;
6765 yyextra->sharpCount=1;
6766 yyextra->roundCount=0;
6767 yyextra->lastSkipSharpContext = YY_START;
6768 yyextra->specName = &yyextra->current->name;
6769 BEGIN ( Specialization );
6773 yyextra->sharpCount=1;
6774 yyextra->roundCount=0;
6775 yyextra->lastSkipSharpContext = YY_START;
6776 if (yyextra->insideObjC)
6786 yyextra->templateStr = yytext;
6787 yyextra->specName = &yyextra->templateStr;
6788 BEGIN ( Specialization );
6791<Specialization>"<" { *yyextra->specName += *yytext;
6792 if (yyextra->roundCount==0) yyextra->sharpCount++;
6794<Specialization>">" {
6795 *yyextra->specName += *yytext;
6796 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6799 BEGIN(yyextra->lastSkipSharpContext);
6802<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6803<Specialization>"<<" { *yyextra->specName += yytext; }
6804<Specialization>">>"/{B}*"::" {
6809<Specialization>">>" {
6810 if (yyextra->insideCS)
6820 if (yyextra->roundCount>0)
6822 *yyextra->specName += yytext;
6832<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6833<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6834<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6836<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6837<Specialization>"\\'" { *yyextra->specName += *yytext;}
6838<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6839<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6840<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6841<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6842<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6843<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6844<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6845<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6846<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6849 *yyextra->specName += *yytext;
6851<SkipRound>"(" { ++yyextra->roundCount; }
6852<SkipRound>")" {
if (--yyextra->roundCount<0)
6853 BEGIN ( yyextra->lastSkipRoundContext );
6856 yyextra->lastStringContext=SkipRound;
6859<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6860 if (yyextra->insideProtocolList)
6862 yyextra->baseName+=
"-p";
6866 yyextra->current->args +=
',' ;
6869 if (!yyextra->baseName.isEmpty())
6871 yyextra->current->extends.emplace_back(
6872 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6875 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6876 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6877 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6879 yyextra->baseProt=Protection::Public;
6883 yyextra->baseProt=Protection::Private;
6885 yyextra->baseVirt=Specifier::Normal;
6886 yyextra->baseName.clear();
6889 yyextra->insideProtocolList=
FALSE;
6901 if (*yytext==
',' && yyextra->insideObjC)
6903 yyextra->insideProtocolList=
TRUE;
6909 yyextra->current->program.str(std::string());
6910 yyextra->current->fileName = yyextra->fileName ;
6911 yyextra->current->bodyLine = yyextra->yyLineNr;
6912 yyextra->current->bodyColumn = yyextra->yyColNr;
6914 if (!yyextra->baseName.isEmpty())
6915 yyextra->current->extends.emplace_back(
6916 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6918 yyextra->curlyCount=0;
6919 if (yyextra->insideObjC)
6921 BEGIN( ReadBodyIntf );
6928<SkipUnionSwitch>{B}*"(" {
6929 yyextra->roundCount++;
6931<SkipUnionSwitch>")" {
6932 if (--yyextra->roundCount==0)
6937<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6939<Comment>{BN}+ { yyextra->current->program << yytext ;
6942<Comment>{CCS} { yyextra->current->program << yytext ; }
6943<Comment>{CPPC} { yyextra->current->program << yytext ; }
6944<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6945 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6946 yyextra->current->program << yytext ;
6948<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6949 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6950 yyextra->current->program << yytext ;
6952<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6953<Comment>{CCE} { yyextra->current->program << yytext ;
6954 if (!yyextra->insideCode)
6956 yyextra->doxygenComment=
false;
6957 BEGIN( yyextra->lastContext );
6960<Comment>. { yyextra->current->program << *yytext ; }
6962<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6964 if (!yyextra->current->doc.isEmpty())
6966 yyextra->current->doc+=
"\n\n";
6970 yyextra->current->docLine = yyextra->yyLineNr;
6971 yyextra->current->docFile = yyextra->fileName;
6974 yyextra->lastDocContext = YY_START;
6975 if (yyextra->current_root->section.isScope())
6977 yyextra->current->inside = yyextra->current_root->name+
"::";
6979 yyextra->docBlockContext = YY_START;
6980 yyextra->docBlockInBody = YY_START==SkipCurly;
6985 yyextra->docBlock.
str(indent.
str());
6987 if (yyextra->docBlockAutoBrief)
6989 yyextra->current->briefLine = yyextra->yyLineNr;
6990 yyextra->current->briefFile = yyextra->fileName;
6995<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7001 yyextra->lastDocContext = YY_START;
7004 if (yyextra->current_root->section.isScope())
7006 yyextra->current->inside = yyextra->current_root->name+
"::";
7008 yyextra->current->docLine = yyextra->yyLineNr;
7009 yyextra->current->docFile = yyextra->fileName;
7010 yyextra->docBlockContext = YY_START;
7011 yyextra->docBlockInBody = YY_START==SkipCurly;
7013 yyextra->docBlockAutoBrief = javadocAutoBrief;
7017 yyextra->docBlock.
str(indent.
str());
7019 if (yyextra->docBlockAutoBrief)
7021 yyextra->current->briefLine = yyextra->yyLineNr;
7022 yyextra->current->briefFile = yyextra->fileName;
7029 yyextra->current->program << yytext ;
7030 yyextra->lastContext = YY_START ;
7031 yyextra->doxygenComment=
true;
7035<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7040<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7041 yyextra->lastDocContext = YY_START;
7044 if (yyextra->current_root->section.isScope())
7046 yyextra->current->inside = yyextra->current_root->name+
"::";
7048 yyextra->current->docLine = yyextra->yyLineNr;
7049 yyextra->current->docFile = yyextra->fileName;
7050 yyextra->docBlockContext = YY_START;
7051 yyextra->docBlockInBody = YY_START==SkipCurly;
7053 yyextra->docBlockAutoBrief = javadocAutoBrief;
7057 yyextra->docBlock.
str(indent.
str());
7059 if (yyextra->docBlockAutoBrief)
7061 yyextra->current->briefLine = yyextra->yyLineNr;
7062 yyextra->current->briefFile = yyextra->fileName;
7067<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7068 yyextra->lastDocContext = YY_START;
7069 if (yyextra->current_root->section.isScope())
7071 yyextra->current->inside = yyextra->current_root->name+
"::";
7073 yyextra->docBlockContext = YY_START;
7074 yyextra->docBlockInBody = YY_START==SkipCurly;
7075 yyextra->docBlockAutoBrief =
FALSE;
7079 yyextra->docBlock.
str(indent.
str());
7084<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7085 yyextra->lastDocContext = YY_START;
7086 if (yyextra->current_root->section.isScope())
7088 yyextra->current->inside = yyextra->current_root->name+
"::";
7090 yyextra->docBlockContext = YY_START;
7091 yyextra->docBlockInBody = YY_START==SkipCurly;
7092 yyextra->docBlockAutoBrief =
FALSE;
7095 yyextra->docBlock.
str(indent.
str());
7099<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7101 yyextra->externLinkage=
TRUE;
7104 if (yyextra->externLinkage)
7106 yyextra->externLinkage=
FALSE;
7108 else if (yyextra->insideCS &&
7109 !yyextra->current->name.isEmpty() &&
7110 !yyextra->current->type.isEmpty())
7112 if (yyextra->current->mtype == MethodTypes::Event)
7114 yyextra->mtype = MethodTypes::Event;
7118 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7122 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7124 yyextra->current->bodyLine = yyextra->yyLineNr;
7125 yyextra->current->bodyColumn = yyextra->yyColNr;
7126 yyextra->curlyCount=0;
7127 BEGIN( CSAccessorDecl );
7129 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7133 yyextra->current->exception =
" {";
7134 BEGIN(UNOIDLAttributeBlock);
7138 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7139 yyextra->current->name.isEmpty()
7143 yyextra->needsSemi =
FALSE;
7144 if (yyextra->current->isStatic)
7146 yyextra->current->name=
"[static initializer]";
7147 yyextra->current->type.clear();
7151 yyextra->current->name=
"[instance initializer]";
7168 yyextra->current->bodyLine = yyextra->yyLineNr;
7169 yyextra->current->bodyColumn = yyextra->yyColNr;
7170 yyextra->current->initializer.str(yytext);
7171 yyextra->lastInitializerContext = YY_START;
7172 yyextra->sharpCount=0;
7173 yyextra->initBracketCount=1;
7174 BEGIN(ReadInitializer);
7178<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7179<CSAccessorDecl>"}"{B}*"=" {
7181 if (yyextra->curlyCount != 0) REJECT;
7182 yyextra->current->initializer.str(
"=");
7183 yyextra->current->endBodyLine=yyextra->yyLineNr;
7184 yyextra->lastInitializerContext = FindMembers;
7185 BEGIN(ReadInitializer);
7187<CSAccessorDecl>"}" {
7188 if (yyextra->curlyCount)
7190 yyextra->curlyCount--;
7194 yyextra->mtype = MethodTypes::Method;
7195 yyextra->virt = Specifier::Normal;
7197 yyextra->current->endBodyLine=yyextra->yyLineNr;
7202<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7203<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7204<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7205<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7206<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7207<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7208<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7209<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7210<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7211<CSAccessorDecl>{CHARLIT} {}
7212<CSAccessorDecl>"\"" { BEGIN(CSString);}
7213<CSAccessorDecl>"." {}
7214<CSAccessorDecl>\n {
lineCount(yyscanner); }
7215<CSString>"\"" { BEGIN(CSAccessorDecl);}
7223<SliceSequence>{SCOPENAME} {
7224 if (yyextra->current->spec.isLocal())
7226 yyextra->current->type =
"local ";
7228 yyextra->current->type +=
"sequence<";
7229 yyextra->current->type += yytext;
7230 yyextra->current->type +=
">";
7233<SliceSequence>{BN}*">"{BN}* {
7235 BEGIN(SliceSequenceName);
7238<SliceSequenceName>{ID}{BN}* {
7240 yyextra->current->name = yytext ;
7241 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7244<SliceSequenceName>";" {
7245 yyextra->current->section = EntryType::makeVariable();
7246 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7251<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7253 if (yyextra->current->spec.isLocal())
7255 yyextra->current->type =
"local ";
7257 yyextra->current->type +=
"dictionary<";
7258 yyextra->current->type += yytext;
7259 yyextra->current->type +=
">";
7260 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7263<SliceDictionary>{BN}*">"{BN}* {
7265 BEGIN(SliceDictionaryName);
7268<SliceDictionaryName>{ID}{BN}* {
7270 yyextra->current->name = yytext ;
7271 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7274<SliceDictionaryName>";" {
7275 yyextra->current->section = EntryType::makeVariable();
7276 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7286<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7287 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7288 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7291<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7292 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7293 BEGIN( yyextra->docBlockContext );
7295<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7296 yyextra->docBlock << yytext;
7297 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7298 BEGIN( yyextra->docBlockContext );
7300<DocLine>{NONLopt}/"\n" {
7301 yyextra->docBlock << yytext;
7302 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7303 BEGIN( yyextra->docBlockContext );
7308<DocBlock>"*"*{CCE} {
7310 BEGIN(yyextra->docBlockContext);
7312<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7315 yyextra->docBlock <<
"\\ilinebr " << indent;
7317<DocBlock>^{B}*"*"+/[^/] {
7320 yyextra->docBlock << indent;
7322<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7325 yyextra->docBlock << indent;
7327<DocBlock>^{B}*({CPPC}){B}* {
7330 yyextra->docBlock << yytext;
7334 yyextra->docBlock << yytext;
7336<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7337 yyextra->docBlock << yytext;
7339<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7340 yyextra->docBlock << yytext;
7341 char blockName[] =
"f$";
7343 if (c==
'[') blockName[1]=
']';
7344 else if (c==
'{') blockName[1]=
'}';
7345 else if (c==
'(') blockName[1]=
')';
7347 BEGIN(DocCopyBlock);
7349<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7350 yyextra->fileName = &yytext[6];
7351 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7352 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7353 yyextra->docBlock << yytext;
7355<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7356 yyextra->fileName = &yytext[6];
7357 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7358 yyextra->docBlock << yytext;
7360<DocBlock>{CMD}"iline"{LINENR}{B} {
7365 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7369 yyextra->yyLineNr = nr;
7371 yyextra->docBlock << yytext;
7373<DocBlock>{B}*"<"{PRE}">" {
7374 yyextra->docBlock << yytext;
7376 BEGIN(DocCopyBlock);
7378<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7379 yyextra->docBlock << yytext;
7381 BEGIN(DocCopyBlock);
7383<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7384 yyextra->docBlock << yytext;
7386 BEGIN(DocCopyBlock);
7388<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7389 yyextra->docBlock << yytext;
7391 BEGIN(DocCopyBlock);
7393<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7395 yyextra->docBlock <<
"\\ilinebr ";
7396 yyextra->docBlock << pat;
7398 BEGIN(DocCopyBlock);
7400<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7402 yyextra->docBlock << pat;
7404 BEGIN(DocCopyBlock);
7406<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7407<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7408<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7410 yyextra->docBlock <<
"\\ilinebr ";
7411 yyextra->docBlock << pat;
7413 BEGIN(DocCopyBlock);
7415<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7416<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7417<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7419 yyextra->docBlock << pat;
7421 BEGIN(DocCopyBlock);
7424 yyextra->docBlock <<
"```";
7427 yyextra->docBlock << yytext;
7430 yyextra->docBlock << yytext;
7432 BEGIN(DocCopyBlock);
7434<DocBlock>{B}*"<"{CODE}">" {
7435 if (yyextra->insideCS)
7437 yyextra->docBlock << yytext;
7439 BEGIN(DocCopyBlock);
7446<DocBlock>[^@*~`'\/\\\n]+ {
7447 yyextra->docBlock << yytext;
7451 yyextra->docBlock << *yytext;
7454 yyextra->docBlock << *yytext;
7459<DocCopyBlock>"</"{PRE}">" {
7464 yyextra->docBlock << yytext;
7466<DocCopyBlock>"</"{CODE}">" {
7471 yyextra->docBlock << yytext;
7473<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7478 yyextra->docBlock << yytext;
7480<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7485 yyextra->docBlock << yytext;
7487<DocCopyBlock>^{B}*"*"+/{BN}+ {
7488 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7496 yyextra->docBlock << indent;
7499<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7500 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7504 yyextra->docBlock << indent;
7511<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7512 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7516 yyextra->docBlock << indent+
"*";
7523<DocCopyBlock>^{B}*"*"+/{BN}* {
7524 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7527 if (yyextra->nestedComment>0)
7530 yyextra->docBlock << indent+
"*";
7535 yyextra->docBlock << indent;
7543<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7549 yyextra->docBlock << pat;
7551<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7557 yyextra->docBlock << pat;
7559<DocCopyBlock>"```" {
7560 if (yyextra->docBlockName==
"``")
7562 yyextra->docBlock <<
"`";
7564 yyextra->docBlock <<
"``";
7569 yyextra->docBlock << yytext;
7572<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7577 yyextra->docBlock << yytext;
7579<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7584 yyextra->docBlock << yytext;
7586<DocCopyBlock>"`"{1,2} {
7591 yyextra->docBlock << yytext;
7593<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7594 yyextra->docBlock << yytext;
7597 yyextra->docBlock << yytext;
7598 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7602 yyextra->lastStringContext=YY_START;
7603 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7604 yyextra->stopAtInvalidString=
true;
7608<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7611 yyextra->nestedComment++;
7613 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7615 yyextra->nestedComment--;
7617 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7619 warn(yyextra->fileName,yyextra->yyLineNr,
7620 "Found end of C comment inside a '{}' block without matching start of the comment!"
7621 " Maybe the end marker for the block is missing?",
7622 yyextra->docBlockName);
7625 yyextra->docBlock << yytext;
7628 yyextra->docBlock << *yytext;
7632 yyextra->docBlock << *yytext;
7634<DocCopyBlock><<EOF>> {
7635 warn(yyextra->fileName,yyextra->yyLineNr,
7636 "reached end of file while inside a '{}' block!"
7637 " The command that should end the block seems to be missing!",
7638 yyextra->docBlockName);
7645<Prototype>"operator"{B}*"("{B}*")" {
7646 yyextra->current->name+=yytext;
7649 yyextra->current->args+=*yytext;
7650 yyextra->currentArgumentContext = PrototypeQual;
7651 yyextra->fullArgString = yyextra->current->args;
7652 yyextra->copyArgString = &yyextra->current->args;
7653 BEGIN( ReadFuncArgType ) ;
7655<Prototype>"("({ID}"::")*({B}*[&*])+ {
7656 if (yyextra->insidePHP)
7662 yyextra->current->type+=yyextra->current->name+yytext;
7663 yyextra->current->name.clear();
7664 BEGIN( PrototypePtr );
7667<PrototypePtr>{SCOPENAME} {
7668 yyextra->current->name+=yytext;
7671 yyextra->current->args+=*yytext;
7672 yyextra->currentArgumentContext = PrototypeQual;
7673 yyextra->fullArgString = yyextra->current->args;
7674 yyextra->copyArgString = &yyextra->current->args;
7675 BEGIN( ReadFuncArgType ) ;
7678 yyextra->current->type+=
')';
7682 yyextra->current->name+=yytext;
7685 BEGIN( PrototypeSkipLine);
7687<PrototypeQual>{B}*"const"{B}* {
7688 yyextra->current->args +=
" const ";
7689 yyextra->current->argList.setConstSpecifier(
TRUE);
7691<PrototypeQual>{B}*"volatile"{B}* {
7692 yyextra->current->args +=
" volatile ";
7693 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7695<PrototypeQual>{B}*"="{B}*"0"{B}* {
7696 yyextra->current->args +=
" = 0";
7697 yyextra->current->virt = Specifier::Pure;
7698 yyextra->current->argList.setPureSpecifier(
TRUE);
7700<PrototypeQual>"throw"{B}*"(" {
7701 yyextra->current->exception =
"throw(";
7702 BEGIN(PrototypeExc);
7705 yyextra->current->exception +=
')';
7706 BEGIN(PrototypeQual);
7709 yyextra->current->exception += *yytext;
7712 yyextra->current->args += *yytext;
7715 yyextra->current->name += *yytext;
7717<PrototypeSkipLine>. {
7723<SkipCxxComment>.*"\\\n" {
7724 if (yyextra->insideCS)
7733<SkipCxxComment>{ANYopt}/\n {
7734 BEGIN( yyextra->lastCContext ) ;
7736<SkipComment>[^\*\n]+
7741 if (!yyextra->insideCpp) REJECT;
7742 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7743 yyextra->lastC11AttributeContext = YY_START;
7744 BEGIN( SkipC11Attribute );
7749 if (yyextra->insideIDL && yyextra->insideCppQuote)
7753 else if (yyextra->insidePHP)
7755 yyextra->lastStringContext=YY_START;
7760 if (!yyextra->insidePHP)
7762 yyextra->lastCPPContext = YY_START;
7767 yyextra->lastCContext = YY_START ;
7768 BEGIN( SkipCxxComment ) ;
7772 if (!yyextra->insidePHP)
7774 yyextra->lastCContext = YY_START ;
7775 BEGIN( SkipCxxComment ) ;
7778 if (yyextra->insidePHP)
7780 yyextra->lastStringContext=YY_START;
7781 BEGIN(SkipPHPString);
7785 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7787 if (yyextra->current->type.isEmpty())
7789 if (yyextra->current->name.isEmpty())
7790 yyextra->current->name=
"?";
7792 yyextra->current->name+=
"?";
7796 yyextra->current->type+=
"?";
7800<*>"}" { yyextra->exported=
false; }
7802<SkipComment>{CPPC}|{CCS}
7803<*>{CCS} { yyextra->lastCContext = YY_START ;
7804 BEGIN( SkipComment ) ;
7806<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7808 yyextra->lastCContext = YY_START ;
7809 BEGIN( SkipCxxComment ) ;
7812 if (yyextra->insideCS && yyextra->fakeNS)
7816 BEGIN ( ReadNSBody);
7828 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7830 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7832 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7842 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7843 yyextra->outerScopeEntries.clear();
7844 yyextra->baseName.clear();
7845 yyextra->protection = Protection::Public;
7846 yyextra->baseProt = Protection::Public;
7847 yyextra->sharpCount = 0;
7848 yyextra->roundCount = 0;
7849 yyextra->curlyCount = 0;
7850 yyextra->mtype = MethodTypes::Method;
7851 yyextra->isStatic =
FALSE;
7852 yyextra->virt = Specifier::Normal;
7853 yyextra->baseVirt = Specifier::Normal;
7854 yyextra->isTypedef =
FALSE;
7855 yyextra->insideTryBlock =
FALSE;
7856 yyextra->insideFormula =
FALSE;
7857 yyextra->insideCode=
FALSE;
7859 yyextra->previous = 0;
7860 yyextra->firstTypedefEntry.reset();
7861 yyextra->memspecEntry.reset();
7866 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7867 if (yyextra->insideJava)
7869 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7871 yyextra->current->protection = yyextra->protection;
7872 yyextra->current->exported = yyextra->exported ;
7873 yyextra->current->mtype = yyextra->mtype;
7874 yyextra->current->virt = yyextra->virt;
7875 yyextra->current->isStatic = yyextra->isStatic;
7876 yyextra->current->lang = yyextra->language;
7878 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7879 yyextra->isTypedef=
FALSE;
7887 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7888 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7890 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7896 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7899 for (p = yytext ; *p ; ++p )
7903 yyextra->yyLineNr++;
7909 yyextra->column+=tabSize - (yyextra->column%tabSize);
7920static inline int computeIndent(
const char *s,
int startIndent)
7922 int col=startIndent;
7928 if (c==
'\t') col+=tabSize-(col%tabSize);
7929 else if (c==
'\n') col=0;
7937 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7938 yyextra->current->protection = yyextra->protection = prot;
7939 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7940 yyextra->current->type.clear();
7941 yyextra->current->name.clear();
7942 yyextra->current->args.clear();
7943 yyextra->current->argList.clear();
7949 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7950 size_t tl=yyextra->current->type.length();
7951 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7953 yyextra->current->type +=
' ' ;
7955 yyextra->current->type += yyextra->current->name;
7956 yyextra->current->name.clear() ;
7957 tl=yyextra->current->type.length();
7958 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7960 yyextra->current->type +=
' ' ;
7962 yyextra->current->type += yyextra->current->args ;
7963 yyextra->current->args.clear() ;
7964 yyextra->current->argList.clear();
7971 if (s==
nullptr || *s==0)
return name;
7973 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7985 bool funcPtr = i>0 && type[i-1]==
')';
7987 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7988 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7989 return type.
left(i);
7995 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7998 yyextra->docBlock <<
"\\iskip";
8000 yyextra->docBlockName=blockName;
8001 yyextra->fencedSize=fencedSize;
8002 yyextra->isCodeBlock=codeBlock;
8003 yyextra->nestedComment=0;
8009 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8010 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8014 yyextra->docBlock <<
"\\endiskip";
8016 yyextra->docBlockName=
"";
8037 if (i==-1)
return FALSE;
8047 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8049 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8050 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8051 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8052 yyextra->insideD = yyextra->language==SrcLangExt::D;
8053 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8054 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8055 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8056 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8057 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8058 yyextra->language==SrcLangExt::Lex);
8069 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8070 if (yyextra->current_root->section.isScope())
8073 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8075 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8077 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8087 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8088 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8089 if (yyextra->current->argList.empty())
return FALSE;
8090 for (
const Argument &a : yyextra->current->argList)
8101 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8102 if (yyextra->insideJava)
8105 yyextra->current->protection = Protection::Public;
8106 if (text.
find(
"protected")!=-1)
8107 yyextra->current->protection = Protection::Protected;
8108 else if (text.
find(
"private")!=-1)
8109 yyextra->current->protection = Protection::Private;
8110 else if (text.
find(
"package")!=-1)
8111 yyextra->current->protection = Protection::Package;
8118 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8119 int si =
static_cast<int>(yyextra->current->args.length());
8120 if (yyextra->oldStyleArgType.isEmpty())
8122 std::string args = yyextra->current->args.str();
8123 static const reg::Ex re(R
"(\([^)]*\).*)");
8129 bi1=(int)match.position();
8130 size_t secondMatchStart = match.position()+match.length();
8133 bi2=(int)match.position();
8137 if (bi1!=-1 && bi2!=-1)
8140 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8142 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8143 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8145 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8146 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8147 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8152 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8155 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8156 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8158 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8159 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8165 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8168 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8172 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8173 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8186 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8189 oldStyleArgPtr=yyextra->current->args.
left(j);
8208 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8209 for (
Argument &a : yyextra->current->argList)
8218 a.
docs=brief+
"\n\n"+docs;
8250 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8253 yyextra->current->briefFile = yyextra->fileName;
8254 yyextra->current->briefLine = yyextra->yyLineNr;
8258 yyextra->current->docFile = yyextra->fileName;
8259 yyextra->current->docLine = yyextra->yyLineNr;
8267 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8268 if (yyextra->tempEntry==0)
8273 yyextra->previous = yyextra->current;
8274 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8278 yyextra->previous = yyextra->current;
8279 yyextra->current = yyextra->tempEntry;
8280 yyextra->tempEntry.reset();
8287 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8290 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8291 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8294 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8295 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8297 docEntry->inbodyFile = yyextra->fileName;
8298 docEntry->inbodyLine = lineNr;
8302 bool needsEntry=
FALSE;
8304 Markdown markdown(yyextra->fileName,lineNr);
8306 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8307 while (yyextra->commentScanner.parseCommentBlock(
8308 yyextra->thisParser,
8309 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8313 yyextra->docBlockInBody ?
FALSE : brief,
8314 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8315 yyextra->docBlockInBody,
8316 yyextra->protection,
8327 QCString docFile = yyextra->current->docFile;
8329 yyextra->current->docFile = docFile;
8330 yyextra->current->docLine = lineNr;
8338 if (yyextra->docBlockTerm)
8340 unput(yyextra->docBlockTerm);
8341 yyextra->docBlockTerm=0;
8348 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8359 QCString orgDoc = yyextra->current->doc;
8360 QCString orgBrief = yyextra->current->brief;
8361 int orgDocLine = yyextra->current->docLine;
8362 int orgBriefLine = yyextra->current->briefLine;
8364 yyextra->current->doc.
clear();
8365 yyextra->current->brief.clear();
8368 int lineNr = orgDocLine;
8370 Markdown markdown(yyextra->fileName,lineNr);
8372 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8373 while (yyextra->commentScanner.parseCommentBlock(
8374 yyextra->thisParser,
8375 yyextra->current.get(),
8382 yyextra->protection,
8391 if (needsEntry)
newEntry(yyscanner);
8397 a.
docs = yyextra->current->doc;
8400 yyextra->current->doc = orgDoc;
8401 yyextra->current->brief = orgBrief;
8402 yyextra->current->docLine = orgDocLine;
8403 yyextra->current->briefLine = orgBriefLine;
8414 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8415 for (
const auto &ce : rt->children())
8417 if (!ce->program.empty())
8421 yyextra->padCount=0;
8423 yyextra->programStr = ce->program.str();
8424 yyextra->inputString = yyextra->programStr.data();
8425 yyextra->inputPosition = 0;
8426 if (ce->section.isEnum() || ce->spec.isEnum())
8427 BEGIN( FindFields ) ;
8429 BEGIN( FindMembers ) ;
8430 yyextra->current_root = ce;
8431 yyextra->fileName = ce->fileName;
8433 yyextra->yyLineNr = ce->bodyLine;
8434 yyextra->yyColNr = ce->bodyColumn;
8435 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8437 yyextra->current = std::make_shared<Entry>();
8438 yyextra->isStatic =
FALSE;
8443 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8445 ce->groups = rt->groups;
8448 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8450 if ( ce->section.isClass() )
8452 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8454 yyextra->current->protection = yyextra->protection = Protection::Public ;
8456 else if (yyextra->insideJava)
8458 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8460 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8462 if (ce->lang==SrcLangExt::ObjC)
8464 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8468 yyextra->current->protection = yyextra->protection = Protection::Public ;
8473 yyextra->current->protection = yyextra->protection = Protection::Private ;
8476 else if (ce->section.isEnum() )
8478 yyextra->current->protection = yyextra->protection = ce->protection;
8480 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8482 if (ce->section.isNamespace() )
8484 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8486 yyextra->current->protection = yyextra->protection = ce->protection;
8487 yyextra->current->exported = yyextra->exported =
false;
8489 else if (ce->section.isNamespace() )
8491 yyextra->current->protection = yyextra->protection = Protection::Public ;
8492 yyextra->current->exported = yyextra->exported = ce->exported;
8496 yyextra->current->protection = yyextra->protection = Protection::Public ;
8497 yyextra->current->exported = yyextra->exported =
false;
8499 yyextra->mtype = MethodTypes::Method;
8500 yyextra->virt = Specifier::Normal;
8507 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8509 scannerYYlex(yyscanner);
8512 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8514 yyextra->programStr.clear();
8515 ce->program.str(std::string());
8529 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8530 for (
const auto &ce : rt->children())
8532 if (ce->section.isConcept())
8536 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8538 yyextra->padCount =0;
8540 yyextra->programStr = ce->initializer.str();
8541 yyextra->inputString = yyextra->programStr.data();
8542 yyextra->inputPosition = 0;
8543 yyextra->current_root = ce;
8544 yyextra->fileName = ce->fileName;
8545 yyextra->yyLineNr = ce->bodyLine;
8546 yyextra->yyColNr = ce->bodyColumn;
8547 yyextra->insideObjC =
false;
8548 yyextra->current = std::make_shared<Entry>();
8552 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8554 if (!ce->args.isEmpty())
8556 templArgs=indent+
"template"+ce->args+
"\n";
8558 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8560 yyextra->isStatic =
FALSE;
8562 yyextra->current->section = EntryType::makeConceptCodePart();
8563 yyextra->current->startLine = yyextra->yyLineNr;
8564 BEGIN( FindConceptParts );
8565 scannerYYlex(yyscanner);
8566 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8577 const char *fileBuf,
8578 const std::shared_ptr<Entry> &rt,
8582 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8585 yyextra->inputString = fileBuf;
8586 yyextra->inputPosition = 0;
8587 yyextra->column = 0;
8588 scannerYYrestart(
nullptr,yyscanner);
8591 yyextra->protection = Protection::Public;
8592 yyextra->mtype = MethodTypes::Method;
8593 yyextra->isStatic =
FALSE;
8594 yyextra->exported =
false;
8595 yyextra->virt = Specifier::Normal;
8596 yyextra->current_root = rt;
8597 yyextra->yyLineNr = 1 ;
8598 yyextra->yyBegLineNr = 1;
8599 yyextra->yyBegColNr = 0;
8600 yyextra->anonCount = 0;
8601 yyextra->anonNSCount = 0;
8602 yyextra->fileName = fileName;
8603 yyextra->clangParser = clangParser;
8605 rt->lang = yyextra->language;
8606 msg(
"Parsing file {}...\n",yyextra->fileName);
8608 yyextra->current_root = rt;
8610 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8611 yyextra->current = std::make_shared<Entry>();
8616 yyextra->current->name = yyextra->fileName;
8617 yyextra->current->section = sec;
8618 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8620 yyextra->current->reset();
8622 if ( yyextra->insidePHP )
8624 BEGIN( FindMembersPHP );
8626 else if ( yyextra->insideJava )
8628 yyextra->current->name=
"java::lang";
8629 yyextra->current->fileName = yyextra->fileName;
8630 yyextra->current->section = EntryType::makeUsingDir();
8631 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8633 BEGIN( FindMembers );
8637 BEGIN( FindMembers );
8640 scannerYYlex(yyscanner);
8642 if (YY_START==Comment)
8644 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8648 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8650 yyextra->programStr.clear();
8651 rt->program.str(std::string());
8656 yyextra->anonNSCount++;
8659 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8662 parent->moveToSubEntryAndKeep(child);
8664 yyextra->outerScopeEntries.clear();
8673 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8676 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8679 if (!yyextra->current)
8684 const char *orgInputString;
8685 int orgInputPosition;
8686 YY_BUFFER_STATE orgState;
8689 orgState = YY_CURRENT_BUFFER;
8690 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8691 orgInputString = yyextra->inputString;
8692 orgInputPosition = yyextra->inputPosition;
8695 yyextra->inputString = text.
data();
8696 yyextra->inputPosition = 0;
8697 yyextra->column = 0;
8698 scannerYYrestart(
nullptr, yyscanner);
8700 scannerYYlex(yyscanner);
8702 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8703 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8705 yyextra->current->section = EntryType::makeVariableDoc();
8709 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8710 yy_switch_to_buffer(orgState, yyscanner);
8711 yyextra->inputString = orgInputString;
8712 yyextra->inputPosition = orgInputPosition;
8728 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8736 scannerYYlex_destroy(
p->yyscanner);
8740 const char *fileBuf,
8741 const std::shared_ptr<Entry> &root,
8745 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8746 yyextra->thisParser =
this;
8750 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8758 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8759 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8760 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8771#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)
static void parseConcepts(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
EntryType guessSection(const QCString &name)