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
222static inline int computeIndent(
const char *s,
int startIndent);
255#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 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 void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
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?
MethodTypes
Kind of method.
Protection
Protection level of members.
SrcLangExt
Language as given by extension.
Specifier
Virtualness of a member.
A bunch of utility functions.
270NOTopt (("!"{BNopt})|("not"{BN}+))?
272HEXDIGIT ({DIGIT}|[a-f]|[A-F])
273ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
274SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
275TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
276CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
279CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
280PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
281PHPUSEKW ("public"|"private"|"protected")
282IDLATTR ("["[^\]]*"]"){BN}*
283TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
284RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
285RAWEND ")"[^ \t\(\)\\]{0,16}\"
286ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
287ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
288LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
289BITOP "&"|"|"|"^"|"<<"|">>"|"~"
290OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
291FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
292MODULE_ID ({ID}".")*{ID}
293LINENR {B}*[1-9][0-9]*
294FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
295FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
296FILECHARS {FILEICHAR}*{FILEECHAR}+
297HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
298VFILEMASK {FILECHARS}("."{FILECHARS})*
299FILEMASK {VFILEMASK}|{HFILEMASK}
310DCOMMC ("/\*!"|"/\**")
312DCOMMCPP ("/\/!"|"/\/\/")
314DCOMM {DCOMMC}|{DCOMMCPP}
382%x TryFunctionBlockEnd
397%x SkipInterpVerbString
411%x UNOIDLAttributeBlock
438%x SpecializationSingleQuote
439%x SpecializationDoubleQuote
472%x SliceDictionaryName
503<*>"DEPRECATED_ATTRIBUTE" {
504 if (!yyextra->insideObjC) REJECT;
506<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
507 if (!yyextra->insideObjC) REJECT;
508 yyextra->lastDeprecatedContext=YY_START;
509 yyextra->lastStringContext=Deprecated_round;
512<Deprecated_round>")" {
513 BEGIN(yyextra->lastDeprecatedContext);
515<Deprecated_round>{BNopt} {
518<Deprecated_round>. { }
520 yyextra->curlyCount=0;
521 yyextra->needsSemi =
TRUE;
522 BEGIN(SkipCurlyBlock);
525 yyextra->roundCount=0;
526 BEGIN(SkipRoundBlock);
529 ++yyextra->roundCount;
532 if (yyextra->roundCount )
533 --yyextra->roundCount ;
538 ++yyextra->curlyCount ;
541 if( yyextra->curlyCount )
543 --yyextra->curlyCount ;
545 else if (yyextra->needsSemi)
551 BEGIN( FindMembers );
555 if (yyextra->insidePHP)
557 yyextra->lastStringContext=NextSemi;
558 BEGIN(SkipPHPString);
561<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
563 yyextra->lastStringContext=NextSemi;
568 BEGIN( FindMembers );
572 BEGIN( FindMembers );
575 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
579<FindMembers>"<?php" {
580 yyextra->insidePHP =
TRUE;
582<FindMembersPHP>"<?"("php"?) {
583 BEGIN( FindMembers );
585<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
587 BEGIN( FindMembers );
589<FindMembers>"?>"|"</script>" {
590 if (yyextra->insidePHP)
591 BEGIN( FindMembersPHP );
595<FindMembersPHP>[^\n<]+ {
602<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
607<FindMembers>"%{"[^\n]* {
608 if (!yyextra->insideIDL)
612 if (!yyextra->insideIDL)
615<FindMembers>{B}*("properties"){BN}*":"{BN}* {
620<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
625<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
630<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
635<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
640<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
644<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
647<FindMembers>{B}*"internal"{BN}*":"{BN}* {
648 if (yyextra->insideCli)
657<FindMembers>{B}*"protected"{BN}*":"{BN}* {
660<FindMembers>{B}*"private"{BN}*":"{BN}* {
663<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
664 if (!yyextra->insideCpp) REJECT;
668<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
669 if (!yyextra->insideCpp) REJECT;
673<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
674 if (!yyextra->insideCpp) REJECT;
686<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
687<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
688 BEGIN( SkipComment ) ;
690<CppProt>("slots"|"Q_SLOTS") {
693<FindMembers>{B}*"event"{BN}+ {
694 if (yyextra->insideCli)
699 yyextra->current->bodyLine = yyextra->yyLineNr;
700 yyextra->current->bodyColumn = yyextra->yyColNr;
701 yyextra->curlyCount=0;
702 BEGIN( CliPropertyType );
704 else if (yyextra->insideCS)
708 yyextra->current->bodyLine = yyextra->yyLineNr;
709 yyextra->current->bodyColumn = yyextra->yyColNr;
716<FindMembers>{B}*"property"{BN}+ {
717 if (yyextra->insideCli)
722 yyextra->current->bodyLine = yyextra->yyLineNr;
723 yyextra->current->bodyColumn = yyextra->yyColNr;
724 yyextra->curlyCount=0;
725 BEGIN( CliPropertyType );
732<CliPropertyType>{ID} {
734 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
736<CliPropertyType>"[" {
737 yyextra->current->args =
"[";
738 BEGIN( CliPropertyIndex );
740<CliPropertyType>"{" {
741 yyextra->curlyCount=0;
743 BEGIN( CSAccessorDecl );
745<CliPropertyType>";" {
747 BEGIN( FindMembers );
752<CliPropertyType>{B}* {
756 yyextra->current->type += yytext;
758<CliPropertyIndex>"]" {
759 BEGIN( CliPropertyType );
760 yyextra->current->args+=yytext;
763 yyextra->current->args+=yytext;
778<FindMembers>{B}*"@private"{BN}+ {
781<FindMembers>{B}*"@protected"{BN}+ {
784<FindMembers>{B}*"@public"{BN}+ {
787<FindMembers>[\-+]{BN}* {
788 if (!yyextra->insideObjC)
794 yyextra->current->fileName = yyextra->fileName;
795 yyextra->current->startLine = yyextra->yyLineNr;
796 yyextra->current->startColumn = yyextra->yyColNr;
797 yyextra->current->bodyLine = yyextra->yyLineNr;
798 yyextra->current->bodyColumn = yyextra->yyColNr;
799 yyextra->current->section = EntryType::makeFunction();
801 yyextra->insideObjC =
TRUE;
802 yyextra->yyBegColNr = yyextra->yyColNr;
803 yyextra->yyBegLineNr = yyextra->yyLineNr;
806 yyextra->current->isStatic=yytext[0]==
'+';
812 BEGIN( ObjCReturnType );
813 yyextra->current->type.clear();
814 yyextra->roundCount=0;
817 if (yyextra->current->type.isEmpty())
819 yyextra->current->type +=
"id";
821 yyextra->current->name = yytext;
825 yyextra->current->name +=
':';
827 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
830<ObjCReturnType>[^()]* {
831 yyextra->current->type += yytext;
833<ObjCReturnType>"(^)(" {
834 yyextra->current->type += yytext;
835 yyextra->roundCount++;
838 yyextra->current->type += yytext;
839 yyextra->roundCount++;
842 if (yyextra->roundCount<=0)
848 yyextra->current->type += yytext;
849 yyextra->roundCount--;
852<ObjCParams>({ID})?{BN}*":" {
857 yyextra->current->name +=
" :";
861 yyextra->current->name += keyw+
":";
863 if (yyextra->current->argList.back().type.isEmpty())
865 yyextra->current->argList.back().type=
"id";
869 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
871<ObjCParams>{ID}{BN}* {
875<ObjCParams>","{BN}*"..." {
882 yyextra->current->argList.push_back(a);
890 yyextra->roundCount=0;
891 yyextra->current->argList.back().type.clear();
892 BEGIN( ObjCParamType );
895 yyextra->roundCount++;
896 yyextra->current->argList.back().type+=yytext;
898<ObjCParamType>")"/{B}* {
899 if (yyextra->roundCount<=0)
905 yyextra->current->argList.back().type+=yytext;
906 yyextra->roundCount--;
909<ObjCParamType>[^()]* {
912<ObjCMethod,ObjCParams>";" {
913 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
915 yyextra->current->argList.back().type=
"id";
917 if (yyextra->current->argList.empty())
919 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
926<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
931 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
933 yyextra->current->argList.back().type=
"id";
935 if (yyextra->current->argList.empty())
937 yyextra->current->argList.setNoParameters(
TRUE);
943<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
944 if (yyextra->insideSlice)
947 yyextra->current->bodyLine = yyextra->yyLineNr;
948 yyextra->current->bodyColumn = yyextra->yyColNr;
949 yyextra->current->fileName = yyextra->fileName ;
950 yyextra->current->startLine = yyextra->yyLineNr ;
951 yyextra->current->startColumn = yyextra->yyColNr;
952 yyextra->current->args.clear();
953 yyextra->current->section = EntryType::makeTypedef();
954 yyextra->isTypedef =
TRUE;
955 BEGIN( SliceSequence );
960<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
961 if (yyextra->insideSlice)
964 yyextra->current->bodyLine = yyextra->yyLineNr;
965 yyextra->current->bodyColumn = yyextra->yyColNr;
966 yyextra->current->fileName = yyextra->fileName ;
967 yyextra->current->startLine = yyextra->yyLineNr ;
968 yyextra->current->startColumn = yyextra->yyColNr;
969 yyextra->current->args.clear();
970 yyextra->current->section = EntryType::makeTypedef() ;
971 yyextra->isTypedef =
TRUE;
972 BEGIN( SliceDictionary );
977<FindMembers>{BN}{1,80} {
980<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
981 if (yyextra->insideJava)
984 yyextra->lastSkipRoundContext = YY_START;
985 yyextra->roundCount=0;
991 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
994 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
1001<ObjCPropAttr>"getter="{ID} {
1002 yyextra->current->read = yytext+7;
1004<ObjCPropAttr>"setter="{ID} {
1005 yyextra->current->write = yytext+7;
1007<ObjCPropAttr>"readonly" {
1008 yyextra->current->spec.setWritable(
false);
1010<ObjCPropAttr>"readwrite" {
1012<ObjCPropAttr>"assign" {
1014<ObjCPropAttr>"unsafe_unretained" {
1015 yyextra->current->spec.setAssign(
false);
1016 yyextra->current->spec.setUnretained(
true);
1018<ObjCPropAttr>"retain" {
1019 yyextra->current->spec.setAssign(
false);
1020 yyextra->current->spec.setRetain(
true);
1022<ObjCPropAttr>"copy" {
1023 yyextra->current->spec.setAssign(
false);
1024 yyextra->current->spec.setCopy(
true);
1026<ObjCPropAttr>"weak" {
1027 yyextra->current->spec.setAssign(
false);
1028 yyextra->current->spec.setWeak(
true);
1030<ObjCPropAttr>"strong" {
1031 yyextra->current->spec.setAssign(
false);
1032 yyextra->current->spec.setStrong(
true);
1034<ObjCPropAttr>"nonatomic" {
1035 yyextra->current->spec.setNonAtomic(
true);
1040<FindMembers>"@"{ID}("."{ID})+ {
1041 if (yyextra->insideJava)
1050<FindMembers>"@"{ID} {
1051 if (yyextra->insideJava)
1055 else if (
qstrcmp(yytext,
"@property")==0)
1058 yyextra->current->spec.setWritable(
true).setReadable(
true);
1061 else if (
qstrcmp(yytext,
"@synthesize")==0)
1063 BEGIN( ObjCSkipStatement );
1065 else if (
qstrcmp(yytext,
"@dynamic")==0)
1067 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1074<ObjCSkipStatement>";" {
1077<PackageName>{ID}(("."|"\\"){ID})* {
1078 yyextra->isTypedef=
FALSE;
1080 yyextra->current->name = yytext;
1081 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1082 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1083 yyextra->current->section = EntryType::makeNamespace();
1084 yyextra->current->type =
"namespace" ;
1085 yyextra->current->fileName = yyextra->fileName;
1086 yyextra->current->startLine = yyextra->yyLineNr;
1087 yyextra->current->startColumn = yyextra->yyColNr;
1088 yyextra->current->bodyLine = yyextra->yyLineNr;
1089 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
1093 std::shared_ptr<Entry> tmp = yyextra->current;
1094 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1095 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1100 yyextra->curlyCount=0;
1101 BEGIN( ReadNSBody );
1103<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1104 if (!yyextra->insideCpp) REJECT;
1106 yyextra->current->exported =
true;
1108 BEGIN( ModuleName );
1110<FindMembers>{B}*"module"{BN}*";" {
1111 if (!yyextra->insideCpp) REJECT;
1112 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1115 BEGIN( FindMembers );
1117<FindMembers>{B}*"module"{BN}+ {
1118 if (!yyextra->insideCpp) REJECT;
1120 yyextra->current->exported =
false;
1122 BEGIN( ModuleName );
1124<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1125 if (!yyextra->insideCpp) REJECT;
1126 yyextra->current->exported =
true;
1128 BEGIN( ModuleImport );
1130<FindMembers>{B}*"import"{BN}+ {
1131 if (!yyextra->insideCpp) REJECT;
1133 BEGIN( ModuleImport );
1135<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1137 int i = name.
find(
':');
1143 yyextra->current->exported,
1146 yyextra->current->section = EntryType::makeModuleDoc();
1147 yyextra->isTypedef=
FALSE;
1149 yyextra->current->type +=
" module";
1150 yyextra->current->fileName = yyextra->fileName;
1151 yyextra->current->startLine = yyextra->yyLineNr;
1152 yyextra->current->startColumn = yyextra->yyColNr;
1153 yyextra->current->bodyLine = yyextra->yyLineNr;
1154 yyextra->current->bodyColumn = yyextra->yyColNr;
1155 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
1158<ModuleName>{MODULE_ID} {
1162 yyextra->current->exported,
1164 yyextra->current->section = EntryType::makeModuleDoc();
1165 yyextra->isTypedef=
FALSE;
1167 yyextra->current->type +=
" module";
1168 yyextra->current->fileName = yyextra->fileName;
1169 yyextra->current->startLine = yyextra->yyLineNr;
1170 yyextra->current->startColumn = yyextra->yyColNr;
1171 yyextra->current->bodyLine = yyextra->yyLineNr;
1172 yyextra->current->bodyColumn = yyextra->yyColNr;
1173 yyextra->current->name = yytext;
1176<ModuleName>":"{BN}+"private" {
1177 yyextra->current->exported = yyextra->exported =
false;
1180<ModuleName>";" { unput(
';');
1185<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1191<ModuleImport>"<"[^>\n]*">" {
1197<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1199 int i = name.
find(
':');
1205 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1209<ModuleImport>{MODULE_ID} {
1213 yyextra->current->exported);
1216<ModuleImport>";" { BEGIN(FindMembers); }
1217<ModuleImport>\n {
lineCount(yyscanner); }
1219<FindMembers>{B}*"export"{BN}+"{" {
1220 yyextra->current->exported = yyextra->exported =
true;
1222<FindMembers>{B}*"export"{BN}+ {
1223 if (!yyextra->insideCpp) REJECT;
1224 yyextra->current->exported=
true;
1226<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1227 yyextra->current->type +=
" initonly ";
1228 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1231<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1232 yyextra->current->isStatic =
TRUE;
1235<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1236 yyextra->current->isStatic =
TRUE;
1239<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1240 yyextra->current->isStatic =
FALSE;
1241 yyextra->current->explicitExternal =
TRUE;
1244<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1246 yyextra->current->type +=
" const ";
1247 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1255<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1256 yyextra->current->type +=
" virtual ";
1260<FindMembers>{B}*"constexpr"{BN}+ {
1261 if (yyextra->insideCpp)
1263 yyextra->current->spec.setConstExpr(
true);
1267<FindMembers>{B}*"consteval"{BN}+ {
1268 if (yyextra->insideCpp)
1270 yyextra->current->spec.setConstEval(
true);
1274<FindMembers>{B}*"constinit"{BN}+ {
1275 if (yyextra->insideCpp)
1277 yyextra->current->spec.setConstInit(
true);
1281<FindMembers>{B}*"published"{BN}+ {
1282 if (yyextra->insideIDL)
1285 yyextra->current->spec.setPublished(
true);
1292<FindMembers>{B}*"sealed"{BN}+ {
1293 if (yyextra->insideCS)
1295 yyextra->current->spec.setSealed(
true);
1302<FindMembers>{B}*"abstract"{BN}+ {
1303 if (yyextra->insidePHP || yyextra->insideCS)
1305 yyextra->current->spec.setAbstract(
true);
1309 if (yyextra->insideCpp) REJECT;
1310 yyextra->current->type +=
" abstract ";
1311 if (!yyextra->insideJava)
1317 yyextra->current->spec.setAbstract(
true);
1322<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1323 yyextra->current->spec.setInline(
true);
1326<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1327 yyextra->current->spec.setMutable(
true);
1330<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1331 yyextra->current->spec.setExplicit(
true);
1334<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1335 yyextra->current->spec.setLocal(
true);
1338<FindMembers>{B}*"@required"{BN}+ {
1339 yyextra->current->spec.setOptional(
false).setRequired(
true);
1342<FindMembers>{B}*"@optional"{BN}+ {
1343 yyextra->current->spec.setRequired(
false).setOptional(
true);
1351<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1352<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1353 yyextra->isTypedef=
FALSE;
1354 yyextra->current->section = EntryType::makeNamespace();
1355 yyextra->current->type =
"namespace" ;
1356 yyextra->current->fileName = yyextra->fileName;
1357 yyextra->current->startLine = yyextra->yyLineNr;
1358 yyextra->current->startColumn = yyextra->yyColNr;
1359 yyextra->current->bodyLine = yyextra->yyLineNr;
1360 yyextra->current->bodyColumn = yyextra->yyColNr;
1362 if (yyextra->insidePHP)
1364 BEGIN( PackageName );
1368 BEGIN( CompoundName );
1371<FindMembers>{B}*"module"{BN}+ {
1373 if (yyextra->insideIDL || yyextra->insideSlice)
1375 yyextra->isTypedef=
FALSE;
1376 yyextra->current->section = EntryType::makeNamespace();
1377 yyextra->current->type =
"module" ;
1378 yyextra->current->fileName = yyextra->fileName;
1379 yyextra->current->startLine = yyextra->yyLineNr;
1380 yyextra->current->startColumn = yyextra->yyColNr;
1381 yyextra->current->bodyLine = yyextra->yyLineNr;
1382 yyextra->current->bodyColumn = yyextra->yyColNr;
1383 BEGIN( CompoundName );
1385 else if (yyextra->insideD)
1396<FindMembers>{B}*"library"{BN}+ {
1398 if (yyextra->insideIDL)
1400 yyextra->isTypedef=
FALSE;
1401 yyextra->current->section = EntryType::makeNamespace();
1402 yyextra->current->type =
"library" ;
1403 yyextra->current->fileName = yyextra->fileName;
1404 yyextra->current->startLine = yyextra->yyLineNr;
1405 yyextra->current->startColumn = yyextra->yyColNr;
1406 yyextra->current->bodyLine = yyextra->yyLineNr;
1407 yyextra->current->bodyColumn = yyextra->yyColNr;
1408 BEGIN( CompoundName );
1416<FindMembers>{B}*"constants"{BN}+ {
1418 if (yyextra->insideIDL)
1420 yyextra->isTypedef=
FALSE;
1421 yyextra->current->section = EntryType::makeNamespace();
1422 yyextra->current->type =
"constants";
1423 yyextra->current->fileName = yyextra->fileName;
1424 yyextra->current->startLine = yyextra->yyLineNr;
1425 yyextra->current->startColumn = yyextra->yyColNr;
1426 yyextra->current->bodyLine = yyextra->yyLineNr;
1427 yyextra->current->bodyColumn = yyextra->yyColNr;
1428 BEGIN( CompoundName );
1436<FindMembers>{BN}*("service"){BN}+ {
1438 if (yyextra->insideIDL)
1440 yyextra->isTypedef=
FALSE;
1441 yyextra->current->section = EntryType::makeClass();
1445 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1447 yyextra->current->type +=
" service " ;
1448 yyextra->current->fileName = yyextra->fileName;
1449 yyextra->current->startLine = yyextra->yyLineNr;
1450 yyextra->current->bodyLine = yyextra->yyLineNr;
1451 yyextra->current->bodyColumn = yyextra->yyColNr;
1452 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1460<FindMembers>{BN}*("singleton"){BN}+ {
1462 if (yyextra->insideIDL)
1464 yyextra->isTypedef=
FALSE;
1465 yyextra->current->section = EntryType::makeClass();
1467 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1468 setPublished(spec.isPublished());
1470 yyextra->current->type +=
" singleton " ;
1471 yyextra->current->fileName = yyextra->fileName;
1472 yyextra->current->startLine = yyextra->yyLineNr;
1473 yyextra->current->bodyLine = yyextra->yyLineNr;
1474 yyextra->current->bodyColumn = yyextra->yyColNr;
1475 BEGIN( CompoundName );
1483<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1485 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1487 yyextra->isTypedef=
FALSE;
1488 yyextra->current->section = EntryType::makeClass();
1490 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1492 setOptional(spec.isOptional()).
1493 setPublished(spec.isPublished()).
1494 setLocal(spec.isLocal());
1496 yyextra->current->type +=
" interface" ;
1497 yyextra->current->fileName = yyextra->fileName;
1498 yyextra->current->startLine = yyextra->yyLineNr;
1499 yyextra->current->startColumn = yyextra->yyColNr;
1500 yyextra->current->bodyLine = yyextra->yyLineNr;
1501 yyextra->current->bodyColumn = yyextra->yyColNr;
1503 BEGIN( CompoundName );
1511<FindMembers>{B}*"@implementation"{BN}+ {
1513 yyextra->isTypedef=
FALSE;
1514 yyextra->current->section = EntryType::makeObjcImpl();
1516 yyextra->insideObjC =
TRUE;
1519 yyextra->current->type +=
" implementation" ;
1520 yyextra->current->fileName = yyextra->fileName;
1521 yyextra->current->startLine = yyextra->yyLineNr;
1522 yyextra->current->bodyLine = yyextra->yyLineNr;
1523 yyextra->current->bodyColumn = yyextra->yyColNr;
1524 BEGIN( CompoundName );
1526<FindMembers>{B}*"@interface"{BN}+ {
1528 yyextra->isTypedef=
FALSE;
1529 yyextra->current->section = EntryType::makeClass();
1530 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1531 if (!yyextra->insideJava)
1534 yyextra->insideObjC =
TRUE;
1538 yyextra->current->type +=
" interface" ;
1539 yyextra->current->fileName = yyextra->fileName;
1540 yyextra->current->startLine = yyextra->yyLineNr;
1541 yyextra->current->startColumn = yyextra->yyColNr;
1542 yyextra->current->bodyLine = yyextra->yyLineNr;
1543 yyextra->current->bodyColumn = yyextra->yyColNr;
1544 BEGIN( CompoundName );
1546<FindMembers>{B}*"@protocol"{BN}+ {
1548 yyextra->isTypedef=
FALSE;
1549 yyextra->current->section = EntryType::makeClass();
1552 yyextra->insideObjC =
TRUE;
1555 yyextra->current->type +=
" protocol" ;
1556 yyextra->current->fileName = yyextra->fileName;
1557 yyextra->current->startLine = yyextra->yyLineNr;
1558 yyextra->current->startColumn = yyextra->yyColNr;
1559 yyextra->current->bodyLine = yyextra->yyLineNr;
1560 yyextra->current->bodyColumn = yyextra->yyColNr;
1561 BEGIN( CompoundName );
1563<FindMembers>{B}*"exception"{BN}+ {
1564 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1565 yyextra->isTypedef=
FALSE;
1566 yyextra->current->section = EntryType::makeClass();
1569 yyextra->current->spec =
TypeSpecifier().setException(
true).
1570 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1572 yyextra->current->type +=
" exception" ;
1573 yyextra->current->fileName = yyextra->fileName;
1574 yyextra->current->startLine = yyextra->yyLineNr;
1575 yyextra->current->startColumn = yyextra->yyColNr;
1576 yyextra->current->bodyLine = yyextra->yyLineNr;
1577 yyextra->current->bodyColumn = yyextra->yyColNr;
1579 BEGIN( CompoundName );
1581<FindMembers>"@class" |
1582<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1583<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1585 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1586 bool isConst=decl.
find(
"const")!=-1;
1587 bool isVolatile=decl.
find(
"volatile")!=-1;
1588 yyextra->current->section = EntryType::makeClass();
1590 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1593 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1595 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1597 yyextra->current->spec.setLocal(
true);
1601 yyextra->current->type +=
" const";
1603 else if (isVolatile)
1605 yyextra->current->type +=
" volatile";
1607 yyextra->current->type +=
" class" ;
1608 yyextra->current->fileName = yyextra->fileName;
1609 yyextra->current->startLine = yyextra->yyLineNr;
1610 yyextra->current->startColumn = yyextra->yyColNr;
1611 yyextra->current->bodyLine = yyextra->yyLineNr;
1612 yyextra->current->bodyColumn = yyextra->yyColNr;
1616 yyextra->insideObjC =
TRUE;
1619 if (yytext[yyleng-1]==
'{') unput(
'{');
1620 BEGIN( CompoundName ) ;
1622<FindMembers>{B}*"value class{" |
1623<FindMembers>{B}*"value class"{BN}+ {
1624 yyextra->isTypedef=
FALSE;
1625 yyextra->current->section = EntryType::makeClass();
1628 yyextra->current->type +=
" value class" ;
1629 yyextra->current->fileName = yyextra->fileName;
1630 yyextra->current->startLine = yyextra->yyLineNr;
1631 yyextra->current->startColumn = yyextra->yyColNr;
1632 yyextra->current->bodyLine = yyextra->yyLineNr;
1633 yyextra->current->bodyColumn = yyextra->yyColNr;
1635 if (yytext[yyleng-1]==
'{') unput(
'{');
1636 BEGIN( CompoundName ) ;
1638<FindMembers>{B}*"ref class{" |
1639<FindMembers>{B}*"ref class"{BN}+ {
1640 yyextra->isTypedef=
FALSE;
1641 yyextra->current->section = EntryType::makeClass();
1644 yyextra->current->type +=
" ref class" ;
1645 yyextra->current->fileName = yyextra->fileName;
1646 yyextra->current->startLine = yyextra->yyLineNr;
1647 yyextra->current->startColumn = yyextra->yyColNr;
1648 yyextra->current->bodyLine = yyextra->yyLineNr;
1649 yyextra->current->bodyColumn = yyextra->yyColNr;
1651 if (yytext[yyleng-1]==
'{') unput(
'{');
1652 BEGIN( CompoundName ) ;
1654<FindMembers>{B}*"interface class{" |
1655<FindMembers>{B}*"interface class"{BN}+ {
1656 yyextra->isTypedef=
FALSE;
1657 yyextra->current->section = EntryType::makeClass();
1658 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1660 yyextra->current->type +=
" interface class" ;
1661 yyextra->current->fileName = yyextra->fileName;
1662 yyextra->current->startLine = yyextra->yyLineNr;
1663 yyextra->current->startColumn = yyextra->yyColNr;
1664 yyextra->current->bodyLine = yyextra->yyLineNr;
1665 yyextra->current->bodyColumn = yyextra->yyColNr;
1667 if (yytext[yyleng-1]==
'{') unput(
'{');
1668 BEGIN( CompoundName ) ;
1670<FindMembers>{B}*"coclass"{BN}+ {
1671 if (yyextra->insideIDL)
1673 yyextra->isTypedef=
FALSE;
1674 yyextra->current->section = EntryType::makeClass();
1676 yyextra->current->type +=
" coclass" ;
1677 yyextra->current->fileName = yyextra->fileName;
1678 yyextra->current->startLine = yyextra->yyLineNr;
1679 yyextra->current->startColumn = yyextra->yyColNr;
1680 yyextra->current->bodyLine = yyextra->yyLineNr;
1681 yyextra->current->bodyColumn = yyextra->yyColNr;
1683 BEGIN( CompoundName ) ;
1688 yyextra->current->name = yytext;
1689 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1693<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1694<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1695 if (yyextra->insideJava) REJECT;
1697 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1698 bool isConst=decl.
find(
"const")!=-1;
1699 bool isVolatile=decl.
find(
"volatile")!=-1;
1700 yyextra->current->section = EntryType::makeClass() ;
1704 setPublished(spec.isPublished()).
1705 setInline(spec.isInline()).
1706 setLocal(spec.isLocal());
1712 yyextra->current->type +=
" const";
1714 else if (isVolatile)
1716 yyextra->current->type +=
" volatile";
1718 yyextra->current->type +=
" struct" ;
1719 yyextra->current->fileName = yyextra->fileName;
1720 yyextra->current->startLine = yyextra->yyLineNr;
1721 yyextra->current->startColumn = yyextra->yyColNr;
1722 yyextra->current->bodyLine = yyextra->yyLineNr;
1723 yyextra->current->bodyColumn = yyextra->yyColNr;
1725 if (yytext[yyleng-1]==
'{') unput(
'{');
1726 BEGIN( CompoundName ) ;
1728<FindMembers>{B}*"value struct{" |
1729<FindMembers>{B}*"value struct"{BN}+ {
1730 yyextra->isTypedef=
FALSE;
1731 yyextra->current->section = EntryType::makeClass();
1732 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1734 yyextra->current->type +=
" value struct" ;
1735 yyextra->current->fileName = yyextra->fileName;
1736 yyextra->current->startLine = yyextra->yyLineNr;
1737 yyextra->current->startColumn = yyextra->yyColNr;
1738 yyextra->current->bodyLine = yyextra->yyLineNr;
1739 yyextra->current->bodyColumn = yyextra->yyColNr;
1741 if (yytext[yyleng-1]==
'{') unput(
'{');
1742 BEGIN( CompoundName ) ;
1744<FindMembers>{B}*"ref struct{" |
1745<FindMembers>{B}*"ref struct"{BN}+ {
1746 yyextra->isTypedef=
FALSE;
1747 yyextra->current->section = EntryType::makeClass();
1748 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1750 yyextra->current->type +=
" ref struct" ;
1751 yyextra->current->fileName = yyextra->fileName;
1752 yyextra->current->startLine = yyextra->yyLineNr;
1753 yyextra->current->startColumn = yyextra->yyColNr;
1754 yyextra->current->bodyLine = yyextra->yyLineNr;
1755 yyextra->current->bodyColumn = yyextra->yyColNr;
1757 if (yytext[yyleng-1]==
'{') unput(
'{');
1758 BEGIN( CompoundName ) ;
1760<FindMembers>{B}*"interface struct{" |
1761<FindMembers>{B}*"interface struct"{BN}+ {
1762 yyextra->isTypedef=
FALSE;
1763 yyextra->current->section = EntryType::makeClass();
1764 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1766 yyextra->current->type +=
" interface struct";
1767 yyextra->current->fileName = yyextra->fileName;
1768 yyextra->current->startLine = yyextra->yyLineNr;
1769 yyextra->current->startColumn = yyextra->yyColNr;
1770 yyextra->current->bodyLine = yyextra->yyLineNr;
1771 yyextra->current->bodyColumn = yyextra->yyColNr;
1773 if (yytext[yyleng-1]==
'{') unput(
'{');
1774 BEGIN( CompoundName ) ;
1776<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1777<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1778 if (yyextra->insideJava) REJECT;
1780 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1781 bool isConst=decl.
find(
"const")!=-1;
1782 bool isVolatile=decl.
find(
"volatile")!=-1;
1783 yyextra->current->section = EntryType::makeClass();
1790 yyextra->current->type +=
" const";
1792 else if (isVolatile)
1794 yyextra->current->type +=
" volatile";
1796 yyextra->current->type +=
" union" ;
1797 yyextra->current->fileName = yyextra->fileName;
1798 yyextra->current->startLine = yyextra->yyLineNr;
1799 yyextra->current->startColumn = yyextra->yyColNr;
1800 yyextra->current->bodyLine = yyextra->yyLineNr;
1801 yyextra->current->bodyColumn = yyextra->yyColNr;
1803 if (yytext[yyleng-1]==
'{') unput(
'{');
1804 BEGIN( CompoundName ) ;
1806<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1807<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1809 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1810 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1811 bool isEnumSytruct = text.
find(
"struct")!=-1;
1812 if (yyextra->insideJava)
1814 yyextra->current->section = EntryType::makeClass();
1820 yyextra->current->section = EntryType::makeEnum() ;
1823 yyextra->current->type +=
" enum";
1826 yyextra->current->spec.setStrong(
true);
1830 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1832 yyextra->current->fileName = yyextra->fileName;
1833 yyextra->current->startLine = yyextra->yyLineNr;
1834 yyextra->current->startColumn = yyextra->yyColNr;
1835 yyextra->current->bodyLine = yyextra->yyLineNr;
1836 yyextra->current->bodyColumn = yyextra->yyColNr;
1838 if (yytext[yyleng-1]==
'{') unput(
'{');
1839 BEGIN( CompoundName ) ;
1841<FindMembers>{B}*"concept"{BN}+ {
1842 if (yyextra->insideJava) REJECT;
1843 yyextra->isTypedef=
FALSE;
1844 yyextra->current->section = EntryType::makeConcept();
1846 yyextra->current->type +=
" concept";
1847 yyextra->current->fileName = yyextra->fileName;
1848 yyextra->current->startLine = yyextra->yyLineNr;
1849 yyextra->current->startColumn = yyextra->yyColNr;
1850 yyextra->current->bodyLine = yyextra->yyLineNr;
1851 yyextra->current->bodyColumn = yyextra->yyColNr;
1853 BEGIN( ConceptName ) ;
1855<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1857 yyextra->current->name +=
"()";
1858 BEGIN( FindMembers );
1860<Operator>"("{BN}*")"{BNopt}/"(" {
1862 yyextra->current->name += yytext ;
1863 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1864 BEGIN( FindMembers ) ;
1868 BEGIN( FindMembers ) ;
1872 yyextra->current->name += *yytext ;
1874<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1875 if (!yyextra->current->type.startsWith(
"friend "))
1877 yyextra->current->name += yytext;
1881 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1883 BEGIN( FindMembers ) ;
1885<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1888 yyextra->current->tArgLists.
push_back(al);
1889 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1890 yyextra->templateStr=
"<";
1891 yyextra->fullArgString = yyextra->templateStr;
1892 yyextra->copyArgString = &yyextra->templateStr;
1893 yyextra->currentArgumentContext = FindMembers;
1894 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1896<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1897 if (yyextra->insideJava) REJECT;
1899 BEGIN( NSAliasName );
1902 yyextra->aliasName = yytext;
1903 BEGIN( NSAliasArg );
1905<NSAliasArg>({ID}"::")*{ID} {
1907 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1918 BEGIN( FindMembers );
1920<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1922 yyextra->aliasName=yytext;
1925<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1929 yyextra->current->fileName = yyextra->fileName;
1931 yyextra->current->section = EntryType::makeUsingDecl();
1932 yyextra->current_root->copyToSubEntry(yyextra->current);
1934 yyextra->current->section = EntryType::makeUsingDir();
1935 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1937 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1939<PHPUseAs>{BN}+"as"{BN}+ {
1942<PHPUseAs>{PHPUSEKW} {
1946 if (!yyextra->aliasName.isEmpty())
1951 yyextra->aliasName.clear();
const std::string & str() const
1953<PHPUse,PHPUseAs>[,;] {
1963<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1967 yyextra->current->fileName = yyextra->fileName;
1974 yyextra->current->section = EntryType::makeUsingDir();
1975 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)
1979<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1983 yyextra->current->fileName = yyextra->fileName;
1995 if (yyextra->insideD)
1997 yyextra->current->section = EntryType::makeUsingDir();
2002 yyextra->current->section = EntryType::makeUsingDecl();
2004 yyextra->previous = yyextra->current;
2005 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2009<IDLImport>"\""[^"]*"\"" {
2010 QCString fileName(&yytext[1],yyleng-2);
2026<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2027 if (yyextra->insideJava) REJECT;
2028 yyextra->current->startLine=yyextra->yyLineNr;
2029 yyextra->current->startColumn = yyextra->yyColNr;
2033<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2034<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2036 yyextra->current->name=yytext;
2037 yyextra->current->fileName = yyextra->fileName;
2038 yyextra->current->section = EntryType::makeUsingDecl();
2039 yyextra->current->startLine = yyextra->yyLineNr;
2040 yyextra->previous = yyextra->current;
2041 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2043 if (yyextra->insideCS)
2048 yyextra->current->name=yytext;
2049 yyextra->current->fileName = yyextra->fileName;
2050 yyextra->current->startLine = yyextra->yyLineNr;
2051 yyextra->current->startColumn = yyextra->yyColNr;
2052 yyextra->current->section = EntryType::makeUsingDir();
2053 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2058<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2060 yyextra->current->fileName = yyextra->fileName;
2061 yyextra->current->section = EntryType::makeUsingDecl();
2062 yyextra->current->startLine = yyextra->yyLineNr;
2063 yyextra->current->bodyLine = yyextra->yyLineNr;
2064 yyextra->current->bodyColumn = yyextra->yyColNr;
2065 yyextra->lastInitializerContext = UsingAlias;
2066 yyextra->initBracketCount=0;
2067 BEGIN(ReadInitializer);
2070 yyextra->current->section = EntryType::makeVariable();
2072 init.stripPrefix(
"class ");
2073 init.stripPrefix(
"struct ");
2075 yyextra->current->type =
"typedef "+
init;
2076 yyextra->current->args.clear();
2077 yyextra->current->spec.setAlias(
true);
2078 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2083 yyextra->current->initializer << yytext;
2086 yyextra->current->initializer << yytext;
2090 yyextra->current->fileName = yyextra->fileName;
2091 yyextra->current->section = EntryType::makeUsingDir();
2092 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2096<Using>";" { BEGIN(FindMembers); }
2097<FindMembers>{SCOPENAME}{BN}*"<>" {
2102<FindMembers>{SCOPENAME}{BNopt}/"<" {
2104 if (yyextra->insideCpp && name==
"import") REJECT;
2105 yyextra->roundCount=0;
2106 yyextra->sharpCount=0;
2109 yyextra->current->name=name;
2115 BEGIN( EndTemplate );
2117<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2118 yyextra->sharpCount=0;
2119 yyextra->roundCount=0;
2127 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...
2130 if (!yyextra->insidePHP)
2136 yyextra->lastHereDocContext = YY_START;
2140<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2141 yyextra->current->name+=yytext;
2145 if (yyextra->roundCount==0)
2148 yyextra->sharpCount++;
2150 yyextra->current->name+=yytext;
2152<ClassTemplSpec,EndTemplate>">=" {
2153 yyextra->current->name+=yytext;
2155<ClassTemplSpec,EndTemplate>(">>") {
2156 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2164 yyextra->current->name+=yytext;
2169 yyextra->current->name+=
'>';
2171 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2173 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2178<EndTemplate>">"{BN}*"(" {
2180 yyextra->current->name+=
'>';
2182 if (yyextra->roundCount==0)
2184 --yyextra->sharpCount;
2186 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2188 yyextra->current->bodyLine = yyextra->yyLineNr;
2189 yyextra->current->bodyColumn = yyextra->yyColNr;
2190 yyextra->current->args =
"(";
2191 yyextra->currentArgumentContext = FuncQual;
2192 yyextra->fullArgString = yyextra->current->args;
2193 yyextra->copyArgString = &yyextra->current->args;
2195 BEGIN( ReadFuncArgType ) ;
2199 yyextra->current->name+=
"(";
2200 yyextra->roundCount++;
2203<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2205 yyextra->current->name+=
'>';
2206 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2211<EndTemplate>">"{BNopt}/"::" {
2213 yyextra->current->name+=
'>';
2215 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2217 BEGIN(FindMemberName);
2220<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2221 yyextra->roundCount++;
2223<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2224 if (yyextra->roundCount>0) yyextra->roundCount--;
2227 yyextra->current->name+=*yytext;
2230<FindMembers>"define"{BN}*"("{BN}*["'] {
2231 if (yyextra->insidePHP)
2233 yyextra->current->bodyLine = yyextra->yyLineNr;
2234 yyextra->current->bodyColumn = yyextra->yyColNr;
2241 yyextra->delimiter = yytext;
2242 *yyextra->pCopyHereDocGString << yytext;
2243 BEGIN(CopyHereDocEnd);
2245<CopyHereDoc>"\""{ID}/"\"" {
2246 yyextra->delimiter = &yytext[1];
2247 *yyextra->pCopyHereDocGString << yytext;
2248 BEGIN(CopyHereDocEnd);
2250<CopyHereDoc>"'"{ID}/"'" {
2251 yyextra->delimiter = &yytext[1];
2252 *yyextra->pCopyHereDocGString << yytext;
2253 BEGIN(CopyHereDocEnd);
2256 yyextra->delimiter = yytext;
2259<HereDoc>"\""{ID}/"\"" {
2260 yyextra->delimiter = &yytext[1];
2263<HereDoc>"'"{ID}/"'" {
2264 yyextra->delimiter = &yytext[1];
2268 if (yyextra->delimiter==yytext)
2270 BEGIN(yyextra->lastHereDocContext);
2274<CopyHereDocEnd>^{Bopt}{ID} {
2275 *yyextra->pCopyHereDocGString << yytext;
2278 BEGIN(yyextra->lastHereDocContext);
2283 *yyextra->pCopyHereDocGString << yytext;
2285<CopyHereDocEnd>{ID} {
2286 *yyextra->pCopyHereDocGString << yytext;
2289 *yyextra->pCopyHereDocGString << yytext;
2291<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2293<FindMembers>"Q_PROPERTY" {
2294 yyextra->yyBegLineNr = yyextra->yyLineNr;
2295 yyextra->yyBegColNr = yyextra->yyColNr;
2298 yyextra->current->type.clear();
2308 yyextra->current->name+=yytext;
2311 yyextra->current->type+= yyextra->current->name;
2312 yyextra->current->type+= yytext;
2313 yyextra->current->name=
"";
2315<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2316 yyextra->current->type+= yyextra->current->name;
2317 yyextra->current->name=yytext;
2319<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2320 yyextra->current->spec.setReadable(
true);
2323<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2324 yyextra->current->spec.setWritable(
true);
2327<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2328<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2329<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2330<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2335<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2336<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2340 yyextra->current->read = yytext;
2344 yyextra->current->write = yytext;
2347<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2348 yyextra->current->name=yytext;
2352<FindMembers>"requires" {
2353 if (yyextra->insideJava) REJECT;
2354 yyextra->current->req.clear();
2355 yyextra->requiresContext = YY_START;
2356 BEGIN(RequiresClause);
2358<RequiresClause>"requires"{BN}*/"{" {
2359 if (yyextra->insideJava) REJECT;
2361 yyextra->current->req+=yytext;
2362 BEGIN( RequiresExpression ) ;
2364<RequiresClause>"requires"{BN}*"(" {
2365 if (yyextra->insideJava) REJECT;
2367 yyextra->current->req+=yytext;
2368 yyextra->lastRoundContext=RequiresExpression;
2369 yyextra->pCopyRoundString=&yyextra->current->req;
2370 yyextra->roundCount=0;
2371 BEGIN( CopyRound ) ;
2373<RequiresExpression>"{" {
2374 yyextra->current->req+=yytext;
2375 yyextra->lastCurlyContext=RequiresClause;
2376 yyextra->pCopyCurlyString=&yyextra->current->req;
2377 yyextra->curlyCount=0;
2378 BEGIN( CopyCurly ) ;
2380<RequiresExpression>\n {
2381 yyextra->current->req+=
' ';
2384<RequiresExpression>. {
2385 yyextra->current->req+=yytext;
2387<RequiresClause>"(" {
2388 yyextra->current->req+=yytext;
2389 yyextra->lastRoundContext=RequiresClause;
2390 yyextra->pCopyRoundString=&yyextra->current->req;
2391 yyextra->roundCount=0;
2392 BEGIN( CopyRound ) ;
2394<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2398 yyextra->current->req+=yytext;
2399 yyextra->lastRoundContext=RequiresClause;
2400 yyextra->pCopyRoundString=&yyextra->current->req;
2401 yyextra->roundCount=0;
2409<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2413 yyextra->current->req+=yytext;
2414 yyextra->lastSharpContext=RequiresClause;
2415 yyextra->pCopySharpString=&yyextra->current->req;
2416 yyextra->sharpCount=0;
2424<RequiresClause>{NOTopt}{SCOPENAME} {
2428 yyextra->current->req=yytext;
2429 BEGIN(yyextra->requiresContext);
2436<RequiresClause>{NOTopt}"::"{ID} {
2438 yyextra->current->req+=yytext;
2440<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2442 yyextra->current->req+=yytext;
2444<RequiresClause>{BN}+ {
2445 yyextra->current->req+=
' ';
2450 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2451 BEGIN(yyextra->requiresContext);
2453<FindMembers,FindMemberName>{SCOPENAME} {
2455 yyextra->yyBegColNr=yyextra->yyColNr;
2456 yyextra->yyBegLineNr=yyextra->yyLineNr;
2458 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2462 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2464 if (yyextra->insideIDL)
2469 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2473 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2478 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2480 BEGIN(IDLUnionCase);
2482 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2484 yyextra->insideTryBlock=
FALSE;
2485 BEGIN(TryFunctionBlock);
2487 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2489 yyextra->lastAlignAsContext = YY_START;
2492 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2494 yyextra->current->type=
"var";
2496 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2498 yyextra->current->type=
"function";
2500 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2504 yyextra->current->name=
"this";
2507 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2510 BEGIN(StaticAssert);
2512 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2516 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2517 yyextra->current->type+=yytext;
2520 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2522 if (yyextra->current->type.isEmpty())
2524 yyextra->current->type =
"optional";
2528 yyextra->current->type +=
" optional";
2530 yyextra->lastModifierContext = YY_START;
2531 BEGIN(SliceOptional);
2535 if (YY_START==FindMembers)
2539 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2540 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2544 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2548 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2552 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2556 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2558 if (YY_START==FindMembers)
2559 yyextra->current->name = yytext;
2561 yyextra->current->name += yytext;
2562 yyextra->current->isStatic =
TRUE;
2566 if (YY_START==FindMembers)
2567 yyextra->current->name = yytext;
2569 yyextra->current->name += yytext;
2570 if (yyextra->current->name.startsWith(
"static "))
2572 yyextra->current->isStatic =
TRUE;
2573 yyextra->current->name= yyextra->current->name.mid(7);
2575 else if (yyextra->current->name.startsWith(
"inline "))
2577 if (yyextra->current->type.isEmpty())
2579 yyextra->current->type=
"inline";
2583 yyextra->current->type+=
"inline ";
2585 yyextra->current->name= yyextra->current->name.mid(7);
2587 else if (yyextra->current->name.startsWith(
"constexpr "))
2589 if (yyextra->current->type.isEmpty())
2591 yyextra->current->type=
"constexpr";
2595 yyextra->current->type+=
"constexpr ";
2597 yyextra->current->name=yyextra->current->name.mid(10);
2599 else if (yyextra->current->name.startsWith(
"consteval "))
2601 if (yyextra->current->type.isEmpty())
2603 yyextra->current->type=
"consteval";
2607 yyextra->current->type+=
"consteval ";
2609 yyextra->current->name=yyextra->current->name.mid(10);
2611 else if (yyextra->current->name.startsWith(
"constinit "))
2613 if (yyextra->current->type.isEmpty())
2615 yyextra->current->type=
"constinit";
2619 yyextra->current->type+=
"constinit ";
2621 yyextra->current->name=yyextra->current->name.mid(10);
2623 else if (yyextra->current->name.startsWith(
"const "))
2625 if (yyextra->current->type.isEmpty())
2627 yyextra->current->type=
"const";
2631 yyextra->current->type+=
"const ";
2633 yyextra->current->name=yyextra->current->name.mid(6);
2635 else if (yyextra->current->name.startsWith(
"volatile "))
2637 if (yyextra->current->type.isEmpty())
2639 yyextra->current->type=
"volatile";
2643 yyextra->current->type+=
"volatile ";
2645 yyextra->current->name=yyextra->current->name.mid(9);
2647 else if (yyextra->current->name.startsWith(
"typedef "))
2649 if (yyextra->current->type.isEmpty())
2651 yyextra->current->type=
"typedef";
2655 yyextra->current->type+=
"typedef ";
2657 yyextra->current->name=yyextra->current->name.mid(8);
2667 yyextra->externLinkage=
FALSE;
2671 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2674 yyextra->lastSkipRoundContext = FindMembers;
2675 yyextra->roundCount=0;
2678<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2684 yyextra->current->type+=yytext;
2685 yyextra->lastRoundContext=FindMembers;
2686 yyextra->pCopyRoundString=&yyextra->current->type;
2687 yyextra->roundCount=0;
2690<DeclType>{BN}+ {
lineCount(yyscanner); }
2695<CSIndexer>"["[^\n\]]*"]" {
2699<FindMembers>[0-9]{ID} {
2702 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2704 yyextra->current->name+=
".";
2708 yyextra->current->name+=yytext;
2710<CppQuote>"("{B}*"\"" {
2711 yyextra->insideCppQuote=
TRUE;
2715<IDLUnionCase>":" { BEGIN(FindMembers); }
2716<IDLUnionCase>\n {
lineCount(yyscanner); }
2718<TryFunctionBlock>\n {
lineCount(yyscanner); }
2719<TryFunctionBlock>"{" {
2720 yyextra->curlyCount=0;
2721 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2725<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2727<TryFunctionBlockEnd>\n { unput(*yytext);
2728 BEGIN( FindMembers );
2730<TryFunctionBlockEnd>. { unput(*yytext);
2731 BEGIN( FindMembers );
2734 yyextra->insideCppQuote=
FALSE;
2737<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2739 yyextra->lastCPPContext = YY_START;
2742<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2743<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2744 if (yyextra->insidePHP)
2746 yyextra->current->bodyLine = yyextra->yyLineNr;
2747 yyextra->current->bodyColumn = yyextra->yyColNr;
2748 yyextra->current->fileName = yyextra->fileName;
2749 yyextra->current->startLine = yyextra->yyLineNr;
2750 yyextra->current->startColumn = yyextra->yyColNr;
2751 yyextra->current->type.clear();
2752 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2753 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2754 yyextra->current->section = EntryType::makeDefine();
2755 yyextra->lastDefineContext = YY_START;
2758<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2759 yyextra->yyLineNr = atoi(&yytext[1]);
2761 yyextra->lastPreLineCtrlContext = YY_START;
2762 if (YY_START==ReadBody ||
2763 YY_START==ReadNSBody ||
2764 YY_START==ReadBodyIntf)
2766 yyextra->current->program << yytext;
2768 BEGIN( PreLineCtrl );
2770<PreLineCtrl>"\""[^\n\"]*"\"" {
2772 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2773 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2774 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2776 yyextra->current->program << yytext;
2780 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2781 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2782 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2784 yyextra->current->program << yytext;
2788 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2789 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2790 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2792 yyextra->current->program << yytext;
2795 BEGIN( yyextra->lastPreLineCtrlContext );
2798<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2799<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2800 BEGIN( yyextra->lastCPPContext) ;
2802<SDefine>{ID}{B}*"(" {
2803 yyextra->current->name = yytext;
2804 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2805 yyextra->current->args =
"(";
2806 yyextra->current->bodyLine = yyextra->yyLineNr;
2807 yyextra->current->bodyColumn = yyextra->yyColNr;
2808 yyextra->currentArgumentContext = DefineEnd;
2809 yyextra->fullArgString=yyextra->current->args;
2810 yyextra->copyArgString=&yyextra->current->args;
2811 BEGIN( ReadFuncArgType ) ;
2826 yyextra->current->bodyLine = yyextra->yyLineNr;
2827 yyextra->current->bodyColumn = yyextra->yyColNr;
2828 yyextra->current->name = yytext;
2835 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2837 BEGIN(yyextra->lastDefineContext);
2841 yyextra->current->fileName = yyextra->fileName;
2842 yyextra->current->startLine = yyextra->yyLineNr;
2843 yyextra->current->startColumn = yyextra->yyColNr;
2844 yyextra->current->type.clear();
2845 yyextra->current->type =
"const";
2849 yyextra->current->initializer.str(
init.str());
2850 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2851 yyextra->current->section = EntryType::makeVariable();
2852 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2857<DefineEnd>\\[\r]?\n {
2859 yyextra->current->endBodyLine = yyextra->yyLineNr;
2862 if (yyextra->insideIDL && yyextra->insideCppQuote)
2868 yyextra->lastStringContext=DefineEnd;
2873<DefinePHP>{ID}["']{BN}*","{BN}* {
2874 yyextra->current->name = yytext;
2875 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2876 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2877 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2878 yyextra->current->bodyLine = yyextra->yyLineNr;
2879 yyextra->current->bodyColumn = yyextra->yyColNr;
2880 yyextra->lastRoundContext = DefinePHPEnd;
2881 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2882 yyextra->roundCount = 0;
2883 BEGIN( GCopyRound );
2887 if (yyextra->insideCli)
2890 yyextra->current->name = yytext ;
2898 yyextra->current->name += yytext ;
2901<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2902 if (yyextra->current->bodyLine==-1)
2904 yyextra->current->bodyLine=yyextra->yyLineNr;
2905 yyextra->current->bodyColumn = yyextra->yyColNr;
2907 yyextra->docBlockContext = YY_START;
2908 yyextra->docBlockInBody =
FALSE;
2909 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2914 yyextra->docBlock.str(indent.
str());
2918 yyextra->docBlockTerm =
';';
2919 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2921 yyextra->current->bitfields =
":"+yyextra->current->args;
2922 yyextra->current->args.clear();
2923 yyextra->current->section = EntryType::makeVariable();
2925 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)
2936<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2937 yyextra->docBlockContext = YY_START;
2938 yyextra->docBlockInBody =
FALSE;
2939 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2944 yyextra->docBlock.str(indent.
str());
2947 yyextra->docBlockTerm =
',';
2948 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2950 yyextra->current->bitfields =
":"+yyextra->current->args;
2951 yyextra->current->args.clear();
2952 yyextra->current->section = EntryType::makeVariable();
2954 if (yytext[yyleng-3]==
'/')
2965<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2966 if (yyextra->current->bodyLine==-1)
2968 yyextra->current->bodyLine=yyextra->yyLineNr;
2969 yyextra->current->bodyColumn = yyextra->yyColNr;
2971 yyextra->docBlockContext = YY_START;
2972 yyextra->docBlockInBody =
FALSE;
2973 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2977 yyextra->docBlock.str(indent.
str());
2980 yyextra->docBlockTerm = 0;
2981 if (yytext[yyleng-3]==
'/')
2993<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2995 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
2998 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3003 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3009 if (yytext[2]==
'!' || yytext[2]==
'/')
3011 yyextra->docBlockContext = YY_START;
3012 yyextra->docBlockInBody =
FALSE;
3013 yyextra->docBlockAutoBrief =
FALSE;
3014 yyextra->docBlock.str(std::string());
3015 yyextra->docBlockTerm = 0;
3021 yyextra->lastCContext=YY_START;
3022 BEGIN(SkipCxxComment);
3027 if (yytext[2]==
'!' || yytext[2]==
'*')
3029 yyextra->docBlockContext = YY_START;
3030 yyextra->docBlockInBody =
FALSE;
3031 yyextra->docBlock.str(std::string());
3032 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3034 yyextra->docBlockTerm = 0;
3040 yyextra->lastCContext=YY_START;
3045<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3046 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3047 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3051 if (!yyextra->insideCS) REJECT;
3052 yyextra->current->bodyLine = yyextra->yyLineNr;
3053 yyextra->current->bodyColumn = yyextra->yyColNr;
3054 yyextra->current->initializer.str(yytext);
3055 yyextra->lastInitializerContext = YY_START;
3056 yyextra->initBracketCount=0;
3058 yyextra->current->spec.setGettable(
true);
3059 BEGIN(ReadInitializerPtr);
3062 yyextra->current->bodyLine = yyextra->yyLineNr;
3063 yyextra->current->bodyColumn = yyextra->yyColNr;
3064 yyextra->current->initializer.str(yytext);
3065 yyextra->lastInitializerContext = YY_START;
3066 yyextra->initBracketCount=0;
3067 BEGIN(ReadInitializer);
3069<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3071 yyextra->current->exception +=
" ";
3074<UNOIDLAttributeBlock>"}" {
3075 yyextra->current->exception +=
" }";
3079<ReadInitializer,ReadInitializerPtr>"(" {
3080 yyextra->lastRoundContext=YY_START;
3081 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3082 yyextra->roundCount=0;
3083 yyextra->current->initializer << *yytext;
3086<ReadInitializer,ReadInitializerPtr>"[" {
3087 if (!yyextra->insidePHP) REJECT;
3088 yyextra->lastSquareContext=YY_START;
3089 yyextra->pCopySquareGString=&yyextra->current->initializer;
3090 yyextra->squareCount=0;
3091 yyextra->current->initializer << *yytext;
3094<ReadInitializer,ReadInitializerPtr>"{" {
3095 yyextra->lastCurlyContext=YY_START;
3096 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3097 yyextra->curlyCount=0;
3098 yyextra->current->initializer << *yytext;
3101<ReadInitializer,ReadInitializerPtr>[;,] {
3103 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3105 yyextra->current->fileName = yyextra->fileName;
3106 yyextra->current->startLine = yyextra->yyLineNr;
3107 yyextra->current->startColumn = yyextra->yyColNr;
3108 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3109 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3110 yyextra->current->section = EntryType::makeVariable();
3111 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3115 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3118 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3119 BEGIN(yyextra->lastInitializerContext);
3121 else if (*yytext==
',' && yyextra->initBracketCount==0)
3124 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3125 BEGIN(yyextra->lastInitializerContext);
3129 yyextra->current->initializer << *yytext;
3132<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3133 if (!yyextra->insideCpp)
3139 yyextra->current->initializer << yytext;
3141 yyextra->lastRawStringContext = YY_START;
3142 yyextra->pCopyRawGString = &yyextra->current->initializer;
3147<RawGString>{RAWEND} {
3150 *yyextra->pCopyRawGString << yytext;
3151 BEGIN(yyextra->lastRawStringContext);
3158<RawGString>[^)\n]+ {
3159 *yyextra->pCopyRawGString << yytext;
3162 *yyextra->pCopyRawGString << yytext;
3165 *yyextra->pCopyRawGString << yytext;
3168<RawString>{RAWEND} {
3169 *yyextra->pCopyRawString+=yytext;
3170 yyextra->fullArgString+=yytext;
3173 BEGIN(yyextra->lastRawStringContext);
3177 *yyextra->pCopyRawString += yytext;
3178 yyextra->fullArgString+=yytext;
3181 *yyextra->pCopyRawString += yytext;
3182 yyextra->fullArgString+=yytext;
3185 *yyextra->pCopyRawString += yytext;
3186 yyextra->fullArgString+=yytext;
3189<ReadInitializer,ReadInitializerPtr>\" {
3190 if (yyextra->insideIDL && yyextra->insideCppQuote)
3196 yyextra->lastStringContext=YY_START;
3197 yyextra->current->initializer << yytext;
3198 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3199 yyextra->stopAtInvalidString=
false;
3203<ReadInitializer,ReadInitializerPtr>"->" {
3204 yyextra->current->initializer << yytext;
3206<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3207 yyextra->current->initializer << yytext;
3209<ReadInitializer,ReadInitializerPtr>(">>"|">=") {
3210 yyextra->current->initializer << yytext;
3212<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3213 yyextra->initBracketCount++;
3214 yyextra->current->initializer << *yytext;
3216<ReadInitializer,ReadInitializerPtr>[>\]})] {
3217 yyextra->initBracketCount--;
3220 yyextra->current->endBodyLine=yyextra->yyLineNr;
3222 yyextra->current->initializer << *yytext;
3224<ReadInitializer,ReadInitializerPtr>\' {
3225 if (yyextra->insidePHP)
3227 yyextra->current->initializer << yytext;
3228 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3229 yyextra->lastStringContext=YY_START;
3230 BEGIN(CopyPHPGString);
3234 yyextra->current->initializer << yytext;
3237<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3238 if (yyextra->insidePHP)
3244 yyextra->current->initializer << yytext;
3247<ReadInitializer,ReadInitializerPtr>\n {
3248 yyextra->current->initializer << *yytext;
3251<ReadInitializer,ReadInitializerPtr>"@\"" {
3253 yyextra->current->initializer << yytext;
3254 if (!yyextra->insideCS && !yyextra->insideObjC)
3261 yyextra->lastSkipVerbStringContext=YY_START;
3262 yyextra->pSkipVerbString=&yyextra->current->initializer;
3263 BEGIN(SkipVerbString);
3266<SkipVerbString>[^\n"\\]+ {
3267 *yyextra->pSkipVerbString << yytext;
3269<SkipVerbString>"\\\\" {
3270 if (yyextra->insideCS) REJECT
3271 *yyextra->pSkipVerbString << yytext;
3273<SkipVerbString>"\\\"" {
3274 if (yyextra->insideCS) REJECT
3275 *yyextra->pSkipVerbString << yytext;
3277<SkipVerbString>"\"\"" {
3278 *yyextra->pSkipVerbString << yytext;
3280<SkipVerbString>"\"" {
3281 *yyextra->pSkipVerbString << *yytext;
3282 BEGIN(yyextra->lastSkipVerbStringContext);
3285 *yyextra->pSkipVerbString << *yytext;
3289 *yyextra->pSkipVerbString << *yytext;
3291<ReadInitializer,ReadInitializerPtr>"?>" {
3292 if (yyextra->insidePHP)
3293 BEGIN( FindMembersPHP );
3295 yyextra->current->initializer << yytext;
3297<ReadInitializer,ReadInitializerPtr>. {
3298 yyextra->current->initializer << *yytext;
3302<CopyString,CopyPHPString>\\. {
3303 *yyextra->pCopyQuotedString+=yytext;
3306 *yyextra->pCopyQuotedString+=*yytext;
3307 BEGIN( yyextra->lastStringContext );
3310 *yyextra->pCopyQuotedString+=*yytext;
3311 BEGIN( yyextra->lastStringContext );
3313<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3314 *yyextra->pCopyQuotedString+=yytext;
3316<CopyString,CopyPHPString>\n {
3317 *yyextra->pCopyQuotedString+=*yytext;
3320<CopyString,CopyPHPString>. {
3321 *yyextra->pCopyQuotedString+=*yytext;
3325<CopyGString,CopyPHPGString>\\. {
3326 *yyextra->pCopyQuotedGString << yytext;
3329 *yyextra->pCopyQuotedGString << *yytext;
3330 BEGIN( yyextra->lastStringContext );
3333 *yyextra->pCopyQuotedGString << *yytext;
3334 BEGIN( yyextra->lastStringContext );
3336<CopyGString,CopyPHPGString>"<?php" {
3337 *yyextra->pCopyQuotedGString << yytext;
3338 BEGIN( yyextra->lastStringContext );
3340<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3341 *yyextra->pCopyQuotedGString << yytext;
3343<CopyGString,CopyPHPGString>\n {
3344 *yyextra->pCopyQuotedGString << *yytext;
3345 if (yyextra->stopAtInvalidString)
3347 BEGIN( yyextra->lastStringContext );
3354<CopyGString,CopyPHPGString>. {
3355 *yyextra->pCopyQuotedGString << *yytext;
3360 *yyextra->pCopyRoundString += *yytext;
3361 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3362 yyextra->lastStringContext=YY_START;
3366 *yyextra->pCopyRoundString += *yytext;
3367 yyextra->roundCount++;
3370 *yyextra->pCopyRoundString += *yytext;
3371 if (--yyextra->roundCount<0)
3372 BEGIN(yyextra->lastRoundContext);
3376 *yyextra->pCopyRoundString += *yytext;
3379 if (yyextra->insidePHP)
3381 yyextra->current->initializer << yytext;
3382 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3383 yyextra->lastStringContext=YY_START;
3384 BEGIN(CopyPHPString);
3388 *yyextra->pCopyRoundString += yytext;
3391<CopyRound>{CHARLIT} {
3392 if (yyextra->insidePHP)
3398 *yyextra->pCopyRoundString+=yytext;
3401<CopyRound>[^"'()\n,]+ {
3402 *yyextra->pCopyRoundString+=yytext;
3405 *yyextra->pCopyRoundString+=*yytext;
3410 *yyextra->pCopySharpString += *yytext;
3411 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3412 yyextra->lastStringContext=YY_START;
3416 *yyextra->pCopySharpString += *yytext;
3417 yyextra->sharpCount++;
3420 *yyextra->pCopySharpString += *yytext;
3421 if (--yyextra->sharpCount<0)
3423 BEGIN(yyextra->lastSharpContext);
3428 *yyextra->pCopySharpString += *yytext;
3431 if (yyextra->insidePHP)
3433 yyextra->current->initializer << yytext;
3434 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3435 yyextra->lastStringContext=YY_START;
3436 BEGIN(CopyPHPString);
3440 *yyextra->pCopySharpString += yytext;
3443<CopySharp>{CHARLIT} {
3444 if (yyextra->insidePHP)
3450 *yyextra->pCopySharpString+=yytext;
3453<CopySharp>[^"'<>\n,]+ {
3454 *yyextra->pCopySharpString+=yytext;
3457 *yyextra->pCopySharpString+=*yytext;
3463 *yyextra->pCopyRoundGString << *yytext;
3464 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3465 yyextra->lastStringContext=YY_START;
3469 *yyextra->pCopyRoundGString << *yytext;
3470 yyextra->roundCount++;
3473 *yyextra->pCopyRoundGString << *yytext;
3474 if (--yyextra->roundCount<0)
3475 BEGIN(yyextra->lastRoundContext);
3479 *yyextra->pCopyRoundGString << *yytext;
3482 if (yyextra->insidePHP)
3484 yyextra->current->initializer << yytext;
3485 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3486 yyextra->lastStringContext=YY_START;
3487 BEGIN(CopyPHPGString);
3491 *yyextra->pCopyRoundGString << yytext;
3494<GCopyRound>{CHARLIT} {
3495 if (yyextra->insidePHP)
3501 *yyextra->pCopyRoundGString << yytext;
3505 if (!yyextra->insideCS) REJECT;
3506 *yyextra->pCopyRoundGString << yytext;
3507 yyextra->lastSkipVerbStringContext=YY_START;
3508 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3509 BEGIN(SkipVerbString);
3511<GCopyRound>[^"'()\n\/,R]+ {
3512 *yyextra->pCopyRoundGString << yytext;
3514<GCopyRound>{RAWBEGIN} {
3515 *yyextra->pCopyRoundGString << yytext;
3517 yyextra->lastRawStringContext = YY_START;
3518 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3522 *yyextra->pCopyRoundGString << *yytext;
3527 *yyextra->pCopySquareGString << *yytext;
3528 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3529 yyextra->lastStringContext=YY_START;
3533 *yyextra->pCopySquareGString << *yytext;
3534 if (yyextra->insidePHP)
3536 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3537 yyextra->lastStringContext=YY_START;
3538 BEGIN(CopyPHPGString);
3542 *yyextra->pCopySquareGString << *yytext;
3543 yyextra->squareCount++;
3546 *yyextra->pCopySquareGString << *yytext;
3547 if (--yyextra->squareCount<0)
3548 BEGIN(yyextra->lastSquareContext);
3552 *yyextra->pCopySquareGString << *yytext;
3555 if (yyextra->insidePHP)
3557 yyextra->current->initializer << yytext;
3558 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3559 yyextra->lastStringContext=YY_START;
3560 BEGIN(CopyPHPGString);
3564 *yyextra->pCopySquareGString << yytext;
3567<GCopySquare>{CHARLIT} {
3568 if (yyextra->insidePHP)
3574 *yyextra->pCopySquareGString << yytext;
3577<GCopySquare>[^"'\[\]\n\/,]+ {
3578 *yyextra->pCopySquareGString << yytext;
3581 *yyextra->pCopySquareGString << *yytext;
3586 *yyextra->pCopyCurlyString += *yytext;
3587 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3588 yyextra->lastStringContext=YY_START;
3592 *yyextra->pCopyCurlyString += *yytext;
3593 if (yyextra->insidePHP)
3595 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3596 yyextra->lastStringContext=YY_START;
3597 BEGIN(CopyPHPString);
3601 *yyextra->pCopyCurlyString += *yytext;
3602 yyextra->curlyCount++;
3605 *yyextra->pCopyCurlyString += *yytext;
3606 if (--yyextra->curlyCount<0)
3607 BEGIN(yyextra->lastCurlyContext);
3609<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3615 *yyextra->pCopyCurlyString += yytext;
3618<CopyCurly>[^"'{}\/\n,]+ {
3619 *yyextra->pCopyCurlyString += yytext;
3621<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3624 *yyextra->pCopyCurlyString += *yytext;
3627 *yyextra->pCopyCurlyString += *yytext;
3631<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3633<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3635 int s = line.
find(
' ');
3636 int e = line.
find(
'"',s);
3637 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3638 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3645 *yyextra->pCopyCurlyGString << *yytext;
3646 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3647 yyextra->lastStringContext=YY_START;
3651 *yyextra->pCopyCurlyGString << *yytext;
3652 if (yyextra->insidePHP)
3654 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3655 yyextra->lastStringContext=YY_START;
3656 BEGIN(CopyPHPGString);
3660 *yyextra->pCopyCurlyGString << *yytext;
3661 yyextra->curlyCount++;
3664 *yyextra->pCopyCurlyGString << *yytext;
3665 if (--yyextra->curlyCount<0)
3667 yyextra->current->endBodyLine = yyextra->yyLineNr;
3668 BEGIN(yyextra->lastCurlyContext);
3671<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3677 *yyextra->pCopyCurlyGString << yytext;
3680<GCopyCurly>[^"'{}\/\n,]+ {
3681 *yyextra->pCopyCurlyGString << yytext;
3684 *yyextra->pCopyCurlyGString << yytext;
3686<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3689 *yyextra->pCopyCurlyGString << *yytext;
3692 *yyextra->pCopyCurlyGString << *yytext;
3699 if (yyextra->current->type.isEmpty() &&
3700 yyextra->current->name==
"enum")
3702 yyextra->current->section = EntryType::makeEnum();
3703 yyextra->current->name.clear();
3704 yyextra->current->args.clear();
3705 BEGIN(EnumBaseType);
3709 if (yyextra->current->type.isEmpty())
3712 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3715 yyextra->current->bitfields+=
":";
3719 yyextra->current->bitfields+=*yytext;
3722 yyextra->current->args+=*yytext;
3726 yyextra->current->args+=
' ';
3729 QCString oldType = yyextra->current->type;
3730 if (yyextra->current->bodyLine==-1)
3732 yyextra->current->bodyLine = yyextra->yyLineNr;
3733 yyextra->current->bodyColumn = yyextra->yyColNr;
3735 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3737 yyextra->current->type = yyextra->current->type.mid(3);
3739 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3741 yyextra->current->type.prepend(
"typedef ");
3743 bool isStatic = yyextra->current->isStatic;
3744 Protection prot = yyextra->current->protection;
3745 bool isConcept = yyextra->current->section.isConcept();
3746 bool isModule = yyextra->current->section.isModuleDoc();
3749 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3754 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3757 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3759 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3761 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3762 if (yyextra->current->section.isClass())
3766 yyextra->current->section = EntryType::makeVariable() ;
3767 yyextra->current->fileName = yyextra->fileName;
3768 yyextra->current->startLine = yyextra->yyBegLineNr;
3769 yyextra->current->startColumn = yyextra->yyBegColNr;
3770 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3773 if ( *yytext ==
',')
3775 yyextra->current->isStatic = isStatic;
3776 yyextra->current->protection = prot;
3777 yyextra->current->name.clear();
3778 yyextra->current->args.clear();
3779 yyextra->current->brief.clear();
3780 yyextra->current->doc.clear();
3781 yyextra->current->initializer.str(std::string());
3782 yyextra->current->bitfields.clear();
3789 yyextra->current->bodyLine = -1;
3790 yyextra->current->bodyColumn = 1;
3791 yyextra->current->groups.clear();
3797 if (yyextra->insideSlice)
3799 yyextra->squareCount=1;
3800 yyextra->lastSquareContext = YY_START;
3801 yyextra->current->metaData +=
"[";
3802 BEGIN( SliceMetadata );
3804 else if (!yyextra->insideCS &&
3805 (yyextra->current->name.isEmpty() ||
3806 yyextra->current->name==
"typedef"
3810 yyextra->squareCount=1;
3811 yyextra->lastSquareContext = YY_START;
3812 yyextra->idlAttr.clear();
3813 yyextra->idlProp.clear();
3814 yyextra->current->mtype = yyextra->mtype;
3819 yyextra->odlProp =
true;
3820 yyextra->current->spec.setGettable(
true).setSettable(
true);
3823 BEGIN( IDLAttribute );
3825 else if (yyextra->insideCS &&
3826 yyextra->current->name.isEmpty())
3828 yyextra->squareCount=1;
3829 yyextra->lastSquareContext = YY_START;
3832 yyextra->current->args.clear();
3833 BEGIN( SkipSquare );
3837 yyextra->current->args += yytext ;
3838 yyextra->squareCount=1;
3839 yyextra->externLinkage=
FALSE;
3844 yyextra->squareCount++;
3845 yyextra->current->metaData +=
"[";
3847<SliceMetadata>{BN}* {
3850<SliceMetadata>\"[^\"]*\" {
3851 yyextra->current->metaData += yytext;
3854 yyextra->current->metaData += yytext;
3857 yyextra->current->metaData += yytext;
3858 if (--yyextra->squareCount<=0)
3860 BEGIN (yyextra->lastSquareContext);
3864 yyextra->current->type +=
"(";
3865 yyextra->roundCount++;
3867<SliceOptional>[0-9]+ {
3868 yyextra->current->type += yytext;
3871 yyextra->current->type +=
")";
3872 if(--yyextra->roundCount<=0)
3874 BEGIN (yyextra->lastModifierContext);
3879 if (--yyextra->squareCount<=0)
3883 BEGIN( IDLPropName );
3885 BEGIN( yyextra->lastSquareContext );
3888<IDLAttribute>"propput" {
3893 yyextra->current->spec.setSettable(
true);
3895<IDLAttribute>"propget" {
3900 yyextra->current->spec.setGettable(
true);
3902<IDLAttribute>"property" {
3903 yyextra->current->spec.setProperty(
true);
3905<IDLAttribute>"attribute" {
3906 yyextra->current->spec.setAttribute(
true);
3908<IDLAttribute>"optional" {
3909 yyextra->current->spec.setOptional(
true);
3911<IDLAttribute>"readonly" {
3914 yyextra->current->spec.setSettable(
false);
3918 yyextra->current->spec.setReadonly(
true);
3921<IDLAttribute>"bound" {
3922 yyextra->current->spec.setBound(
true);
3924<IDLAttribute>"removable" {
3925 yyextra->current->spec.setRemovable(
true);
3927<IDLAttribute>"constrained" {
3928 yyextra->current->spec.setConstrained(
true);
3930<IDLAttribute>"transient" {
3931 yyextra->current->spec.setTransient(
true);
3933<IDLAttribute>"maybevoid" {
3934 yyextra->current->spec.setMaybeVoid(
true);
3936<IDLAttribute>"maybedefault" {
3937 yyextra->current->spec.setMaybeDefault(
true);
3939<IDLAttribute>"maybeambiguous" {
3940 yyextra->current->spec.setMaybeAmbiguous(
true);
3944<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3947 if (yyextra->odlProp)
3949 yyextra->idlProp = yytext;
3952<IDLPropName>{ID}{BN}*"(" {
3953 yyextra->current->name = yytext;
3954 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3955 yyextra->current->startLine = yyextra->yyLineNr;
3956 yyextra->current->startColumn = yyextra->yyColNr;
3959<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3960 if (yyextra->odlProp)
3962 yyextra->idlProp += yytext;
3965<IDLPropName>{ID}{BNopt}/";" {
3966 if (yyextra->odlProp)
3968 yyextra->current->name = yytext;
3969 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3970 yyextra->odlProp =
false;
3975<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3976 yyextra->idlAttr = yytext;
3977 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3980 yyextra->idlProp = yytext;
3982<IDLProp>{BN}*{ID}{BN}*"," {
3983 if (yyextra->current->args.isEmpty())
3984 yyextra->current->args =
"(";
3986 yyextra->current->args +=
", ";
3987 yyextra->current->args += yyextra->idlAttr;
3988 yyextra->current->args +=
" ";
3989 yyextra->current->args += yyextra->idlProp;
3990 yyextra->current->args +=
" ";
3991 yyextra->current->args += yytext;
3992 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
3993 yyextra->idlProp.clear();
3994 yyextra->idlAttr.clear();
3997<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4001 yyextra->current->fileName = yyextra->fileName;
4002 yyextra->current->type = yyextra->idlProp;
4003 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4004 if (!yyextra->current->args.isEmpty())
4005 yyextra->current->args +=
")";
4006 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4007 yyextra->current->section = EntryType::makeVariable();
4008 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4010 BEGIN( FindMembers );
4015<Array>"]" { yyextra->current->args += *yytext ;
4016 if (--yyextra->squareCount<=0)
4017 BEGIN( FindMembers ) ;
4019<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4020 if (--yyextra->squareCount<=0)
4021 BEGIN( SFunction ) ;
4023<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4024 yyextra->squareCount++;
4026<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4027<SkipSquare>"[" { yyextra->squareCount++; }
4029 if (--yyextra->squareCount<=0)
4030 BEGIN( yyextra->lastSquareContext );
4033 yyextra->lastStringContext=YY_START;
4034 BEGIN( SkipString );
4036<SkipSquare>[^\n\[\]\"]+
4037<FindMembers>"<" {
addType(yyscanner);
4038 yyextra->current->type += yytext ;
4041<Sharp>">" { yyextra->current->type += *yytext ;
4042 if (--yyextra->sharpCount<=0)
4043 BEGIN( FindMembers ) ;
4045<Sharp>"<" { yyextra->current->type += *yytext ;
4046 yyextra->sharpCount++;
4049 yyextra->current->type +=
' ';
4052<Sharp>. { yyextra->current->type += *yytext ; }
4055 yyextra->current->bodyLine = yyextra->yyLineNr;
4056 yyextra->current->bodyColumn = yyextra->yyColNr;
4057 yyextra->current->name = yytext;
4062 yyextra->lastInitializerContext = YY_START;
4063 yyextra->initBracketCount=0;
4064 yyextra->current->initializer.str(
"=");
4065 BEGIN(ReadInitializer);
4068 yyextra->lastInitializerContext = YY_START;
4069 yyextra->initBracketCount=0;
4070 yyextra->current->initializer.str(yytext);
4071 BEGIN(ReadInitializer);
4074 if (yyextra->insideJava)
4076 if (!yyextra->current->name.isEmpty())
4078 yyextra->current->fileName = yyextra->fileName;
4079 yyextra->current->startLine = yyextra->yyLineNr;
4080 yyextra->current->startColumn = yyextra->yyColNr;
4081 if (!yyextra->current_root->spec.isEnum())
4083 yyextra->current->type =
"@";
4085 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4086 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4087 yyextra->current->section = EntryType::makeVariable();
4088 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4092 BEGIN( FindMembers );
4103 if (!yyextra->current->name.isEmpty())
4105 yyextra->current->fileName = yyextra->fileName;
4106 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4108 yyextra->current->startLine = yyextra->current->bodyLine;
4109 yyextra->current->startColumn = yyextra->current->bodyColumn;
4113 yyextra->current->startLine = yyextra->yyLineNr;
4114 yyextra->current->startColumn = yyextra->yyColNr;
4116 if (!yyextra->current_root->spec.isEnum())
4118 yyextra->current->type =
"@";
4120 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4121 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4122 yyextra->current->section = EntryType::makeVariable();
4124 if (!yyextra->insideCS && !yyextra->insideJava &&
4125 !yyextra->current_root->spec.isStrong())
4132 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4134 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4139 yyextra->current->reset();
4144 yyextra->squareCount=1;
4145 yyextra->lastSquareContext = YY_START;
4148<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4149<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4150<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4153 yyextra->current->program << yytext ;
4156<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4157 yyextra->current->program << yytext ;
4158 yyextra->pSkipInterpString = &yyextra->current->program;
4159 yyextra->lastSkipInterpStringContext=YY_START;
4160 BEGIN( SkipInterpString );
4162<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})* {
4163 *yyextra->pSkipInterpString << yytext;
4165<SkipInterpString>\" {
4166 *yyextra->pSkipInterpString << *yytext;
4167 BEGIN( yyextra->lastSkipInterpStringContext );
4170<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4171 yyextra->current->program << yytext ;
4172 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4173 yyextra->lastSkipInterpVerbStringContext=YY_START;
4174 BEGIN( SkipInterpVerbString );
4176<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4177 *yyextra->pSkipInterpVerbString << yytext;
4179<SkipInterpString>"{"[^}]*"}" {
4180 *yyextra->pSkipInterpString << yytext;
4182<SkipInterpVerbString>"{"[^}]*"}" {
4183 *yyextra->pSkipInterpVerbString << yytext;
4185<SkipInterpVerbString>\" {
4186 *yyextra->pSkipInterpVerbString << *yytext;
4187 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4189<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4190<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4191 yyextra->pSkipVerbString = &yyextra->current->program;
4192 yyextra->lastSkipVerbStringContext=YY_START;
4193 BEGIN( SkipVerbString );
4195<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4197 yyextra->current->program << yytext ;
4198 yyextra->pCopyHereDocGString = &yyextra->current->program;
4199 yyextra->lastHereDocContext=YY_START;
4200 BEGIN( CopyHereDoc );
4207<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4208 yyextra->current->program << yytext;
4210 yyextra->lastRawStringContext = YY_START;
4211 yyextra->pCopyRawGString = &yyextra->current->program;
4214<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4215 yyextra->pCopyQuotedGString = &yyextra->current->program;
4216 yyextra->lastStringContext=YY_START;
4217 yyextra->stopAtInvalidString=
false;
4218 BEGIN( CopyGString );
4220<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4221<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4222 yyextra->lastContext = YY_START ;
4225<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4226 ++yyextra->yyLineNr ;
4227 yyextra->lastContext = YY_START ;
4230<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4231 if (!yyextra->insidePHP)
4233 yyextra->current->program << yytext;
4237 yyextra->current->program << yytext;
4238 yyextra->pCopyQuotedGString = &yyextra->current->program;
4239 yyextra->lastStringContext=YY_START;
4240 BEGIN(CopyPHPGString);
4243<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4244 if (yyextra->insidePHP)
4251 yyextra->current->program << yytext;
4254<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4255 ++yyextra->curlyCount ;
4258 yyextra->current->program << yytext ;
4259 --yyextra->curlyCount ;
4261<ReadBody,ReadNSBody>"}" {
4262 if ( yyextra->curlyCount>0 )
4264 yyextra->current->program << yytext ;
4265 --yyextra->curlyCount ;
4269 yyextra->current->endBodyLine = yyextra->yyLineNr;
4270 std::shared_ptr<Entry> original_root = yyextra->current_root;
4271 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4275 QCString doc = yyextra->current->doc;
4276 int docLine = yyextra->current->docLine;
4277 QCString docFile = yyextra->current->docFile;
4278 QCString brief = yyextra->current->brief;
4279 int briefLine = yyextra->current->briefLine;
4280 QCString briefFile = yyextra->current->briefFile;
4282 yyextra->current->doc =
"";
4283 yyextra->current->docLine = 0;
4284 yyextra->current->docFile =
"";
4285 yyextra->current->brief =
"";
4286 yyextra->current->briefLine = 0;
4287 yyextra->current->briefFile =
"";
4288 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4290 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4291 yyextra->current->program.str(std::string());
4292 new_current->name = yyextra->current->name.mid(split_point + 2);
4293 yyextra->current->name = yyextra->current->name.left(split_point);
4294 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4296 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4297 yyextra->current_root = yyextra->current;
4298 yyextra->current = new_current;
4301 yyextra->current->doc = doc;
4302 yyextra->current->docLine = docLine;
4303 yyextra->current->docFile = docFile;
4304 yyextra->current->brief = brief;
4305 yyextra->current->briefLine = briefLine;
4306 yyextra->current->briefFile = briefFile;
4308 QCString &cn = yyextra->current->name;
4309 QCString rn = yyextra->current_root->name;
4315 if (yyextra->isTypedef && cn.
isEmpty())
4318 BEGIN( TypedefName );
4322 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4324 yyextra->current->program <<
',';
4329 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4330 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4332 if (yyextra->insideObjC &&
4333 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4336 BEGIN( ReadBodyIntf ) ;
4340 yyextra->memspecEntry = yyextra->current;
4341 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4342 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4343 if (yyextra->current->section.isNamespace() ||
4344 yyextra->current->spec.isInterface() ||
4345 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4346 yyextra->insideSlice
4349 yyextra->current->reset();
4350 yyextra->current_root = std::move(original_root);
4352 yyextra->memspecEntry.reset();
4353 BEGIN( FindMembers ) ;
4357 static const reg::Ex re(R
"(@\d+$)");
4358 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4359 !
reg::search(yyextra->memspecEntry->name.str(),re))
4362 yyextra->current->doc.clear();
4363 yyextra->current->brief.clear();
4365 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.
4371<ReadBody>"}"{BN}+"typedef"{BN}+ {
4373 if ( yyextra->curlyCount>0 )
4375 yyextra->current->program << yytext ;
4376 --yyextra->curlyCount ;
4380 yyextra->isTypedef =
TRUE;
4381 yyextra->current->endBodyLine = yyextra->yyLineNr;
4382 QCString &cn = yyextra->current->name;
4383 QCString rn = yyextra->current_root->name;
4388 BEGIN( TypedefName );
4391<TypedefName>("const"|"volatile"){BN} {
4393 yyextra->current->type.prepend(yytext);
4396 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4398 yyextra->current->program <<
",";
4400 yyextra->current->name=yytext;
4402 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4403 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4405 if (!yyextra->firstTypedefEntry)
4407 yyextra->firstTypedefEntry = yyextra->current;
4409 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4411 yyextra->isTypedef=
TRUE;
4412 BEGIN(MemberSpecSkip);
4416 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4418 yyextra->current->program <<
',';
4421 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4422 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4423 yyextra->memspecEntry = yyextra->current;
4424 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4427 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4429<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4431 int i=0,l=(int)yyleng,j;
4432 while (i<l && (!
isId(yytext[i]))) i++;
4434 j=yyextra->msName.
find(
"[");
4437 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4438 yyextra->msName=yyextra->msName.left(j);
4443 if (yyextra->firstTypedefEntry)
4445 if (yyextra->firstTypedefEntry->spec.isStruct())
4447 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4449 else if (yyextra->firstTypedefEntry->spec.isUnion())
4451 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4453 else if (yyextra->firstTypedefEntry->section.isEnum())
4455 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4459 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4465 yyextra->current->name = yyextra->msName;
4471 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4477 const Entry *p=yyextra->current.get();
4485 int pi = (i==-1) ? 0 : i+2;
4495 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4499 if (!yyextra->msName.isEmpty()
4505 if (typedefHidesStruct &&
4506 yyextra->isTypedef &&
4507 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4508 yyextra->msType.stripWhiteSpace().isEmpty() &&
4509 yyextra->memspecEntry)
4511 yyextra->memspecEntry->name=yyextra->msName;
4515 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4516 varEntry->lang = yyextra->language;
4517 varEntry->protection = yyextra->current->protection ;
4518 varEntry->mtype = yyextra->current->mtype;
4519 varEntry->virt = yyextra->current->virt;
4520 varEntry->isStatic = yyextra->current->isStatic;
4521 varEntry->section = EntryType::makeVariable();
4522 varEntry->name = yyextra->msName.stripWhiteSpace();
4523 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4524 varEntry->args = yyextra->msArgs;
4525 if (yyextra->isTypedef)
4527 varEntry->type.prepend(
"typedef ");
4530 if (typedefHidesStruct &&
4531 yyextra->isTypedef &&
4532 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4533 yyextra->memspecEntry
4536 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4540 varEntry->type+=yyextra->current->name+yyextra->msType;
4542 varEntry->fileName = yyextra->fileName;
4543 varEntry->startLine = yyextra->yyLineNr;
4544 varEntry->startColumn = yyextra->yyColNr;
4545 varEntry->doc = yyextra->current->doc;
4546 varEntry->brief = yyextra->current->brief;
4547 varEntry->mGrpId = yyextra->current->mGrpId;
4548 varEntry->initializer.str(yyextra->current->initializer.str());
4549 varEntry->groups = yyextra->current->groups;
4550 varEntry->sli = yyextra->current->sli;
4555 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4560 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4562 if (!yyextra->current->doc.isEmpty())
4564 yyextra->memspecEntry->doc += yyextra->current->doc;
4566 if (!yyextra->current->brief.isEmpty())
4568 yyextra->memspecEntry->brief += yyextra->current->brief;
4571 yyextra->msType.clear();
4572 yyextra->msName.clear();
4573 yyextra->msArgs.clear();
4574 yyextra->isTypedef=
FALSE;
4575 yyextra->firstTypedefEntry.reset();
4576 yyextra->memspecEntry.reset();
4577 yyextra->current->reset();
4579 BEGIN( FindMembers );
4583 yyextra->current->doc.clear();
4584 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
4589 yyextra->lastInitializerContext=YY_START;
4590 yyextra->initBracketCount=0;
4591 yyextra->current->initializer.str(yytext);
4592 BEGIN(ReadInitializer);
4603<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4604<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4605<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4608<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4609 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4612 yyextra->insideObjC=
FALSE;
4613 BEGIN( FindMembers );
4615<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4616<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4618<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4619<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4620 if (yyextra->insidePHP)
4626 yyextra->current->bodyLine = yyextra->yyLineNr;
4627 yyextra->current->bodyColumn = yyextra->yyColNr;
4630 yyextra->funcPtrType=yytext;
4631 yyextra->roundCount=0;
4636<FuncPtr>{SCOPENAME} {
4637 yyextra->current->name = yytext;
4640 BEGIN( FuncPtrOperator );
4644 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4646 yyextra->funcPtrType += yyextra->current->name;
4650 BEGIN( EndFuncPtr );
4657<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4658 yyextra->current->name += yytext;
4659 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4662<FuncPtrOperator>\n {
4664 yyextra->current->name += *yytext;
4666<FuncPtrOperator>"(" {
4668 BEGIN( EndFuncPtr );
4671 yyextra->current->name += *yytext;
4673<EndFuncPtr>")"{BNopt}/";" {
4675 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4678<EndFuncPtr>")"{BNopt}/"(" {
4680 if (yyextra->funcPtrType!=
"(")
4682 yyextra->current->type+=yyextra->funcPtrType+
")";
4686<EndFuncPtr>")"{BNopt}/"[" {
4688 yyextra->current->type+=yyextra->funcPtrType;
4689 yyextra->current->args +=
")";
4694 yyextra->current->args += *yytext ;
4697 yyextra->current->bodyLine = yyextra->yyLineNr;
4698 yyextra->current->bodyColumn = yyextra->yyColNr;
4699 yyextra->currentArgumentContext = FuncFuncEnd;
4700 yyextra->fullArgString=yyextra->current->args;
4701 yyextra->copyArgString=&yyextra->current->args;
4702 BEGIN( ReadFuncArgType ) ;
4704<EndFuncPtr>"["[^\n\]]*"]" {
4705 yyextra->funcPtrType+=yytext;
4711 yyextra->current->args += *yytext ;
4712 ++yyextra->roundCount;
4715 yyextra->current->args += *yytext ;
4716 if ( yyextra->roundCount )
4717 --yyextra->roundCount;
4723<FuncFuncEnd>")"{BN}*"(" {
4725 yyextra->current->type+=yyextra->funcPtrType+
")(";
4726 BEGIN(FuncFuncType);
4728<FuncFuncEnd>")"{BNopt}/[;{] {
4730 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4733<FuncFuncEnd>")"{BNopt}/"[" {
4735 yyextra->current->type+=yyextra->funcPtrType;
4736 yyextra->current->args+=
")";
4737 BEGIN(FuncFuncArray);
4740 yyextra->current->args += *yytext;
4743 yyextra->current->type += *yytext;
4744 yyextra->roundCount++;
4747 yyextra->current->type += *yytext;
4748 if (yyextra->roundCount)
4749 --yyextra->roundCount;
4753<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4754<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4756 yyextra->current->type += *yytext;
4758<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4759 if (yyextra->current->type.startsWith(
"typedef") &&
4760 yyextra->current->bodyLine==-1)
4763 yyextra->current->bodyLine = yyextra->yyLineNr;
4764 yyextra->current->bodyColumn = yyextra->yyColNr;
4765 BEGIN( GetCallType );
4767 else if (!yyextra->current->name.isEmpty())
4769 yyextra->current->args = yytext;
4770 yyextra->current->bodyLine = yyextra->yyLineNr;
4771 yyextra->current->bodyColumn = yyextra->yyColNr;
4772 yyextra->currentArgumentContext = FuncQual;
4773 yyextra->fullArgString=yyextra->current->args;
4774 yyextra->copyArgString=&yyextra->current->args;
4775 BEGIN( ReadFuncArgType ) ;
4779<GetCallType>{BN}*{ID}{BN}*"*" {
4782 yyextra->funcPtrType=
"(";
4783 yyextra->funcPtrType+=yytext;
4784 yyextra->roundCount=0;
4788 if (!yyextra->current->name.isEmpty())
4790 yyextra->current->args = yytext;
4791 yyextra->current->bodyLine = yyextra->yyLineNr;
4792 yyextra->current->bodyColumn = yyextra->yyColNr;
4793 yyextra->currentArgumentContext = FuncQual;
4794 yyextra->fullArgString=yyextra->current->args;
4795 yyextra->copyArgString=&yyextra->current->args;
4796 BEGIN( ReadFuncArgType ) ;
4810<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4811 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4812 else yyextra->fullArgString+=yytext;
4814<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4815 yyextra->fullArgString+=yytext;
4817<CopyArgRound>[^\/\n\)\(\"\']+ {
4818 *yyextra->copyArgString+=yytext;
4819 yyextra->fullArgString+=yytext;
4821<CopyArgSquare>[^\/\n\]\[\"\']+ {
4822 *yyextra->copyArgString+=yytext;
4823 yyextra->fullArgString+=yytext;
4825<ReadFuncArgType,ReadTempArgs>{BN}* {
4826 *yyextra->copyArgString+=
" ";
4827 yyextra->fullArgString+=
" ";
4830<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4832 yyextra->lastRawStringContext = YY_START;
4833 yyextra->pCopyRawString = yyextra->copyArgString;
4834 *yyextra->pCopyRawString+=yytext;
4835 yyextra->fullArgString+=yytext;
4838<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4839 *yyextra->copyArgString+=*yytext;
4840 yyextra->fullArgString+=*yytext;
4841 yyextra->lastCopyArgStringContext = YY_START;
4842 BEGIN( CopyArgString );
4844<ReadFuncArgType>"[" {
4845 if (!yyextra->insidePHP) REJECT;
4846 *yyextra->copyArgString+=*yytext;
4847 yyextra->fullArgString+=*yytext;
4848 yyextra->argSquareCount=0;
4849 yyextra->lastCopyArgContext = YY_START;
4850 BEGIN( CopyArgSquare );
4852<ReadFuncArgType,ReadTempArgs>"(" {
4853 *yyextra->copyArgString+=*yytext;
4854 yyextra->fullArgString+=*yytext;
4855 yyextra->argRoundCount=0;
4856 yyextra->lastCopyArgContext = YY_START;
4857 BEGIN( CopyArgRound );
4859<ReadFuncArgType>")" {
4860 *yyextra->copyArgString+=*yytext;
4861 yyextra->fullArgString+=*yytext;
4863 if (yyextra->insideJS)
4874 yyextra->docBackup = yyextra->current->doc;
4875 yyextra->briefBackup = yyextra->current->brief;
4877 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4880<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4881 if (yyextra->currentArgumentContext==DefineEnd)
4885 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4891 BEGIN( yyextra->currentArgumentContext );
4897 yyextra->fullArgString+=yytext;
4898 yyextra->lastCopyArgChar=0;
4899 yyextra->lastCommentInArgContext=YY_START;
4901 BEGIN( CopyArgCommentLine );
4903 BEGIN( CopyArgComment );
4907<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4908<ReadFuncArgType,ReadTempArgs>{CCS} {
4909 yyextra->lastCContext = YY_START;
4910 BEGIN( SkipComment );
4912<ReadFuncArgType,ReadTempArgs>{CPPC} {
4913 yyextra->lastCContext = YY_START;
4914 BEGIN( SkipCxxComment );
4930<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4932 if (yyextra->currentArgumentContext==DefineEnd)
4936 int i;
for (i=(
int)yyleng-1;i>0;i--)
4940 *yyextra->copyArgString+=*yytext;
4941 yyextra->fullArgString+=*yytext;
4944 BEGIN( yyextra->currentArgumentContext );
4950 yyextra->lastCopyArgChar=*yytext;
4953 yyextra->lastCommentInArgContext=YY_START;
4954 yyextra->fullArgString+=text;
4955 if (text.
find(
"//")!=-1)
4956 BEGIN( CopyArgCommentLine );
4958 BEGIN( CopyArgComment );
4961<CopyArgComment>^{B}*"*"+/{BN}+
4962<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4963<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4964 if (yyextra->lastCopyArgChar!=0)
4965 unput(yyextra->lastCopyArgChar);
4966 BEGIN( yyextra->lastCommentInArgContext );
4968<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4970 if (yyextra->lastCopyArgChar!=0)
4971 unput(yyextra->lastCopyArgChar);
4972 BEGIN( yyextra->lastCommentInArgContext );
4974<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4975 yyextra->docBlockName=
"uml";
4976 yyextra->fullArgString+=yytext;
4977 BEGIN(CopyArgVerbatim);
4979<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4980 yyextra->docBlockName=&yytext[1];
4981 yyextra->fullArgString+=yytext;
4982 BEGIN(CopyArgVerbatim);
4984<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
4985 yyextra->docBlockName=&yytext[1];
4986 if (yyextra->docBlockName.at(1)==
'[')
4988 yyextra->docBlockName.at(1)=
']';
4990 if (yyextra->docBlockName.at(1)==
'{')
4992 yyextra->docBlockName.at(1)=
'}';
4994 if (yyextra->docBlockName.at(1)==
'(')
4996 yyextra->docBlockName.at(1)=
')';
4998 yyextra->fullArgString+=yytext;
4999 BEGIN(CopyArgVerbatim);
5001<CopyArgVerbatim>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5002 yyextra->fullArgString+=yytext;
5003 if (&yytext[4]==yyextra->docBlockName)
5005 yyextra->docBlockName=
"";
5006 BEGIN(CopyArgCommentLine);
5009<CopyArgVerbatim>[\\@]("f$"|"f]"|"f}"|"f)") {
5010 yyextra->fullArgString+=yytext;
5011 if (yyextra->docBlockName==&yytext[1])
5013 yyextra->docBlockName=
"";
5014 BEGIN(CopyArgCommentLine);
5017<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5018<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5019<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5020<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5021<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5022 warn(yyextra->fileName,yyextra->yyLineNr,
5023 "Ignoring {:c}brief command inside argument documentation",*yytext
5025 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5028 *yyextra->copyArgString+=*yytext;
5029 yyextra->fullArgString+=*yytext;
5030 yyextra->argSharpCount=1;
5031 BEGIN( CopyArgSharp );
5034 *yyextra->copyArgString+=*yytext;
5035 yyextra->fullArgString+=*yytext;
5037 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5039 BEGIN( yyextra->currentArgumentContext );
5042 yyextra->argRoundCount++;
5043 *yyextra->copyArgString+=*yytext;
5044 yyextra->fullArgString+=*yytext;
5047 *yyextra->copyArgString+=*yytext;
5048 yyextra->fullArgString+=*yytext;
5049 if (yyextra->argRoundCount>0)
5050 yyextra->argRoundCount--;
5052 BEGIN( yyextra->lastCopyArgContext );
5055 yyextra->argSquareCount++;
5056 *yyextra->copyArgString+=*yytext;
5057 yyextra->fullArgString+=*yytext;
5060 *yyextra->copyArgString+=*yytext;
5061 yyextra->fullArgString+=*yytext;
5062 if (yyextra->argSquareCount>0)
5063 yyextra->argSquareCount--;
5065 BEGIN( yyextra->lastCopyArgContext );
5068 *yyextra->copyArgString+=*yytext;
5069 yyextra->fullArgString+=*yytext;
5070 yyextra->argRoundCount=0;
5071 yyextra->lastCopyArgContext = YY_START;
5072 BEGIN( CopyArgRound );
5075 yyextra->argSharpCount++;
5077 *yyextra->copyArgString+=*yytext;
5078 yyextra->fullArgString+=*yytext;
5081 *yyextra->copyArgString+=*yytext;
5082 yyextra->fullArgString+=*yytext;
5083 yyextra->argSharpCount--;
5084 if (yyextra->argSharpCount>0)
5090 BEGIN( ReadTempArgs );
5094<CopyArgString,CopyArgPHPString>\\. {
5095 *yyextra->copyArgString+=yytext;
5096 yyextra->fullArgString+=yytext;
5099 *yyextra->copyArgString+=*yytext;
5100 yyextra->fullArgString+=*yytext;
5101 BEGIN( yyextra->lastCopyArgStringContext );
5103<CopyArgPHPString>\' {
5104 *yyextra->copyArgString+=*yytext;
5105 yyextra->fullArgString+=*yytext;
5106 BEGIN( yyextra->lastCopyArgStringContext );
5108<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5109 if (yyextra->insidePHP)
5115 *yyextra->copyArgString+=yytext;
5116 yyextra->fullArgString+=yytext;
5119<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5120 *yyextra->copyArgString+=yytext;
5121 yyextra->fullArgString+=yytext;
5122 if (yyextra->insidePHP)
5124 yyextra->lastCopyArgStringContext=YY_START;
5125 BEGIN(CopyArgPHPString);
5128<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5129 *yyextra->copyArgString+=yytext;
5130 yyextra->fullArgString+=yytext;
5132<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5134 *yyextra->copyArgString+=*yytext;
5135 yyextra->fullArgString+=*yytext;
5137<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5138 *yyextra->copyArgString+=yytext;
5139 yyextra->fullArgString+=yytext;
5141<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5142 *yyextra->copyArgString+=*yytext;
5143 yyextra->fullArgString+=*yytext;
5151<FuncRound>"(" { yyextra->current->args += *yytext ;
5152 ++yyextra->roundCount ;
5154<FuncRound>")" { yyextra->current->args += *yytext ;
5155 if ( yyextra->roundCount )
5156 --yyextra->roundCount ;
5168 if (
qstrcmp(yytext,
";")==0 &&
5169 ((yyextra->insideJS || yyextra->insidePHP) &&
5172 yyextra->current->reset();
5174 BEGIN( FindMembers );
5178 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5181<FuncQual>{BN}*"abstract"{BN}* {
5184 yyextra->current->args +=
" override ";
5186<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5188 yyextra->current->spec.setOverride(
true);
5189 yyextra->current->args +=
" override ";
5192<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5194 yyextra->current->spec.setFinal(
true);
5195 yyextra->current->args +=
" final ";
5198<FuncQual>{BN}*"sealed"{BN}* {
5200 yyextra->current->spec.setSealed(
true);
5201 yyextra->current->args +=
" sealed ";
5203<FuncQual>{BN}*"new"{BN}* {
5205 yyextra->current->spec.setNew(
true);
5206 yyextra->current->args +=
" new ";
5208<FuncQual>{BN}*"const"{BN}* {
5210 yyextra->current->args +=
" const ";
5211 yyextra->current->argList.setConstSpecifier(
TRUE);
5213<FuncQual>{BN}*"volatile"{BN}* {
5215 yyextra->current->args +=
" volatile ";
5216 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5218<FuncQual>{BN}*"noexcept"{BN}* {
5220 yyextra->current->args +=
" noexcept ";
5221 yyextra->current->spec.setNoExcept(
true);
5223<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5225 yyextra->current->args +=
" noexcept(false)";
5227<FuncQual>{BN}*"noexcept"{BN}*"(" {
5229 yyextra->current->args +=
" noexcept(";
5230 yyextra->current->spec.setNoExcept(
true);
5231 yyextra->lastRoundContext=FuncQual;
5232 yyextra->pCopyRoundString=&yyextra->current->args;
5233 yyextra->roundCount=0;
5237 yyextra->current->args +=
" &";
5240<FuncQual>{BN}*"&&" {
5241 yyextra->current->args +=
" &&";
5245<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5247 yyextra->current->args +=
" = 0";
5249 yyextra->current->argList.setPureSpecifier(
TRUE);
5252<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5254 yyextra->current->args +=
" = delete";
5255 yyextra->current->spec.setDelete(
true);
5256 yyextra->current->argList.setIsDeleted(
TRUE);
5259<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5261 yyextra->current->args +=
" = default";
5262 yyextra->current->spec.setDefault(
true);
5265<FuncQual>{BN}*"->"{BN}* {
5267 yyextra->current->argList.setTrailingReturnType(
" -> ");
5268 yyextra->current->args +=
" -> ";
5269 yyextra->roundCount=0;
5270 BEGIN(TrailingReturn);
5272<TrailingReturn>[{;] {
5273 if (yyextra->roundCount>0) REJECT;
5277<TrailingReturn>"requires"{BN}+ {
5278 if (yyextra->insideJava) REJECT;
5279 yyextra->requiresContext = FuncQual;
5280 yyextra->current->req+=
' ';
5281 BEGIN(RequiresClause);
5283<TrailingReturn>"(" {
5284 yyextra->roundCount++;
5285 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5286 yyextra->current->args+=yytext;
5288<TrailingReturn>")" {
5289 if (yyextra->roundCount>0)
5291 yyextra->roundCount--;
5295 warn(yyextra->fileName,yyextra->yyLineNr,
5296 "Found ')' without opening '(' for trailing return type '{})...'",
5297 yyextra->current->argList.trailingReturnType());
5299 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5300 yyextra->current->args+=yytext;
5303 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5304 yyextra->current->args+=yytext;
5308 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5309 yyextra->current->args+=
' ';
5311<FuncRound,FuncFunc>{BN}*","{BN}* {
5313 yyextra->current->args +=
", " ;
5315<FuncQual,FuncRound,FuncFunc>{BN}+ {
5317 yyextra->current->args +=
' ' ;
5319<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5321 yyextra->lastCPPContext = YY_START;
5325 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5332 yyextra->lastInitializerContext=YY_START;
5333 yyextra->initBracketCount=0;
5334 yyextra->current->initializer.str(yytext);
5335 BEGIN(ReadInitializer);
5350 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5353 yyextra->requiresContext = YY_START;
5354 yyextra->current->req+=
' ';
5355 BEGIN(RequiresClause);
5357 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5360 yyextra->current->typeConstr.clear();
5361 yyextra->current->typeConstr.push_back(
Argument());
5362 yyextra->lastCSConstraint = YY_START;
5363 BEGIN( CSConstraintName );
5367 yyextra->current->args = yytext;
5368 yyextra->oldStyleArgType.clear();
5369 BEGIN(OldStyleArgs);
5373 yyextra->current->args += yytext;
5379 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5381 if (yyextra->current->doc!=yyextra->docBackup)
5383 doc=yyextra->current->doc;
5384 yyextra->current->doc=yyextra->docBackup;
5386 if (yyextra->current->brief!=yyextra->briefBackup)
5388 brief=yyextra->current->brief;
5389 yyextra->current->brief=yyextra->briefBackup;
5391 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5392 oldStyleArgName,brief,doc);
5393 yyextra->current->args.clear();
5394 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5396<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5398 if (yyextra->current->argList.empty())
5400 yyextra->current->argList.setNoParameters(
TRUE);
5406<OldStyleArgs>. { yyextra->current->args += *yytext; }
5407<FuncQual,FuncRound,FuncFunc>\" {
5408 if (yyextra->insideIDL && yyextra->insideCppQuote)
5414 yyextra->current->args += *yytext;
5417<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5418<FuncQual>{BN}*"try:" |
5419<FuncQual>{BN}*"try"{BN}+ {
5420 yyextra->insideTryBlock=
TRUE;
5422 if (yytext[yyleng-1]==
':')
5428<FuncQual>{BN}*"throw"{BN}*"(" {
5429 yyextra->current->exception =
" throw (" ;
5430 yyextra->roundCount=0;
5432 BEGIN( ExcpRound ) ;
5434<FuncQual>{BN}*"raises"{BN}*"(" {
5435 yyextra->current->exception =
" raises (" ;
5437 yyextra->roundCount=0;
5438 BEGIN( ExcpRound ) ;
5440<FuncQual>{BN}*"throws"{BN}+ {
5441 yyextra->current->exception =
" throws " ;
5445<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5446 ++yyextra->roundCount ;
5448<ExcpRound>")" { yyextra->current->exception += *yytext ;
5449 if ( yyextra->roundCount )
5450 --yyextra->roundCount ;
5455 yyextra->current->exception += *yytext;
5458 unput(
'{'); BEGIN( FuncQual );
5461 unput(
';'); BEGIN( FuncQual );
5464 yyextra->current->exception +=
' ';
5468 yyextra->current->exception += *yytext;
5470<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5471 yyextra->current->name = yyextra->current->args ;
5472 yyextra->current->args = yytext ;
5473 yyextra->roundCount=0;
5474 BEGIN( FuncRound ) ;
5477 if (!yyextra->insidePHP) BEGIN(SkipInits);
5483 yyextra->current->fileName = yyextra->fileName;
5484 yyextra->current->startLine = yyextra->yyBegLineNr;
5485 yyextra->current->startColumn = yyextra->yyBegColNr;
5486 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5488 std::string type = yyextra->current->type.str();
5492 ti = (int)
match.position();
5496 int di = yyextra->current->type.find(
"decltype(");
5497 if (di!=-1 && di<ti)
5502 int ts=yyextra->current->type.find(
'<');
5503 int te=yyextra->current->type.findRev(
'>');
5506 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5507 bool isFunction = ti==-1 ||
5508 (ts!=-1 && ts<te && ts<ti && ti<te);
5509 bool isVariable = !yyextra->current->type.isEmpty() &&
5510 (!isFunction || startsWithTypedef);
5515 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5520 if (yyextra->isTypedef && !startsWithTypedef)
5522 yyextra->current->type.prepend(
"typedef ");
5524 yyextra->current->section = EntryType::makeVariable() ;
5529 yyextra->current->section = EntryType::makeFunction() ;
5530 yyextra->current->proto = *yytext==
';';
5538 if (yyextra->isTypedef && !startsWithTypedef)
5540 yyextra->current->type.prepend(
"typedef ");
5543 yyextra->current->section = EntryType::makeVariable();
5548 yyextra->current->section = EntryType::makeFunction();
5549 yyextra->current->proto =
TRUE;
5553 if ( yyextra->insidePHP)
5557 yyextra->current->spec.setFinal(
true);
5561 yyextra->current->spec.setAbstract(
true);
5564 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5567 if ( *yytext ==
'{' )
5569 yyextra->lastCurlyContext = FindMembers;
5570 yyextra->curlyCount=0;
5575 BEGIN( FindMembers );
5580 if ( yyextra->insidePHP)
5584 yyextra->previous = yyextra->current;
5585 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5588 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5590 yyextra->current->spec.setOptional(
true).setRequired(
true);
5592 yyextra->lastCurlyContext = FindMembers;
5593 if ( *yytext ==
',' )
5595 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5597 if ( *yytext ==
'{' )
5599 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5601 yyextra->previous->spec.setInline(
true);
5604 yyextra->curlyCount=0;
5605 BEGIN( SkipCurly ) ;
5609 if (!yyextra->previous->section.isVariable())
5610 yyextra->previous->bodyLine=-1;
5611 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...
5615<SkipInits>">"{BN}*"{" {
5617 yyextra->curlyCount=1;
5618 BEGIN(SkipC11Inits);
5620<SkipInits>{ID}{BN}*"{" {
5622 yyextra->curlyCount=1;
5623 BEGIN(SkipC11Inits);
5626 ++yyextra->curlyCount;
5629 if ( --yyextra->curlyCount<=0 )
5634<SkipC11Attribute>"]]" {
5635 BEGIN(yyextra->lastC11AttributeContext);
5643 ++yyextra->curlyCount ;
5645<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5648 if( yyextra->curlyCount )
5650 --yyextra->curlyCount ;
5654 if (!yyextra->current->sli.empty() && yyextra->previous)
5656 yyextra->previous->sli = yyextra->current->sli;
5657 yyextra->current->sli.clear();
5659 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5660 BEGIN( yyextra->lastCurlyContext ) ;
5663<SkipCurly>"}"{BN}*{DCOMM}"<" {
5665 if ( yyextra->curlyCount )
5668 --yyextra->curlyCount ;
5672 yyextra->current->endBodyLine=yyextra->yyLineNr;
5673 yyextra->tempEntry = yyextra->current;
5674 yyextra->current = yyextra->previous;
5676 yyextra->docBlockContext = SkipCurlyEndDoc;
5677 yyextra->docBlockInBody =
FALSE;
5678 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5680 yyextra->docBlock.str(std::string());
5681 yyextra->docBlockTerm =
'}';
5682 if (yytext[yyleng-3]==
'/')
5694<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5695 yyextra->docBlockContext = SkipCurlyEndDoc;
5696 yyextra->docBlockInBody =
FALSE;
5697 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5699 yyextra->docBlock.str(std::string());
5700 yyextra->docBlockTerm =
'}';
5701 if (yytext[yyleng-3]==
'/')
5712<SkipCurlyEndDoc>"}" {
5714 if (yyextra->tempEntry)
5716 yyextra->current = yyextra->tempEntry;
5717 yyextra->tempEntry.reset();
5719 BEGIN( yyextra->lastCurlyContext );
5723 yyextra->lastStringContext=SkipCurly;
5724 BEGIN( SkipString );
5726<SkipCurly>^{B}*"#" {
5727 if (yyextra->insidePHP)
5730 BEGIN( SkipCurlyCpp );
5732<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5736<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5737 if (!yyextra->insidePHP)
5743 yyextra->lastHereDocContext = YY_START;
5747<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5749 yyextra->lastRawStringContext = YY_START;
5750 yyextra->dummyRawString.clear();
5751 yyextra->pCopyRawString = &yyextra->dummyRawString;
5752 *yyextra->pCopyRawString += yytext;
5755<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<\$]+ {
5759<SkipCurly,SkipCurlyCpp>"\$" {}
5763 yyextra->lastCurlyContext = FindMembers;
5766<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5770<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5772 yyextra->lastCContext = YY_START;
5775<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5777 yyextra->lastCContext = YY_START;
5778 BEGIN(SkipCxxComment);
5780<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5781 yyextra->roundCount=0;
5782 yyextra->lastSkipRoundContext=YY_START;
5785<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5786 yyextra->lastStringContext=YY_START;
5787 BEGIN( SkipString );
5790 warn(yyextra->fileName,yyextra->yyLineNr,
5791 "Found ';' while parsing initializer list! "
5792 "(doxygen could be confused by a macro call without semicolon)"
5794 BEGIN( FindMembers );
5796<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5797 if (!yyextra->insidePHP)
5800 yyextra->lastCContext = YY_START;
5801 BEGIN(SkipCxxComment);
5803<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5804 if (!yyextra->insideCS) REJECT;
5807 yyextra->lastSkipVerbStringContext=YY_START;
5808 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5809 yyextra->dummyTextStream.clear();
5810 BEGIN(SkipVerbString);
5812<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5813 if (yyextra->insidePHP) REJECT;
5815<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5816 if (yyextra->insidePHP)
5818 yyextra->lastStringContext=YY_START;
5819 BEGIN(SkipPHPString);
5822<SkipC11Attribute>{ID} {
5825 yyextra->current->spec.setNoDiscard(
true);
5828<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5829<SkipString,SkipPHPString>\\. { }
5831 BEGIN( yyextra->lastStringContext );
5834 BEGIN( yyextra->lastStringContext );
5836<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5837<SkipString,SkipPHPString>\n {
5841<SkipString,SkipPHPString>. { }
5847 yyextra->current->section = EntryType::makeEmpty() ;
5848 yyextra->current->type.clear() ;
5849 yyextra->current->name.clear() ;
5850 yyextra->current->args.clear() ;
5851 yyextra->current->argList.clear();
5852 BEGIN( FindMembers ) ;
5855 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5859 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5863 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5865 if (!yyextra->baseName.isEmpty())
5867 yyextra->current->extends.emplace_back(
5869 yyextra->baseName.clear();
5871 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5876 yyextra->current->section = EntryType::makeEmpty() ;
5877 yyextra->current->type.clear() ;
5878 yyextra->current->name.clear() ;
5879 yyextra->current->args.clear() ;
5880 yyextra->current->argList.clear();
5882 BEGIN( FindMembers ) ;
5884<CompoundName>{SCOPENAME}/{BN}*"<" {
5885 yyextra->sharpCount = 0;
5886 yyextra->current->name = yytext ;
5887 if (yyextra->current->spec.isProtocol())
5889 yyextra->current->name+=
"-p";
5892 yyextra->lastClassTemplSpecContext = ClassVar;
5893 if (yyextra->insideObjC)
5895 BEGIN( ObjCProtocolList );
5897 else if (yyextra->insideCS)
5904 yyextra->roundCount=0;
5905 BEGIN( ClassTemplSpec );
5912 yyextra->current->tArgLists.
push_back(al);
5913 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5914 yyextra->templateStr=
"<";
5915 yyextra->current->name +=
"<";
5916 yyextra->fullArgString = yyextra->templateStr;
5917 yyextra->copyArgString = &yyextra->current->name;
5919 yyextra->currentArgumentContext = ClassVar;
5920 BEGIN( ReadTempArgs );
5922<ObjCProtocolList>"<" {
5923 yyextra->insideProtocolList=
TRUE;
5926<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5927 yyextra->current->name += yytext;
5929 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5932 if (yyextra->current->spec.isProtocol())
5939 BEGIN( yyextra->lastClassTemplSpecContext );
5943<ClassTemplSpec>"<" {
5944 yyextra->current->name += yytext;
5945 if (yyextra->roundCount==0) yyextra->sharpCount++;
5948 yyextra->current->name += yytext;
5950<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5951 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5955 yyextra->current->name =
substitute(yytext,
".",
"::");
5956 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5961 else if (!yyextra->current->tArgLists.empty())
5965 yyextra->current->name = yytext;
5966 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5968 QCString rn = yyextra->current_root->name;
5970 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5974 yyextra->current->spec.setForwardDecl(
true);
5975 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5977 else if (yyextra->insideIDL &&
5978 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
5979 yyextra->current->spec.isInterface()) ||
5980 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
5981 yyextra->current->spec.isService())
5989 yyextra->current->name = yytext;
5990 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5991 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
5994 yyextra->current->spec.setInterface(
false).setService(
false);
5998 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6001 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6004 yyextra->current->reset();
6006 if (yyextra->insideObjC)
6009 yyextra->insideObjC =
FALSE;
6011 if (yyextra->isTypedef)
6013 yyextra->current->type.prepend(
"typedef");
6015 BEGIN( FindMembers );
Wrapper class for the Entry type.
6018<CompoundName>{SCOPENAME}/{BN}*"(" {
6019 yyextra->current->name = yytext ;
6021 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6023 yyextra->lastAlignAsContext = YY_START;
6028 if (yyextra->current->spec.isProtocol())
6030 yyextra->current->name +=
"-p";
6035<AlignAs>"(" { yyextra->roundCount=0;
6036 BEGIN( AlignAsEnd );
6040<AlignAsEnd>"(" { yyextra->roundCount++; }
6041<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6043 BEGIN( yyextra->lastAlignAsContext );
6049 yyextra->current->name = yytext ;
6052 yyextra->current->bodyLine = yyextra->yyLineNr;
6053 yyextra->current->bodyColumn = yyextra->yyColNr;
6054 yyextra->current->initializer.str(std::string());
6055 yyextra->lastInitializerContext = FindMembers;
6056 yyextra->initBracketCount=0;
6057 BEGIN(ReadInitializer);
6059<CompoundName>{SCOPENAME}/{BN}*"," {
6061 yyextra->current->reset();
6064<CompoundName>{SCOPENAME} {
6065 yyextra->current->name = yytext ;
6068 if (yyextra->current->spec.isProtocol())
6070 yyextra->current->name +=
"-p";
6072 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6078<CompoundName>{CSSCOPENAME} {
6079 yyextra->current->name =
substitute(yytext,
".",
"::");
6083<ClassVar>{SCOPENAME}{BNopt}/"(" {
6084 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6087 yyextra->roundCount=0;
6088 BEGIN(SkipUnionSwitch);
6093 yyextra->yyBegColNr=yyextra->yyColNr;
6094 yyextra->yyBegLineNr=yyextra->yyLineNr;
6095 yyextra->current->name = yytext;
6096 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6098 BEGIN( FindMembers );
6102 if (yyextra->isTypedef)
6106 yyextra->current->type.prepend(
"typedef ");
6114<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6115 if (yyextra->insideCli)
6118 yyextra->current->spec.setSealedClass(
true);
6120 yyextra->current->spec.setAbstractClass(
true);
6128<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6129 yyextra->yyBegColNr=yyextra->yyColNr;
6130 yyextra->yyBegLineNr=yyextra->yyLineNr;
6133 if (yyextra->current->section.isEnum())
6135 yyextra->current->section = EntryType::makeVariable() ;
6137 yyextra->current->type +=
' ' ;
6138 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...
6147 yyextra->yyBegColNr=yyextra->yyColNr;
6148 yyextra->yyBegLineNr=yyextra->yyLineNr;
6150 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6153 yyextra->roundCount=0;
6154 BEGIN(SkipUnionSwitch);
6156 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6158 yyextra->current->type.clear();
6161 yyextra->baseName.clear();
6162 BEGIN( BasesProt ) ;
6164 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6166 yyextra->current->typeConstr.clear();
6167 yyextra->current->typeConstr.push_back(
Argument());
6168 yyextra->lastCSConstraint = YY_START;
6169 BEGIN( CSConstraintName );
6171 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6173 yyextra->current->spec.setAbstract(
true);
6175 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6177 yyextra->current->spec.setSealed(
true);
6179 else if (
qstrcmp(yytext,
"final")==0)
6181 yyextra->current->spec.setFinal(
true);
6185 if (yyextra->current->section.isEnum())
6187 yyextra->current->section = EntryType::makeVariable() ;
6189 yyextra->current->type +=
' ' ;
6190 yyextra->current->type += yyextra->current->name ;
6191 yyextra->current->name = yytext ;
6200 if (yyextra->insideObjC && *yytext==
'(')
6202 yyextra->current->name+=
'(';
6205 yyextra->current->spec.setCategory(
true);
6207 BEGIN( ClassCategory );
6213 BEGIN( FindMembers );
6216<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6217<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6218 yyextra->fullArgString.clear();
6219 yyextra->lastCopyArgChar=
'#';
6220 yyextra->lastCommentInArgContext=YY_START;
6222 BEGIN( CopyArgCommentLine );
6224 BEGIN( CopyArgComment );
6226<CSConstraintType,CSConstraintName>"#" {
6227 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6229<CSConstraintType>"=>" {
6234 BEGIN( yyextra->lastCSConstraint );
6236<CSConstraintType>"{" {
6240 BEGIN( yyextra->lastCSConstraint );
6242<CSConstraintType,CSConstraintName>";" {
6245 BEGIN( yyextra->lastCSConstraint );
6247<CSConstraintName>":" {
6248 BEGIN( CSConstraintType );
6250<CSConstraintName>{ID} {
6252 yyextra->current->typeConstr.back().name=yytext;
6254<CSConstraintType>"where" {
6255 yyextra->current->typeConstr.push_back(
Argument());
6256 BEGIN( CSConstraintName );
6258<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6259 if (yyextra->current->typeConstr.back().type.isEmpty())
6262 yyextra->current->typeConstr.back().type=yytext;
6266 QCString name = yyextra->current->typeConstr.back().name;
6267 yyextra->current->typeConstr.push_back(
Argument());
6268 yyextra->current->typeConstr.back().name=name;
6269 yyextra->current->typeConstr.back().type=yytext;
6272<CSConstraintName,CSConstraintType>\n {
6275<CSConstraintName,CSConstraintType>. {
6277<ClassCategory>{ID} {
6278 yyextra->current->name+=yytext;
6280<ClassCategory>")"/{BN}*"{" {
6281 yyextra->current->name+=
')';
6284<ClassCategory>")"/{BN}*"<" {
6285 yyextra->current->name+=
')';
6286 BEGIN( ObjCProtocolList );
6289 yyextra->current->name+=
')';
6290 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6302 if (yyextra->current->section.isVariable())
6304 yyextra->current->bitfields+=
":";
6305 yyextra->current->args.clear();
6308 else if (yyextra->current->section.isEnum())
6311 yyextra->current->args.clear();
6312 BEGIN(EnumBaseType);
6316 yyextra->current->type.clear();
6317 if (yyextra->current->spec.isInterface() ||
6318 yyextra->current->spec.isStruct() ||
6319 yyextra->current->spec.isRef() ||
6320 yyextra->current->spec.isValue() ||
6321 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6331 yyextra->baseName.clear();
6332 BEGIN( BasesProt ) ;
6336 if (yyextra->isTypedef)
6338 yyextra->current->type.prepend(
"typedef");
6340 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6342 yyextra->current->section = EntryType::makeVariable() ;
6344 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6346 yyextra->current->reset();
6353 BEGIN( FindMembers );
6355<Bases,ClassVar>{CPPC}"/"/[^/] {
6356 if (!yyextra->insideObjC)
6363 yyextra->current->program << yytext;
6364 yyextra->current->fileName = yyextra->fileName ;
6365 yyextra->current->startLine = yyextra->yyLineNr ;
6366 yyextra->current->startColumn = yyextra->yyColNr;
6367 yyextra->curlyCount=0;
6368 BEGIN( ReadBodyIntf );
6371<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6372<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6373<Bases,ClassVar>{CPPC}"!" |
6374<Bases,ClassVar>[\-+]{BN}* {
6375 if (!yyextra->insideObjC)
6382 yyextra->current->program << yytext;
6383 yyextra->current->fileName = yyextra->fileName ;
6384 yyextra->current->startLine = yyextra->yyLineNr ;
6385 yyextra->current->startColumn = yyextra->yyColNr;
6386 yyextra->curlyCount=0;
6387 BEGIN( ReadBodyIntf );
6390<CompoundName,ClassVar>{B}*"{"{B}* {
6391 yyextra->current->program.str(std::string());
6392 yyextra->current->fileName = yyextra->fileName ;
6393 yyextra->current->bodyLine = yyextra->yyLineNr;
6394 yyextra->current->bodyColumn = yyextra->yyColNr;
6396 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6398 if (yyextra->current->section.isNamespace())
6402 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6414 yyextra->curlyCount=0;
6415 if (yyextra->current_root &&
6416 !yyextra->current_root->spec.isInterface() &&
6417 (yyextra->current->spec.isInterface() ||
6418 yyextra->current->spec.isProtocol() ||
6419 yyextra->current->spec.isCategory() ||
6420 yyextra->current->section.isObjcImpl()
6425 BEGIN( ReadBodyIntf );
6427 else if (yyextra->current->section.isNamespace())
6429 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6441<BasesProt>{BN} {
lineCount(yyscanner); }
6442<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6443<Bases>"decltype"{BN}*"(" {
6445 yyextra->roundCount=0;
6446 yyextra->lastSkipRoundContext=YY_START;
6449<Bases>("\\")?({ID}"\\")*{ID} {
6450 if (!yyextra->insidePHP)
6459 yyextra->baseName += bn;
6460 yyextra->current->args +=
' ';
6461 yyextra->current->args += yytext;
6464<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6470 yyextra->current->typeConstr.clear();
6471 yyextra->current->typeConstr.push_back(
Argument());
6472 yyextra->lastCSConstraint = YY_START;
6473 BEGIN( CSConstraintName );
6477 yyextra->baseName+=yytext;
6478 yyextra->current->args +=
' ';
6479 yyextra->current->args += yytext;
6482<Bases>{BN}*{ID}("."{ID})* {
6484 yyextra->baseName += name;
6485 yyextra->current->args +=
' ';
6486 yyextra->current->args += name;
6488<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6489 if (!yyextra->insideObjC)
6499<ClassVar,Bases>"@end" {
6507<ClassVar>"<" { yyextra->current->name += *yytext;
6508 yyextra->sharpCount=1;
6509 yyextra->roundCount=0;
6510 yyextra->lastSkipSharpContext = YY_START;
6511 yyextra->specName = &yyextra->current->name;
6512 BEGIN ( Specialization );
6516 yyextra->sharpCount=1;
6517 yyextra->roundCount=0;
6518 yyextra->lastSkipSharpContext = YY_START;
6519 if (yyextra->insideObjC)
6529 yyextra->templateStr = yytext;
6530 yyextra->specName = &yyextra->templateStr;
6531 BEGIN ( Specialization );
6534<Specialization>"<" { *yyextra->specName += *yytext;
6535 if (yyextra->roundCount==0) yyextra->sharpCount++;
6537<Specialization>">" {
6538 *yyextra->specName += *yytext;
6539 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6542 BEGIN(yyextra->lastSkipSharpContext);
6545<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6546<Specialization>"<<" { *yyextra->specName += yytext; }
6547<Specialization>">>"/{B}*"::" {
6552<Specialization>">>" {
6553 if (yyextra->insideCS)
6563 if (yyextra->roundCount>0)
6565 *yyextra->specName += yytext;
6575<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6576<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6577<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6579<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6580<Specialization>"\\'" { *yyextra->specName += *yytext;}
6581<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6582<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6583<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6584<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6585<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6586<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6587<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6588<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6589<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6592 *yyextra->specName += *yytext;
6594<SkipRound>"(" { ++yyextra->roundCount; }
6595<SkipRound>")" {
if (--yyextra->roundCount<0)
6596 BEGIN ( yyextra->lastSkipRoundContext );
6599 yyextra->lastStringContext=SkipRound;
6602<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6603 if (yyextra->insideProtocolList)
6605 yyextra->baseName+=
"-p";
6609 yyextra->current->args +=
',' ;
6612 if (!yyextra->baseName.isEmpty())
6614 yyextra->current->extends.emplace_back(
6615 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6618 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6619 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6620 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6629 yyextra->baseName.clear();
6632 yyextra->insideProtocolList=
FALSE;
6644 if (*yytext==
',' && yyextra->insideObjC)
6646 yyextra->insideProtocolList=
TRUE;
6652 yyextra->current->program.str(std::string());
6653 yyextra->current->fileName = yyextra->fileName ;
6654 yyextra->current->bodyLine = yyextra->yyLineNr;
6655 yyextra->current->bodyColumn = yyextra->yyColNr;
6657 if (!yyextra->baseName.isEmpty())
6658 yyextra->current->extends.emplace_back(
6659 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6661 yyextra->curlyCount=0;
6662 if (yyextra->insideObjC)
6664 BEGIN( ReadBodyIntf );
6671<SkipUnionSwitch>{B}*"(" {
6672 yyextra->roundCount++;
6674<SkipUnionSwitch>")" {
6675 if (--yyextra->roundCount==0)
6680<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6682<Comment>{BN}+ { yyextra->current->program << yytext ;
6685<Comment>{CCS} { yyextra->current->program << yytext ; }
6686<Comment>{CPPC} { yyextra->current->program << yytext ; }
6687<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6688 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6689 yyextra->current->program << yytext ;
6691<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6692 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6693 yyextra->current->program << yytext ;
6695<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6696<Comment>{CCE} { yyextra->current->program << yytext ;
6697 if (!yyextra->insideCode)
6699 yyextra->doxygenComment=
false;
6700 BEGIN( yyextra->lastContext );
6703<Comment>. { yyextra->current->program << *yytext ; }
6705<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6707 if (!yyextra->current->doc.isEmpty())
6709 yyextra->current->doc+=
"\n\n";
6713 yyextra->current->docLine = yyextra->yyLineNr;
6714 yyextra->current->docFile = yyextra->fileName;
6717 yyextra->lastDocContext = YY_START;
6718 if (yyextra->current_root->section.isScope())
6720 yyextra->current->inside = yyextra->current_root->name+
"::";
6722 yyextra->docBlockContext = YY_START;
6723 yyextra->docBlockInBody = YY_START==SkipCurly;
6728 yyextra->docBlock.str(indent.
str());
6730 if (yyextra->docBlockAutoBrief)
6732 yyextra->current->briefLine = yyextra->yyLineNr;
6733 yyextra->current->briefFile = yyextra->fileName;
6738<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6744 yyextra->lastDocContext = YY_START;
6747 if (yyextra->current_root->section.isScope())
6749 yyextra->current->inside = yyextra->current_root->name+
"::";
6751 yyextra->current->docLine = yyextra->yyLineNr;
6752 yyextra->current->docFile = yyextra->fileName;
6753 yyextra->docBlockContext = YY_START;
6754 yyextra->docBlockInBody = YY_START==SkipCurly;
6756 yyextra->docBlockAutoBrief = javadocAutoBrief;
6760 yyextra->docBlock.str(indent.
str());
6762 if (yyextra->docBlockAutoBrief)
6764 yyextra->current->briefLine = yyextra->yyLineNr;
6765 yyextra->current->briefFile = yyextra->fileName;
6772 yyextra->current->program << yytext ;
6773 yyextra->lastContext = YY_START ;
6774 yyextra->doxygenComment=
true;
6778<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6783<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6784 yyextra->lastDocContext = YY_START;
6787 if (yyextra->current_root->section.isScope())
6789 yyextra->current->inside = yyextra->current_root->name+
"::";
6791 yyextra->current->docLine = yyextra->yyLineNr;
6792 yyextra->current->docFile = yyextra->fileName;
6793 yyextra->docBlockContext = YY_START;
6794 yyextra->docBlockInBody = YY_START==SkipCurly;
6796 yyextra->docBlockAutoBrief = javadocAutoBrief;
6800 yyextra->docBlock.str(indent.
str());
6802 if (yyextra->docBlockAutoBrief)
6804 yyextra->current->briefLine = yyextra->yyLineNr;
6805 yyextra->current->briefFile = yyextra->fileName;
6810<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6811 yyextra->lastDocContext = YY_START;
6812 if (yyextra->current_root->section.isScope())
6814 yyextra->current->inside = yyextra->current_root->name+
"::";
6816 yyextra->docBlockContext = YY_START;
6817 yyextra->docBlockInBody = YY_START==SkipCurly;
6818 yyextra->docBlockAutoBrief =
FALSE;
6822 yyextra->docBlock.str(indent.
str());
6827<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6828 yyextra->lastDocContext = YY_START;
6829 if (yyextra->current_root->section.isScope())
6831 yyextra->current->inside = yyextra->current_root->name+
"::";
6833 yyextra->docBlockContext = YY_START;
6834 yyextra->docBlockInBody = YY_START==SkipCurly;
6835 yyextra->docBlockAutoBrief =
FALSE;
6838 yyextra->docBlock.str(indent.
str());
6842<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6844 yyextra->externLinkage=
TRUE;
6847 if (yyextra->externLinkage)
6849 yyextra->externLinkage=
FALSE;
6851 else if (yyextra->insideCS &&
6852 !yyextra->current->name.isEmpty() &&
6853 !yyextra->current->type.isEmpty())
6867 yyextra->current->bodyLine = yyextra->yyLineNr;
6868 yyextra->current->bodyColumn = yyextra->yyColNr;
6869 yyextra->curlyCount=0;
6870 BEGIN( CSAccessorDecl );
6872 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6876 yyextra->current->exception =
" {";
6877 BEGIN(UNOIDLAttributeBlock);
6881 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6882 yyextra->current->name.isEmpty()
6886 yyextra->needsSemi =
FALSE;
6887 if (yyextra->current->isStatic)
6889 yyextra->current->name=
"[static initializer]";
6890 yyextra->current->type.clear();
6894 yyextra->current->name=
"[instance initializer]";
6911 yyextra->current->bodyLine = yyextra->yyLineNr;
6912 yyextra->current->bodyColumn = yyextra->yyColNr;
6913 yyextra->current->initializer.str(yytext);
6914 yyextra->lastInitializerContext = YY_START;
6915 yyextra->initBracketCount=1;
6916 BEGIN(ReadInitializer);
6920<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6921<CSAccessorDecl>"}"{B}*"=" {
6923 if (yyextra->curlyCount != 0) REJECT;
6924 yyextra->current->initializer.str(
"=");
6925 yyextra->current->endBodyLine=yyextra->yyLineNr;
6926 yyextra->lastInitializerContext = FindMembers;
6927 BEGIN(ReadInitializer);
6929<CSAccessorDecl>"}" {
6930 if (yyextra->curlyCount)
6932 yyextra->curlyCount--;
6939 yyextra->current->endBodyLine=yyextra->yyLineNr;
6944<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6945<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6946<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6947<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6948<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6949<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6950<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6951<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6952<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6953<CSAccessorDecl>{CHARLIT} {}
6954<CSAccessorDecl>"\"" { BEGIN(CSString);}
6955<CSAccessorDecl>"." {}
6956<CSAccessorDecl>\n {
lineCount(yyscanner); }
6957<CSString>"\"" { BEGIN(CSAccessorDecl);}
6965<SliceSequence>{SCOPENAME} {
6966 if (yyextra->current->spec.isLocal())
6968 yyextra->current->type =
"local ";
6970 yyextra->current->type +=
"sequence<";
6971 yyextra->current->type += yytext;
6972 yyextra->current->type +=
">";
6975<SliceSequence>{BN}*">"{BN}* {
6977 BEGIN(SliceSequenceName);
6980<SliceSequenceName>{ID}{BN}* {
6982 yyextra->current->name = yytext ;
6983 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6986<SliceSequenceName>";" {
6987 yyextra->current->section = EntryType::makeVariable();
6988 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6993<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
6995 if (yyextra->current->spec.isLocal())
6997 yyextra->current->type =
"local ";
6999 yyextra->current->type +=
"dictionary<";
7000 yyextra->current->type += yytext;
7001 yyextra->current->type +=
">";
7002 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7005<SliceDictionary>{BN}*">"{BN}* {
7007 BEGIN(SliceDictionaryName);
7010<SliceDictionaryName>{ID}{BN}* {
7012 yyextra->current->name = yytext ;
7013 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7016<SliceDictionaryName>";" {
7017 yyextra->current->section = EntryType::makeVariable();
7018 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7028<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7029 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7030 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7033<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7034 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7035 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7037<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7038 yyextra->docBlock << yytext;
7039 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7040 BEGIN( yyextra->docBlockContext );
7042<DocLine>{NONLopt}/"\n" {
7043 yyextra->docBlock << yytext;
7044 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7045 BEGIN( yyextra->docBlockContext );
7050<DocBlock>"*"*{CCE} {
7052 BEGIN(yyextra->docBlockContext);
7054<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7057 yyextra->docBlock <<
"\\ilinebr " << indent;
7059<DocBlock>^{B}*"*"+/[^/] {
7062 yyextra->docBlock << indent;
7064<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7067 yyextra->docBlock << indent;
7069<DocBlock>^{B}*({CPPC}){B}* {
7072 yyextra->docBlock << yytext;
7076 yyextra->docBlock << yytext;
7078<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7079 yyextra->docBlock << yytext;
7081<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7082 yyextra->docBlock << yytext;
7083 char blockName[] =
"f$";
7085 if (c==
'[') blockName[1]=
']';
7086 else if (c==
'{') blockName[1]=
'}';
7087 else if (c==
'(') blockName[1]=
')';
7089 BEGIN(DocCopyBlock);
7091<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7092 yyextra->fileName = &yytext[6];
7093 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7094 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7095 yyextra->docBlock << yytext;
7097<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7098 yyextra->fileName = &yytext[6];
7099 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7100 yyextra->docBlock << yytext;
7102<DocBlock>{CMD}"iline"{LINENR}{B} {
7107 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7111 yyextra->yyLineNr = nr;
7113 yyextra->docBlock << yytext;
7115<DocBlock>{B}*"<"{PRE}">" {
7116 yyextra->docBlock << yytext;
7118 BEGIN(DocCopyBlock);
7120<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7121 yyextra->docBlock << yytext;
7123 BEGIN(DocCopyBlock);
7125<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
7126 yyextra->docBlock << yytext;
7128 BEGIN(DocCopyBlock);
7130<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7132 yyextra->docBlock <<
"\\ilinebr ";
7133 yyextra->docBlock << pat;
7135 BEGIN(DocCopyBlock);
7137<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7139 yyextra->docBlock << pat;
7141 BEGIN(DocCopyBlock);
7143<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7144<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7145<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7147 yyextra->docBlock <<
"\\ilinebr ";
7148 yyextra->docBlock << pat;
7150 BEGIN(DocCopyBlock);
7152<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7153<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7154<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7156 yyextra->docBlock << pat;
7158 BEGIN(DocCopyBlock);
7160<DocBlock>{B}*"<"{CODE}">" {
7161 if (yyextra->insideCS)
7163 yyextra->docBlock << yytext;
7165 BEGIN(DocCopyBlock);
7172<DocBlock>[^@*~\/\\\n]+ {
7173 yyextra->docBlock << yytext;
7177 yyextra->docBlock << *yytext;
7180 yyextra->docBlock << *yytext;
7185<DocCopyBlock>"</"{PRE}">" {
7190 yyextra->docBlock << yytext;
7192<DocCopyBlock>"</"{CODE}">" {
7197 yyextra->docBlock << yytext;
7199<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7204 yyextra->docBlock << yytext;
7206<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7211 yyextra->docBlock << yytext;
7213<DocCopyBlock>^{B}*"*"+/{BN}+ {
7214 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7222 yyextra->docBlock << indent;
7225<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7226 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7230 yyextra->docBlock << indent;
7237<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7238 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7242 yyextra->docBlock << indent+
"*";
7249<DocCopyBlock>^{B}*"*"+/{BN}* {
7250 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7253 if (yyextra->nestedComment>0)
7256 yyextra->docBlock << indent+
"*";
7261 yyextra->docBlock << indent;
7269<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7275 yyextra->docBlock << pat;
7277<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7283 yyextra->docBlock << pat;
7285<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7286 yyextra->docBlock << yytext;
7289 yyextra->docBlock << yytext;
7290 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7294 yyextra->lastStringContext=YY_START;
7295 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7296 yyextra->stopAtInvalidString=
true;
7300<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7303 yyextra->nestedComment++;
7305 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7307 yyextra->nestedComment--;
7309 yyextra->docBlock << yytext;
7312 yyextra->docBlock << *yytext;
7316 yyextra->docBlock << *yytext;
7318<DocCopyBlock><<EOF>> {
7319 warn(yyextra->fileName,yyextra->yyLineNr,
7320 "reached end of file while inside a '{}' block!"
7321 " The command that should end the block seems to be missing!",
7322 yyextra->docBlockName);
7329<Prototype>"operator"{B}*"("{B}*")" {
7330 yyextra->current->name+=yytext;
7333 yyextra->current->args+=*yytext;
7334 yyextra->currentArgumentContext = PrototypeQual;
7335 yyextra->fullArgString = yyextra->current->args;
7336 yyextra->copyArgString = &yyextra->current->args;
7337 BEGIN( ReadFuncArgType ) ;
7339<Prototype>"("({ID}"::")*({B}*[&*])+ {
7340 if (yyextra->insidePHP)
7346 yyextra->current->type+=yyextra->current->name+yytext;
7347 yyextra->current->name.clear();
7348 BEGIN( PrototypePtr );
7351<PrototypePtr>{SCOPENAME} {
7352 yyextra->current->name+=yytext;
7355 yyextra->current->args+=*yytext;
7356 yyextra->currentArgumentContext = PrototypeQual;
7357 yyextra->fullArgString = yyextra->current->args;
7358 yyextra->copyArgString = &yyextra->current->args;
7359 BEGIN( ReadFuncArgType ) ;
7362 yyextra->current->type+=
')';
7366 yyextra->current->name+=yytext;
7369 BEGIN( PrototypeSkipLine);
7371<PrototypeQual>{B}*"const"{B}* {
7372 yyextra->current->args +=
" const ";
7373 yyextra->current->argList.setConstSpecifier(
TRUE);
7375<PrototypeQual>{B}*"volatile"{B}* {
7376 yyextra->current->args +=
" volatile ";
7377 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7379<PrototypeQual>{B}*"="{B}*"0"{B}* {
7380 yyextra->current->args +=
" = 0";
7382 yyextra->current->argList.setPureSpecifier(
TRUE);
7384<PrototypeQual>"throw"{B}*"(" {
7385 yyextra->current->exception =
"throw(";
7386 BEGIN(PrototypeExc);
7389 yyextra->current->exception +=
')';
7390 BEGIN(PrototypeQual);
7393 yyextra->current->exception += *yytext;
7396 yyextra->current->args += *yytext;
7399 yyextra->current->name += *yytext;
7401<PrototypeSkipLine>. {
7407<SkipCxxComment>.*"\\\n" {
7408 if (yyextra->insideCS)
7417<SkipCxxComment>{ANYopt}/\n {
7418 BEGIN( yyextra->lastCContext ) ;
7420<SkipComment>[^\*\n]+
7425 if (!yyextra->insideCpp) REJECT;
7426 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7427 yyextra->lastC11AttributeContext = YY_START;
7428 BEGIN( SkipC11Attribute );
7433 if (yyextra->insideIDL && yyextra->insideCppQuote)
7437 else if (yyextra->insidePHP)
7439 yyextra->lastStringContext=YY_START;
7444 if (!yyextra->insidePHP)
7446 yyextra->lastCPPContext = YY_START;
7451 yyextra->lastCContext = YY_START ;
7452 BEGIN( SkipCxxComment ) ;
7456 if (!yyextra->insidePHP)
7458 yyextra->lastCContext = YY_START ;
7459 BEGIN( SkipCxxComment ) ;
7462 if (yyextra->insidePHP)
7464 yyextra->lastStringContext=YY_START;
7465 BEGIN(SkipPHPString);
7469 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7471 if (yyextra->current->type.isEmpty())
7473 if (yyextra->current->name.isEmpty())
7474 yyextra->current->name=
"?";
7476 yyextra->current->name+=
"?";
7480 yyextra->current->type+=
"?";
7484<*>"}" { yyextra->exported=
false; }
7486<SkipComment>{CPPC}|{CCS}
7487<*>{CCS} { yyextra->lastCContext = YY_START ;
7488 BEGIN( SkipComment ) ;
7490<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7492 yyextra->lastCContext = YY_START ;
7493 BEGIN( SkipCxxComment ) ;
7496 if (yyextra->insideCS && yyextra->fakeNS)
7500 BEGIN ( ReadNSBody);
7512 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7514 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7516 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7526 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7527 yyextra->outerScopeEntries.clear();
7528 yyextra->baseName.clear();
7531 yyextra->sharpCount = 0;
7532 yyextra->roundCount = 0;
7533 yyextra->curlyCount = 0;
7535 yyextra->isStatic =
FALSE;
7538 yyextra->isTypedef =
FALSE;
7539 yyextra->insideTryBlock =
FALSE;
7540 yyextra->insideFormula =
FALSE;
7541 yyextra->insideCode=
FALSE;
7543 yyextra->previous = 0;
7544 yyextra->firstTypedefEntry.reset();
7545 yyextra->memspecEntry.reset();
7550 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7551 if (yyextra->insideJava)
7555 yyextra->current->protection = yyextra->protection;
7556 yyextra->current->exported = yyextra->exported ;
7557 yyextra->current->mtype = yyextra->mtype;
7558 yyextra->current->virt = yyextra->virt;
7559 yyextra->current->isStatic = yyextra->isStatic;
7560 yyextra->current->lang = yyextra->language;
7562 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7563 yyextra->isTypedef=
FALSE;
7571 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7572 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7574 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7580 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7583 for (p = yytext ; *p ; ++p )
7587 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7591 yyextra->column+=tabSize - (yyextra->column%tabSize);
7595 yyextra->column++,yyextra->yyColNr++;
7603 int col=startIndent;
7609 if (c==
'\t') col+=tabSize-(col%tabSize);
7610 else if (c==
'\n') col=0;
7619 int i = text.
find(
'"');
7632 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7633 yyextra->current->protection = yyextra->protection = prot;
7635 yyextra->current->type.clear();
7636 yyextra->current->name.clear();
7637 yyextra->current->args.clear();
7638 yyextra->current->argList.clear();
7644 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7645 size_t tl=yyextra->current->type.length();
7646 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7648 yyextra->current->type +=
' ' ;
7650 yyextra->current->type += yyextra->current->name;
7651 yyextra->current->name.clear() ;
7652 tl=yyextra->current->type.length();
7653 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7655 yyextra->current->type +=
' ' ;
7657 yyextra->current->type += yyextra->current->args ;
7658 yyextra->current->args.clear() ;
7659 yyextra->current->argList.clear();
7666 if (s==
nullptr || *s==0)
return name;
7668 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7680 bool funcPtr = i>0 && type[i-1]==
')';
7682 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7683 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7684 return type.
left(i);
7690 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7693 yyextra->docBlock <<
"\\iskip";
7695 yyextra->docBlockName=blockName;
7696 yyextra->fencedSize=fencedSize;
7697 yyextra->nestedComment=0;
7703 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7704 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7708 yyextra->docBlock <<
"\\endiskip";
7710 yyextra->docBlockName=
"";
7730 int i=name.
find(
"operator");
7731 if (i==-1)
return FALSE;
7741 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7763 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7764 if (yyextra->current_root->section.isScope())
7767 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7769 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7771 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7781 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7782 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7783 if (yyextra->current->argList.empty())
return FALSE;
7784 for (
const Argument &a : yyextra->current->argList)
7795 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7796 if (yyextra->insideJava)
7800 if (text.
find(
"protected")!=-1)
7802 else if (text.
find(
"private")!=-1)
7804 else if (text.
find(
"package")!=-1)
7812 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7813 int si =
static_cast<int>(yyextra->current->args.length());
7814 if (yyextra->oldStyleArgType.isEmpty())
7816 std::string args = yyextra->current->args.str();
7817 static const reg::Ex re(R
"(\([^)]*\).*)");
7823 bi1=(int)match.position();
7824 size_t secondMatchStart = match.position()+match.length();
7827 bi2=(int)match.position();
7831 if (bi1!=-1 && bi2!=-1)
7834 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7836 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7837 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7839 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7840 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7841 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7846 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7849 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7850 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7852 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7853 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7859 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7862 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7866 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7867 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7880 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7883 oldStyleArgPtr=yyextra->current->args.
left(j);
7902 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7903 for (
Argument &a : yyextra->current->argList)
7912 a.
docs=brief+
"\n\n"+docs;
7944 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7947 yyextra->current->briefFile = yyextra->fileName;
7948 yyextra->current->briefLine = yyextra->yyLineNr;
7952 yyextra->current->docFile = yyextra->fileName;
7953 yyextra->current->docLine = yyextra->yyLineNr;
7961 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7962 if (yyextra->tempEntry==0)
7967 yyextra->previous = yyextra->current;
7968 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7972 yyextra->previous = yyextra->current;
7973 yyextra->current = yyextra->tempEntry;
7974 yyextra->tempEntry.reset();
7981 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7984 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
7985 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
7988 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
7989 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
7991 docEntry->inbodyFile = yyextra->fileName;
7992 docEntry->inbodyLine = lineNr;
7996 bool needsEntry=
FALSE;
7998 Markdown markdown(yyextra->fileName,lineNr);
8001 while (yyextra->commentScanner.parseCommentBlock(
8002 yyextra->thisParser,
8003 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8007 yyextra->docBlockInBody ?
FALSE : brief,
8008 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8009 yyextra->docBlockInBody,
8010 yyextra->protection,
8021 QCString docFile = yyextra->current->docFile;
8023 yyextra->current->docFile = docFile;
8024 yyextra->current->docLine = lineNr;
8032 if (yyextra->docBlockTerm)
8034 unput(yyextra->docBlockTerm);
8035 yyextra->docBlockTerm=0;
8042 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8053 QCString orgDoc = yyextra->current->doc;
8054 QCString orgBrief = yyextra->current->brief;
8055 int orgDocLine = yyextra->current->docLine;
8056 int orgBriefLine = yyextra->current->briefLine;
8058 yyextra->current->doc.
clear();
8059 yyextra->current->brief.clear();
8062 int lineNr = orgDocLine;
8064 Markdown markdown(yyextra->fileName,lineNr);
8067 while (yyextra->commentScanner.parseCommentBlock(
8068 yyextra->thisParser,
8069 yyextra->current.get(),
8076 yyextra->protection,
8085 if (needsEntry)
newEntry(yyscanner);
8091 a.
docs = yyextra->current->doc;
8094 yyextra->current->doc = orgDoc;
8095 yyextra->current->brief = orgBrief;
8096 yyextra->current->docLine = orgDocLine;
8097 yyextra->current->briefLine = orgBriefLine;
8108 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8109 for (
const auto &ce : rt->children())
8111 if (!ce->program.empty())
8115 yyextra->padCount=0;
8118 yyextra->programStr = ce->program.str();
8119 yyextra->inputString = yyextra->programStr.data();
8120 yyextra->inputPosition = 0;
8121 if (ce->section.isEnum() || ce->spec.isEnum())
8122 BEGIN( FindFields ) ;
8124 BEGIN( FindMembers ) ;
8125 yyextra->current_root = ce;
8126 yyextra->fileName = ce->fileName;
8128 yyextra->yyLineNr = ce->bodyLine;
8129 yyextra->yyColNr = ce->bodyColumn;
8132 yyextra->current = std::make_shared<Entry>();
8133 yyextra->isStatic =
FALSE;
8138 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8140 ce->groups = rt->groups;
8143 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8145 if ( ce->section.isClass() )
8147 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8151 else if (yyextra->insideJava)
8155 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8171 else if (ce->section.isEnum() )
8173 yyextra->current->protection = yyextra->protection = ce->protection;
8175 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8177 if (ce->section.isNamespace() )
8179 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8181 yyextra->current->protection = yyextra->protection = ce->protection;
8182 yyextra->current->exported = yyextra->exported =
false;
8184 else if (ce->section.isNamespace() )
8187 yyextra->current->exported = yyextra->exported = ce->exported;
8192 yyextra->current->exported = yyextra->exported =
false;
8202 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8204 scannerYYlex(yyscanner);
8205 yyextra->lexInit=
TRUE;
8208 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8210 yyextra->programStr.clear();
8211 ce->program.str(std::string());
8227 const char *fileBuf,
8228 const std::shared_ptr<Entry> &rt,
8232 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8235 yyextra->inputString = fileBuf;
8236 yyextra->inputPosition = 0;
8237 yyextra->column = 0;
8238 scannerYYrestart(
nullptr,yyscanner);
8243 yyextra->isStatic =
FALSE;
8244 yyextra->exported =
false;
8246 yyextra->current_root = rt;
8247 yyextra->yyLineNr = 1 ;
8248 yyextra->yyBegLineNr = 1;
8249 yyextra->yyBegColNr = 0;
8250 yyextra->anonCount = 0;
8251 yyextra->anonNSCount = 0;
8252 yyextra->fileName = fileName;
8253 yyextra->clangParser = clangParser;
8255 rt->lang = yyextra->language;
8256 msg(
"Parsing file {}...\n",yyextra->fileName);
8258 yyextra->current_root = rt;
8260 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8261 yyextra->current = std::make_shared<Entry>();
8266 yyextra->current->name = yyextra->fileName;
8267 yyextra->current->section = sec;
8268 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8270 yyextra->current->reset();
8272 if ( yyextra->insidePHP )
8274 BEGIN( FindMembersPHP );
8276 else if ( yyextra->insideJava )
8278 yyextra->current->name=
"java::lang";
8279 yyextra->current->fileName = yyextra->fileName;
8280 yyextra->current->section = EntryType::makeUsingDir();
8281 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8283 BEGIN( FindMembers );
8287 BEGIN( FindMembers );
8290 scannerYYlex(yyscanner);
8291 yyextra->lexInit=
TRUE;
8293 if (YY_START==Comment)
8295 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8299 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8301 yyextra->programStr.clear();
8302 rt->program.str(std::string());
8306 yyextra->anonNSCount++;
8309 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8312 parent->moveToSubEntryAndKeep(child);
8314 yyextra->outerScopeEntries.clear();
8323 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8326 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8329 if (!yyextra->current)
8334 const char *orgInputString;
8335 int orgInputPosition;
8336 YY_BUFFER_STATE orgState;
8339 orgState = YY_CURRENT_BUFFER;
8340 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8341 orgInputString = yyextra->inputString;
8342 orgInputPosition = yyextra->inputPosition;
8345 yyextra->inputString = text.
data();
8346 yyextra->inputPosition = 0;
8347 yyextra->column = 0;
8348 scannerYYrestart(
nullptr, yyscanner);
8350 scannerYYlex(yyscanner);
8351 yyextra->lexInit=
TRUE;
8353 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8354 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8356 yyextra->current->section = EntryType::makeVariableDoc();
8360 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8361 yy_switch_to_buffer(orgState, yyscanner);
8362 yyextra->inputString = orgInputString;
8363 yyextra->inputPosition = orgInputPosition;
8379 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8387 scannerYYlex_destroy(
p->yyscanner);
8391 const char *fileBuf,
8392 const std::shared_ptr<Entry> &root,
8396 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8397 yyextra->thisParser =
this;
8401 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8410 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8411 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8422#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)