15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
62#define YY_NO_UNISTD_H 1
223static inline int computeIndent(
const char *s,
int startIndent);
256#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
#define lineCount(s, len)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static QCString extractBeginRawStringDelimiter(const char *str)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void setContext(yyscan_t yyscanner)
static QCString stripQuotes(const char *s)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static void initParser(yyscan_t yyscanner)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static const char * stateToString(int state)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
static QCString extractEndRawStringDelimiter(const char *str)
void fixArgumentListForJavaScript(ArgumentList &al)
static int computeIndent(const char *s, int startIndent)
static bool startOfRequiresExpression(const QCString &req)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static const char * getLexerFILE()
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
static void addType(yyscan_t yyscanner)
static void initEntry(yyscan_t yyscanner)
Some helper functions for std::string.
TextStream * pSkipInterpString
QCString * pCopyRoundString
int lastCopyArgStringContext
std::shared_ptr< Entry > firstTypedefEntry
int lastDeprecatedContext
bool insideJS
processing JavaScript code?
OutlineParserInterface * thisParser
std::shared_ptr< Entry > tempEntry
std::shared_ptr< Entry > memspecEntry
TextStream * pCopySquareGString
int lastInitializerContext
std::shared_ptr< Entry > previous
int lastPreLineCtrlContext
ClangTUParser * clangParser
bool insideCS
processing C# code?
ArgumentList * currentArgumentList
TextStream * pCopyCurlyGString
int lastCommentInArgContext
std::vector< std::pair< Entry *, std::shared_ptr< Entry > > > outerScopeEntries
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
int lastC11AttributeContext
QCString * pCopyQuotedString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
QCString * pCopyCurlyString
CommentScanner commentScanner
bool insideIDL
processing IDL code?
bool insideSlice
processing Slice code?
TextStream * pCopyHereDocGString
bool insideObjC
processing Objective C code?
bool insideCli
processing C++/CLI code?
int currentArgumentContext
int lastSkipVerbStringContext
QCString * pCopyRawString
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
QCString * pCopySharpString
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
271NOTopt (("!"{BNopt})|("not"{BN}+))?
273HEXDIGIT ({DIGIT}|[a-f]|[A-F])
274ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
275SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
276TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
277CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
280CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
281PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
282PHPUSEKW ("public"|"private"|"protected")
283IDLATTR ("["[^\]]*"]"){BN}*
284TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
285RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
286RAWEND ")"[^ \t\(\)\\]{0,16}\"
287ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
288ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
289LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
290BITOP "&"|"|"|"^"|"<<"|">>"|"~"
291OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
292FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
293MODULE_ID ({ID}".")*{ID}
294LINENR {B}*[1-9][0-9]*
295FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
296FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
297FILECHARS {FILEICHAR}*{FILEECHAR}+
298HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
299VFILEMASK {FILECHARS}("."{FILECHARS})*
300FILEMASK {VFILEMASK}|{HFILEMASK}
311DCOMMC ("/\*!"|"/\**")
313DCOMMCPP ("/\/!"|"/\/\/")
315DCOMM {DCOMMC}|{DCOMMCPP}
383%x TryFunctionBlockEnd
398%x SkipInterpVerbString
412%x UNOIDLAttributeBlock
439%x SpecializationSingleQuote
440%x SpecializationDoubleQuote
473%x SliceDictionaryName
504<*>"DEPRECATED_ATTRIBUTE" {
505 if (!yyextra->insideObjC) REJECT;
507<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
508 if (!yyextra->insideObjC) REJECT;
509 yyextra->lastDeprecatedContext=YY_START;
510 yyextra->lastStringContext=Deprecated_round;
513<Deprecated_round>")" {
514 BEGIN(yyextra->lastDeprecatedContext);
516<Deprecated_round>{BNopt} {
519<Deprecated_round>. { }
521 yyextra->curlyCount=0;
522 yyextra->needsSemi =
TRUE;
523 BEGIN(SkipCurlyBlock);
526 yyextra->roundCount=0;
527 BEGIN(SkipRoundBlock);
530 ++yyextra->roundCount;
533 if (yyextra->roundCount )
534 --yyextra->roundCount ;
539 ++yyextra->curlyCount ;
542 if( yyextra->curlyCount )
544 --yyextra->curlyCount ;
546 else if (yyextra->needsSemi)
552 BEGIN( FindMembers );
556 if (yyextra->insidePHP)
558 yyextra->lastStringContext=NextSemi;
559 BEGIN(SkipPHPString);
562<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
564 yyextra->lastStringContext=NextSemi;
569 BEGIN( FindMembers );
573 BEGIN( FindMembers );
576 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
580<FindMembers>"<?php" {
581 yyextra->insidePHP =
TRUE;
583<FindMembersPHP>"<?"("php"?) {
584 BEGIN( FindMembers );
586<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
588 BEGIN( FindMembers );
590<FindMembers>"?>"|"</script>" {
591 if (yyextra->insidePHP)
592 BEGIN( FindMembersPHP );
596<FindMembersPHP>[^\n<]+ {
603<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
608<FindMembers>"%{"[^\n]* {
609 if (!yyextra->insideIDL)
613 if (!yyextra->insideIDL)
616<FindMembers>{B}*("properties"){BN}*":"{BN}* {
618 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
621<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
623 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
626<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
628 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
631<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
633 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
636<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
638 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
641<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
643 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
645<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
648<FindMembers>{B}*"internal"{BN}*":"{BN}* {
649 if (yyextra->insideCli)
658<FindMembers>{B}*"protected"{BN}*":"{BN}* {
661<FindMembers>{B}*"private"{BN}*":"{BN}* {
664<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
665 if (!yyextra->insideCpp) REJECT;
669<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
670 if (!yyextra->insideCpp) REJECT;
674<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
675 if (!yyextra->insideCpp) REJECT;
687<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
688<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
689 BEGIN( SkipComment ) ;
691<CppProt>("slots"|"Q_SLOTS") {
692 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
694<FindMembers>{B}*"event"{BN}+ {
695 if (yyextra->insideCli)
699 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
700 yyextra->current->bodyLine = yyextra->yyLineNr;
701 yyextra->current->bodyColumn = yyextra->yyColNr;
702 yyextra->curlyCount=0;
703 BEGIN( CliPropertyType );
705 else if (yyextra->insideCS)
708 yyextra->current->mtype = MethodTypes::Event;
709 yyextra->current->bodyLine = yyextra->yyLineNr;
710 yyextra->current->bodyColumn = yyextra->yyColNr;
717<FindMembers>{B}*"property"{BN}+ {
718 if (yyextra->insideCli)
722 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
723 yyextra->current->bodyLine = yyextra->yyLineNr;
724 yyextra->current->bodyColumn = yyextra->yyColNr;
725 yyextra->curlyCount=0;
726 BEGIN( CliPropertyType );
733<CliPropertyType>{ID} {
735 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
737<CliPropertyType>"[" {
738 yyextra->current->args =
"[";
739 BEGIN( CliPropertyIndex );
741<CliPropertyType>"{" {
742 yyextra->curlyCount=0;
744 BEGIN( CSAccessorDecl );
746<CliPropertyType>";" {
748 BEGIN( FindMembers );
753<CliPropertyType>{B}* {
757 yyextra->current->type += yytext;
759<CliPropertyIndex>"]" {
760 BEGIN( CliPropertyType );
761 yyextra->current->args+=yytext;
764 yyextra->current->args+=yytext;
779<FindMembers>{B}*"@private"{BN}+ {
782<FindMembers>{B}*"@protected"{BN}+ {
785<FindMembers>{B}*"@public"{BN}+ {
788<FindMembers>[\-+]{BN}* {
789 if (!yyextra->insideObjC)
795 yyextra->current->fileName = yyextra->fileName;
796 yyextra->current->startLine = yyextra->yyLineNr;
797 yyextra->current->startColumn = yyextra->yyColNr;
798 yyextra->current->bodyLine = yyextra->yyLineNr;
799 yyextra->current->bodyColumn = yyextra->yyColNr;
800 yyextra->current->section = EntryType::makeFunction();
801 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
802 yyextra->insideObjC =
TRUE;
803 yyextra->yyBegColNr = yyextra->yyColNr;
804 yyextra->yyBegLineNr = yyextra->yyLineNr;
805 yyextra->current->virt = Specifier::Virtual;
807 yyextra->current->isStatic=yytext[0]==
'+';
813 BEGIN( ObjCReturnType );
814 yyextra->current->type.clear();
815 yyextra->roundCount=0;
818 if (yyextra->current->type.isEmpty())
820 yyextra->current->type +=
"id";
822 yyextra->current->name = yytext;
826 yyextra->current->name +=
':';
828 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
831<ObjCReturnType>[^()]* {
832 yyextra->current->type += yytext;
834<ObjCReturnType>"(^)(" {
835 yyextra->current->type += yytext;
836 yyextra->roundCount++;
839 yyextra->current->type += yytext;
840 yyextra->roundCount++;
843 if (yyextra->roundCount<=0)
849 yyextra->current->type += yytext;
850 yyextra->roundCount--;
853<ObjCParams>({ID})?{BN}*":" {
858 yyextra->current->name +=
" :";
862 yyextra->current->name += keyw+
":";
864 if (yyextra->current->argList.back().type.isEmpty())
866 yyextra->current->argList.back().type=
"id";
870 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
872<ObjCParams>{ID}{BN}* {
876<ObjCParams>","{BN}*"..." {
883 yyextra->current->argList.push_back(a);
891 yyextra->roundCount=0;
892 yyextra->current->argList.back().type.clear();
893 BEGIN( ObjCParamType );
896 yyextra->roundCount++;
897 yyextra->current->argList.back().type+=yytext;
899<ObjCParamType>")"/{B}* {
900 if (yyextra->roundCount<=0)
906 yyextra->current->argList.back().type+=yytext;
907 yyextra->roundCount--;
910<ObjCParamType>[^()]* {
913<ObjCMethod,ObjCParams>";" {
914 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
916 yyextra->current->argList.back().type=
"id";
918 if (yyextra->current->argList.empty())
920 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
927<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
932 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
934 yyextra->current->argList.back().type=
"id";
936 if (yyextra->current->argList.empty())
938 yyextra->current->argList.setNoParameters(
TRUE);
944<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
945 if (yyextra->insideSlice)
948 yyextra->current->bodyLine = yyextra->yyLineNr;
949 yyextra->current->bodyColumn = yyextra->yyColNr;
950 yyextra->current->fileName = yyextra->fileName ;
951 yyextra->current->startLine = yyextra->yyLineNr ;
952 yyextra->current->startColumn = yyextra->yyColNr;
953 yyextra->current->args.clear();
954 yyextra->current->section = EntryType::makeTypedef();
955 yyextra->isTypedef =
TRUE;
956 BEGIN( SliceSequence );
961<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
962 if (yyextra->insideSlice)
965 yyextra->current->bodyLine = yyextra->yyLineNr;
966 yyextra->current->bodyColumn = yyextra->yyColNr;
967 yyextra->current->fileName = yyextra->fileName ;
968 yyextra->current->startLine = yyextra->yyLineNr ;
969 yyextra->current->startColumn = yyextra->yyColNr;
970 yyextra->current->args.clear();
971 yyextra->current->section = EntryType::makeTypedef() ;
972 yyextra->isTypedef =
TRUE;
973 BEGIN( SliceDictionary );
978<FindMembers>{BN}{1,80} {
981<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
982 if (yyextra->insideJava)
985 yyextra->lastSkipRoundContext = YY_START;
986 yyextra->roundCount=0;
991 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
992 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
993 yyextra->current->protection = Protection::Public ;
995 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
1002<ObjCPropAttr>"getter="{ID} {
1003 yyextra->current->read = yytext+7;
1005<ObjCPropAttr>"setter="{ID} {
1006 yyextra->current->write = yytext+7;
1008<ObjCPropAttr>"readonly" {
1009 yyextra->current->spec.setWritable(
false);
1011<ObjCPropAttr>"readwrite" {
1013<ObjCPropAttr>"assign" {
1015<ObjCPropAttr>"unsafe_unretained" {
1016 yyextra->current->spec.setAssign(
false);
1017 yyextra->current->spec.setUnretained(
true);
1019<ObjCPropAttr>"retain" {
1020 yyextra->current->spec.setAssign(
false);
1021 yyextra->current->spec.setRetain(
true);
1023<ObjCPropAttr>"copy" {
1024 yyextra->current->spec.setAssign(
false);
1025 yyextra->current->spec.setCopy(
true);
1027<ObjCPropAttr>"weak" {
1028 yyextra->current->spec.setAssign(
false);
1029 yyextra->current->spec.setWeak(
true);
1031<ObjCPropAttr>"strong" {
1032 yyextra->current->spec.setAssign(
false);
1033 yyextra->current->spec.setStrong(
true);
1035<ObjCPropAttr>"nonatomic" {
1036 yyextra->current->spec.setNonAtomic(
true);
1041<FindMembers>"@"{ID}("."{ID})+ {
1042 if (yyextra->insideJava)
1051<FindMembers>"@"{ID} {
1052 if (yyextra->insideJava)
1056 else if (
qstrcmp(yytext,
"@property")==0)
1058 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1059 yyextra->current->spec.setWritable(
true).setReadable(
true);
1060 yyextra->current->protection = Protection::Public ;
1062 else if (
qstrcmp(yytext,
"@synthesize")==0)
1064 BEGIN( ObjCSkipStatement );
1066 else if (
qstrcmp(yytext,
"@dynamic")==0)
1068 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1075<ObjCSkipStatement>";" {
1078<PackageName>{ID}(("."|"\\"){ID})* {
1079 yyextra->isTypedef=
FALSE;
1081 yyextra->current->name = yytext;
1082 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1083 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1084 yyextra->current->section = EntryType::makeNamespace();
1085 yyextra->current->type =
"namespace" ;
1086 yyextra->current->fileName = yyextra->fileName;
1087 yyextra->current->startLine = yyextra->yyLineNr;
1088 yyextra->current->startColumn = yyextra->yyColNr;
1089 yyextra->current->bodyLine = yyextra->yyLineNr;
1090 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
1094 std::shared_ptr<Entry> tmp = yyextra->current;
1095 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1096 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1101 yyextra->curlyCount=0;
1102 BEGIN( ReadNSBody );
1104<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1105 if (!yyextra->insideCpp) REJECT;
1107 yyextra->current->exported =
true;
1109 BEGIN( ModuleName );
1111<FindMembers>{B}*"module"{BN}*";" {
1112 if (!yyextra->insideCpp) REJECT;
1113 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1116 BEGIN( FindMembers );
1118<FindMembers>{B}*"module"{BN}+ {
1119 if (!yyextra->insideCpp) REJECT;
1121 yyextra->current->exported =
false;
1123 BEGIN( ModuleName );
1125<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1126 if (!yyextra->insideCpp) REJECT;
1127 yyextra->current->exported =
true;
1129 BEGIN( ModuleImport );
1131<FindMembers>{B}*"import"{BN}+ {
1132 if (!yyextra->insideCpp) REJECT;
1134 BEGIN( ModuleImport );
1136<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1138 int i = name.
find(
':');
1144 yyextra->current->exported,
1147 yyextra->current->section = EntryType::makeModuleDoc();
1148 yyextra->isTypedef=
FALSE;
1150 yyextra->current->type +=
" module";
1151 yyextra->current->fileName = yyextra->fileName;
1152 yyextra->current->startLine = yyextra->yyLineNr;
1153 yyextra->current->startColumn = yyextra->yyColNr;
1154 yyextra->current->bodyLine = yyextra->yyLineNr;
1155 yyextra->current->bodyColumn = yyextra->yyColNr;
1156 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
1159<ModuleName>{MODULE_ID} {
1163 yyextra->current->exported,
1165 yyextra->current->section = EntryType::makeModuleDoc();
1166 yyextra->isTypedef=
FALSE;
1168 yyextra->current->type +=
" module";
1169 yyextra->current->fileName = yyextra->fileName;
1170 yyextra->current->startLine = yyextra->yyLineNr;
1171 yyextra->current->startColumn = yyextra->yyColNr;
1172 yyextra->current->bodyLine = yyextra->yyLineNr;
1173 yyextra->current->bodyColumn = yyextra->yyColNr;
1174 yyextra->current->name = yytext;
1177<ModuleName>":"{BN}+"private" {
1178 yyextra->current->exported = yyextra->exported =
false;
1181<ModuleName>";" { unput(
';');
1186<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1192<ModuleImport>"<"[^>\n]*">" {
1198<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1200 int i = name.
find(
':');
1206 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1210<ModuleImport>{MODULE_ID} {
1214 yyextra->current->exported);
1217<ModuleImport>";" { BEGIN(FindMembers); }
1218<ModuleImport>\n {
lineCount(yyscanner); }
1220<FindMembers>{B}*"export"{BN}+"{" {
1221 yyextra->current->exported = yyextra->exported =
true;
1223<FindMembers>{B}*"export"{BN}+ {
1224 if (!yyextra->insideCpp) REJECT;
1225 yyextra->current->exported=
true;
1227<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1228 yyextra->current->type +=
" initonly ";
1229 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1232<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1233 yyextra->current->isStatic =
TRUE;
1236<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1237 yyextra->current->isStatic =
TRUE;
1240<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1241 yyextra->current->isStatic =
FALSE;
1242 yyextra->current->explicitExternal =
TRUE;
1245<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1247 yyextra->current->type +=
" const ";
1248 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1256<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1257 yyextra->current->type +=
" virtual ";
1258 yyextra->current->virt = Specifier::Virtual;
1261<FindMembers>{B}*"constexpr"{BN}+ {
1262 if (yyextra->insideCpp)
1264 yyextra->current->spec.setConstExpr(
true);
1268<FindMembers>{B}*"consteval"{BN}+ {
1269 if (yyextra->insideCpp)
1271 yyextra->current->spec.setConstEval(
true);
1275<FindMembers>{B}*"constinit"{BN}+ {
1276 if (yyextra->insideCpp)
1278 yyextra->current->spec.setConstInit(
true);
1282<FindMembers>{B}*"published"{BN}+ {
1283 if (yyextra->insideIDL)
1286 yyextra->current->spec.setPublished(
true);
1293<FindMembers>{B}*"sealed"{BN}+ {
1294 if (yyextra->insideCS)
1296 yyextra->current->spec.setSealed(
true);
1303<FindMembers>{B}*"abstract"{BN}+ {
1304 if (yyextra->insidePHP || yyextra->insideCS)
1306 yyextra->current->spec.setAbstract(
true);
1310 if (yyextra->insideCpp) REJECT;
1311 yyextra->current->type +=
" abstract ";
1312 if (!yyextra->insideJava)
1314 yyextra->current->virt = Specifier::Pure;
1318 yyextra->current->spec.setAbstract(
true);
1323<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1324 yyextra->current->spec.setInline(
true);
1327<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1328 yyextra->current->spec.setMutable(
true);
1331<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1332 yyextra->current->spec.setExplicit(
true);
1335<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1336 yyextra->current->spec.setLocal(
true);
1339<FindMembers>{B}*"@required"{BN}+ {
1340 yyextra->current->spec.setOptional(
false).setRequired(
true);
1343<FindMembers>{B}*"@optional"{BN}+ {
1344 yyextra->current->spec.setRequired(
false).setOptional(
true);
1352<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1353<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1354 yyextra->isTypedef=
FALSE;
1355 yyextra->current->section = EntryType::makeNamespace();
1356 yyextra->current->type =
"namespace" ;
1357 yyextra->current->fileName = yyextra->fileName;
1358 yyextra->current->startLine = yyextra->yyLineNr;
1359 yyextra->current->startColumn = yyextra->yyColNr;
1360 yyextra->current->bodyLine = yyextra->yyLineNr;
1361 yyextra->current->bodyColumn = yyextra->yyColNr;
1363 if (yyextra->insidePHP)
1365 BEGIN( PackageName );
1369 BEGIN( CompoundName );
1372<FindMembers>{B}*"module"{BN}+ {
1374 if (yyextra->insideIDL || yyextra->insideSlice)
1376 yyextra->isTypedef=
FALSE;
1377 yyextra->current->section = EntryType::makeNamespace();
1378 yyextra->current->type =
"module" ;
1379 yyextra->current->fileName = yyextra->fileName;
1380 yyextra->current->startLine = yyextra->yyLineNr;
1381 yyextra->current->startColumn = yyextra->yyColNr;
1382 yyextra->current->bodyLine = yyextra->yyLineNr;
1383 yyextra->current->bodyColumn = yyextra->yyColNr;
1384 BEGIN( CompoundName );
1386 else if (yyextra->insideD)
1397<FindMembers>{B}*"library"{BN}+ {
1399 if (yyextra->insideIDL)
1401 yyextra->isTypedef=
FALSE;
1402 yyextra->current->section = EntryType::makeNamespace();
1403 yyextra->current->type =
"library" ;
1404 yyextra->current->fileName = yyextra->fileName;
1405 yyextra->current->startLine = yyextra->yyLineNr;
1406 yyextra->current->startColumn = yyextra->yyColNr;
1407 yyextra->current->bodyLine = yyextra->yyLineNr;
1408 yyextra->current->bodyColumn = yyextra->yyColNr;
1409 BEGIN( CompoundName );
1417<FindMembers>{B}*"constants"{BN}+ {
1419 if (yyextra->insideIDL)
1421 yyextra->isTypedef=
FALSE;
1422 yyextra->current->section = EntryType::makeNamespace();
1423 yyextra->current->type =
"constants";
1424 yyextra->current->fileName = yyextra->fileName;
1425 yyextra->current->startLine = yyextra->yyLineNr;
1426 yyextra->current->startColumn = yyextra->yyColNr;
1427 yyextra->current->bodyLine = yyextra->yyLineNr;
1428 yyextra->current->bodyColumn = yyextra->yyColNr;
1429 BEGIN( CompoundName );
1437<FindMembers>{BN}*("service"){BN}+ {
1439 if (yyextra->insideIDL)
1441 yyextra->isTypedef=
FALSE;
1442 yyextra->current->section = EntryType::makeClass();
1446 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1448 yyextra->current->type +=
" service " ;
1449 yyextra->current->fileName = yyextra->fileName;
1450 yyextra->current->startLine = yyextra->yyLineNr;
1451 yyextra->current->bodyLine = yyextra->yyLineNr;
1452 yyextra->current->bodyColumn = yyextra->yyColNr;
1453 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1461<FindMembers>{BN}*("singleton"){BN}+ {
1463 if (yyextra->insideIDL)
1465 yyextra->isTypedef=
FALSE;
1466 yyextra->current->section = EntryType::makeClass();
1468 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1469 setPublished(spec.isPublished());
1471 yyextra->current->type +=
" singleton " ;
1472 yyextra->current->fileName = yyextra->fileName;
1473 yyextra->current->startLine = yyextra->yyLineNr;
1474 yyextra->current->bodyLine = yyextra->yyLineNr;
1475 yyextra->current->bodyColumn = yyextra->yyColNr;
1476 BEGIN( CompoundName );
1484<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1486 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1488 yyextra->isTypedef=
FALSE;
1489 yyextra->current->section = EntryType::makeClass();
1491 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1493 setOptional(spec.isOptional()).
1494 setPublished(spec.isPublished()).
1495 setLocal(spec.isLocal());
1497 yyextra->current->type +=
" interface" ;
1498 yyextra->current->fileName = yyextra->fileName;
1499 yyextra->current->startLine = yyextra->yyLineNr;
1500 yyextra->current->startColumn = yyextra->yyColNr;
1501 yyextra->current->bodyLine = yyextra->yyLineNr;
1502 yyextra->current->bodyColumn = yyextra->yyColNr;
1504 BEGIN( CompoundName );
1512<FindMembers>{B}*"@implementation"{BN}+ {
1514 yyextra->isTypedef=
FALSE;
1515 yyextra->current->section = EntryType::makeObjcImpl();
1516 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1517 yyextra->insideObjC =
TRUE;
1518 yyextra->current->protection = yyextra->protection = Protection::Public ;
1520 yyextra->current->type +=
" implementation" ;
1521 yyextra->current->fileName = yyextra->fileName;
1522 yyextra->current->startLine = yyextra->yyLineNr;
1523 yyextra->current->bodyLine = yyextra->yyLineNr;
1524 yyextra->current->bodyColumn = yyextra->yyColNr;
1525 BEGIN( CompoundName );
1527<FindMembers>{B}*"@interface"{BN}+ {
1529 yyextra->isTypedef=
FALSE;
1530 yyextra->current->section = EntryType::makeClass();
1531 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1532 if (!yyextra->insideJava)
1534 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1535 yyextra->insideObjC =
TRUE;
1537 yyextra->current->protection = yyextra->protection = Protection::Public ;
1539 yyextra->current->type +=
" interface" ;
1540 yyextra->current->fileName = yyextra->fileName;
1541 yyextra->current->startLine = yyextra->yyLineNr;
1542 yyextra->current->startColumn = yyextra->yyColNr;
1543 yyextra->current->bodyLine = yyextra->yyLineNr;
1544 yyextra->current->bodyColumn = yyextra->yyColNr;
1545 BEGIN( CompoundName );
1547<FindMembers>{B}*"@protocol"{BN}+ {
1549 yyextra->isTypedef=
FALSE;
1550 yyextra->current->section = EntryType::makeClass();
1552 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1553 yyextra->insideObjC =
TRUE;
1554 yyextra->current->protection = yyextra->protection = Protection::Public ;
1556 yyextra->current->type +=
" protocol" ;
1557 yyextra->current->fileName = yyextra->fileName;
1558 yyextra->current->startLine = yyextra->yyLineNr;
1559 yyextra->current->startColumn = yyextra->yyColNr;
1560 yyextra->current->bodyLine = yyextra->yyLineNr;
1561 yyextra->current->bodyColumn = yyextra->yyColNr;
1562 BEGIN( CompoundName );
1564<FindMembers>{B}*"exception"{BN}+ {
1565 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1566 yyextra->isTypedef=
FALSE;
1567 yyextra->current->section = EntryType::makeClass();
1570 yyextra->current->spec =
TypeSpecifier().setException(
true).
1571 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1573 yyextra->current->type +=
" exception" ;
1574 yyextra->current->fileName = yyextra->fileName;
1575 yyextra->current->startLine = yyextra->yyLineNr;
1576 yyextra->current->startColumn = yyextra->yyColNr;
1577 yyextra->current->bodyLine = yyextra->yyLineNr;
1578 yyextra->current->bodyColumn = yyextra->yyColNr;
1580 BEGIN( CompoundName );
1582<FindMembers>"@class" |
1583<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1584<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1586 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1587 bool isConst=decl.
find(
"const")!=-1;
1588 bool isVolatile=decl.
find(
"volatile")!=-1;
1589 yyextra->current->section = EntryType::makeClass();
1591 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1594 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1596 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1598 yyextra->current->spec.setLocal(
true);
1602 yyextra->current->type +=
" const";
1604 else if (isVolatile)
1606 yyextra->current->type +=
" volatile";
1608 yyextra->current->type +=
" class" ;
1609 yyextra->current->fileName = yyextra->fileName;
1610 yyextra->current->startLine = yyextra->yyLineNr;
1611 yyextra->current->startColumn = yyextra->yyColNr;
1612 yyextra->current->bodyLine = yyextra->yyLineNr;
1613 yyextra->current->bodyColumn = yyextra->yyColNr;
1616 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1617 yyextra->insideObjC =
TRUE;
1620 if (yytext[yyleng-1]==
'{') unput(
'{');
1621 BEGIN( CompoundName ) ;
1623<FindMembers>{B}*"value class{" |
1624<FindMembers>{B}*"value class"{BN}+ {
1625 yyextra->isTypedef=
FALSE;
1626 yyextra->current->section = EntryType::makeClass();
1629 yyextra->current->type +=
" value class" ;
1630 yyextra->current->fileName = yyextra->fileName;
1631 yyextra->current->startLine = yyextra->yyLineNr;
1632 yyextra->current->startColumn = yyextra->yyColNr;
1633 yyextra->current->bodyLine = yyextra->yyLineNr;
1634 yyextra->current->bodyColumn = yyextra->yyColNr;
1636 if (yytext[yyleng-1]==
'{') unput(
'{');
1637 BEGIN( CompoundName ) ;
1639<FindMembers>{B}*"ref class{" |
1640<FindMembers>{B}*"ref class"{BN}+ {
1641 yyextra->isTypedef=
FALSE;
1642 yyextra->current->section = EntryType::makeClass();
1645 yyextra->current->type +=
" ref class" ;
1646 yyextra->current->fileName = yyextra->fileName;
1647 yyextra->current->startLine = yyextra->yyLineNr;
1648 yyextra->current->startColumn = yyextra->yyColNr;
1649 yyextra->current->bodyLine = yyextra->yyLineNr;
1650 yyextra->current->bodyColumn = yyextra->yyColNr;
1652 if (yytext[yyleng-1]==
'{') unput(
'{');
1653 BEGIN( CompoundName ) ;
1655<FindMembers>{B}*"interface class{" |
1656<FindMembers>{B}*"interface class"{BN}+ {
1657 yyextra->isTypedef=
FALSE;
1658 yyextra->current->section = EntryType::makeClass();
1659 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1661 yyextra->current->type +=
" interface class" ;
1662 yyextra->current->fileName = yyextra->fileName;
1663 yyextra->current->startLine = yyextra->yyLineNr;
1664 yyextra->current->startColumn = yyextra->yyColNr;
1665 yyextra->current->bodyLine = yyextra->yyLineNr;
1666 yyextra->current->bodyColumn = yyextra->yyColNr;
1668 if (yytext[yyleng-1]==
'{') unput(
'{');
1669 BEGIN( CompoundName ) ;
1671<FindMembers>{B}*"coclass"{BN}+ {
1672 if (yyextra->insideIDL)
1674 yyextra->isTypedef=
FALSE;
1675 yyextra->current->section = EntryType::makeClass();
1677 yyextra->current->type +=
" coclass" ;
1678 yyextra->current->fileName = yyextra->fileName;
1679 yyextra->current->startLine = yyextra->yyLineNr;
1680 yyextra->current->startColumn = yyextra->yyColNr;
1681 yyextra->current->bodyLine = yyextra->yyLineNr;
1682 yyextra->current->bodyColumn = yyextra->yyColNr;
1684 BEGIN( CompoundName ) ;
1689 yyextra->current->name = yytext;
1690 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1694<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1695<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1696 if (yyextra->insideJava) REJECT;
1698 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1699 bool isConst=decl.
find(
"const")!=-1;
1700 bool isVolatile=decl.
find(
"volatile")!=-1;
1701 yyextra->current->section = EntryType::makeClass() ;
1705 setPublished(spec.isPublished()).
1706 setInline(spec.isInline()).
1707 setLocal(spec.isLocal());
1713 yyextra->current->type +=
" const";
1715 else if (isVolatile)
1717 yyextra->current->type +=
" volatile";
1719 yyextra->current->type +=
" struct" ;
1720 yyextra->current->fileName = yyextra->fileName;
1721 yyextra->current->startLine = yyextra->yyLineNr;
1722 yyextra->current->startColumn = yyextra->yyColNr;
1723 yyextra->current->bodyLine = yyextra->yyLineNr;
1724 yyextra->current->bodyColumn = yyextra->yyColNr;
1726 if (yytext[yyleng-1]==
'{') unput(
'{');
1727 BEGIN( CompoundName ) ;
1729<FindMembers>{B}*"value struct{" |
1730<FindMembers>{B}*"value struct"{BN}+ {
1731 yyextra->isTypedef=
FALSE;
1732 yyextra->current->section = EntryType::makeClass();
1733 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1735 yyextra->current->type +=
" value struct" ;
1736 yyextra->current->fileName = yyextra->fileName;
1737 yyextra->current->startLine = yyextra->yyLineNr;
1738 yyextra->current->startColumn = yyextra->yyColNr;
1739 yyextra->current->bodyLine = yyextra->yyLineNr;
1740 yyextra->current->bodyColumn = yyextra->yyColNr;
1742 if (yytext[yyleng-1]==
'{') unput(
'{');
1743 BEGIN( CompoundName ) ;
1745<FindMembers>{B}*"ref struct{" |
1746<FindMembers>{B}*"ref struct"{BN}+ {
1747 yyextra->isTypedef=
FALSE;
1748 yyextra->current->section = EntryType::makeClass();
1749 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1751 yyextra->current->type +=
" ref struct" ;
1752 yyextra->current->fileName = yyextra->fileName;
1753 yyextra->current->startLine = yyextra->yyLineNr;
1754 yyextra->current->startColumn = yyextra->yyColNr;
1755 yyextra->current->bodyLine = yyextra->yyLineNr;
1756 yyextra->current->bodyColumn = yyextra->yyColNr;
1758 if (yytext[yyleng-1]==
'{') unput(
'{');
1759 BEGIN( CompoundName ) ;
1761<FindMembers>{B}*"interface struct{" |
1762<FindMembers>{B}*"interface struct"{BN}+ {
1763 yyextra->isTypedef=
FALSE;
1764 yyextra->current->section = EntryType::makeClass();
1765 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1767 yyextra->current->type +=
" interface struct";
1768 yyextra->current->fileName = yyextra->fileName;
1769 yyextra->current->startLine = yyextra->yyLineNr;
1770 yyextra->current->startColumn = yyextra->yyColNr;
1771 yyextra->current->bodyLine = yyextra->yyLineNr;
1772 yyextra->current->bodyColumn = yyextra->yyColNr;
1774 if (yytext[yyleng-1]==
'{') unput(
'{');
1775 BEGIN( CompoundName ) ;
1777<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1778<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1779 if (yyextra->insideJava) REJECT;
1781 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1782 bool isConst=decl.
find(
"const")!=-1;
1783 bool isVolatile=decl.
find(
"volatile")!=-1;
1784 yyextra->current->section = EntryType::makeClass();
1791 yyextra->current->type +=
" const";
1793 else if (isVolatile)
1795 yyextra->current->type +=
" volatile";
1797 yyextra->current->type +=
" union" ;
1798 yyextra->current->fileName = yyextra->fileName;
1799 yyextra->current->startLine = yyextra->yyLineNr;
1800 yyextra->current->startColumn = yyextra->yyColNr;
1801 yyextra->current->bodyLine = yyextra->yyLineNr;
1802 yyextra->current->bodyColumn = yyextra->yyColNr;
1804 if (yytext[yyleng-1]==
'{') unput(
'{');
1805 BEGIN( CompoundName ) ;
1807<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1808<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1810 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1811 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1812 bool isEnumSytruct = text.
find(
"struct")!=-1;
1813 if (yyextra->insideJava)
1815 yyextra->current->section = EntryType::makeClass();
1821 yyextra->current->section = EntryType::makeEnum() ;
1824 yyextra->current->type +=
" enum";
1827 yyextra->current->spec.setStrong(
true);
1831 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1833 yyextra->current->fileName = yyextra->fileName;
1834 yyextra->current->startLine = yyextra->yyLineNr;
1835 yyextra->current->startColumn = yyextra->yyColNr;
1836 yyextra->current->bodyLine = yyextra->yyLineNr;
1837 yyextra->current->bodyColumn = yyextra->yyColNr;
1839 if (yytext[yyleng-1]==
'{') unput(
'{');
1840 BEGIN( CompoundName ) ;
1842<FindMembers>{B}*"concept"{BN}+ {
1843 if (yyextra->insideJava) REJECT;
1844 yyextra->isTypedef=
FALSE;
1845 yyextra->current->section = EntryType::makeConcept();
1847 yyextra->current->type +=
" concept";
1848 yyextra->current->fileName = yyextra->fileName;
1849 yyextra->current->startLine = yyextra->yyLineNr;
1850 yyextra->current->startColumn = yyextra->yyColNr;
1851 yyextra->current->bodyLine = yyextra->yyLineNr;
1852 yyextra->current->bodyColumn = yyextra->yyColNr;
1854 BEGIN( ConceptName ) ;
1856<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1858 yyextra->current->name +=
"()";
1859 BEGIN( FindMembers );
1861<Operator>"("{BN}*")"{BNopt}/"(" {
1863 yyextra->current->name += yytext ;
1864 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1865 BEGIN( FindMembers ) ;
1869 BEGIN( FindMembers ) ;
1873 yyextra->current->name += *yytext ;
1875<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1876 if (!yyextra->current->type.startsWith(
"friend "))
1878 yyextra->current->name += yytext;
1882 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1884 BEGIN( FindMembers ) ;
1886<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1889 yyextra->current->tArgLists.
push_back(al);
1890 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1891 yyextra->templateStr=
"<";
1892 yyextra->fullArgString = yyextra->templateStr;
1893 yyextra->copyArgString = &yyextra->templateStr;
1894 yyextra->currentArgumentContext = FindMembers;
1895 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1897<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1898 if (yyextra->insideJava) REJECT;
1900 BEGIN( NSAliasName );
1903 yyextra->aliasName = yytext;
1904 BEGIN( NSAliasArg );
1906<NSAliasArg>({ID}"::")*{ID} {
1908 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1919 BEGIN( FindMembers );
1921<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1923 yyextra->aliasName=yytext;
1926<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1930 yyextra->current->fileName = yyextra->fileName;
1932 yyextra->current->section = EntryType::makeUsingDecl();
1933 yyextra->current_root->copyToSubEntry(yyextra->current);
1935 yyextra->current->section = EntryType::makeUsingDir();
1936 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1938 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1940<PHPUseAs>{BN}+"as"{BN}+ {
1943<PHPUseAs>{PHPUSEKW} {
1947 if (!yyextra->aliasName.isEmpty())
1952 yyextra->aliasName.clear();
const std::string & str() const
1954<PHPUse,PHPUseAs>[,;] {
1964<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1968 yyextra->current->fileName = yyextra->fileName;
1975 yyextra->current->section = EntryType::makeUsingDir();
1976 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)
1980<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1984 yyextra->current->fileName = yyextra->fileName;
1996 if (yyextra->insideD)
1998 yyextra->current->section = EntryType::makeUsingDir();
2003 yyextra->current->section = EntryType::makeUsingDecl();
2005 yyextra->previous = yyextra->current;
2006 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2010<IDLImport>"\""[^"]*"\"" {
2011 QCString fileName(&yytext[1],yyleng-2);
2027<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2028 if (yyextra->insideJava) REJECT;
2029 yyextra->current->startLine=yyextra->yyLineNr;
2030 yyextra->current->startColumn = yyextra->yyColNr;
2034<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2035<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2037 yyextra->current->name=yytext;
2038 yyextra->current->fileName = yyextra->fileName;
2039 yyextra->current->section = EntryType::makeUsingDecl();
2040 yyextra->current->startLine = yyextra->yyLineNr;
2041 yyextra->previous = yyextra->current;
2042 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2044 if (yyextra->insideCS)
2049 yyextra->current->name=yytext;
2050 yyextra->current->fileName = yyextra->fileName;
2051 yyextra->current->startLine = yyextra->yyLineNr;
2052 yyextra->current->startColumn = yyextra->yyColNr;
2053 yyextra->current->section = EntryType::makeUsingDir();
2054 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2059<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2061 yyextra->current->fileName = yyextra->fileName;
2062 yyextra->current->section = EntryType::makeUsingDecl();
2063 yyextra->current->startLine = yyextra->yyLineNr;
2064 yyextra->current->bodyLine = yyextra->yyLineNr;
2065 yyextra->current->bodyColumn = yyextra->yyColNr;
2066 yyextra->lastInitializerContext = UsingAlias;
2067 yyextra->sharpCount=0;
2068 yyextra->initBracketCount=0;
2070 BEGIN(ReadInitializer);
2073 yyextra->current->section = EntryType::makeVariable();
2075 init.stripPrefix(
"class ");
2076 init.stripPrefix(
"struct ");
2078 yyextra->current->type =
"typedef "+
init;
2079 yyextra->current->args.clear();
2080 yyextra->current->spec.setAlias(
true);
2081 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2086 yyextra->current->initializer << yytext;
2089 yyextra->current->initializer << yytext;
2093 yyextra->current->fileName = yyextra->fileName;
2094 yyextra->current->section = EntryType::makeUsingDir();
2095 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2099<Using>";" { BEGIN(FindMembers); }
2100<FindMembers>{SCOPENAME}{BN}*"<>" {
2105<FindMembers>{SCOPENAME}{BNopt}/"<" {
2107 if (yyextra->insideCpp && name==
"import") REJECT;
2108 yyextra->roundCount=0;
2109 yyextra->sharpCount=0;
2112 yyextra->current->name=name;
2118 BEGIN( EndTemplate );
2120<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2121 yyextra->sharpCount=0;
2122 yyextra->roundCount=0;
2130 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...
2133 if (!yyextra->insidePHP)
2139 yyextra->lastHereDocContext = YY_START;
2143<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2144 yyextra->current->name+=yytext;
2148 if (yyextra->roundCount==0)
2151 yyextra->sharpCount++;
2153 yyextra->current->name+=yytext;
2155<ClassTemplSpec,EndTemplate>">=" {
2156 yyextra->current->name+=yytext;
2158<ClassTemplSpec,EndTemplate>(">>") {
2159 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2167 yyextra->current->name+=yytext;
2172 yyextra->current->name+=
'>';
2174 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2176 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2181<EndTemplate>">"{BN}*"(" {
2183 yyextra->current->name+=
'>';
2185 if (yyextra->roundCount==0)
2187 --yyextra->sharpCount;
2189 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2191 yyextra->current->bodyLine = yyextra->yyLineNr;
2192 yyextra->current->bodyColumn = yyextra->yyColNr;
2193 yyextra->current->args =
"(";
2194 yyextra->currentArgumentContext = FuncQual;
2195 yyextra->fullArgString = yyextra->current->args;
2196 yyextra->copyArgString = &yyextra->current->args;
2198 BEGIN( ReadFuncArgType ) ;
2202 yyextra->current->name+=
"(";
2203 yyextra->roundCount++;
2206<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2208 yyextra->current->name+=
'>';
2209 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2214<EndTemplate>">"{BNopt}/"::" {
2216 yyextra->current->name+=
'>';
2218 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2220 BEGIN(FindMemberName);
2223<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2224 yyextra->roundCount++;
2226<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2227 if (yyextra->roundCount>0) yyextra->roundCount--;
2230 yyextra->current->name+=*yytext;
2233<FindMembers>"define"{BN}*"("{BN}*["'] {
2234 if (yyextra->insidePHP)
2236 yyextra->current->bodyLine = yyextra->yyLineNr;
2237 yyextra->current->bodyColumn = yyextra->yyColNr;
2244 yyextra->delimiter = yytext;
2245 *yyextra->pCopyHereDocGString << yytext;
2246 BEGIN(CopyHereDocEnd);
2248<CopyHereDoc>"\""{ID}/"\"" {
2249 yyextra->delimiter = &yytext[1];
2250 *yyextra->pCopyHereDocGString << yytext;
2251 BEGIN(CopyHereDocEnd);
2253<CopyHereDoc>"'"{ID}/"'" {
2254 yyextra->delimiter = &yytext[1];
2255 *yyextra->pCopyHereDocGString << yytext;
2256 BEGIN(CopyHereDocEnd);
2259 yyextra->delimiter = yytext;
2262<HereDoc>"\""{ID}/"\"" {
2263 yyextra->delimiter = &yytext[1];
2266<HereDoc>"'"{ID}/"'" {
2267 yyextra->delimiter = &yytext[1];
2271 if (yyextra->delimiter==yytext)
2273 BEGIN(yyextra->lastHereDocContext);
2277<CopyHereDocEnd>^{Bopt}{ID} {
2278 *yyextra->pCopyHereDocGString << yytext;
2281 BEGIN(yyextra->lastHereDocContext);
2286 *yyextra->pCopyHereDocGString << yytext;
2288<CopyHereDocEnd>{ID} {
2289 *yyextra->pCopyHereDocGString << yytext;
2292 *yyextra->pCopyHereDocGString << yytext;
2294<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2296<FindMembers>"Q_PROPERTY" {
2297 yyextra->yyBegLineNr = yyextra->yyLineNr;
2298 yyextra->yyBegColNr = yyextra->yyColNr;
2299 yyextra->current->protection = Protection::Public ;
2300 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2301 yyextra->current->type.clear();
2311 yyextra->current->name+=yytext;
2314 yyextra->current->type+= yyextra->current->name;
2315 yyextra->current->type+= yytext;
2316 yyextra->current->name=
"";
2318<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2319 yyextra->current->type+= yyextra->current->name;
2320 yyextra->current->name=yytext;
2322<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2323 yyextra->current->spec.setReadable(
true);
2326<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2327 yyextra->current->spec.setWritable(
true);
2330<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2335<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2336<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2337<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2338<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2339<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2343 yyextra->current->read = yytext;
2347 yyextra->current->write = yytext;
2350<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2351 yyextra->current->name=yytext;
2355<FindMembers>"requires" {
2356 if (yyextra->insideJava) REJECT;
2357 yyextra->current->req.clear();
2358 yyextra->requiresContext = YY_START;
2359 BEGIN(RequiresClause);
2361<RequiresClause>"requires"{BN}*/"{" {
2362 if (yyextra->insideJava) REJECT;
2364 yyextra->current->req+=yytext;
2365 BEGIN( RequiresExpression ) ;
2367<RequiresClause>"requires"{BN}*"(" {
2368 if (yyextra->insideJava) REJECT;
2370 yyextra->current->req+=yytext;
2371 yyextra->lastRoundContext=RequiresExpression;
2372 yyextra->pCopyRoundString=&yyextra->current->req;
2373 yyextra->roundCount=0;
2374 BEGIN( CopyRound ) ;
2376<RequiresExpression>"{" {
2377 yyextra->current->req+=yytext;
2378 yyextra->lastCurlyContext=RequiresClause;
2379 yyextra->pCopyCurlyString=&yyextra->current->req;
2380 yyextra->curlyCount=0;
2381 BEGIN( CopyCurly ) ;
2383<RequiresExpression>\n {
2384 yyextra->current->req+=
' ';
2387<RequiresExpression>. {
2388 yyextra->current->req+=yytext;
2390<RequiresClause>"(" {
2391 yyextra->current->req+=yytext;
2392 yyextra->lastRoundContext=RequiresClause;
2393 yyextra->pCopyRoundString=&yyextra->current->req;
2394 yyextra->roundCount=0;
2395 BEGIN( CopyRound ) ;
2397<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2401 yyextra->current->req+=yytext;
2402 yyextra->lastRoundContext=RequiresClause;
2403 yyextra->pCopyRoundString=&yyextra->current->req;
2404 yyextra->roundCount=0;
2412<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2416 yyextra->current->req+=yytext;
2417 yyextra->lastSharpContext=RequiresClause;
2418 yyextra->pCopySharpString=&yyextra->current->req;
2419 yyextra->sharpCount=0;
2427<RequiresClause>{NOTopt}{SCOPENAME} {
2431 yyextra->current->req=yytext;
2432 BEGIN(yyextra->requiresContext);
2439<RequiresClause>{NOTopt}"::"{ID} {
2441 yyextra->current->req+=yytext;
2443<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2445 yyextra->current->req+=yytext;
2447<RequiresClause>{BN}+ {
2448 yyextra->current->req+=
' ';
2453 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2454 BEGIN(yyextra->requiresContext);
2456<FindMembers,FindMemberName>{SCOPENAME} {
2458 yyextra->yyBegColNr=yyextra->yyColNr;
2459 yyextra->yyBegLineNr=yyextra->yyLineNr;
2461 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2465 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2467 if (yyextra->insideIDL)
2472 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2476 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2481 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2483 BEGIN(IDLUnionCase);
2485 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2487 yyextra->insideTryBlock=
FALSE;
2488 BEGIN(TryFunctionBlock);
2490 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2492 yyextra->lastAlignAsContext = YY_START;
2495 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2497 yyextra->current->type=
"var";
2499 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2501 yyextra->current->type=
"function";
2503 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2507 yyextra->current->name=
"this";
2510 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2513 BEGIN(StaticAssert);
2515 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2519 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2520 yyextra->current->type+=yytext;
2523 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2525 if (yyextra->current->type.isEmpty())
2527 yyextra->current->type =
"optional";
2531 yyextra->current->type +=
" optional";
2533 yyextra->lastModifierContext = YY_START;
2534 BEGIN(SliceOptional);
2538 if (YY_START==FindMembers)
2542 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2543 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2545 yyextra->current->protection = Protection::Public;
2547 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2549 yyextra->current->protection = Protection::Protected;
2551 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2553 yyextra->current->protection = Protection::Package;
2555 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2557 yyextra->current->protection = Protection::Private;
2559 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2561 if (YY_START==FindMembers)
2562 yyextra->current->name = yytext;
2564 yyextra->current->name += yytext;
2565 yyextra->current->isStatic =
TRUE;
2569 if (YY_START==FindMembers)
2570 yyextra->current->name = yytext;
2572 yyextra->current->name += yytext;
2573 if (yyextra->current->name.startsWith(
"static "))
2575 yyextra->current->isStatic =
TRUE;
2576 yyextra->current->name= yyextra->current->name.mid(7);
2578 else if (yyextra->current->name.startsWith(
"inline "))
2580 if (yyextra->current->type.isEmpty())
2582 yyextra->current->type=
"inline";
2586 yyextra->current->type+=
"inline ";
2588 yyextra->current->name= yyextra->current->name.mid(7);
2590 else if (yyextra->current->name.startsWith(
"constexpr "))
2592 if (yyextra->current->type.isEmpty())
2594 yyextra->current->type=
"constexpr";
2598 yyextra->current->type+=
"constexpr ";
2600 yyextra->current->name=yyextra->current->name.mid(10);
2602 else if (yyextra->current->name.startsWith(
"consteval "))
2604 if (yyextra->current->type.isEmpty())
2606 yyextra->current->type=
"consteval";
2610 yyextra->current->type+=
"consteval ";
2612 yyextra->current->name=yyextra->current->name.mid(10);
2614 else if (yyextra->current->name.startsWith(
"constinit "))
2616 if (yyextra->current->type.isEmpty())
2618 yyextra->current->type=
"constinit";
2622 yyextra->current->type+=
"constinit ";
2624 yyextra->current->name=yyextra->current->name.mid(10);
2626 else if (yyextra->current->name.startsWith(
"const "))
2628 if (yyextra->current->type.isEmpty())
2630 yyextra->current->type=
"const";
2634 yyextra->current->type+=
"const ";
2636 yyextra->current->name=yyextra->current->name.mid(6);
2638 else if (yyextra->current->name.startsWith(
"volatile "))
2640 if (yyextra->current->type.isEmpty())
2642 yyextra->current->type=
"volatile";
2646 yyextra->current->type+=
"volatile ";
2648 yyextra->current->name=yyextra->current->name.mid(9);
2650 else if (yyextra->current->name.startsWith(
"typedef "))
2652 if (yyextra->current->type.isEmpty())
2654 yyextra->current->type=
"typedef";
2658 yyextra->current->type+=
"typedef ";
2660 yyextra->current->name=yyextra->current->name.mid(8);
2670 yyextra->externLinkage=
FALSE;
2674 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2677 yyextra->lastSkipRoundContext = FindMembers;
2678 yyextra->roundCount=0;
2681<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2687 yyextra->current->type+=yytext;
2688 yyextra->lastRoundContext=FindMembers;
2689 yyextra->pCopyRoundString=&yyextra->current->type;
2690 yyextra->roundCount=0;
2693<DeclType>{BN}+ {
lineCount(yyscanner); }
2698<CSIndexer>"["[^\n\]]*"]" {
2702<FindMembers>[0-9]{ID} {
2705 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2707 yyextra->current->name+=
".";
2711 yyextra->current->name+=yytext;
2713<CppQuote>"("{B}*"\"" {
2714 yyextra->insideCppQuote=
TRUE;
2718<IDLUnionCase>":" { BEGIN(FindMembers); }
2719<IDLUnionCase>\n {
lineCount(yyscanner); }
2721<TryFunctionBlock>\n {
lineCount(yyscanner); }
2722<TryFunctionBlock>"{" {
2723 yyextra->curlyCount=0;
2724 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2728<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2730<TryFunctionBlockEnd>\n { unput(*yytext);
2731 BEGIN( FindMembers );
2733<TryFunctionBlockEnd>. { unput(*yytext);
2734 BEGIN( FindMembers );
2737 yyextra->insideCppQuote=
FALSE;
2740<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2742 yyextra->lastCPPContext = YY_START;
2745<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2746<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2747 if (yyextra->insidePHP)
2749 yyextra->current->bodyLine = yyextra->yyLineNr;
2750 yyextra->current->bodyColumn = yyextra->yyColNr;
2751 yyextra->current->fileName = yyextra->fileName;
2752 yyextra->current->startLine = yyextra->yyLineNr;
2753 yyextra->current->startColumn = yyextra->yyColNr;
2754 yyextra->current->type.clear();
2755 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2756 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2757 yyextra->current->section = EntryType::makeDefine();
2758 yyextra->lastDefineContext = YY_START;
2761<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2762 yyextra->yyLineNr = atoi(&yytext[1]);
2764 yyextra->lastPreLineCtrlContext = YY_START;
2765 if (YY_START==ReadBody ||
2766 YY_START==ReadNSBody ||
2767 YY_START==ReadBodyIntf)
2769 yyextra->current->program << yytext;
2771 BEGIN( PreLineCtrl );
2773<PreLineCtrl>"\""[^\n\"]*"\"" {
2775 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2776 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2777 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2779 yyextra->current->program << yytext;
2783 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2784 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2785 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2787 yyextra->current->program << yytext;
2791 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2792 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2793 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2795 yyextra->current->program << yytext;
2798 BEGIN( yyextra->lastPreLineCtrlContext );
2801<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2802<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2803 BEGIN( yyextra->lastCPPContext) ;
2805<SDefine>{ID}{B}*"(" {
2806 yyextra->current->name = yytext;
2807 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2808 yyextra->current->args =
"(";
2809 yyextra->current->bodyLine = yyextra->yyLineNr;
2810 yyextra->current->bodyColumn = yyextra->yyColNr;
2811 yyextra->currentArgumentContext = DefineEnd;
2812 yyextra->fullArgString=yyextra->current->args;
2813 yyextra->copyArgString=&yyextra->current->args;
2814 BEGIN( ReadFuncArgType ) ;
2829 yyextra->current->bodyLine = yyextra->yyLineNr;
2830 yyextra->current->bodyColumn = yyextra->yyColNr;
2831 yyextra->current->name = yytext;
2838 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2840 BEGIN(yyextra->lastDefineContext);
2844 yyextra->current->fileName = yyextra->fileName;
2845 yyextra->current->startLine = yyextra->yyLineNr;
2846 yyextra->current->startColumn = yyextra->yyColNr;
2847 yyextra->current->type.clear();
2848 yyextra->current->type =
"const";
2852 yyextra->current->initializer.str(
init.str());
2853 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2854 yyextra->current->section = EntryType::makeVariable();
2855 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2860<DefineEnd>\\[\r]?\n {
2862 yyextra->current->endBodyLine = yyextra->yyLineNr;
2865 if (yyextra->insideIDL && yyextra->insideCppQuote)
2871 yyextra->lastStringContext=DefineEnd;
2876<DefinePHP>{ID}["']{BN}*","{BN}* {
2877 yyextra->current->name = yytext;
2878 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2879 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2880 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2881 yyextra->current->bodyLine = yyextra->yyLineNr;
2882 yyextra->current->bodyColumn = yyextra->yyColNr;
2883 yyextra->lastRoundContext = DefinePHPEnd;
2884 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2885 yyextra->roundCount = 0;
2886 BEGIN( GCopyRound );
2890 if (yyextra->insideCli)
2893 yyextra->current->name = yytext ;
2901 yyextra->current->name += yytext ;
2904<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2905 if (yyextra->current->bodyLine==-1)
2907 yyextra->current->bodyLine=yyextra->yyLineNr;
2908 yyextra->current->bodyColumn = yyextra->yyColNr;
2910 yyextra->docBlockContext = YY_START;
2911 yyextra->docBlockInBody =
FALSE;
2912 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2917 yyextra->docBlock.str(indent.
str());
2921 yyextra->docBlockTerm =
';';
2922 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2924 yyextra->current->bitfields =
":"+yyextra->current->args;
2925 yyextra->current->args.clear();
2926 yyextra->current->section = EntryType::makeVariable();
2928 if (yytext[yyleng-3]==
'/')
void fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
2939<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2940 yyextra->docBlockContext = YY_START;
2941 yyextra->docBlockInBody =
FALSE;
2942 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2947 yyextra->docBlock.str(indent.
str());
2950 yyextra->docBlockTerm =
',';
2951 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2953 yyextra->current->bitfields =
":"+yyextra->current->args;
2954 yyextra->current->args.clear();
2955 yyextra->current->section = EntryType::makeVariable();
2957 if (yytext[yyleng-3]==
'/')
2968<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2969 if (yyextra->current->bodyLine==-1)
2971 yyextra->current->bodyLine=yyextra->yyLineNr;
2972 yyextra->current->bodyColumn = yyextra->yyColNr;
2974 yyextra->docBlockContext = YY_START;
2975 yyextra->docBlockInBody =
FALSE;
2976 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2980 yyextra->docBlock.str(indent.
str());
2983 yyextra->docBlockTerm = 0;
2984 if (yytext[yyleng-3]==
'/')
2996<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2998 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3001 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3006 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3012 if (yytext[2]==
'!' || yytext[2]==
'/')
3014 yyextra->docBlockContext = YY_START;
3015 yyextra->docBlockInBody =
FALSE;
3016 yyextra->docBlockAutoBrief =
FALSE;
3017 yyextra->docBlock.str(std::string());
3018 yyextra->docBlockTerm = 0;
3024 yyextra->lastCContext=YY_START;
3025 BEGIN(SkipCxxComment);
3030 if (yytext[2]==
'!' || yytext[2]==
'*')
3032 yyextra->docBlockContext = YY_START;
3033 yyextra->docBlockInBody =
FALSE;
3034 yyextra->docBlock.str(std::string());
3035 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3037 yyextra->docBlockTerm = 0;
3043 yyextra->lastCContext=YY_START;
3048<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3049 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3050 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3054 if (!yyextra->insideCS) REJECT;
3055 yyextra->current->bodyLine = yyextra->yyLineNr;
3056 yyextra->current->bodyColumn = yyextra->yyColNr;
3057 yyextra->current->initializer.str(yytext);
3058 yyextra->lastInitializerContext = YY_START;
3059 yyextra->sharpCount=0;
3060 yyextra->initBracketCount=0;
3061 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3062 yyextra->current->spec.setGettable(
true);
3063 BEGIN(ReadInitializerPtr);
3066 yyextra->current->bodyLine = yyextra->yyLineNr;
3067 yyextra->current->bodyColumn = yyextra->yyColNr;
3068 yyextra->current->initializer.str(yytext);
3069 yyextra->lastInitializerContext = YY_START;
3070 yyextra->sharpCount=0;
3071 yyextra->initBracketCount=0;
3072 BEGIN(ReadInitializer);
3074<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3076 yyextra->current->exception +=
" ";
3079<UNOIDLAttributeBlock>"}" {
3080 yyextra->current->exception +=
" }";
3084<ReadInitializer,ReadInitializerPtr>"(" {
3085 yyextra->lastRoundContext=YY_START;
3086 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3087 yyextra->roundCount=0;
3088 yyextra->current->initializer << *yytext;
3091<ReadInitializer,ReadInitializerPtr>"[" {
3092 if (!yyextra->insidePHP) REJECT;
3093 yyextra->lastSquareContext=YY_START;
3094 yyextra->pCopySquareGString=&yyextra->current->initializer;
3095 yyextra->squareCount=0;
3096 yyextra->current->initializer << *yytext;
3099<ReadInitializer,ReadInitializerPtr>"{" {
3100 yyextra->lastCurlyContext=YY_START;
3101 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3102 yyextra->curlyCount=0;
3103 yyextra->current->initializer << *yytext;
3106<ReadInitializer,ReadInitializerPtr>[;,] {
3108 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3110 yyextra->current->fileName = yyextra->fileName;
3111 yyextra->current->startLine = yyextra->yyLineNr;
3112 yyextra->current->startColumn = yyextra->yyColNr;
3113 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3114 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3115 yyextra->current->section = EntryType::makeVariable();
3116 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3120 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3123 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3124 BEGIN(yyextra->lastInitializerContext);
3126 else if (*yytext==
',' && yyextra->initBracketCount==0)
3129 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3130 BEGIN(yyextra->lastInitializerContext);
3134 yyextra->current->initializer << *yytext;
3137<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3138 if (!yyextra->insideCpp)
3144 yyextra->current->initializer << yytext;
3146 yyextra->lastRawStringContext = YY_START;
3147 yyextra->pCopyRawGString = &yyextra->current->initializer;
3152<RawGString>{RAWEND} {
3155 *yyextra->pCopyRawGString << yytext;
3156 BEGIN(yyextra->lastRawStringContext);
3163<RawGString>[^)\n]+ {
3164 *yyextra->pCopyRawGString << yytext;
3167 *yyextra->pCopyRawGString << yytext;
3170 *yyextra->pCopyRawGString << yytext;
3173<RawString>{RAWEND} {
3174 *yyextra->pCopyRawString+=yytext;
3175 yyextra->fullArgString+=yytext;
3178 BEGIN(yyextra->lastRawStringContext);
3182 *yyextra->pCopyRawString += yytext;
3183 yyextra->fullArgString+=yytext;
3186 *yyextra->pCopyRawString += yytext;
3187 yyextra->fullArgString+=yytext;
3190 *yyextra->pCopyRawString += yytext;
3191 yyextra->fullArgString+=yytext;
3194<ReadInitializer,ReadInitializerPtr>\" {
3195 if (yyextra->insideIDL && yyextra->insideCppQuote)
3201 yyextra->lastStringContext=YY_START;
3202 yyextra->current->initializer << yytext;
3203 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3204 yyextra->stopAtInvalidString=
false;
3208<ReadInitializer,ReadInitializerPtr>"->" {
3209 yyextra->current->initializer << yytext;
3211<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3212 yyextra->current->initializer << yytext;
3214<ReadInitializer,ReadInitializerPtr>(">>") {
3215 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3218 yyextra->initBracketCount-=2;
3219 yyextra->sharpCount-=2;
3221 yyextra->current->initializer << yytext;
3223<ReadInitializer,ReadInitializerPtr>(">=") {
3224 yyextra->current->initializer << yytext;
3226<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3227 yyextra->initBracketCount++;
3228 yyextra->sharpCount++;
3229 yyextra->current->initializer << *yytext;
3231<ReadInitializer,ReadInitializerPtr>[>\]})] {
3232 yyextra->initBracketCount--;
3233 yyextra->sharpCount--;
3236 yyextra->current->endBodyLine=yyextra->yyLineNr;
3238 yyextra->current->initializer << *yytext;
3240<ReadInitializer,ReadInitializerPtr>\' {
3241 if (yyextra->insidePHP)
3243 yyextra->current->initializer << yytext;
3244 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3245 yyextra->lastStringContext=YY_START;
3246 BEGIN(CopyPHPGString);
3250 yyextra->current->initializer << yytext;
3253<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3254 if (yyextra->insidePHP)
3260 yyextra->current->initializer << yytext;
3263<ReadInitializer,ReadInitializerPtr>\n {
3264 yyextra->current->initializer << *yytext;
3267<ReadInitializer,ReadInitializerPtr>"@\"" {
3269 yyextra->current->initializer << yytext;
3270 if (!yyextra->insideCS && !yyextra->insideObjC)
3277 yyextra->lastSkipVerbStringContext=YY_START;
3278 yyextra->pSkipVerbString=&yyextra->current->initializer;
3279 BEGIN(SkipVerbString);
3282<SkipVerbString>[^\n"\\]+ {
3283 *yyextra->pSkipVerbString << yytext;
3285<SkipVerbString>"\\\\" {
3286 if (yyextra->insideCS) REJECT
3287 *yyextra->pSkipVerbString << yytext;
3289<SkipVerbString>"\\\"" {
3290 if (yyextra->insideCS) REJECT
3291 *yyextra->pSkipVerbString << yytext;
3293<SkipVerbString>"\"\"" {
3294 *yyextra->pSkipVerbString << yytext;
3296<SkipVerbString>"\"" {
3297 *yyextra->pSkipVerbString << *yytext;
3298 BEGIN(yyextra->lastSkipVerbStringContext);
3301 *yyextra->pSkipVerbString << *yytext;
3305 *yyextra->pSkipVerbString << *yytext;
3307<ReadInitializer,ReadInitializerPtr>"?>" {
3308 if (yyextra->insidePHP)
3309 BEGIN( FindMembersPHP );
3311 yyextra->current->initializer << yytext;
3313<ReadInitializer,ReadInitializerPtr>. {
3314 yyextra->current->initializer << *yytext;
3318<CopyString,CopyPHPString>\\. {
3319 *yyextra->pCopyQuotedString+=yytext;
3322 *yyextra->pCopyQuotedString+=*yytext;
3323 BEGIN( yyextra->lastStringContext );
3326 *yyextra->pCopyQuotedString+=*yytext;
3327 BEGIN( yyextra->lastStringContext );
3329<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3330 *yyextra->pCopyQuotedString+=yytext;
3332<CopyString,CopyPHPString>\n {
3333 *yyextra->pCopyQuotedString+=*yytext;
3336<CopyString,CopyPHPString>. {
3337 *yyextra->pCopyQuotedString+=*yytext;
3341<CopyGString,CopyPHPGString>\\. {
3342 *yyextra->pCopyQuotedGString << yytext;
3345 *yyextra->pCopyQuotedGString << *yytext;
3346 BEGIN( yyextra->lastStringContext );
3349 *yyextra->pCopyQuotedGString << *yytext;
3350 BEGIN( yyextra->lastStringContext );
3352<CopyGString,CopyPHPGString>"<?php" {
3353 *yyextra->pCopyQuotedGString << yytext;
3354 BEGIN( yyextra->lastStringContext );
3356<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3357 *yyextra->pCopyQuotedGString << yytext;
3359<CopyGString,CopyPHPGString>\n {
3360 *yyextra->pCopyQuotedGString << *yytext;
3361 if (yyextra->stopAtInvalidString)
3363 BEGIN( yyextra->lastStringContext );
3370<CopyGString,CopyPHPGString>. {
3371 *yyextra->pCopyQuotedGString << *yytext;
3376 *yyextra->pCopyRoundString += *yytext;
3377 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3378 yyextra->lastStringContext=YY_START;
3382 *yyextra->pCopyRoundString += *yytext;
3383 yyextra->roundCount++;
3386 *yyextra->pCopyRoundString += *yytext;
3387 if (--yyextra->roundCount<0)
3388 BEGIN(yyextra->lastRoundContext);
3392 *yyextra->pCopyRoundString += *yytext;
3395 if (yyextra->insidePHP)
3397 yyextra->current->initializer << yytext;
3398 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3399 yyextra->lastStringContext=YY_START;
3400 BEGIN(CopyPHPString);
3404 *yyextra->pCopyRoundString += yytext;
3407<CopyRound>{CHARLIT} {
3408 if (yyextra->insidePHP)
3414 *yyextra->pCopyRoundString+=yytext;
3417<CopyRound>[^"'()\n,]+ {
3418 *yyextra->pCopyRoundString+=yytext;
3421 *yyextra->pCopyRoundString+=*yytext;
3426 *yyextra->pCopySharpString += *yytext;
3427 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3428 yyextra->lastStringContext=YY_START;
3432 *yyextra->pCopySharpString += *yytext;
3433 yyextra->sharpCount++;
3436 *yyextra->pCopySharpString += *yytext;
3437 if (--yyextra->sharpCount<0)
3439 BEGIN(yyextra->lastSharpContext);
3444 *yyextra->pCopySharpString += *yytext;
3447 if (yyextra->insidePHP)
3449 yyextra->current->initializer << yytext;
3450 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3451 yyextra->lastStringContext=YY_START;
3452 BEGIN(CopyPHPString);
3456 *yyextra->pCopySharpString += yytext;
3459<CopySharp>{CHARLIT} {
3460 if (yyextra->insidePHP)
3466 *yyextra->pCopySharpString+=yytext;
3469<CopySharp>[^"'<>\n,]+ {
3470 *yyextra->pCopySharpString+=yytext;
3473 *yyextra->pCopySharpString+=*yytext;
3479 *yyextra->pCopyRoundGString << *yytext;
3480 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3481 yyextra->lastStringContext=YY_START;
3485 *yyextra->pCopyRoundGString << *yytext;
3486 yyextra->roundCount++;
3489 *yyextra->pCopyRoundGString << *yytext;
3490 if (--yyextra->roundCount<0)
3491 BEGIN(yyextra->lastRoundContext);
3495 *yyextra->pCopyRoundGString << *yytext;
3498 if (yyextra->insidePHP)
3500 yyextra->current->initializer << yytext;
3501 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3502 yyextra->lastStringContext=YY_START;
3503 BEGIN(CopyPHPGString);
3507 *yyextra->pCopyRoundGString << yytext;
3510<GCopyRound>{CHARLIT} {
3511 if (yyextra->insidePHP)
3517 *yyextra->pCopyRoundGString << yytext;
3521 if (!yyextra->insideCS) REJECT;
3522 *yyextra->pCopyRoundGString << yytext;
3523 yyextra->lastSkipVerbStringContext=YY_START;
3524 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3525 BEGIN(SkipVerbString);
3527<GCopyRound>[^"'()\n\/,R]+ {
3528 *yyextra->pCopyRoundGString << yytext;
3530<GCopyRound>{RAWBEGIN} {
3531 *yyextra->pCopyRoundGString << yytext;
3533 yyextra->lastRawStringContext = YY_START;
3534 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3538 *yyextra->pCopyRoundGString << *yytext;
3543 *yyextra->pCopySquareGString << *yytext;
3544 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3545 yyextra->lastStringContext=YY_START;
3549 *yyextra->pCopySquareGString << *yytext;
3550 if (yyextra->insidePHP)
3552 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3553 yyextra->lastStringContext=YY_START;
3554 BEGIN(CopyPHPGString);
3558 *yyextra->pCopySquareGString << *yytext;
3559 yyextra->squareCount++;
3562 *yyextra->pCopySquareGString << *yytext;
3563 if (--yyextra->squareCount<0)
3564 BEGIN(yyextra->lastSquareContext);
3568 *yyextra->pCopySquareGString << *yytext;
3571 if (yyextra->insidePHP)
3573 yyextra->current->initializer << yytext;
3574 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3575 yyextra->lastStringContext=YY_START;
3576 BEGIN(CopyPHPGString);
3580 *yyextra->pCopySquareGString << yytext;
3583<GCopySquare>{CHARLIT} {
3584 if (yyextra->insidePHP)
3590 *yyextra->pCopySquareGString << yytext;
3593<GCopySquare>[^"'\[\]\n\/,]+ {
3594 *yyextra->pCopySquareGString << yytext;
3597 *yyextra->pCopySquareGString << *yytext;
3602 *yyextra->pCopyCurlyString += *yytext;
3603 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3604 yyextra->lastStringContext=YY_START;
3608 *yyextra->pCopyCurlyString += *yytext;
3609 if (yyextra->insidePHP)
3611 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3612 yyextra->lastStringContext=YY_START;
3613 BEGIN(CopyPHPString);
3617 *yyextra->pCopyCurlyString += *yytext;
3618 yyextra->curlyCount++;
3621 *yyextra->pCopyCurlyString += *yytext;
3622 if (--yyextra->curlyCount<0)
3623 BEGIN(yyextra->lastCurlyContext);
3625<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3631 *yyextra->pCopyCurlyString += yytext;
3634<CopyCurly>[^"'{}\/\n,]+ {
3635 *yyextra->pCopyCurlyString += yytext;
3637<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3640 *yyextra->pCopyCurlyString += *yytext;
3643 *yyextra->pCopyCurlyString += *yytext;
3647<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3649<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3651 int s = line.
find(
' ');
3652 int e = line.
find(
'"',s);
3653 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3654 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3661 *yyextra->pCopyCurlyGString << *yytext;
3662 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3663 yyextra->lastStringContext=YY_START;
3667 *yyextra->pCopyCurlyGString << *yytext;
3668 if (yyextra->insidePHP)
3670 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3671 yyextra->lastStringContext=YY_START;
3672 BEGIN(CopyPHPGString);
3676 *yyextra->pCopyCurlyGString << *yytext;
3677 yyextra->curlyCount++;
3680 *yyextra->pCopyCurlyGString << *yytext;
3681 if (--yyextra->curlyCount<0)
3683 yyextra->current->endBodyLine = yyextra->yyLineNr;
3684 BEGIN(yyextra->lastCurlyContext);
3687<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3693 *yyextra->pCopyCurlyGString << yytext;
3696<GCopyCurly>[^"'{}\/\n,]+ {
3697 *yyextra->pCopyCurlyGString << yytext;
3700 *yyextra->pCopyCurlyGString << yytext;
3702<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3705 *yyextra->pCopyCurlyGString << *yytext;
3708 *yyextra->pCopyCurlyGString << *yytext;
3715 if (yyextra->current->type.isEmpty() &&
3716 yyextra->current->name==
"enum")
3718 yyextra->current->section = EntryType::makeEnum();
3719 yyextra->current->name.clear();
3720 yyextra->current->args.clear();
3721 BEGIN(EnumBaseType);
3725 if (yyextra->current->type.isEmpty())
3728 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3731 yyextra->current->bitfields+=
":";
3735 yyextra->current->bitfields+=*yytext;
3738 yyextra->current->args+=*yytext;
3742 yyextra->current->args+=
' ';
3745 QCString oldType = yyextra->current->type;
3746 if (yyextra->current->bodyLine==-1)
3748 yyextra->current->bodyLine = yyextra->yyLineNr;
3749 yyextra->current->bodyColumn = yyextra->yyColNr;
3751 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3753 yyextra->current->type = yyextra->current->type.mid(3);
3755 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3757 yyextra->current->type.prepend(
"typedef ");
3759 bool isStatic = yyextra->current->isStatic;
3760 Protection prot = yyextra->current->protection;
3761 bool isConcept = yyextra->current->section.isConcept();
3762 bool isModule = yyextra->current->section.isModuleDoc();
3765 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3770 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3773 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3775 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3777 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3778 if (yyextra->current->section.isClass())
3782 yyextra->current->section = EntryType::makeVariable() ;
3783 yyextra->current->fileName = yyextra->fileName;
3784 yyextra->current->startLine = yyextra->yyBegLineNr;
3785 yyextra->current->startColumn = yyextra->yyBegColNr;
3786 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3789 if ( *yytext ==
',')
3791 yyextra->current->isStatic = isStatic;
3792 yyextra->current->protection = prot;
3793 yyextra->current->name.clear();
3794 yyextra->current->args.clear();
3795 yyextra->current->brief.clear();
3796 yyextra->current->doc.clear();
3797 yyextra->current->initializer.str(std::string());
3798 yyextra->current->bitfields.clear();
3803 yyextra->mtype = MethodTypes::Method;
3804 yyextra->virt = Specifier::Normal;
3805 yyextra->current->bodyLine = -1;
3806 yyextra->current->bodyColumn = 1;
3807 yyextra->current->groups.clear();
3813 if (yyextra->insideSlice)
3815 yyextra->squareCount=1;
3816 yyextra->lastSquareContext = YY_START;
3817 yyextra->current->metaData +=
"[";
3818 BEGIN( SliceMetadata );
3820 else if (!yyextra->insideCS &&
3821 (yyextra->current->name.isEmpty() ||
3822 yyextra->current->name==
"typedef"
3826 yyextra->squareCount=1;
3827 yyextra->lastSquareContext = YY_START;
3828 yyextra->idlAttr.clear();
3829 yyextra->idlProp.clear();
3830 yyextra->current->mtype = yyextra->mtype;
3833 yyextra->current->mtype == MethodTypes::Property)
3835 yyextra->odlProp =
true;
3836 yyextra->current->spec.setGettable(
true).setSettable(
true);
3839 BEGIN( IDLAttribute );
3841 else if (yyextra->insideCS &&
3842 yyextra->current->name.isEmpty())
3844 yyextra->squareCount=1;
3845 yyextra->lastSquareContext = YY_START;
3848 yyextra->current->args.clear();
3849 BEGIN( SkipSquare );
3853 yyextra->current->args += yytext ;
3854 yyextra->squareCount=1;
3855 yyextra->externLinkage=
FALSE;
3860 yyextra->squareCount++;
3861 yyextra->current->metaData +=
"[";
3863<SliceMetadata>{BN}* {
3866<SliceMetadata>\"[^\"]*\" {
3867 yyextra->current->metaData += yytext;
3870 yyextra->current->metaData += yytext;
3873 yyextra->current->metaData += yytext;
3874 if (--yyextra->squareCount<=0)
3876 BEGIN (yyextra->lastSquareContext);
3880 yyextra->current->type +=
"(";
3881 yyextra->roundCount++;
3883<SliceOptional>[0-9]+ {
3884 yyextra->current->type += yytext;
3887 yyextra->current->type +=
")";
3888 if(--yyextra->roundCount<=0)
3890 BEGIN (yyextra->lastModifierContext);
3895 if (--yyextra->squareCount<=0)
3898 if (yyextra->current->mtype == MethodTypes::Property)
3899 BEGIN( IDLPropName );
3901 BEGIN( yyextra->lastSquareContext );
3904<IDLAttribute>"propput" {
3907 yyextra->current->mtype = MethodTypes::Property;
3909 yyextra->current->spec.setSettable(
true);
3911<IDLAttribute>"propget" {
3914 yyextra->current->mtype = MethodTypes::Property;
3916 yyextra->current->spec.setGettable(
true);
3918<IDLAttribute>"property" {
3919 yyextra->current->spec.setProperty(
true);
3921<IDLAttribute>"attribute" {
3922 yyextra->current->spec.setAttribute(
true);
3924<IDLAttribute>"optional" {
3925 yyextra->current->spec.setOptional(
true);
3927<IDLAttribute>"readonly" {
3930 yyextra->current->spec.setSettable(
false);
3934 yyextra->current->spec.setReadonly(
true);
3937<IDLAttribute>"bound" {
3938 yyextra->current->spec.setBound(
true);
3940<IDLAttribute>"removable" {
3941 yyextra->current->spec.setRemovable(
true);
3943<IDLAttribute>"constrained" {
3944 yyextra->current->spec.setConstrained(
true);
3946<IDLAttribute>"transient" {
3947 yyextra->current->spec.setTransient(
true);
3949<IDLAttribute>"maybevoid" {
3950 yyextra->current->spec.setMaybeVoid(
true);
3952<IDLAttribute>"maybedefault" {
3953 yyextra->current->spec.setMaybeDefault(
true);
3955<IDLAttribute>"maybeambiguous" {
3956 yyextra->current->spec.setMaybeAmbiguous(
true);
3960<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3963 if (yyextra->odlProp)
3965 yyextra->idlProp = yytext;
3968<IDLPropName>{ID}{BN}*"(" {
3969 yyextra->current->name = yytext;
3970 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3971 yyextra->current->startLine = yyextra->yyLineNr;
3972 yyextra->current->startColumn = yyextra->yyColNr;
3975<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3976 if (yyextra->odlProp)
3978 yyextra->idlProp += yytext;
3981<IDLPropName>{ID}{BNopt}/";" {
3982 if (yyextra->odlProp)
3984 yyextra->current->name = yytext;
3985 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3986 yyextra->odlProp =
false;
3991<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3992 yyextra->idlAttr = yytext;
3993 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3996 yyextra->idlProp = yytext;
3998<IDLProp>{BN}*{ID}{BN}*"," {
3999 if (yyextra->current->args.isEmpty())
4000 yyextra->current->args =
"(";
4002 yyextra->current->args +=
", ";
4003 yyextra->current->args += yyextra->idlAttr;
4004 yyextra->current->args +=
" ";
4005 yyextra->current->args += yyextra->idlProp;
4006 yyextra->current->args +=
" ";
4007 yyextra->current->args += yytext;
4008 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4009 yyextra->idlProp.clear();
4010 yyextra->idlAttr.clear();
4013<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4017 yyextra->current->fileName = yyextra->fileName;
4018 yyextra->current->type = yyextra->idlProp;
4019 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4020 if (!yyextra->current->args.isEmpty())
4021 yyextra->current->args +=
")";
4022 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4023 yyextra->current->section = EntryType::makeVariable();
4024 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4026 BEGIN( FindMembers );
4031<Array>"]" { yyextra->current->args += *yytext ;
4032 if (--yyextra->squareCount<=0)
4033 BEGIN( FindMembers ) ;
4035<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4036 if (--yyextra->squareCount<=0)
4037 BEGIN( SFunction ) ;
4039<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4040 yyextra->squareCount++;
4042<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4043<SkipSquare>"[" { yyextra->squareCount++; }
4045 if (--yyextra->squareCount<=0)
4046 BEGIN( yyextra->lastSquareContext );
4049 yyextra->lastStringContext=YY_START;
4050 BEGIN( SkipString );
4052<SkipSquare>[^\n\[\]\"]+
4053<FindMembers>"<" {
addType(yyscanner);
4054 yyextra->current->type += yytext ;
4057<Sharp>">" { yyextra->current->type += *yytext ;
4058 if (--yyextra->sharpCount<=0)
4059 BEGIN( FindMembers ) ;
4061<Sharp>"<" { yyextra->current->type += *yytext ;
4062 yyextra->sharpCount++;
4065 yyextra->current->type +=
' ';
4068<Sharp>. { yyextra->current->type += *yytext ; }
4071 yyextra->current->bodyLine = yyextra->yyLineNr;
4072 yyextra->current->bodyColumn = yyextra->yyColNr;
4073 yyextra->current->name = yytext;
4078 yyextra->lastInitializerContext = YY_START;
4079 yyextra->sharpCount=0;
4080 yyextra->initBracketCount=0;
4081 yyextra->current->initializer.str(
"=");
4082 BEGIN(ReadInitializer);
4085 yyextra->lastInitializerContext = YY_START;
4086 yyextra->sharpCount=0;
4087 yyextra->initBracketCount=0;
4088 yyextra->current->initializer.str(yytext);
4089 BEGIN(ReadInitializer);
4092 if (yyextra->insideJava)
4094 if (!yyextra->current->name.isEmpty())
4096 yyextra->current->fileName = yyextra->fileName;
4097 yyextra->current->startLine = yyextra->yyLineNr;
4098 yyextra->current->startColumn = yyextra->yyColNr;
4099 if (!yyextra->current_root->spec.isEnum())
4101 yyextra->current->type =
"@";
4103 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4104 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4105 yyextra->current->section = EntryType::makeVariable();
4106 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4110 BEGIN( FindMembers );
4121 if (!yyextra->current->name.isEmpty())
4123 yyextra->current->fileName = yyextra->fileName;
4124 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4126 yyextra->current->startLine = yyextra->current->bodyLine;
4127 yyextra->current->startColumn = yyextra->current->bodyColumn;
4131 yyextra->current->startLine = yyextra->yyLineNr;
4132 yyextra->current->startColumn = yyextra->yyColNr;
4134 if (!yyextra->current_root->spec.isEnum())
4136 yyextra->current->type =
"@";
4138 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4139 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4140 yyextra->current->section = EntryType::makeVariable();
4142 if (!yyextra->insideCS && !yyextra->insideJava &&
4143 !yyextra->current_root->spec.isStrong())
4150 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4152 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4157 yyextra->current->reset();
4162 yyextra->squareCount=1;
4163 yyextra->lastSquareContext = YY_START;
4166<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4167<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4168<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4171 yyextra->current->program << yytext ;
4174<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4175 yyextra->current->program << yytext ;
4176 yyextra->pSkipInterpString = &yyextra->current->program;
4177 yyextra->lastSkipInterpStringContext=YY_START;
4178 BEGIN( SkipInterpString );
4180<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})* {
4181 *yyextra->pSkipInterpString << yytext;
4183<SkipInterpString>\" {
4184 *yyextra->pSkipInterpString << *yytext;
4185 BEGIN( yyextra->lastSkipInterpStringContext );
4188<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4189 yyextra->current->program << yytext ;
4190 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4191 yyextra->lastSkipInterpVerbStringContext=YY_START;
4192 BEGIN( SkipInterpVerbString );
4194<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4195 *yyextra->pSkipInterpVerbString << yytext;
4197<SkipInterpString>"{"[^}]*"}" {
4198 *yyextra->pSkipInterpString << yytext;
4200<SkipInterpVerbString>"{"[^}]*"}" {
4201 *yyextra->pSkipInterpVerbString << yytext;
4203<SkipInterpVerbString>\" {
4204 *yyextra->pSkipInterpVerbString << *yytext;
4205 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4207<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4208<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4209 yyextra->pSkipVerbString = &yyextra->current->program;
4210 yyextra->lastSkipVerbStringContext=YY_START;
4211 BEGIN( SkipVerbString );
4213<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4215 yyextra->current->program << yytext ;
4216 yyextra->pCopyHereDocGString = &yyextra->current->program;
4217 yyextra->lastHereDocContext=YY_START;
4218 BEGIN( CopyHereDoc );
4225<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4226 yyextra->current->program << yytext;
4228 yyextra->lastRawStringContext = YY_START;
4229 yyextra->pCopyRawGString = &yyextra->current->program;
4232<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4233 yyextra->pCopyQuotedGString = &yyextra->current->program;
4234 yyextra->lastStringContext=YY_START;
4235 yyextra->stopAtInvalidString=
false;
4236 BEGIN( CopyGString );
4238<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4239<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4240 yyextra->lastContext = YY_START ;
4243<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4244 ++yyextra->yyLineNr ;
4245 yyextra->lastContext = YY_START ;
4248<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4249 if (!yyextra->insidePHP)
4251 yyextra->current->program << yytext;
4255 yyextra->current->program << yytext;
4256 yyextra->pCopyQuotedGString = &yyextra->current->program;
4257 yyextra->lastStringContext=YY_START;
4258 BEGIN(CopyPHPGString);
4261<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4262 if (yyextra->insidePHP)
4269 yyextra->current->program << yytext;
4272<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4273 ++yyextra->curlyCount ;
4276 yyextra->current->program << yytext ;
4277 --yyextra->curlyCount ;
4279<ReadBody,ReadNSBody>"}" {
4280 if ( yyextra->curlyCount>0 )
4282 yyextra->current->program << yytext ;
4283 --yyextra->curlyCount ;
4287 yyextra->current->endBodyLine = yyextra->yyLineNr;
4288 std::shared_ptr<Entry> original_root = yyextra->current_root;
4289 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4293 QCString doc = yyextra->current->doc;
4294 int docLine = yyextra->current->docLine;
4295 QCString docFile = yyextra->current->docFile;
4296 QCString brief = yyextra->current->brief;
4297 int briefLine = yyextra->current->briefLine;
4298 QCString briefFile = yyextra->current->briefFile;
4300 yyextra->current->doc =
"";
4301 yyextra->current->docLine = 0;
4302 yyextra->current->docFile =
"";
4303 yyextra->current->brief =
"";
4304 yyextra->current->briefLine = 0;
4305 yyextra->current->briefFile =
"";
4306 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4308 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4309 yyextra->current->program.str(std::string());
4310 new_current->name = yyextra->current->name.mid(split_point + 2);
4311 yyextra->current->name = yyextra->current->name.left(split_point);
4312 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4314 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4315 yyextra->current_root = yyextra->current;
4316 yyextra->current = new_current;
4319 yyextra->current->doc = doc;
4320 yyextra->current->docLine = docLine;
4321 yyextra->current->docFile = docFile;
4322 yyextra->current->brief = brief;
4323 yyextra->current->briefLine = briefLine;
4324 yyextra->current->briefFile = briefFile;
4326 QCString &cn = yyextra->current->name;
4327 QCString rn = yyextra->current_root->name;
4333 if (yyextra->isTypedef && cn.
isEmpty())
4336 BEGIN( TypedefName );
4340 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4342 yyextra->current->program <<
',';
4347 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4348 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4350 if (yyextra->insideObjC &&
4351 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4354 BEGIN( ReadBodyIntf ) ;
4358 yyextra->memspecEntry = yyextra->current;
4359 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4360 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4361 if (yyextra->current->section.isNamespace() ||
4362 yyextra->current->spec.isInterface() ||
4363 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4364 yyextra->insideSlice
4367 yyextra->current->reset();
4368 yyextra->current_root = std::move(original_root);
4370 yyextra->memspecEntry.reset();
4371 BEGIN( FindMembers ) ;
4375 static const reg::Ex re(R
"(@\d+$)");
4376 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4377 !
reg::search(yyextra->memspecEntry->name.str(),re))
4380 yyextra->current->doc.clear();
4381 yyextra->current->brief.clear();
4383 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.
4389<ReadBody>"}"{BN}+"typedef"{BN}+ {
4391 if ( yyextra->curlyCount>0 )
4393 yyextra->current->program << yytext ;
4394 --yyextra->curlyCount ;
4398 yyextra->isTypedef =
TRUE;
4399 yyextra->current->endBodyLine = yyextra->yyLineNr;
4400 QCString &cn = yyextra->current->name;
4401 QCString rn = yyextra->current_root->name;
4406 BEGIN( TypedefName );
4409<TypedefName>("const"|"volatile"){BN} {
4411 yyextra->current->type.prepend(yytext);
4414 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4416 yyextra->current->program <<
",";
4418 yyextra->current->name=yytext;
4420 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4421 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4423 if (!yyextra->firstTypedefEntry)
4425 yyextra->firstTypedefEntry = yyextra->current;
4427 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4429 yyextra->isTypedef=
TRUE;
4430 BEGIN(MemberSpecSkip);
4434 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4436 yyextra->current->program <<
',';
4439 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4440 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4441 yyextra->memspecEntry = yyextra->current;
4442 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4445 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4447<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4449 int i=0,l=(int)yyleng,j;
4450 while (i<l && (!
isId(yytext[i]))) i++;
4452 j=yyextra->msName.
find(
"[");
4455 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4456 yyextra->msName=yyextra->msName.left(j);
4461 if (yyextra->firstTypedefEntry)
4463 if (yyextra->firstTypedefEntry->spec.isStruct())
4465 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4467 else if (yyextra->firstTypedefEntry->spec.isUnion())
4469 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4471 else if (yyextra->firstTypedefEntry->section.isEnum())
4473 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4477 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4483 yyextra->current->name = yyextra->msName;
4489 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4495 const Entry *p=yyextra->current.get();
4503 int pi = (i==-1) ? 0 : i+2;
4513 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4517 if (!yyextra->msName.isEmpty()
4523 if (typedefHidesStruct &&
4524 yyextra->isTypedef &&
4525 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4526 yyextra->msType.stripWhiteSpace().isEmpty() &&
4527 yyextra->memspecEntry)
4529 yyextra->memspecEntry->name=yyextra->msName;
4533 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4534 varEntry->lang = yyextra->language;
4535 varEntry->protection = yyextra->current->protection ;
4536 varEntry->mtype = yyextra->current->mtype;
4537 varEntry->virt = yyextra->current->virt;
4538 varEntry->isStatic = yyextra->current->isStatic;
4539 varEntry->section = EntryType::makeVariable();
4540 varEntry->name = yyextra->msName.stripWhiteSpace();
4541 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4542 varEntry->args = yyextra->msArgs;
4543 if (yyextra->isTypedef)
4545 varEntry->type.prepend(
"typedef ");
4548 if (typedefHidesStruct &&
4549 yyextra->isTypedef &&
4550 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4551 yyextra->memspecEntry
4554 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4558 varEntry->type+=yyextra->current->name+yyextra->msType;
4560 varEntry->fileName = yyextra->fileName;
4561 varEntry->startLine = yyextra->yyLineNr;
4562 varEntry->startColumn = yyextra->yyColNr;
4563 varEntry->doc = yyextra->current->doc;
4564 varEntry->brief = yyextra->current->brief;
4565 varEntry->mGrpId = yyextra->current->mGrpId;
4566 varEntry->initializer.str(yyextra->current->initializer.str());
4567 varEntry->groups = yyextra->current->groups;
4568 varEntry->sli = yyextra->current->sli;
4573 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4578 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4580 if (!yyextra->current->doc.isEmpty())
4582 yyextra->memspecEntry->doc += yyextra->current->doc;
4584 if (!yyextra->current->brief.isEmpty())
4586 yyextra->memspecEntry->brief += yyextra->current->brief;
4589 yyextra->msType.clear();
4590 yyextra->msName.clear();
4591 yyextra->msArgs.clear();
4592 yyextra->isTypedef=
FALSE;
4593 yyextra->firstTypedefEntry.reset();
4594 yyextra->memspecEntry.reset();
4595 yyextra->current->reset();
4597 BEGIN( FindMembers );
4601 yyextra->current->doc.clear();
4602 yyextra->current->brief.clear();
Represents an unstructured piece of information, about an entity found in the sources.
EntryType section
entry type (see Sections);
ENTRY_TYPES bool isCompound() const
char & at(size_t i)
Returns a reference to the character at index i.
int findRev(char c, int index=-1, bool cs=TRUE) const
4607 yyextra->lastInitializerContext=YY_START;
4608 yyextra->sharpCount=0;
4609 yyextra->initBracketCount=0;
4610 yyextra->current->initializer.str(yytext);
4611 BEGIN(ReadInitializer);
4622<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4623<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4624<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4627<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4628 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4630 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4631 yyextra->insideObjC=
FALSE;
4632 BEGIN( FindMembers );
4634<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4635<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4637<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4638<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4639 if (yyextra->insidePHP)
4645 yyextra->current->bodyLine = yyextra->yyLineNr;
4646 yyextra->current->bodyColumn = yyextra->yyColNr;
4649 yyextra->funcPtrType=yytext;
4650 yyextra->roundCount=0;
4655<FuncPtr>{SCOPENAME} {
4656 yyextra->current->name = yytext;
4659 BEGIN( FuncPtrOperator );
4663 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4665 yyextra->funcPtrType += yyextra->current->name;
4669 BEGIN( EndFuncPtr );
4676<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4677 yyextra->current->name += yytext;
4678 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4681<FuncPtrOperator>\n {
4683 yyextra->current->name += *yytext;
4685<FuncPtrOperator>"(" {
4687 BEGIN( EndFuncPtr );
4690 yyextra->current->name += *yytext;
4692<EndFuncPtr>")"{BNopt}/";" {
4694 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4697<EndFuncPtr>")"{BNopt}/"(" {
4699 if (yyextra->funcPtrType!=
"(")
4701 yyextra->current->type+=yyextra->funcPtrType+
")";
4705<EndFuncPtr>")"{BNopt}/"[" {
4707 yyextra->current->type+=yyextra->funcPtrType;
4708 yyextra->current->args +=
")";
4713 yyextra->current->args += *yytext ;
4716 yyextra->current->bodyLine = yyextra->yyLineNr;
4717 yyextra->current->bodyColumn = yyextra->yyColNr;
4718 yyextra->currentArgumentContext = FuncFuncEnd;
4719 yyextra->fullArgString=yyextra->current->args;
4720 yyextra->copyArgString=&yyextra->current->args;
4721 BEGIN( ReadFuncArgType ) ;
4723<EndFuncPtr>"["[^\n\]]*"]" {
4724 yyextra->funcPtrType+=yytext;
4730 yyextra->current->args += *yytext ;
4731 ++yyextra->roundCount;
4734 yyextra->current->args += *yytext ;
4735 if ( yyextra->roundCount )
4736 --yyextra->roundCount;
4742<FuncFuncEnd>")"{BN}*"(" {
4744 yyextra->current->type+=yyextra->funcPtrType+
")(";
4745 BEGIN(FuncFuncType);
4747<FuncFuncEnd>")"{BNopt}/[;{] {
4749 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4752<FuncFuncEnd>")"{BNopt}/"[" {
4754 yyextra->current->type+=yyextra->funcPtrType;
4755 yyextra->current->args+=
")";
4756 BEGIN(FuncFuncArray);
4759 yyextra->current->args += *yytext;
4762 yyextra->current->type += *yytext;
4763 yyextra->roundCount++;
4766 yyextra->current->type += *yytext;
4767 if (yyextra->roundCount)
4768 --yyextra->roundCount;
4772<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4773<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4775 yyextra->current->type += *yytext;
4777<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4778 if (yyextra->current->type.startsWith(
"typedef") &&
4779 yyextra->current->bodyLine==-1)
4782 yyextra->current->bodyLine = yyextra->yyLineNr;
4783 yyextra->current->bodyColumn = yyextra->yyColNr;
4784 BEGIN( GetCallType );
4786 else if (!yyextra->current->name.isEmpty())
4788 yyextra->current->args = yytext;
4789 yyextra->current->bodyLine = yyextra->yyLineNr;
4790 yyextra->current->bodyColumn = yyextra->yyColNr;
4791 yyextra->currentArgumentContext = FuncQual;
4792 yyextra->fullArgString=yyextra->current->args;
4793 yyextra->copyArgString=&yyextra->current->args;
4794 BEGIN( ReadFuncArgType ) ;
4798<GetCallType>{BN}*{ID}{BN}*"*" {
4801 yyextra->funcPtrType=
"(";
4802 yyextra->funcPtrType+=yytext;
4803 yyextra->roundCount=0;
4807 if (!yyextra->current->name.isEmpty())
4809 yyextra->current->args = yytext;
4810 yyextra->current->bodyLine = yyextra->yyLineNr;
4811 yyextra->current->bodyColumn = yyextra->yyColNr;
4812 yyextra->currentArgumentContext = FuncQual;
4813 yyextra->fullArgString=yyextra->current->args;
4814 yyextra->copyArgString=&yyextra->current->args;
4815 BEGIN( ReadFuncArgType ) ;
4829<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4830 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4831 else yyextra->fullArgString+=yytext;
4833<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4834 yyextra->fullArgString+=yytext;
4836<CopyArgRound>[^\/\n\)\(\"\']+ {
4837 *yyextra->copyArgString+=yytext;
4838 yyextra->fullArgString+=yytext;
4840<CopyArgSquare>[^\/\n\]\[\"\']+ {
4841 *yyextra->copyArgString+=yytext;
4842 yyextra->fullArgString+=yytext;
4844<ReadFuncArgType,ReadTempArgs>{BN}* {
4845 *yyextra->copyArgString+=
" ";
4846 yyextra->fullArgString+=
" ";
4849<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4851 yyextra->lastRawStringContext = YY_START;
4852 yyextra->pCopyRawString = yyextra->copyArgString;
4853 *yyextra->pCopyRawString+=yytext;
4854 yyextra->fullArgString+=yytext;
4857<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4858 *yyextra->copyArgString+=*yytext;
4859 yyextra->fullArgString+=*yytext;
4860 yyextra->lastCopyArgStringContext = YY_START;
4861 BEGIN( CopyArgString );
4863<ReadFuncArgType>"[" {
4864 if (!yyextra->insidePHP) REJECT;
4865 *yyextra->copyArgString+=*yytext;
4866 yyextra->fullArgString+=*yytext;
4867 yyextra->argSquareCount=0;
4868 yyextra->lastCopyArgContext = YY_START;
4869 BEGIN( CopyArgSquare );
4871<ReadFuncArgType,ReadTempArgs>"(" {
4872 *yyextra->copyArgString+=*yytext;
4873 yyextra->fullArgString+=*yytext;
4874 yyextra->argRoundCount=0;
4875 yyextra->lastCopyArgContext = YY_START;
4876 BEGIN( CopyArgRound );
4878<ReadFuncArgType>")" {
4879 *yyextra->copyArgString+=*yytext;
4880 yyextra->fullArgString+=*yytext;
4882 if (yyextra->insideJS)
4893 yyextra->docBackup = yyextra->current->doc;
4894 yyextra->briefBackup = yyextra->current->brief;
4896 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4899<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4900 if (yyextra->currentArgumentContext==DefineEnd)
4904 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4910 BEGIN( yyextra->currentArgumentContext );
4916 yyextra->fullArgString+=yytext;
4917 yyextra->lastCopyArgChar=0;
4918 yyextra->lastCommentInArgContext=YY_START;
4920 BEGIN( CopyArgCommentLine );
4922 BEGIN( CopyArgComment );
4926<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4927<ReadFuncArgType,ReadTempArgs>{CCS} {
4928 yyextra->lastCContext = YY_START;
4929 BEGIN( SkipComment );
4931<ReadFuncArgType,ReadTempArgs>{CPPC} {
4932 yyextra->lastCContext = YY_START;
4933 BEGIN( SkipCxxComment );
4949<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4951 if (yyextra->currentArgumentContext==DefineEnd)
4955 int i;
for (i=(
int)yyleng-1;i>0;i--)
4959 *yyextra->copyArgString+=*yytext;
4960 yyextra->fullArgString+=*yytext;
4963 BEGIN( yyextra->currentArgumentContext );
4969 yyextra->lastCopyArgChar=*yytext;
4972 yyextra->lastCommentInArgContext=YY_START;
4973 yyextra->fullArgString+=text;
4974 if (text.
find(
"//")!=-1)
4975 BEGIN( CopyArgCommentLine );
4977 BEGIN( CopyArgComment );
4980<CopyArgComment>^{B}*"*"+/{BN}+
4981<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4982<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4983 if (yyextra->lastCopyArgChar!=0)
4984 unput(yyextra->lastCopyArgChar);
4985 BEGIN( yyextra->lastCommentInArgContext );
4987<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4989 if (yyextra->lastCopyArgChar!=0)
4990 unput(yyextra->lastCopyArgChar);
4991 BEGIN( yyextra->lastCommentInArgContext );
4993<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4994 yyextra->docBlockName=
"uml";
4995 yyextra->fullArgString+=yytext;
4996 BEGIN(CopyArgVerbatim);
4998<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4999 yyextra->docBlockName=&yytext[1];
5000 yyextra->fullArgString+=yytext;
5001 BEGIN(CopyArgVerbatim);
5003<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5004 yyextra->docBlockName=&yytext[1];
5005 if (yyextra->docBlockName.at(1)==
'[')
5007 yyextra->docBlockName.at(1)=
']';
5009 if (yyextra->docBlockName.at(1)==
'{')
5011 yyextra->docBlockName.at(1)=
'}';
5013 if (yyextra->docBlockName.at(1)==
'(')
5015 yyextra->docBlockName.at(1)=
')';
5017 yyextra->fullArgString+=yytext;
5018 BEGIN(CopyArgVerbatim);
5020<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5021 yyextra->fullArgString+=yytext;
5022 if (&yytext[4]==yyextra->docBlockName)
5024 yyextra->docBlockName=
"";
5025 BEGIN(CopyArgCommentLine);
5028<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5029 yyextra->fullArgString+=yytext;
5030 if (yyextra->docBlockName==&yytext[1])
5032 yyextra->docBlockName=
"";
5033 BEGIN(CopyArgCommentLine);
5036<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5037<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5038<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5039<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5040<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5041 warn(yyextra->fileName,yyextra->yyLineNr,
5042 "Ignoring {:c}brief command inside argument documentation",*yytext
5044 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5047 *yyextra->copyArgString+=*yytext;
5048 yyextra->fullArgString+=*yytext;
5049 yyextra->argSharpCount=1;
5050 BEGIN( CopyArgSharp );
5053 *yyextra->copyArgString+=*yytext;
5054 yyextra->fullArgString+=*yytext;
5056 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5058 BEGIN( yyextra->currentArgumentContext );
5061 yyextra->argRoundCount++;
5062 *yyextra->copyArgString+=*yytext;
5063 yyextra->fullArgString+=*yytext;
5066 *yyextra->copyArgString+=*yytext;
5067 yyextra->fullArgString+=*yytext;
5068 if (yyextra->argRoundCount>0)
5069 yyextra->argRoundCount--;
5071 BEGIN( yyextra->lastCopyArgContext );
5074 yyextra->argSquareCount++;
5075 *yyextra->copyArgString+=*yytext;
5076 yyextra->fullArgString+=*yytext;
5079 *yyextra->copyArgString+=*yytext;
5080 yyextra->fullArgString+=*yytext;
5081 if (yyextra->argSquareCount>0)
5082 yyextra->argSquareCount--;
5084 BEGIN( yyextra->lastCopyArgContext );
5087 *yyextra->copyArgString+=*yytext;
5088 yyextra->fullArgString+=*yytext;
5089 yyextra->argRoundCount=0;
5090 yyextra->lastCopyArgContext = YY_START;
5091 BEGIN( CopyArgRound );
5094 yyextra->argSharpCount++;
5096 *yyextra->copyArgString+=*yytext;
5097 yyextra->fullArgString+=*yytext;
5100 *yyextra->copyArgString+=*yytext;
5101 yyextra->fullArgString+=*yytext;
5102 yyextra->argSharpCount--;
5103 if (yyextra->argSharpCount>0)
5109 BEGIN( ReadTempArgs );
5113<CopyArgString,CopyArgPHPString>\\. {
5114 *yyextra->copyArgString+=yytext;
5115 yyextra->fullArgString+=yytext;
5118 *yyextra->copyArgString+=*yytext;
5119 yyextra->fullArgString+=*yytext;
5120 BEGIN( yyextra->lastCopyArgStringContext );
5122<CopyArgPHPString>\' {
5123 *yyextra->copyArgString+=*yytext;
5124 yyextra->fullArgString+=*yytext;
5125 BEGIN( yyextra->lastCopyArgStringContext );
5127<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5128 if (yyextra->insidePHP)
5134 *yyextra->copyArgString+=yytext;
5135 yyextra->fullArgString+=yytext;
5138<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5139 *yyextra->copyArgString+=yytext;
5140 yyextra->fullArgString+=yytext;
5141 if (yyextra->insidePHP)
5143 yyextra->lastCopyArgStringContext=YY_START;
5144 BEGIN(CopyArgPHPString);
5147<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5148 *yyextra->copyArgString+=yytext;
5149 yyextra->fullArgString+=yytext;
5151<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5153 *yyextra->copyArgString+=*yytext;
5154 yyextra->fullArgString+=*yytext;
5156<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5157 *yyextra->copyArgString+=yytext;
5158 yyextra->fullArgString+=yytext;
5160<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5161 *yyextra->copyArgString+=*yytext;
5162 yyextra->fullArgString+=*yytext;
5170<FuncRound>"(" { yyextra->current->args += *yytext ;
5171 ++yyextra->roundCount ;
5173<FuncRound>")" { yyextra->current->args += *yytext ;
5174 if ( yyextra->roundCount )
5175 --yyextra->roundCount ;
5187 if (
qstrcmp(yytext,
";")==0 &&
5188 ((yyextra->insideJS || yyextra->insidePHP) &&
5191 yyextra->current->reset();
5193 BEGIN( FindMembers );
5197 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5200<FuncQual>{BN}*"abstract"{BN}* {
5202 yyextra->current->virt = Specifier::Pure;
5203 yyextra->current->args +=
" override ";
5205<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5207 yyextra->current->spec.setOverride(
true);
5208 yyextra->current->args +=
" override ";
5211<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5213 yyextra->current->spec.setFinal(
true);
5214 yyextra->current->args +=
" final ";
5217<FuncQual>{BN}*"sealed"{BN}* {
5219 yyextra->current->spec.setSealed(
true);
5220 yyextra->current->args +=
" sealed ";
5222<FuncQual>{BN}*"new"{BN}* {
5224 yyextra->current->spec.setNew(
true);
5225 yyextra->current->args +=
" new ";
5227<FuncQual>{BN}*"const"{BN}* {
5229 yyextra->current->args +=
" const ";
5230 yyextra->current->argList.setConstSpecifier(
TRUE);
5232<FuncQual>{BN}*"volatile"{BN}* {
5234 yyextra->current->args +=
" volatile ";
5235 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5237<FuncQual>{BN}*"noexcept"{BN}* {
5239 yyextra->current->args +=
" noexcept ";
5240 yyextra->current->spec.setNoExcept(
true);
5242<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5244 yyextra->current->args +=
" noexcept(false)";
5246<FuncQual>{BN}*"noexcept"{BN}*"(" {
5248 yyextra->current->args +=
" noexcept(";
5249 yyextra->current->spec.setNoExcept(
true);
5250 yyextra->lastRoundContext=FuncQual;
5251 yyextra->pCopyRoundString=&yyextra->current->args;
5252 yyextra->roundCount=0;
5256 yyextra->current->args +=
" &";
5259<FuncQual>{BN}*"&&" {
5260 yyextra->current->args +=
" &&";
5264<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5266 yyextra->current->args +=
" = 0";
5267 yyextra->current->virt = Specifier::Pure;
5268 yyextra->current->argList.setPureSpecifier(
TRUE);
5271<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5273 yyextra->current->args +=
" = delete";
5274 yyextra->current->spec.setDelete(
true);
5275 yyextra->current->argList.setIsDeleted(
TRUE);
5278<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5280 yyextra->current->args +=
" = default";
5281 yyextra->current->spec.setDefault(
true);
5284<FuncQual>{BN}*"->"{BN}* {
5286 yyextra->current->argList.setTrailingReturnType(
" -> ");
5287 yyextra->current->args +=
" -> ";
5288 yyextra->roundCount=0;
5289 BEGIN(TrailingReturn);
5291<TrailingReturn>[{;] {
5292 if (yyextra->roundCount>0) REJECT;
5296<TrailingReturn>"requires"{BN}+ {
5297 if (yyextra->insideJava) REJECT;
5298 yyextra->requiresContext = FuncQual;
5299 yyextra->current->req+=
' ';
5300 BEGIN(RequiresClause);
5302<TrailingReturn>"(" {
5303 yyextra->roundCount++;
5304 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5305 yyextra->current->args+=yytext;
5307<TrailingReturn>")" {
5308 if (yyextra->roundCount>0)
5310 yyextra->roundCount--;
5314 warn(yyextra->fileName,yyextra->yyLineNr,
5315 "Found ')' without opening '(' for trailing return type '{})...'",
5316 yyextra->current->argList.trailingReturnType());
5318 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5319 yyextra->current->args+=yytext;
5322 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5323 yyextra->current->args+=yytext;
5327 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5328 yyextra->current->args+=
' ';
5330<FuncRound,FuncFunc>{BN}*","{BN}* {
5332 yyextra->current->args +=
", " ;
5334<FuncQual,FuncRound,FuncFunc>{BN}+ {
5336 yyextra->current->args +=
' ' ;
5338<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5340 yyextra->lastCPPContext = YY_START;
5344 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5351 yyextra->lastInitializerContext=YY_START;
5352 yyextra->sharpCount=0;
5353 yyextra->initBracketCount=0;
5354 yyextra->current->initializer.str(yytext);
5355 BEGIN(ReadInitializer);
5370 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5373 yyextra->requiresContext = YY_START;
5374 yyextra->current->req+=
' ';
5375 BEGIN(RequiresClause);
5377 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5380 yyextra->current->typeConstr.clear();
5381 yyextra->current->typeConstr.push_back(
Argument());
5382 yyextra->lastCSConstraint = YY_START;
5383 BEGIN( CSConstraintName );
5387 yyextra->current->args = yytext;
5388 yyextra->oldStyleArgType.clear();
5389 BEGIN(OldStyleArgs);
5393 yyextra->current->args += yytext;
5399 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5401 if (yyextra->current->doc!=yyextra->docBackup)
5403 doc=yyextra->current->doc;
5404 yyextra->current->doc=yyextra->docBackup;
5406 if (yyextra->current->brief!=yyextra->briefBackup)
5408 brief=yyextra->current->brief;
5409 yyextra->current->brief=yyextra->briefBackup;
5411 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5412 oldStyleArgName,brief,doc);
5413 yyextra->current->args.clear();
5414 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5416<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5418 if (yyextra->current->argList.empty())
5420 yyextra->current->argList.setNoParameters(
TRUE);
5426<OldStyleArgs>. { yyextra->current->args += *yytext; }
5427<FuncQual,FuncRound,FuncFunc>\" {
5428 if (yyextra->insideIDL && yyextra->insideCppQuote)
5434 yyextra->current->args += *yytext;
5437<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5438<FuncQual>{BN}*"try:" |
5439<FuncQual>{BN}*"try"{BN}+ {
5440 yyextra->insideTryBlock=
TRUE;
5442 if (yytext[yyleng-1]==
':')
5448<FuncQual>{BN}*"throw"{BN}*"(" {
5449 yyextra->current->exception =
" throw (" ;
5450 yyextra->roundCount=0;
5452 BEGIN( ExcpRound ) ;
5454<FuncQual>{BN}*"raises"{BN}*"(" {
5455 yyextra->current->exception =
" raises (" ;
5457 yyextra->roundCount=0;
5458 BEGIN( ExcpRound ) ;
5460<FuncQual>{BN}*"throws"{BN}+ {
5461 yyextra->current->exception =
" throws " ;
5465<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5466 ++yyextra->roundCount ;
5468<ExcpRound>")" { yyextra->current->exception += *yytext ;
5469 if ( yyextra->roundCount )
5470 --yyextra->roundCount ;
5475 yyextra->current->exception += *yytext;
5478 unput(
'{'); BEGIN( FuncQual );
5481 unput(
';'); BEGIN( FuncQual );
5484 yyextra->current->exception +=
' ';
5488 yyextra->current->exception += *yytext;
5490<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5491 yyextra->current->name = yyextra->current->args ;
5492 yyextra->current->args = yytext ;
5493 yyextra->roundCount=0;
5494 BEGIN( FuncRound ) ;
5497 if (!yyextra->insidePHP) BEGIN(SkipInits);
5503 yyextra->current->fileName = yyextra->fileName;
5504 yyextra->current->startLine = yyextra->yyBegLineNr;
5505 yyextra->current->startColumn = yyextra->yyBegColNr;
5506 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5508 std::string type = yyextra->current->type.str();
5512 ti = (int)
match.position();
5516 int di = yyextra->current->type.find(
"decltype(");
5517 if (di!=-1 && di<ti)
5522 int ts=yyextra->current->type.find(
'<');
5523 int te=yyextra->current->type.findRev(
'>');
5526 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5527 bool isFunction = ti==-1 ||
5528 (ts!=-1 && ts<te && ts<ti && ti<te);
5529 bool isVariable = !yyextra->current->type.isEmpty() &&
5530 (!isFunction || startsWithTypedef);
5535 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5540 if (yyextra->isTypedef && !startsWithTypedef)
5542 yyextra->current->type.prepend(
"typedef ");
5544 yyextra->current->section = EntryType::makeVariable() ;
5549 yyextra->current->section = EntryType::makeFunction() ;
5550 yyextra->current->proto = *yytext==
';';
5558 if (yyextra->isTypedef && !startsWithTypedef)
5560 yyextra->current->type.prepend(
"typedef ");
5563 yyextra->current->section = EntryType::makeVariable();
5568 yyextra->current->section = EntryType::makeFunction();
5569 yyextra->current->proto =
TRUE;
5573 if ( yyextra->insidePHP)
5577 yyextra->current->spec.setFinal(
true);
5581 yyextra->current->spec.setAbstract(
true);
5584 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5587 if ( *yytext ==
'{' )
5589 yyextra->lastCurlyContext = FindMembers;
5590 yyextra->curlyCount=0;
5595 BEGIN( FindMembers );
5600 if ( yyextra->insidePHP)
5604 yyextra->previous = yyextra->current;
5605 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5608 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5610 yyextra->current->spec.setOptional(
true).setRequired(
true);
5612 yyextra->lastCurlyContext = FindMembers;
5613 if ( *yytext ==
',' )
5615 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5617 if ( *yytext ==
'{' )
5619 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5621 yyextra->previous->spec.setInline(
true);
5624 yyextra->curlyCount=0;
5625 BEGIN( SkipCurly ) ;
5629 if (!yyextra->previous->section.isVariable())
5630 yyextra->previous->bodyLine=-1;
5631 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...
5635<SkipInits>">"{BN}*"{" {
5637 yyextra->curlyCount=1;
5638 BEGIN(SkipC11Inits);
5640<SkipInits>{ID}{BN}*"{" {
5642 yyextra->curlyCount=1;
5643 BEGIN(SkipC11Inits);
5646 ++yyextra->curlyCount;
5649 if ( --yyextra->curlyCount<=0 )
5654<SkipC11Attribute>"]]" {
5655 BEGIN(yyextra->lastC11AttributeContext);
5663 ++yyextra->curlyCount ;
5665<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5668 if( yyextra->curlyCount )
5670 --yyextra->curlyCount ;
5674 if (!yyextra->current->sli.empty() && yyextra->previous)
5676 yyextra->previous->sli = yyextra->current->sli;
5677 yyextra->current->sli.clear();
5679 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5680 BEGIN( yyextra->lastCurlyContext ) ;
5683<SkipCurly>"}"{BN}*{DCOMM}"<" {
5685 if ( yyextra->curlyCount )
5688 --yyextra->curlyCount ;
5692 yyextra->current->endBodyLine=yyextra->yyLineNr;
5693 yyextra->tempEntry = yyextra->current;
5694 yyextra->current = yyextra->previous;
5696 yyextra->docBlockContext = SkipCurlyEndDoc;
5697 yyextra->docBlockInBody =
FALSE;
5698 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5700 yyextra->docBlock.str(std::string());
5701 yyextra->docBlockTerm =
'}';
5702 if (yytext[yyleng-3]==
'/')
5714<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5715 yyextra->docBlockContext = SkipCurlyEndDoc;
5716 yyextra->docBlockInBody =
FALSE;
5717 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5719 yyextra->docBlock.str(std::string());
5720 yyextra->docBlockTerm =
'}';
5721 if (yytext[yyleng-3]==
'/')
5732<SkipCurlyEndDoc>"}" {
5734 if (yyextra->tempEntry)
5736 yyextra->current = yyextra->tempEntry;
5737 yyextra->tempEntry.reset();
5739 BEGIN( yyextra->lastCurlyContext );
5743 yyextra->lastStringContext=SkipCurly;
5744 BEGIN( SkipString );
5746<SkipCurly>^{B}*"#" {
5747 if (yyextra->insidePHP)
5750 BEGIN( SkipCurlyCpp );
5752<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5756<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5757 if (!yyextra->insidePHP)
5763 yyextra->lastHereDocContext = YY_START;
5767<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5769 yyextra->lastRawStringContext = YY_START;
5770 yyextra->dummyRawString.clear();
5771 yyextra->pCopyRawString = &yyextra->dummyRawString;
5772 *yyextra->pCopyRawString += yytext;
5775<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
5779<SkipCurly,SkipCurlyCpp>"\$" {}
5783 yyextra->lastCurlyContext = FindMembers;
5786<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5790<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5792 yyextra->lastCContext = YY_START;
5795<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5797 yyextra->lastCContext = YY_START;
5798 BEGIN(SkipCxxComment);
5800<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5801 yyextra->roundCount=0;
5802 yyextra->lastSkipRoundContext=YY_START;
5805<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5806 yyextra->lastStringContext=YY_START;
5807 BEGIN( SkipString );
5810 warn(yyextra->fileName,yyextra->yyLineNr,
5811 "Found ';' while parsing initializer list! "
5812 "(doxygen could be confused by a macro call without semicolon)"
5814 BEGIN( FindMembers );
5816<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5817 if (!yyextra->insidePHP)
5820 yyextra->lastCContext = YY_START;
5821 BEGIN(SkipCxxComment);
5823<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5824 if (!yyextra->insideCS) REJECT;
5827 yyextra->lastSkipVerbStringContext=YY_START;
5828 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5829 yyextra->dummyTextStream.clear();
5830 BEGIN(SkipVerbString);
5832<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5833 if (yyextra->insidePHP) REJECT;
5835<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5836 if (yyextra->insidePHP)
5838 yyextra->lastStringContext=YY_START;
5839 BEGIN(SkipPHPString);
5842<SkipC11Attribute>{ID} {
5845 yyextra->current->spec.setNoDiscard(
true);
5848<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5849<SkipString,SkipPHPString>\\. { }
5851 BEGIN( yyextra->lastStringContext );
5854 BEGIN( yyextra->lastStringContext );
5856<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5857<SkipString,SkipPHPString>\n {
5861<SkipString,SkipPHPString>. { }
5867 yyextra->current->section = EntryType::makeEmpty() ;
5868 yyextra->current->type.clear() ;
5869 yyextra->current->name.clear() ;
5870 yyextra->current->args.clear() ;
5871 yyextra->current->argList.clear();
5872 BEGIN( FindMembers ) ;
5875 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5879 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5883 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5885 if (!yyextra->baseName.isEmpty())
5887 yyextra->current->extends.emplace_back(
5888 yyextra->baseName,Protection::Public,Specifier::Normal);
5889 yyextra->baseName.clear();
5891 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5896 yyextra->current->section = EntryType::makeEmpty() ;
5897 yyextra->current->type.clear() ;
5898 yyextra->current->name.clear() ;
5899 yyextra->current->args.clear() ;
5900 yyextra->current->argList.clear();
5902 BEGIN( FindMembers ) ;
5904<CompoundName>{SCOPENAME}/{BN}*"<" {
5905 yyextra->sharpCount = 0;
5906 yyextra->current->name = yytext ;
5908 if (yyextra->current->spec.isProtocol())
5910 yyextra->current->name+=
"-p";
5913 yyextra->lastClassTemplSpecContext = ClassVar;
5914 if (yyextra->insideObjC)
5916 BEGIN( ObjCProtocolList );
5918 else if (yyextra->insideCS)
5925 yyextra->roundCount=0;
5926 BEGIN( ClassTemplSpec );
5933 yyextra->current->tArgLists.
push_back(al);
5934 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5935 yyextra->templateStr=
"<";
5936 yyextra->current->name +=
"<";
5937 yyextra->fullArgString = yyextra->templateStr;
5938 yyextra->copyArgString = &yyextra->current->name;
5940 yyextra->currentArgumentContext = ClassVar;
5941 BEGIN( ReadTempArgs );
5943<ObjCProtocolList>"<" {
5944 yyextra->insideProtocolList=
TRUE;
5947<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5948 yyextra->current->name += yytext;
5950 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5953 if (yyextra->current->spec.isProtocol())
5960 BEGIN( yyextra->lastClassTemplSpecContext );
5964<ClassTemplSpec>"<" {
5965 yyextra->current->name += yytext;
5966 if (yyextra->roundCount==0) yyextra->sharpCount++;
5969 yyextra->current->name += yytext;
5971<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5972 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5976 yyextra->current->name =
substitute(yytext,
".",
"::");
5977 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5982 else if (!yyextra->current->tArgLists.empty())
5986 yyextra->current->name = yytext;
5987 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5990 QCString rn = yyextra->current_root->name;
5992 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5996 yyextra->current->spec.setForwardDecl(
true);
5997 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5999 else if (yyextra->insideIDL &&
6000 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6001 yyextra->current->spec.isInterface()) ||
6002 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6003 yyextra->current->spec.isService())
6011 yyextra->current->name = yytext;
6012 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6013 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6016 yyextra->current->spec.setInterface(
false).setService(
false);
6020 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6023 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6026 yyextra->current->reset();
6028 if (yyextra->insideObjC)
6030 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6031 yyextra->insideObjC =
FALSE;
6033 if (yyextra->isTypedef)
6035 yyextra->current->type.prepend(
"typedef");
6037 BEGIN( FindMembers );
Wrapper class for the Entry type.
6040<CompoundName>{SCOPENAME}/{BN}*"(" {
6041 yyextra->current->name = yytext ;
6044 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6046 yyextra->lastAlignAsContext = YY_START;
6051 if (yyextra->current->spec.isProtocol())
6053 yyextra->current->name +=
"-p";
6058<AlignAs>"(" { yyextra->roundCount=0;
6059 BEGIN( AlignAsEnd );
6063<AlignAsEnd>"(" { yyextra->roundCount++; }
6064<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6066 BEGIN( yyextra->lastAlignAsContext );
6072 yyextra->current->name = yytext ;
6076 yyextra->current->bodyLine = yyextra->yyLineNr;
6077 yyextra->current->bodyColumn = yyextra->yyColNr;
6078 yyextra->current->initializer.str(std::string());
6079 yyextra->lastInitializerContext = FindMembers;
6080 yyextra->sharpCount=0;
6081 yyextra->initBracketCount=0;
6082 BEGIN(ReadInitializer);
6084<CompoundName>{SCOPENAME}/{BN}*"," {
6086 yyextra->current->reset();
6089<CompoundName>{SCOPENAME} {
6090 yyextra->current->name = yytext ;
6093 if (yyextra->current->spec.isProtocol())
6095 yyextra->current->name +=
"-p";
6097 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6103<CompoundName>{CSSCOPENAME} {
6104 yyextra->current->name =
substitute(yytext,
".",
"::");
6108<ClassVar>{SCOPENAME}{BNopt}/"(" {
6109 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6112 yyextra->roundCount=0;
6113 BEGIN(SkipUnionSwitch);
6118 yyextra->yyBegColNr=yyextra->yyColNr;
6119 yyextra->yyBegLineNr=yyextra->yyLineNr;
6120 yyextra->current->name = yytext;
6121 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6124 BEGIN( FindMembers );
6128 if (yyextra->isTypedef)
6132 yyextra->current->type.prepend(
"typedef ");
6140<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6141 if (yyextra->insideCli)
6144 yyextra->current->spec.setSealedClass(
true);
6146 yyextra->current->spec.setAbstractClass(
true);
6154<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6155 yyextra->yyBegColNr=yyextra->yyColNr;
6156 yyextra->yyBegLineNr=yyextra->yyLineNr;
6159 if (yyextra->current->section.isEnum())
6161 yyextra->current->section = EntryType::makeVariable() ;
6163 yyextra->current->type +=
' ' ;
6164 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...
6173 yyextra->yyBegColNr=yyextra->yyColNr;
6174 yyextra->yyBegLineNr=yyextra->yyLineNr;
6176 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6179 yyextra->roundCount=0;
6180 BEGIN(SkipUnionSwitch);
6182 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6184 yyextra->current->type.clear();
6185 yyextra->baseProt = Protection::Public;
6186 yyextra->baseVirt = Specifier::Normal;
6187 yyextra->baseName.clear();
6188 BEGIN( BasesProt ) ;
6190 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6192 yyextra->current->typeConstr.clear();
6193 yyextra->current->typeConstr.push_back(
Argument());
6194 yyextra->lastCSConstraint = YY_START;
6195 BEGIN( CSConstraintName );
6197 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6199 yyextra->current->spec.setAbstract(
true);
6201 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6203 yyextra->current->spec.setSealed(
true);
6205 else if (
qstrcmp(yytext,
"final")==0)
6207 yyextra->current->spec.setFinal(
true);
6211 if (yyextra->current->section.isEnum())
6213 yyextra->current->section = EntryType::makeVariable() ;
6215 yyextra->current->type +=
' ' ;
6216 yyextra->current->type += yyextra->current->name ;
6217 yyextra->current->name = yytext ;
6226 if (yyextra->insideObjC && *yytext==
'(')
6228 yyextra->current->name+=
'(';
6231 yyextra->current->spec.setCategory(
true);
6233 BEGIN( ClassCategory );
6239 BEGIN( FindMembers );
6242<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6243<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6244 yyextra->fullArgString.clear();
6245 yyextra->lastCopyArgChar=
'#';
6246 yyextra->lastCommentInArgContext=YY_START;
6248 BEGIN( CopyArgCommentLine );
6250 BEGIN( CopyArgComment );
6252<CSConstraintType,CSConstraintName>"#" {
6253 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6255<CSConstraintType>"=>" {
6260 BEGIN( yyextra->lastCSConstraint );
6262<CSConstraintType>"{" {
6266 BEGIN( yyextra->lastCSConstraint );
6268<CSConstraintType,CSConstraintName>";" {
6271 BEGIN( yyextra->lastCSConstraint );
6273<CSConstraintName>":" {
6274 BEGIN( CSConstraintType );
6276<CSConstraintName>{ID} {
6278 yyextra->current->typeConstr.back().name=yytext;
6280<CSConstraintType>"where" {
6281 yyextra->current->typeConstr.push_back(
Argument());
6282 BEGIN( CSConstraintName );
6284<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6285 if (yyextra->current->typeConstr.back().type.isEmpty())
6288 yyextra->current->typeConstr.back().type=yytext;
6292 QCString name = yyextra->current->typeConstr.back().name;
6293 yyextra->current->typeConstr.push_back(
Argument());
6294 yyextra->current->typeConstr.back().name=name;
6295 yyextra->current->typeConstr.back().type=yytext;
6298<CSConstraintName,CSConstraintType>\n {
6301<CSConstraintName,CSConstraintType>. {
6303<ClassCategory>{ID} {
6304 yyextra->current->name+=yytext;
6306<ClassCategory>")"/{BN}*"{" {
6307 yyextra->current->name+=
')';
6310<ClassCategory>")"/{BN}*"<" {
6311 yyextra->current->name+=
')';
6312 BEGIN( ObjCProtocolList );
6315 yyextra->current->name+=
')';
6316 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6328 if (yyextra->current->section.isVariable())
6330 yyextra->current->bitfields+=
":";
6331 yyextra->current->args.clear();
6334 else if (yyextra->current->section.isEnum())
6337 yyextra->current->args.clear();
6338 BEGIN(EnumBaseType);
6342 yyextra->current->type.clear();
6343 if (yyextra->current->spec.isInterface() ||
6344 yyextra->current->spec.isStruct() ||
6345 yyextra->current->spec.isRef() ||
6346 yyextra->current->spec.isValue() ||
6347 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6350 yyextra->baseProt = Protection::Public;
6354 yyextra->baseProt = Protection::Private;
6356 yyextra->baseVirt = Specifier::Normal;
6357 yyextra->baseName.clear();
6358 BEGIN( BasesProt ) ;
6362 if (yyextra->isTypedef)
6364 yyextra->current->type.prepend(
"typedef");
6366 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6368 yyextra->current->section = EntryType::makeVariable() ;
6370 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6372 yyextra->current->reset();
6379 BEGIN( FindMembers );
6381<Bases,ClassVar>{CPPC}"/"/[^/] {
6382 if (!yyextra->insideObjC)
6389 yyextra->current->program << yytext;
6390 yyextra->current->fileName = yyextra->fileName ;
6391 yyextra->current->startLine = yyextra->yyLineNr ;
6392 yyextra->current->startColumn = yyextra->yyColNr;
6393 yyextra->curlyCount=0;
6394 BEGIN( ReadBodyIntf );
6397<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6398<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6399<Bases,ClassVar>{CPPC}"!" |
6400<Bases,ClassVar>[\-+]{BN}* {
6401 if (!yyextra->insideObjC)
6408 yyextra->current->program << yytext;
6409 yyextra->current->fileName = yyextra->fileName ;
6410 yyextra->current->startLine = yyextra->yyLineNr ;
6411 yyextra->current->startColumn = yyextra->yyColNr;
6412 yyextra->curlyCount=0;
6413 BEGIN( ReadBodyIntf );
6416<CompoundName,ClassVar>{B}*"{"{B}* {
6417 yyextra->current->program.str(std::string());
6418 yyextra->current->fileName = yyextra->fileName ;
6419 yyextra->current->bodyLine = yyextra->yyLineNr;
6420 yyextra->current->bodyColumn = yyextra->yyColNr;
6422 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6424 if (yyextra->current->section.isNamespace())
6428 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6440 yyextra->curlyCount=0;
6441 if (yyextra->current_root &&
6442 !yyextra->current_root->spec.isInterface() &&
6443 (yyextra->current->spec.isInterface() ||
6444 yyextra->current->spec.isProtocol() ||
6445 yyextra->current->spec.isCategory() ||
6446 yyextra->current->section.isObjcImpl()
6451 BEGIN( ReadBodyIntf );
6453 else if (yyextra->current->section.isNamespace())
6455 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6462<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6463<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6464<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6465<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6466<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6467<BasesProt>{BN} {
lineCount(yyscanner); }
6468<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6469<Bases>"decltype"{BN}*"(" {
6471 yyextra->roundCount=0;
6472 yyextra->lastSkipRoundContext=YY_START;
6475<Bases>("\\")?({ID}"\\")*{ID} {
6476 if (!yyextra->insidePHP)
6485 yyextra->baseName += bn;
6486 yyextra->current->args +=
' ';
6487 yyextra->current->args += yytext;
6490<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6496 yyextra->current->typeConstr.clear();
6497 yyextra->current->typeConstr.push_back(
Argument());
6498 yyextra->lastCSConstraint = YY_START;
6499 BEGIN( CSConstraintName );
6503 yyextra->baseName+=yytext;
6504 yyextra->current->args +=
' ';
6505 yyextra->current->args += yytext;
6508<Bases>{BN}*{ID}("."{ID})* {
6510 yyextra->baseName += name;
6511 yyextra->current->args +=
' ';
6512 yyextra->current->args += name;
6514<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6515 if (!yyextra->insideObjC)
6525<ClassVar,Bases>"@end" {
6533<ClassVar>"<" { yyextra->current->name += *yytext;
6534 yyextra->sharpCount=1;
6535 yyextra->roundCount=0;
6536 yyextra->lastSkipSharpContext = YY_START;
6537 yyextra->specName = &yyextra->current->name;
6538 BEGIN ( Specialization );
6542 yyextra->sharpCount=1;
6543 yyextra->roundCount=0;
6544 yyextra->lastSkipSharpContext = YY_START;
6545 if (yyextra->insideObjC)
6555 yyextra->templateStr = yytext;
6556 yyextra->specName = &yyextra->templateStr;
6557 BEGIN ( Specialization );
6560<Specialization>"<" { *yyextra->specName += *yytext;
6561 if (yyextra->roundCount==0) yyextra->sharpCount++;
6563<Specialization>">" {
6564 *yyextra->specName += *yytext;
6565 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6568 BEGIN(yyextra->lastSkipSharpContext);
6571<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6572<Specialization>"<<" { *yyextra->specName += yytext; }
6573<Specialization>">>"/{B}*"::" {
6578<Specialization>">>" {
6579 if (yyextra->insideCS)
6589 if (yyextra->roundCount>0)
6591 *yyextra->specName += yytext;
6601<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6602<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6603<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6605<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6606<Specialization>"\\'" { *yyextra->specName += *yytext;}
6607<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6608<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6609<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6610<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6611<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6612<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6613<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6614<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6615<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6618 *yyextra->specName += *yytext;
6620<SkipRound>"(" { ++yyextra->roundCount; }
6621<SkipRound>")" {
if (--yyextra->roundCount<0)
6622 BEGIN ( yyextra->lastSkipRoundContext );
6625 yyextra->lastStringContext=SkipRound;
6628<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6629 if (yyextra->insideProtocolList)
6631 yyextra->baseName+=
"-p";
6635 yyextra->current->args +=
',' ;
6638 if (!yyextra->baseName.isEmpty())
6640 yyextra->current->extends.emplace_back(
6641 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6644 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6645 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6646 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6648 yyextra->baseProt=Protection::Public;
6652 yyextra->baseProt=Protection::Private;
6654 yyextra->baseVirt=Specifier::Normal;
6655 yyextra->baseName.clear();
6658 yyextra->insideProtocolList=
FALSE;
6670 if (*yytext==
',' && yyextra->insideObjC)
6672 yyextra->insideProtocolList=
TRUE;
6678 yyextra->current->program.str(std::string());
6679 yyextra->current->fileName = yyextra->fileName ;
6680 yyextra->current->bodyLine = yyextra->yyLineNr;
6681 yyextra->current->bodyColumn = yyextra->yyColNr;
6683 if (!yyextra->baseName.isEmpty())
6684 yyextra->current->extends.emplace_back(
6685 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6687 yyextra->curlyCount=0;
6688 if (yyextra->insideObjC)
6690 BEGIN( ReadBodyIntf );
6697<SkipUnionSwitch>{B}*"(" {
6698 yyextra->roundCount++;
6700<SkipUnionSwitch>")" {
6701 if (--yyextra->roundCount==0)
6706<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6708<Comment>{BN}+ { yyextra->current->program << yytext ;
6711<Comment>{CCS} { yyextra->current->program << yytext ; }
6712<Comment>{CPPC} { yyextra->current->program << yytext ; }
6713<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6714 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6715 yyextra->current->program << yytext ;
6717<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6718 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6719 yyextra->current->program << yytext ;
6721<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6722<Comment>{CCE} { yyextra->current->program << yytext ;
6723 if (!yyextra->insideCode)
6725 yyextra->doxygenComment=
false;
6726 BEGIN( yyextra->lastContext );
6729<Comment>. { yyextra->current->program << *yytext ; }
6731<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6733 if (!yyextra->current->doc.isEmpty())
6735 yyextra->current->doc+=
"\n\n";
6739 yyextra->current->docLine = yyextra->yyLineNr;
6740 yyextra->current->docFile = yyextra->fileName;
6743 yyextra->lastDocContext = YY_START;
6744 if (yyextra->current_root->section.isScope())
6746 yyextra->current->inside = yyextra->current_root->name+
"::";
6748 yyextra->docBlockContext = YY_START;
6749 yyextra->docBlockInBody = YY_START==SkipCurly;
6754 yyextra->docBlock.str(indent.
str());
6756 if (yyextra->docBlockAutoBrief)
6758 yyextra->current->briefLine = yyextra->yyLineNr;
6759 yyextra->current->briefFile = yyextra->fileName;
6764<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6770 yyextra->lastDocContext = YY_START;
6773 if (yyextra->current_root->section.isScope())
6775 yyextra->current->inside = yyextra->current_root->name+
"::";
6777 yyextra->current->docLine = yyextra->yyLineNr;
6778 yyextra->current->docFile = yyextra->fileName;
6779 yyextra->docBlockContext = YY_START;
6780 yyextra->docBlockInBody = YY_START==SkipCurly;
6782 yyextra->docBlockAutoBrief = javadocAutoBrief;
6786 yyextra->docBlock.str(indent.
str());
6788 if (yyextra->docBlockAutoBrief)
6790 yyextra->current->briefLine = yyextra->yyLineNr;
6791 yyextra->current->briefFile = yyextra->fileName;
6798 yyextra->current->program << yytext ;
6799 yyextra->lastContext = YY_START ;
6800 yyextra->doxygenComment=
true;
6804<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6809<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6810 yyextra->lastDocContext = YY_START;
6813 if (yyextra->current_root->section.isScope())
6815 yyextra->current->inside = yyextra->current_root->name+
"::";
6817 yyextra->current->docLine = yyextra->yyLineNr;
6818 yyextra->current->docFile = yyextra->fileName;
6819 yyextra->docBlockContext = YY_START;
6820 yyextra->docBlockInBody = YY_START==SkipCurly;
6822 yyextra->docBlockAutoBrief = javadocAutoBrief;
6826 yyextra->docBlock.str(indent.
str());
6828 if (yyextra->docBlockAutoBrief)
6830 yyextra->current->briefLine = yyextra->yyLineNr;
6831 yyextra->current->briefFile = yyextra->fileName;
6836<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6837 yyextra->lastDocContext = YY_START;
6838 if (yyextra->current_root->section.isScope())
6840 yyextra->current->inside = yyextra->current_root->name+
"::";
6842 yyextra->docBlockContext = YY_START;
6843 yyextra->docBlockInBody = YY_START==SkipCurly;
6844 yyextra->docBlockAutoBrief =
FALSE;
6848 yyextra->docBlock.str(indent.
str());
6853<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6854 yyextra->lastDocContext = YY_START;
6855 if (yyextra->current_root->section.isScope())
6857 yyextra->current->inside = yyextra->current_root->name+
"::";
6859 yyextra->docBlockContext = YY_START;
6860 yyextra->docBlockInBody = YY_START==SkipCurly;
6861 yyextra->docBlockAutoBrief =
FALSE;
6864 yyextra->docBlock.str(indent.
str());
6868<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6870 yyextra->externLinkage=
TRUE;
6873 if (yyextra->externLinkage)
6875 yyextra->externLinkage=
FALSE;
6877 else if (yyextra->insideCS &&
6878 !yyextra->current->name.isEmpty() &&
6879 !yyextra->current->type.isEmpty())
6881 if (yyextra->current->mtype == MethodTypes::Event)
6883 yyextra->mtype = MethodTypes::Event;
6887 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6891 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6893 yyextra->current->bodyLine = yyextra->yyLineNr;
6894 yyextra->current->bodyColumn = yyextra->yyColNr;
6895 yyextra->curlyCount=0;
6896 BEGIN( CSAccessorDecl );
6898 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6902 yyextra->current->exception =
" {";
6903 BEGIN(UNOIDLAttributeBlock);
6907 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6908 yyextra->current->name.isEmpty()
6912 yyextra->needsSemi =
FALSE;
6913 if (yyextra->current->isStatic)
6915 yyextra->current->name=
"[static initializer]";
6916 yyextra->current->type.clear();
6920 yyextra->current->name=
"[instance initializer]";
6937 yyextra->current->bodyLine = yyextra->yyLineNr;
6938 yyextra->current->bodyColumn = yyextra->yyColNr;
6939 yyextra->current->initializer.str(yytext);
6940 yyextra->lastInitializerContext = YY_START;
6941 yyextra->sharpCount=0;
6942 yyextra->initBracketCount=1;
6943 BEGIN(ReadInitializer);
6947<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6948<CSAccessorDecl>"}"{B}*"=" {
6950 if (yyextra->curlyCount != 0) REJECT;
6951 yyextra->current->initializer.str(
"=");
6952 yyextra->current->endBodyLine=yyextra->yyLineNr;
6953 yyextra->lastInitializerContext = FindMembers;
6954 BEGIN(ReadInitializer);
6956<CSAccessorDecl>"}" {
6957 if (yyextra->curlyCount)
6959 yyextra->curlyCount--;
6963 yyextra->mtype = MethodTypes::Method;
6964 yyextra->virt = Specifier::Normal;
6966 yyextra->current->endBodyLine=yyextra->yyLineNr;
6971<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6972<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6973<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6974<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6975<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6976<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6977<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6978<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6979<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6980<CSAccessorDecl>{CHARLIT} {}
6981<CSAccessorDecl>"\"" { BEGIN(CSString);}
6982<CSAccessorDecl>"." {}
6983<CSAccessorDecl>\n {
lineCount(yyscanner); }
6984<CSString>"\"" { BEGIN(CSAccessorDecl);}
6992<SliceSequence>{SCOPENAME} {
6993 if (yyextra->current->spec.isLocal())
6995 yyextra->current->type =
"local ";
6997 yyextra->current->type +=
"sequence<";
6998 yyextra->current->type += yytext;
6999 yyextra->current->type +=
">";
7002<SliceSequence>{BN}*">"{BN}* {
7004 BEGIN(SliceSequenceName);
7007<SliceSequenceName>{ID}{BN}* {
7009 yyextra->current->name = yytext ;
7010 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7013<SliceSequenceName>";" {
7014 yyextra->current->section = EntryType::makeVariable();
7015 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7020<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7022 if (yyextra->current->spec.isLocal())
7024 yyextra->current->type =
"local ";
7026 yyextra->current->type +=
"dictionary<";
7027 yyextra->current->type += yytext;
7028 yyextra->current->type +=
">";
7029 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7032<SliceDictionary>{BN}*">"{BN}* {
7034 BEGIN(SliceDictionaryName);
7037<SliceDictionaryName>{ID}{BN}* {
7039 yyextra->current->name = yytext ;
7040 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7043<SliceDictionaryName>";" {
7044 yyextra->current->section = EntryType::makeVariable();
7045 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7055<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7056 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7057 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7060<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7061 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7062 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7064<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7065 yyextra->docBlock << yytext;
7066 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7067 BEGIN( yyextra->docBlockContext );
7069<DocLine>{NONLopt}/"\n" {
7070 yyextra->docBlock << yytext;
7071 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7072 BEGIN( yyextra->docBlockContext );
7077<DocBlock>"*"*{CCE} {
7079 BEGIN(yyextra->docBlockContext);
7081<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7084 yyextra->docBlock <<
"\\ilinebr " << indent;
7086<DocBlock>^{B}*"*"+/[^/] {
7089 yyextra->docBlock << indent;
7091<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7094 yyextra->docBlock << indent;
7096<DocBlock>^{B}*({CPPC}){B}* {
7099 yyextra->docBlock << yytext;
7103 yyextra->docBlock << yytext;
7105<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7106 yyextra->docBlock << yytext;
7108<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7109 yyextra->docBlock << yytext;
7110 char blockName[] =
"f$";
7112 if (c==
'[') blockName[1]=
']';
7113 else if (c==
'{') blockName[1]=
'}';
7114 else if (c==
'(') blockName[1]=
')';
7116 BEGIN(DocCopyBlock);
7118<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7119 yyextra->fileName = &yytext[6];
7120 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7121 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7122 yyextra->docBlock << yytext;
7124<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7125 yyextra->fileName = &yytext[6];
7126 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7127 yyextra->docBlock << yytext;
7129<DocBlock>{CMD}"iline"{LINENR}{B} {
7134 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7138 yyextra->yyLineNr = nr;
7140 yyextra->docBlock << yytext;
7142<DocBlock>{B}*"<"{PRE}">" {
7143 yyextra->docBlock << yytext;
7145 BEGIN(DocCopyBlock);
7147<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7148 yyextra->docBlock << yytext;
7150 BEGIN(DocCopyBlock);
7152<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7153 yyextra->docBlock << yytext;
7155 BEGIN(DocCopyBlock);
7157<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7158 yyextra->docBlock << yytext;
7160 BEGIN(DocCopyBlock);
7162<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7164 yyextra->docBlock <<
"\\ilinebr ";
7165 yyextra->docBlock << pat;
7167 BEGIN(DocCopyBlock);
7169<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7171 yyextra->docBlock << pat;
7173 BEGIN(DocCopyBlock);
7175<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7176<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7177<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7179 yyextra->docBlock <<
"\\ilinebr ";
7180 yyextra->docBlock << pat;
7182 BEGIN(DocCopyBlock);
7184<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7185<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7186<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7188 yyextra->docBlock << pat;
7190 BEGIN(DocCopyBlock);
7192<DocBlock>{B}*"<"{CODE}">" {
7193 if (yyextra->insideCS)
7195 yyextra->docBlock << yytext;
7197 BEGIN(DocCopyBlock);
7204<DocBlock>[^@*~\/\\\n]+ {
7205 yyextra->docBlock << yytext;
7209 yyextra->docBlock << *yytext;
7212 yyextra->docBlock << *yytext;
7217<DocCopyBlock>"</"{PRE}">" {
7222 yyextra->docBlock << yytext;
7224<DocCopyBlock>"</"{CODE}">" {
7229 yyextra->docBlock << yytext;
7231<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7236 yyextra->docBlock << yytext;
7238<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7243 yyextra->docBlock << yytext;
7245<DocCopyBlock>^{B}*"*"+/{BN}+ {
7246 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7254 yyextra->docBlock << indent;
7257<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7258 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7262 yyextra->docBlock << indent;
7269<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7270 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7274 yyextra->docBlock << indent+
"*";
7281<DocCopyBlock>^{B}*"*"+/{BN}* {
7282 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7285 if (yyextra->nestedComment>0)
7288 yyextra->docBlock << indent+
"*";
7293 yyextra->docBlock << indent;
7301<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7307 yyextra->docBlock << pat;
7309<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7315 yyextra->docBlock << pat;
7317<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7318 yyextra->docBlock << yytext;
7321 yyextra->docBlock << yytext;
7322 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7326 yyextra->lastStringContext=YY_START;
7327 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7328 yyextra->stopAtInvalidString=
true;
7332<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7335 yyextra->nestedComment++;
7337 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7339 yyextra->nestedComment--;
7341 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7343 warn(yyextra->fileName,yyextra->yyLineNr,
7344 "Found end of C comment inside a '{}' block without matching start of the comment!"
7345 " Maybe the end marker for the block is missing?",
7346 yyextra->docBlockName);
7348 yyextra->docBlock << yytext;
7351 yyextra->docBlock << *yytext;
7355 yyextra->docBlock << *yytext;
7357<DocCopyBlock><<EOF>> {
7358 warn(yyextra->fileName,yyextra->yyLineNr,
7359 "reached end of file while inside a '{}' block!"
7360 " The command that should end the block seems to be missing!",
7361 yyextra->docBlockName);
7368<Prototype>"operator"{B}*"("{B}*")" {
7369 yyextra->current->name+=yytext;
7372 yyextra->current->args+=*yytext;
7373 yyextra->currentArgumentContext = PrototypeQual;
7374 yyextra->fullArgString = yyextra->current->args;
7375 yyextra->copyArgString = &yyextra->current->args;
7376 BEGIN( ReadFuncArgType ) ;
7378<Prototype>"("({ID}"::")*({B}*[&*])+ {
7379 if (yyextra->insidePHP)
7385 yyextra->current->type+=yyextra->current->name+yytext;
7386 yyextra->current->name.clear();
7387 BEGIN( PrototypePtr );
7390<PrototypePtr>{SCOPENAME} {
7391 yyextra->current->name+=yytext;
7394 yyextra->current->args+=*yytext;
7395 yyextra->currentArgumentContext = PrototypeQual;
7396 yyextra->fullArgString = yyextra->current->args;
7397 yyextra->copyArgString = &yyextra->current->args;
7398 BEGIN( ReadFuncArgType ) ;
7401 yyextra->current->type+=
')';
7405 yyextra->current->name+=yytext;
7408 BEGIN( PrototypeSkipLine);
7410<PrototypeQual>{B}*"const"{B}* {
7411 yyextra->current->args +=
" const ";
7412 yyextra->current->argList.setConstSpecifier(
TRUE);
7414<PrototypeQual>{B}*"volatile"{B}* {
7415 yyextra->current->args +=
" volatile ";
7416 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7418<PrototypeQual>{B}*"="{B}*"0"{B}* {
7419 yyextra->current->args +=
" = 0";
7420 yyextra->current->virt = Specifier::Pure;
7421 yyextra->current->argList.setPureSpecifier(
TRUE);
7423<PrototypeQual>"throw"{B}*"(" {
7424 yyextra->current->exception =
"throw(";
7425 BEGIN(PrototypeExc);
7428 yyextra->current->exception +=
')';
7429 BEGIN(PrototypeQual);
7432 yyextra->current->exception += *yytext;
7435 yyextra->current->args += *yytext;
7438 yyextra->current->name += *yytext;
7440<PrototypeSkipLine>. {
7446<SkipCxxComment>.*"\\\n" {
7447 if (yyextra->insideCS)
7456<SkipCxxComment>{ANYopt}/\n {
7457 BEGIN( yyextra->lastCContext ) ;
7459<SkipComment>[^\*\n]+
7464 if (!yyextra->insideCpp) REJECT;
7465 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7466 yyextra->lastC11AttributeContext = YY_START;
7467 BEGIN( SkipC11Attribute );
7472 if (yyextra->insideIDL && yyextra->insideCppQuote)
7476 else if (yyextra->insidePHP)
7478 yyextra->lastStringContext=YY_START;
7483 if (!yyextra->insidePHP)
7485 yyextra->lastCPPContext = YY_START;
7490 yyextra->lastCContext = YY_START ;
7491 BEGIN( SkipCxxComment ) ;
7495 if (!yyextra->insidePHP)
7497 yyextra->lastCContext = YY_START ;
7498 BEGIN( SkipCxxComment ) ;
7501 if (yyextra->insidePHP)
7503 yyextra->lastStringContext=YY_START;
7504 BEGIN(SkipPHPString);
7508 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7510 if (yyextra->current->type.isEmpty())
7512 if (yyextra->current->name.isEmpty())
7513 yyextra->current->name=
"?";
7515 yyextra->current->name+=
"?";
7519 yyextra->current->type+=
"?";
7523<*>"}" { yyextra->exported=
false; }
7525<SkipComment>{CPPC}|{CCS}
7526<*>{CCS} { yyextra->lastCContext = YY_START ;
7527 BEGIN( SkipComment ) ;
7529<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7531 yyextra->lastCContext = YY_START ;
7532 BEGIN( SkipCxxComment ) ;
7535 if (yyextra->insideCS && yyextra->fakeNS)
7539 BEGIN ( ReadNSBody);
7551 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7553 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7555 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7565 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7566 yyextra->outerScopeEntries.clear();
7567 yyextra->baseName.clear();
7568 yyextra->protection = Protection::Public;
7569 yyextra->baseProt = Protection::Public;
7570 yyextra->sharpCount = 0;
7571 yyextra->roundCount = 0;
7572 yyextra->curlyCount = 0;
7573 yyextra->mtype = MethodTypes::Method;
7574 yyextra->isStatic =
FALSE;
7575 yyextra->virt = Specifier::Normal;
7576 yyextra->baseVirt = Specifier::Normal;
7577 yyextra->isTypedef =
FALSE;
7578 yyextra->insideTryBlock =
FALSE;
7579 yyextra->insideFormula =
FALSE;
7580 yyextra->insideCode=
FALSE;
7582 yyextra->previous = 0;
7583 yyextra->firstTypedefEntry.reset();
7584 yyextra->memspecEntry.reset();
7589 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7590 if (yyextra->insideJava)
7592 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7594 yyextra->current->protection = yyextra->protection;
7595 yyextra->current->exported = yyextra->exported ;
7596 yyextra->current->mtype = yyextra->mtype;
7597 yyextra->current->virt = yyextra->virt;
7598 yyextra->current->isStatic = yyextra->isStatic;
7599 yyextra->current->lang = yyextra->language;
7601 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7602 yyextra->isTypedef=
FALSE;
7610 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7611 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7613 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7619 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7622 for (p = yytext ; *p ; ++p )
7626 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7630 yyextra->column+=tabSize - (yyextra->column%tabSize);
7634 yyextra->column++,yyextra->yyColNr++;
7642 int col=startIndent;
7648 if (c==
'\t') col+=tabSize-(col%tabSize);
7649 else if (c==
'\n') col=0;
7658 int i = text.
find(
'"');
7671 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7672 yyextra->current->protection = yyextra->protection = prot;
7673 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7674 yyextra->current->type.
clear();
7675 yyextra->current->name.clear();
7676 yyextra->current->args.clear();
7677 yyextra->current->argList.clear();
7683 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7684 size_t tl=yyextra->current->type.length();
7685 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7687 yyextra->current->type +=
' ' ;
7689 yyextra->current->type += yyextra->current->name;
7690 yyextra->current->name.clear() ;
7691 tl=yyextra->current->type.length();
7692 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7694 yyextra->current->type +=
' ' ;
7696 yyextra->current->type += yyextra->current->args ;
7697 yyextra->current->args.clear() ;
7698 yyextra->current->argList.clear();
7705 if (s==
nullptr || *s==0)
return name;
7707 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7719 bool funcPtr = i>0 && type[i-1]==
')';
7721 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7722 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7723 return type.
left(i);
7729 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7732 yyextra->docBlock <<
"\\iskip";
7734 yyextra->docBlockName=blockName;
7735 yyextra->fencedSize=fencedSize;
7736 yyextra->isCodeBlock=codeBlock;
7737 yyextra->nestedComment=0;
7743 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7744 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7748 yyextra->docBlock <<
"\\endiskip";
7750 yyextra->docBlockName=
"";
7770 int i=name.
find(
"operator");
7771 if (i==-1)
return FALSE;
7781 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7783 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7784 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7785 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7786 yyextra->insideD = yyextra->language==SrcLangExt::D;
7787 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7788 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7789 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7790 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7791 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7792 yyextra->language==SrcLangExt::Lex);
7803 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7804 if (yyextra->current_root->section.isScope())
7807 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7809 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7811 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7821 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7822 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7823 if (yyextra->current->argList.empty())
return FALSE;
7824 for (
const Argument &a : yyextra->current->argList)
7835 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7836 if (yyextra->insideJava)
7839 yyextra->current->protection = Protection::Public;
7840 if (text.
find(
"protected")!=-1)
7841 yyextra->current->protection = Protection::Protected;
7842 else if (text.
find(
"private")!=-1)
7843 yyextra->current->protection = Protection::Private;
7844 else if (text.
find(
"package")!=-1)
7845 yyextra->current->protection = Protection::Package;
7852 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7853 int si =
static_cast<int>(yyextra->current->args.length());
7854 if (yyextra->oldStyleArgType.isEmpty())
7856 std::string args = yyextra->current->args.str();
7857 static const reg::Ex re(R
"(\([^)]*\).*)");
7863 bi1=(int)match.position();
7864 size_t secondMatchStart = match.position()+match.length();
7867 bi2=(int)match.position();
7871 if (bi1!=-1 && bi2!=-1)
7874 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7876 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7877 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7879 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7880 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7881 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7886 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7889 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7890 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7892 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7893 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7899 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7902 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7906 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7907 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7920 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7923 oldStyleArgPtr=yyextra->current->args.
left(j);
7942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7943 for (
Argument &a : yyextra->current->argList)
7952 a.
docs=brief+
"\n\n"+docs;
7984 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7987 yyextra->current->briefFile = yyextra->fileName;
7988 yyextra->current->briefLine = yyextra->yyLineNr;
7992 yyextra->current->docFile = yyextra->fileName;
7993 yyextra->current->docLine = yyextra->yyLineNr;
8001 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8002 if (yyextra->tempEntry==0)
8007 yyextra->previous = yyextra->current;
8008 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8012 yyextra->previous = yyextra->current;
8013 yyextra->current = yyextra->tempEntry;
8014 yyextra->tempEntry.reset();
8021 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8024 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8025 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8028 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8029 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8031 docEntry->inbodyFile = yyextra->fileName;
8032 docEntry->inbodyLine = lineNr;
8036 bool needsEntry=
FALSE;
8038 Markdown markdown(yyextra->fileName,lineNr);
8041 while (yyextra->commentScanner.parseCommentBlock(
8042 yyextra->thisParser,
8043 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8047 yyextra->docBlockInBody ?
FALSE : brief,
8048 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8049 yyextra->docBlockInBody,
8050 yyextra->protection,
8061 QCString docFile = yyextra->current->docFile;
8063 yyextra->current->docFile = docFile;
8064 yyextra->current->docLine = lineNr;
8072 if (yyextra->docBlockTerm)
8074 unput(yyextra->docBlockTerm);
8075 yyextra->docBlockTerm=0;
8082 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8093 QCString orgDoc = yyextra->current->doc;
8094 QCString orgBrief = yyextra->current->brief;
8095 int orgDocLine = yyextra->current->docLine;
8096 int orgBriefLine = yyextra->current->briefLine;
8098 yyextra->current->doc.
clear();
8099 yyextra->current->brief.clear();
8102 int lineNr = orgDocLine;
8104 Markdown markdown(yyextra->fileName,lineNr);
8107 while (yyextra->commentScanner.parseCommentBlock(
8108 yyextra->thisParser,
8109 yyextra->current.get(),
8116 yyextra->protection,
8125 if (needsEntry)
newEntry(yyscanner);
8131 a.
docs = yyextra->current->doc;
8134 yyextra->current->doc = orgDoc;
8135 yyextra->current->brief = orgBrief;
8136 yyextra->current->docLine = orgDocLine;
8137 yyextra->current->briefLine = orgBriefLine;
8148 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8149 for (
const auto &ce : rt->children())
8151 if (!ce->program.empty())
8155 yyextra->padCount=0;
8158 yyextra->programStr = ce->program.str();
8159 yyextra->inputString = yyextra->programStr.data();
8160 yyextra->inputPosition = 0;
8161 if (ce->section.isEnum() || ce->spec.isEnum())
8162 BEGIN( FindFields ) ;
8164 BEGIN( FindMembers ) ;
8165 yyextra->current_root = ce;
8166 yyextra->fileName = ce->fileName;
8168 yyextra->yyLineNr = ce->bodyLine;
8169 yyextra->yyColNr = ce->bodyColumn;
8170 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8172 yyextra->current = std::make_shared<Entry>();
8173 yyextra->isStatic =
FALSE;
8178 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8180 ce->groups = rt->groups;
8183 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8185 if ( ce->section.isClass() )
8187 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8189 yyextra->current->protection = yyextra->protection = Protection::Public ;
8191 else if (yyextra->insideJava)
8193 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8195 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8197 if (ce->lang==SrcLangExt::ObjC)
8199 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8203 yyextra->current->protection = yyextra->protection = Protection::Public ;
8208 yyextra->current->protection = yyextra->protection = Protection::Private ;
8211 else if (ce->section.isEnum() )
8213 yyextra->current->protection = yyextra->protection = ce->protection;
8215 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8217 if (ce->section.isNamespace() )
8219 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8221 yyextra->current->protection = yyextra->protection = ce->protection;
8222 yyextra->current->exported = yyextra->exported =
false;
8224 else if (ce->section.isNamespace() )
8226 yyextra->current->protection = yyextra->protection = Protection::Public ;
8227 yyextra->current->exported = yyextra->exported = ce->exported;
8231 yyextra->current->protection = yyextra->protection = Protection::Public ;
8232 yyextra->current->exported = yyextra->exported =
false;
8234 yyextra->mtype = MethodTypes::Method;
8235 yyextra->virt = Specifier::Normal;
8242 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8244 scannerYYlex(yyscanner);
8245 yyextra->lexInit=
TRUE;
8248 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8250 yyextra->programStr.clear();
8251 ce->program.str(std::string());
8267 const char *fileBuf,
8268 const std::shared_ptr<Entry> &rt,
8272 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8275 yyextra->inputString = fileBuf;
8276 yyextra->inputPosition = 0;
8277 yyextra->column = 0;
8278 scannerYYrestart(
nullptr,yyscanner);
8281 yyextra->protection = Protection::Public;
8282 yyextra->mtype = MethodTypes::Method;
8283 yyextra->isStatic =
FALSE;
8284 yyextra->exported =
false;
8285 yyextra->virt = Specifier::Normal;
8286 yyextra->current_root = rt;
8287 yyextra->yyLineNr = 1 ;
8288 yyextra->yyBegLineNr = 1;
8289 yyextra->yyBegColNr = 0;
8290 yyextra->anonCount = 0;
8291 yyextra->anonNSCount = 0;
8292 yyextra->fileName = fileName;
8293 yyextra->clangParser = clangParser;
8295 rt->lang = yyextra->language;
8296 msg(
"Parsing file {}...\n",yyextra->fileName);
8298 yyextra->current_root = rt;
8300 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8301 yyextra->current = std::make_shared<Entry>();
8306 yyextra->current->name = yyextra->fileName;
8307 yyextra->current->section = sec;
8308 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8310 yyextra->current->reset();
8312 if ( yyextra->insidePHP )
8314 BEGIN( FindMembersPHP );
8316 else if ( yyextra->insideJava )
8318 yyextra->current->name=
"java::lang";
8319 yyextra->current->fileName = yyextra->fileName;
8320 yyextra->current->section = EntryType::makeUsingDir();
8321 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8323 BEGIN( FindMembers );
8327 BEGIN( FindMembers );
8330 scannerYYlex(yyscanner);
8331 yyextra->lexInit=
TRUE;
8333 if (YY_START==Comment)
8335 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8339 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8341 yyextra->programStr.clear();
8342 rt->program.str(std::string());
8346 yyextra->anonNSCount++;
8349 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8352 parent->moveToSubEntryAndKeep(child);
8354 yyextra->outerScopeEntries.clear();
8363 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8366 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8369 if (!yyextra->current)
8374 const char *orgInputString;
8375 int orgInputPosition;
8376 YY_BUFFER_STATE orgState;
8379 orgState = YY_CURRENT_BUFFER;
8380 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8381 orgInputString = yyextra->inputString;
8382 orgInputPosition = yyextra->inputPosition;
8385 yyextra->inputString = text.
data();
8386 yyextra->inputPosition = 0;
8387 yyextra->column = 0;
8388 scannerYYrestart(
nullptr, yyscanner);
8390 scannerYYlex(yyscanner);
8391 yyextra->lexInit=
TRUE;
8393 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8394 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8396 yyextra->current->section = EntryType::makeVariableDoc();
8400 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8401 yy_switch_to_buffer(orgState, yyscanner);
8402 yyextra->inputString = orgInputString;
8403 yyextra->inputPosition = orgInputPosition;
8419 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8427 scannerYYlex_destroy(
p->yyscanner);
8431 const char *fileBuf,
8432 const std::shared_ptr<Entry> &root,
8436 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8437 yyextra->thisParser =
this;
8441 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8449 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8450 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8451 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8462#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.
QCString process(const QCString &input, int &startNewlines, bool fromParseInput=false)
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
QCString trunc(const QCString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
const char * qPrint(const char *s)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
EntryType guessSection(const QCString &name)