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?
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}* {
617 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
620<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
622 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
625<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
627 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
630<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
632 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
635<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
637 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
640<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
642 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
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") {
691 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
693<FindMembers>{B}*"event"{BN}+ {
694 if (yyextra->insideCli)
698 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
699 yyextra->current->bodyLine = yyextra->yyLineNr;
700 yyextra->current->bodyColumn = yyextra->yyColNr;
701 yyextra->curlyCount=0;
702 BEGIN( CliPropertyType );
704 else if (yyextra->insideCS)
707 yyextra->current->mtype = MethodTypes::Event;
708 yyextra->current->bodyLine = yyextra->yyLineNr;
709 yyextra->current->bodyColumn = yyextra->yyColNr;
716<FindMembers>{B}*"property"{BN}+ {
717 if (yyextra->insideCli)
721 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
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();
800 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
801 yyextra->insideObjC =
TRUE;
802 yyextra->yyBegColNr = yyextra->yyColNr;
803 yyextra->yyBegLineNr = yyextra->yyLineNr;
804 yyextra->current->virt = Specifier::Virtual;
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;
990 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
991 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
992 yyextra->current->protection = Protection::Public ;
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)
1057 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1058 yyextra->current->spec.setWritable(
true).setReadable(
true);
1059 yyextra->current->protection = Protection::Public ;
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 ";
1257 yyextra->current->virt = Specifier::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)
1313 yyextra->current->virt = Specifier::Pure;
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();
1515 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1516 yyextra->insideObjC =
TRUE;
1517 yyextra->current->protection = yyextra->protection = Protection::Public ;
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)
1533 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1534 yyextra->insideObjC =
TRUE;
1536 yyextra->current->protection = yyextra->protection = Protection::Public ;
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();
1551 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1552 yyextra->insideObjC =
TRUE;
1553 yyextra->current->protection = yyextra->protection = Protection::Public ;
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;
1615 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
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->sharpCount=0;
2067 yyextra->initBracketCount=0;
2069 BEGIN(ReadInitializer);
2072 yyextra->current->section = EntryType::makeVariable();
2074 init.stripPrefix(
"class ");
2075 init.stripPrefix(
"struct ");
2077 yyextra->current->type =
"typedef "+
init;
2078 yyextra->current->args.clear();
2079 yyextra->current->spec.setAlias(
true);
2080 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2085 yyextra->current->initializer << yytext;
2088 yyextra->current->initializer << yytext;
2092 yyextra->current->fileName = yyextra->fileName;
2093 yyextra->current->section = EntryType::makeUsingDir();
2094 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2098<Using>";" { BEGIN(FindMembers); }
2099<FindMembers>{SCOPENAME}{BN}*"<>" {
2104<FindMembers>{SCOPENAME}{BNopt}/"<" {
2106 if (yyextra->insideCpp && name==
"import") REJECT;
2107 yyextra->roundCount=0;
2108 yyextra->sharpCount=0;
2111 yyextra->current->name=name;
2117 BEGIN( EndTemplate );
2119<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2120 yyextra->sharpCount=0;
2121 yyextra->roundCount=0;
2129 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...
2132 if (!yyextra->insidePHP)
2138 yyextra->lastHereDocContext = YY_START;
2142<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2143 yyextra->current->name+=yytext;
2147 if (yyextra->roundCount==0)
2150 yyextra->sharpCount++;
2152 yyextra->current->name+=yytext;
2154<ClassTemplSpec,EndTemplate>">=" {
2155 yyextra->current->name+=yytext;
2157<ClassTemplSpec,EndTemplate>(">>") {
2158 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2166 yyextra->current->name+=yytext;
2171 yyextra->current->name+=
'>';
2173 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2175 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2180<EndTemplate>">"{BN}*"(" {
2182 yyextra->current->name+=
'>';
2184 if (yyextra->roundCount==0)
2186 --yyextra->sharpCount;
2188 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2190 yyextra->current->bodyLine = yyextra->yyLineNr;
2191 yyextra->current->bodyColumn = yyextra->yyColNr;
2192 yyextra->current->args =
"(";
2193 yyextra->currentArgumentContext = FuncQual;
2194 yyextra->fullArgString = yyextra->current->args;
2195 yyextra->copyArgString = &yyextra->current->args;
2197 BEGIN( ReadFuncArgType ) ;
2201 yyextra->current->name+=
"(";
2202 yyextra->roundCount++;
2205<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2207 yyextra->current->name+=
'>';
2208 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2213<EndTemplate>">"{BNopt}/"::" {
2215 yyextra->current->name+=
'>';
2217 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2219 BEGIN(FindMemberName);
2222<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2223 yyextra->roundCount++;
2225<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2226 if (yyextra->roundCount>0) yyextra->roundCount--;
2229 yyextra->current->name+=*yytext;
2232<FindMembers>"define"{BN}*"("{BN}*["'] {
2233 if (yyextra->insidePHP)
2235 yyextra->current->bodyLine = yyextra->yyLineNr;
2236 yyextra->current->bodyColumn = yyextra->yyColNr;
2243 yyextra->delimiter = yytext;
2244 *yyextra->pCopyHereDocGString << yytext;
2245 BEGIN(CopyHereDocEnd);
2247<CopyHereDoc>"\""{ID}/"\"" {
2248 yyextra->delimiter = &yytext[1];
2249 *yyextra->pCopyHereDocGString << yytext;
2250 BEGIN(CopyHereDocEnd);
2252<CopyHereDoc>"'"{ID}/"'" {
2253 yyextra->delimiter = &yytext[1];
2254 *yyextra->pCopyHereDocGString << yytext;
2255 BEGIN(CopyHereDocEnd);
2258 yyextra->delimiter = yytext;
2261<HereDoc>"\""{ID}/"\"" {
2262 yyextra->delimiter = &yytext[1];
2265<HereDoc>"'"{ID}/"'" {
2266 yyextra->delimiter = &yytext[1];
2270 if (yyextra->delimiter==yytext)
2272 BEGIN(yyextra->lastHereDocContext);
2276<CopyHereDocEnd>^{Bopt}{ID} {
2277 *yyextra->pCopyHereDocGString << yytext;
2280 BEGIN(yyextra->lastHereDocContext);
2285 *yyextra->pCopyHereDocGString << yytext;
2287<CopyHereDocEnd>{ID} {
2288 *yyextra->pCopyHereDocGString << yytext;
2291 *yyextra->pCopyHereDocGString << yytext;
2293<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2295<FindMembers>"Q_PROPERTY" {
2296 yyextra->yyBegLineNr = yyextra->yyLineNr;
2297 yyextra->yyBegColNr = yyextra->yyColNr;
2298 yyextra->current->protection = Protection::Public ;
2299 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2300 yyextra->current->type.clear();
2310 yyextra->current->name+=yytext;
2313 yyextra->current->type+= yyextra->current->name;
2314 yyextra->current->type+= yytext;
2315 yyextra->current->name=
"";
2317<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2318 yyextra->current->type+= yyextra->current->name;
2319 yyextra->current->name=yytext;
2321<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2322 yyextra->current->spec.setReadable(
true);
2325<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2326 yyextra->current->spec.setWritable(
true);
2329<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2330<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2335<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2336<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2337<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2338<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2342 yyextra->current->read = yytext;
2346 yyextra->current->write = yytext;
2349<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2350 yyextra->current->name=yytext;
2354<FindMembers>"requires" {
2355 if (yyextra->insideJava) REJECT;
2356 yyextra->current->req.clear();
2357 yyextra->requiresContext = YY_START;
2358 BEGIN(RequiresClause);
2360<RequiresClause>"requires"{BN}*/"{" {
2361 if (yyextra->insideJava) REJECT;
2363 yyextra->current->req+=yytext;
2364 BEGIN( RequiresExpression ) ;
2366<RequiresClause>"requires"{BN}*"(" {
2367 if (yyextra->insideJava) REJECT;
2369 yyextra->current->req+=yytext;
2370 yyextra->lastRoundContext=RequiresExpression;
2371 yyextra->pCopyRoundString=&yyextra->current->req;
2372 yyextra->roundCount=0;
2373 BEGIN( CopyRound ) ;
2375<RequiresExpression>"{" {
2376 yyextra->current->req+=yytext;
2377 yyextra->lastCurlyContext=RequiresClause;
2378 yyextra->pCopyCurlyString=&yyextra->current->req;
2379 yyextra->curlyCount=0;
2380 BEGIN( CopyCurly ) ;
2382<RequiresExpression>\n {
2383 yyextra->current->req+=
' ';
2386<RequiresExpression>. {
2387 yyextra->current->req+=yytext;
2389<RequiresClause>"(" {
2390 yyextra->current->req+=yytext;
2391 yyextra->lastRoundContext=RequiresClause;
2392 yyextra->pCopyRoundString=&yyextra->current->req;
2393 yyextra->roundCount=0;
2394 BEGIN( CopyRound ) ;
2396<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2400 yyextra->current->req+=yytext;
2401 yyextra->lastRoundContext=RequiresClause;
2402 yyextra->pCopyRoundString=&yyextra->current->req;
2403 yyextra->roundCount=0;
2411<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2415 yyextra->current->req+=yytext;
2416 yyextra->lastSharpContext=RequiresClause;
2417 yyextra->pCopySharpString=&yyextra->current->req;
2418 yyextra->sharpCount=0;
2426<RequiresClause>{NOTopt}{SCOPENAME} {
2430 yyextra->current->req=yytext;
2431 BEGIN(yyextra->requiresContext);
2438<RequiresClause>{NOTopt}"::"{ID} {
2440 yyextra->current->req+=yytext;
2442<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2444 yyextra->current->req+=yytext;
2446<RequiresClause>{BN}+ {
2447 yyextra->current->req+=
' ';
2452 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2453 BEGIN(yyextra->requiresContext);
2455<FindMembers,FindMemberName>{SCOPENAME} {
2457 yyextra->yyBegColNr=yyextra->yyColNr;
2458 yyextra->yyBegLineNr=yyextra->yyLineNr;
2460 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2464 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2466 if (yyextra->insideIDL)
2471 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2475 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2480 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2482 BEGIN(IDLUnionCase);
2484 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2486 yyextra->insideTryBlock=
FALSE;
2487 BEGIN(TryFunctionBlock);
2489 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2491 yyextra->lastAlignAsContext = YY_START;
2494 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2496 yyextra->current->type=
"var";
2498 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2500 yyextra->current->type=
"function";
2502 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2506 yyextra->current->name=
"this";
2509 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2512 BEGIN(StaticAssert);
2514 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2518 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2519 yyextra->current->type+=yytext;
2522 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2524 if (yyextra->current->type.isEmpty())
2526 yyextra->current->type =
"optional";
2530 yyextra->current->type +=
" optional";
2532 yyextra->lastModifierContext = YY_START;
2533 BEGIN(SliceOptional);
2537 if (YY_START==FindMembers)
2541 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2542 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2544 yyextra->current->protection = Protection::Public;
2546 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2548 yyextra->current->protection = Protection::Protected;
2550 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2552 yyextra->current->protection = Protection::Package;
2554 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2556 yyextra->current->protection = Protection::Private;
2558 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2560 if (YY_START==FindMembers)
2561 yyextra->current->name = yytext;
2563 yyextra->current->name += yytext;
2564 yyextra->current->isStatic =
TRUE;
2568 if (YY_START==FindMembers)
2569 yyextra->current->name = yytext;
2571 yyextra->current->name += yytext;
2572 if (yyextra->current->name.startsWith(
"static "))
2574 yyextra->current->isStatic =
TRUE;
2575 yyextra->current->name= yyextra->current->name.mid(7);
2577 else if (yyextra->current->name.startsWith(
"inline "))
2579 if (yyextra->current->type.isEmpty())
2581 yyextra->current->type=
"inline";
2585 yyextra->current->type+=
"inline ";
2587 yyextra->current->name= yyextra->current->name.mid(7);
2589 else if (yyextra->current->name.startsWith(
"constexpr "))
2591 if (yyextra->current->type.isEmpty())
2593 yyextra->current->type=
"constexpr";
2597 yyextra->current->type+=
"constexpr ";
2599 yyextra->current->name=yyextra->current->name.mid(10);
2601 else if (yyextra->current->name.startsWith(
"consteval "))
2603 if (yyextra->current->type.isEmpty())
2605 yyextra->current->type=
"consteval";
2609 yyextra->current->type+=
"consteval ";
2611 yyextra->current->name=yyextra->current->name.mid(10);
2613 else if (yyextra->current->name.startsWith(
"constinit "))
2615 if (yyextra->current->type.isEmpty())
2617 yyextra->current->type=
"constinit";
2621 yyextra->current->type+=
"constinit ";
2623 yyextra->current->name=yyextra->current->name.mid(10);
2625 else if (yyextra->current->name.startsWith(
"const "))
2627 if (yyextra->current->type.isEmpty())
2629 yyextra->current->type=
"const";
2633 yyextra->current->type+=
"const ";
2635 yyextra->current->name=yyextra->current->name.mid(6);
2637 else if (yyextra->current->name.startsWith(
"volatile "))
2639 if (yyextra->current->type.isEmpty())
2641 yyextra->current->type=
"volatile";
2645 yyextra->current->type+=
"volatile ";
2647 yyextra->current->name=yyextra->current->name.mid(9);
2649 else if (yyextra->current->name.startsWith(
"typedef "))
2651 if (yyextra->current->type.isEmpty())
2653 yyextra->current->type=
"typedef";
2657 yyextra->current->type+=
"typedef ";
2659 yyextra->current->name=yyextra->current->name.mid(8);
2669 yyextra->externLinkage=
FALSE;
2673 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2676 yyextra->lastSkipRoundContext = FindMembers;
2677 yyextra->roundCount=0;
2680<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2686 yyextra->current->type+=yytext;
2687 yyextra->lastRoundContext=FindMembers;
2688 yyextra->pCopyRoundString=&yyextra->current->type;
2689 yyextra->roundCount=0;
2692<DeclType>{BN}+ {
lineCount(yyscanner); }
2697<CSIndexer>"["[^\n\]]*"]" {
2701<FindMembers>[0-9]{ID} {
2704 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2706 yyextra->current->name+=
".";
2710 yyextra->current->name+=yytext;
2712<CppQuote>"("{B}*"\"" {
2713 yyextra->insideCppQuote=
TRUE;
2717<IDLUnionCase>":" { BEGIN(FindMembers); }
2718<IDLUnionCase>\n {
lineCount(yyscanner); }
2720<TryFunctionBlock>\n {
lineCount(yyscanner); }
2721<TryFunctionBlock>"{" {
2722 yyextra->curlyCount=0;
2723 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2727<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2729<TryFunctionBlockEnd>\n { unput(*yytext);
2730 BEGIN( FindMembers );
2732<TryFunctionBlockEnd>. { unput(*yytext);
2733 BEGIN( FindMembers );
2736 yyextra->insideCppQuote=
FALSE;
2739<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2741 yyextra->lastCPPContext = YY_START;
2744<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2745<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2746 if (yyextra->insidePHP)
2748 yyextra->current->bodyLine = yyextra->yyLineNr;
2749 yyextra->current->bodyColumn = yyextra->yyColNr;
2750 yyextra->current->fileName = yyextra->fileName;
2751 yyextra->current->startLine = yyextra->yyLineNr;
2752 yyextra->current->startColumn = yyextra->yyColNr;
2753 yyextra->current->type.clear();
2754 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2755 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2756 yyextra->current->section = EntryType::makeDefine();
2757 yyextra->lastDefineContext = YY_START;
2760<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2761 yyextra->yyLineNr = atoi(&yytext[1]);
2763 yyextra->lastPreLineCtrlContext = YY_START;
2764 if (YY_START==ReadBody ||
2765 YY_START==ReadNSBody ||
2766 YY_START==ReadBodyIntf)
2768 yyextra->current->program << yytext;
2770 BEGIN( PreLineCtrl );
2772<PreLineCtrl>"\""[^\n\"]*"\"" {
2774 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2775 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2776 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2778 yyextra->current->program << yytext;
2782 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2783 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2784 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2786 yyextra->current->program << yytext;
2790 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2791 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2792 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2794 yyextra->current->program << yytext;
2797 BEGIN( yyextra->lastPreLineCtrlContext );
2800<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2801<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2802 BEGIN( yyextra->lastCPPContext) ;
2804<SDefine>{ID}{B}*"(" {
2805 yyextra->current->name = yytext;
2806 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2807 yyextra->current->args =
"(";
2808 yyextra->current->bodyLine = yyextra->yyLineNr;
2809 yyextra->current->bodyColumn = yyextra->yyColNr;
2810 yyextra->currentArgumentContext = DefineEnd;
2811 yyextra->fullArgString=yyextra->current->args;
2812 yyextra->copyArgString=&yyextra->current->args;
2813 BEGIN( ReadFuncArgType ) ;
2828 yyextra->current->bodyLine = yyextra->yyLineNr;
2829 yyextra->current->bodyColumn = yyextra->yyColNr;
2830 yyextra->current->name = yytext;
2837 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2839 BEGIN(yyextra->lastDefineContext);
2843 yyextra->current->fileName = yyextra->fileName;
2844 yyextra->current->startLine = yyextra->yyLineNr;
2845 yyextra->current->startColumn = yyextra->yyColNr;
2846 yyextra->current->type.clear();
2847 yyextra->current->type =
"const";
2851 yyextra->current->initializer.str(
init.str());
2852 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2853 yyextra->current->section = EntryType::makeVariable();
2854 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2859<DefineEnd>\\[\r]?\n {
2861 yyextra->current->endBodyLine = yyextra->yyLineNr;
2864 if (yyextra->insideIDL && yyextra->insideCppQuote)
2870 yyextra->lastStringContext=DefineEnd;
2875<DefinePHP>{ID}["']{BN}*","{BN}* {
2876 yyextra->current->name = yytext;
2877 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2878 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2879 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2880 yyextra->current->bodyLine = yyextra->yyLineNr;
2881 yyextra->current->bodyColumn = yyextra->yyColNr;
2882 yyextra->lastRoundContext = DefinePHPEnd;
2883 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2884 yyextra->roundCount = 0;
2885 BEGIN( GCopyRound );
2889 if (yyextra->insideCli)
2892 yyextra->current->name = yytext ;
2900 yyextra->current->name += yytext ;
2903<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2904 if (yyextra->current->bodyLine==-1)
2906 yyextra->current->bodyLine=yyextra->yyLineNr;
2907 yyextra->current->bodyColumn = yyextra->yyColNr;
2909 yyextra->docBlockContext = YY_START;
2910 yyextra->docBlockInBody =
FALSE;
2911 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2916 yyextra->docBlock.str(indent.
str());
2920 yyextra->docBlockTerm =
';';
2921 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2923 yyextra->current->bitfields =
":"+yyextra->current->args;
2924 yyextra->current->args.clear();
2925 yyextra->current->section = EntryType::makeVariable();
2927 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)
2938<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2939 yyextra->docBlockContext = YY_START;
2940 yyextra->docBlockInBody =
FALSE;
2941 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2946 yyextra->docBlock.str(indent.
str());
2949 yyextra->docBlockTerm =
',';
2950 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2952 yyextra->current->bitfields =
":"+yyextra->current->args;
2953 yyextra->current->args.clear();
2954 yyextra->current->section = EntryType::makeVariable();
2956 if (yytext[yyleng-3]==
'/')
2967<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2968 if (yyextra->current->bodyLine==-1)
2970 yyextra->current->bodyLine=yyextra->yyLineNr;
2971 yyextra->current->bodyColumn = yyextra->yyColNr;
2973 yyextra->docBlockContext = YY_START;
2974 yyextra->docBlockInBody =
FALSE;
2975 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2979 yyextra->docBlock.str(indent.
str());
2982 yyextra->docBlockTerm = 0;
2983 if (yytext[yyleng-3]==
'/')
2995<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2997 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3000 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3005 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3011 if (yytext[2]==
'!' || yytext[2]==
'/')
3013 yyextra->docBlockContext = YY_START;
3014 yyextra->docBlockInBody =
FALSE;
3015 yyextra->docBlockAutoBrief =
FALSE;
3016 yyextra->docBlock.str(std::string());
3017 yyextra->docBlockTerm = 0;
3023 yyextra->lastCContext=YY_START;
3024 BEGIN(SkipCxxComment);
3029 if (yytext[2]==
'!' || yytext[2]==
'*')
3031 yyextra->docBlockContext = YY_START;
3032 yyextra->docBlockInBody =
FALSE;
3033 yyextra->docBlock.str(std::string());
3034 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3036 yyextra->docBlockTerm = 0;
3042 yyextra->lastCContext=YY_START;
3047<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3048 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3049 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3053 if (!yyextra->insideCS) REJECT;
3054 yyextra->current->bodyLine = yyextra->yyLineNr;
3055 yyextra->current->bodyColumn = yyextra->yyColNr;
3056 yyextra->current->initializer.str(yytext);
3057 yyextra->lastInitializerContext = YY_START;
3058 yyextra->sharpCount=0;
3059 yyextra->initBracketCount=0;
3060 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3061 yyextra->current->spec.setGettable(
true);
3062 BEGIN(ReadInitializerPtr);
3065 yyextra->current->bodyLine = yyextra->yyLineNr;
3066 yyextra->current->bodyColumn = yyextra->yyColNr;
3067 yyextra->current->initializer.str(yytext);
3068 yyextra->lastInitializerContext = YY_START;
3069 yyextra->sharpCount=0;
3070 yyextra->initBracketCount=0;
3071 BEGIN(ReadInitializer);
3073<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3075 yyextra->current->exception +=
" ";
3078<UNOIDLAttributeBlock>"}" {
3079 yyextra->current->exception +=
" }";
3083<ReadInitializer,ReadInitializerPtr>"(" {
3084 yyextra->lastRoundContext=YY_START;
3085 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3086 yyextra->roundCount=0;
3087 yyextra->current->initializer << *yytext;
3090<ReadInitializer,ReadInitializerPtr>"[" {
3091 if (!yyextra->insidePHP) REJECT;
3092 yyextra->lastSquareContext=YY_START;
3093 yyextra->pCopySquareGString=&yyextra->current->initializer;
3094 yyextra->squareCount=0;
3095 yyextra->current->initializer << *yytext;
3098<ReadInitializer,ReadInitializerPtr>"{" {
3099 yyextra->lastCurlyContext=YY_START;
3100 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3101 yyextra->curlyCount=0;
3102 yyextra->current->initializer << *yytext;
3105<ReadInitializer,ReadInitializerPtr>[;,] {
3107 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3109 yyextra->current->fileName = yyextra->fileName;
3110 yyextra->current->startLine = yyextra->yyLineNr;
3111 yyextra->current->startColumn = yyextra->yyColNr;
3112 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3113 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3114 yyextra->current->section = EntryType::makeVariable();
3115 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3119 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3122 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3123 BEGIN(yyextra->lastInitializerContext);
3125 else if (*yytext==
',' && yyextra->initBracketCount==0)
3128 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3129 BEGIN(yyextra->lastInitializerContext);
3133 yyextra->current->initializer << *yytext;
3136<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3137 if (!yyextra->insideCpp)
3143 yyextra->current->initializer << yytext;
3145 yyextra->lastRawStringContext = YY_START;
3146 yyextra->pCopyRawGString = &yyextra->current->initializer;
3151<RawGString>{RAWEND} {
3154 *yyextra->pCopyRawGString << yytext;
3155 BEGIN(yyextra->lastRawStringContext);
3162<RawGString>[^)\n]+ {
3163 *yyextra->pCopyRawGString << yytext;
3166 *yyextra->pCopyRawGString << yytext;
3169 *yyextra->pCopyRawGString << yytext;
3172<RawString>{RAWEND} {
3173 *yyextra->pCopyRawString+=yytext;
3174 yyextra->fullArgString+=yytext;
3177 BEGIN(yyextra->lastRawStringContext);
3181 *yyextra->pCopyRawString += yytext;
3182 yyextra->fullArgString+=yytext;
3185 *yyextra->pCopyRawString += yytext;
3186 yyextra->fullArgString+=yytext;
3189 *yyextra->pCopyRawString += yytext;
3190 yyextra->fullArgString+=yytext;
3193<ReadInitializer,ReadInitializerPtr>\" {
3194 if (yyextra->insideIDL && yyextra->insideCppQuote)
3200 yyextra->lastStringContext=YY_START;
3201 yyextra->current->initializer << yytext;
3202 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3203 yyextra->stopAtInvalidString=
false;
3207<ReadInitializer,ReadInitializerPtr>"->" {
3208 yyextra->current->initializer << yytext;
3210<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3211 yyextra->current->initializer << yytext;
3213<ReadInitializer,ReadInitializerPtr>(">>") {
3214 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3217 yyextra->initBracketCount-=2;
3218 yyextra->sharpCount-=2;
3220 yyextra->current->initializer << yytext;
3222<ReadInitializer,ReadInitializerPtr>(">=") {
3223 yyextra->current->initializer << yytext;
3225<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3226 yyextra->initBracketCount++;
3227 yyextra->sharpCount++;
3228 yyextra->current->initializer << *yytext;
3230<ReadInitializer,ReadInitializerPtr>[>\]})] {
3231 yyextra->initBracketCount--;
3232 yyextra->sharpCount--;
3235 yyextra->current->endBodyLine=yyextra->yyLineNr;
3237 yyextra->current->initializer << *yytext;
3239<ReadInitializer,ReadInitializerPtr>\' {
3240 if (yyextra->insidePHP)
3242 yyextra->current->initializer << yytext;
3243 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3244 yyextra->lastStringContext=YY_START;
3245 BEGIN(CopyPHPGString);
3249 yyextra->current->initializer << yytext;
3252<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3253 if (yyextra->insidePHP)
3259 yyextra->current->initializer << yytext;
3262<ReadInitializer,ReadInitializerPtr>\n {
3263 yyextra->current->initializer << *yytext;
3266<ReadInitializer,ReadInitializerPtr>"@\"" {
3268 yyextra->current->initializer << yytext;
3269 if (!yyextra->insideCS && !yyextra->insideObjC)
3276 yyextra->lastSkipVerbStringContext=YY_START;
3277 yyextra->pSkipVerbString=&yyextra->current->initializer;
3278 BEGIN(SkipVerbString);
3281<SkipVerbString>[^\n"\\]+ {
3282 *yyextra->pSkipVerbString << yytext;
3284<SkipVerbString>"\\\\" {
3285 if (yyextra->insideCS) REJECT
3286 *yyextra->pSkipVerbString << yytext;
3288<SkipVerbString>"\\\"" {
3289 if (yyextra->insideCS) REJECT
3290 *yyextra->pSkipVerbString << yytext;
3292<SkipVerbString>"\"\"" {
3293 *yyextra->pSkipVerbString << yytext;
3295<SkipVerbString>"\"" {
3296 *yyextra->pSkipVerbString << *yytext;
3297 BEGIN(yyextra->lastSkipVerbStringContext);
3300 *yyextra->pSkipVerbString << *yytext;
3304 *yyextra->pSkipVerbString << *yytext;
3306<ReadInitializer,ReadInitializerPtr>"?>" {
3307 if (yyextra->insidePHP)
3308 BEGIN( FindMembersPHP );
3310 yyextra->current->initializer << yytext;
3312<ReadInitializer,ReadInitializerPtr>. {
3313 yyextra->current->initializer << *yytext;
3317<CopyString,CopyPHPString>\\. {
3318 *yyextra->pCopyQuotedString+=yytext;
3321 *yyextra->pCopyQuotedString+=*yytext;
3322 BEGIN( yyextra->lastStringContext );
3325 *yyextra->pCopyQuotedString+=*yytext;
3326 BEGIN( yyextra->lastStringContext );
3328<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3329 *yyextra->pCopyQuotedString+=yytext;
3331<CopyString,CopyPHPString>\n {
3332 *yyextra->pCopyQuotedString+=*yytext;
3335<CopyString,CopyPHPString>. {
3336 *yyextra->pCopyQuotedString+=*yytext;
3340<CopyGString,CopyPHPGString>\\. {
3341 *yyextra->pCopyQuotedGString << yytext;
3344 *yyextra->pCopyQuotedGString << *yytext;
3345 BEGIN( yyextra->lastStringContext );
3348 *yyextra->pCopyQuotedGString << *yytext;
3349 BEGIN( yyextra->lastStringContext );
3351<CopyGString,CopyPHPGString>"<?php" {
3352 *yyextra->pCopyQuotedGString << yytext;
3353 BEGIN( yyextra->lastStringContext );
3355<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3356 *yyextra->pCopyQuotedGString << yytext;
3358<CopyGString,CopyPHPGString>\n {
3359 *yyextra->pCopyQuotedGString << *yytext;
3360 if (yyextra->stopAtInvalidString)
3362 BEGIN( yyextra->lastStringContext );
3369<CopyGString,CopyPHPGString>. {
3370 *yyextra->pCopyQuotedGString << *yytext;
3375 *yyextra->pCopyRoundString += *yytext;
3376 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3377 yyextra->lastStringContext=YY_START;
3381 *yyextra->pCopyRoundString += *yytext;
3382 yyextra->roundCount++;
3385 *yyextra->pCopyRoundString += *yytext;
3386 if (--yyextra->roundCount<0)
3387 BEGIN(yyextra->lastRoundContext);
3391 *yyextra->pCopyRoundString += *yytext;
3394 if (yyextra->insidePHP)
3396 yyextra->current->initializer << yytext;
3397 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3398 yyextra->lastStringContext=YY_START;
3399 BEGIN(CopyPHPString);
3403 *yyextra->pCopyRoundString += yytext;
3406<CopyRound>{CHARLIT} {
3407 if (yyextra->insidePHP)
3413 *yyextra->pCopyRoundString+=yytext;
3416<CopyRound>[^"'()\n,]+ {
3417 *yyextra->pCopyRoundString+=yytext;
3420 *yyextra->pCopyRoundString+=*yytext;
3425 *yyextra->pCopySharpString += *yytext;
3426 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3427 yyextra->lastStringContext=YY_START;
3431 *yyextra->pCopySharpString += *yytext;
3432 yyextra->sharpCount++;
3435 *yyextra->pCopySharpString += *yytext;
3436 if (--yyextra->sharpCount<0)
3438 BEGIN(yyextra->lastSharpContext);
3443 *yyextra->pCopySharpString += *yytext;
3446 if (yyextra->insidePHP)
3448 yyextra->current->initializer << yytext;
3449 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3450 yyextra->lastStringContext=YY_START;
3451 BEGIN(CopyPHPString);
3455 *yyextra->pCopySharpString += yytext;
3458<CopySharp>{CHARLIT} {
3459 if (yyextra->insidePHP)
3465 *yyextra->pCopySharpString+=yytext;
3468<CopySharp>[^"'<>\n,]+ {
3469 *yyextra->pCopySharpString+=yytext;
3472 *yyextra->pCopySharpString+=*yytext;
3478 *yyextra->pCopyRoundGString << *yytext;
3479 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3480 yyextra->lastStringContext=YY_START;
3484 *yyextra->pCopyRoundGString << *yytext;
3485 yyextra->roundCount++;
3488 *yyextra->pCopyRoundGString << *yytext;
3489 if (--yyextra->roundCount<0)
3490 BEGIN(yyextra->lastRoundContext);
3494 *yyextra->pCopyRoundGString << *yytext;
3497 if (yyextra->insidePHP)
3499 yyextra->current->initializer << yytext;
3500 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3501 yyextra->lastStringContext=YY_START;
3502 BEGIN(CopyPHPGString);
3506 *yyextra->pCopyRoundGString << yytext;
3509<GCopyRound>{CHARLIT} {
3510 if (yyextra->insidePHP)
3516 *yyextra->pCopyRoundGString << yytext;
3520 if (!yyextra->insideCS) REJECT;
3521 *yyextra->pCopyRoundGString << yytext;
3522 yyextra->lastSkipVerbStringContext=YY_START;
3523 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3524 BEGIN(SkipVerbString);
3526<GCopyRound>[^"'()\n\/,R]+ {
3527 *yyextra->pCopyRoundGString << yytext;
3529<GCopyRound>{RAWBEGIN} {
3530 *yyextra->pCopyRoundGString << yytext;
3532 yyextra->lastRawStringContext = YY_START;
3533 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3537 *yyextra->pCopyRoundGString << *yytext;
3542 *yyextra->pCopySquareGString << *yytext;
3543 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3544 yyextra->lastStringContext=YY_START;
3548 *yyextra->pCopySquareGString << *yytext;
3549 if (yyextra->insidePHP)
3551 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3552 yyextra->lastStringContext=YY_START;
3553 BEGIN(CopyPHPGString);
3557 *yyextra->pCopySquareGString << *yytext;
3558 yyextra->squareCount++;
3561 *yyextra->pCopySquareGString << *yytext;
3562 if (--yyextra->squareCount<0)
3563 BEGIN(yyextra->lastSquareContext);
3567 *yyextra->pCopySquareGString << *yytext;
3570 if (yyextra->insidePHP)
3572 yyextra->current->initializer << yytext;
3573 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3574 yyextra->lastStringContext=YY_START;
3575 BEGIN(CopyPHPGString);
3579 *yyextra->pCopySquareGString << yytext;
3582<GCopySquare>{CHARLIT} {
3583 if (yyextra->insidePHP)
3589 *yyextra->pCopySquareGString << yytext;
3592<GCopySquare>[^"'\[\]\n\/,]+ {
3593 *yyextra->pCopySquareGString << yytext;
3596 *yyextra->pCopySquareGString << *yytext;
3601 *yyextra->pCopyCurlyString += *yytext;
3602 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3603 yyextra->lastStringContext=YY_START;
3607 *yyextra->pCopyCurlyString += *yytext;
3608 if (yyextra->insidePHP)
3610 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3611 yyextra->lastStringContext=YY_START;
3612 BEGIN(CopyPHPString);
3616 *yyextra->pCopyCurlyString += *yytext;
3617 yyextra->curlyCount++;
3620 *yyextra->pCopyCurlyString += *yytext;
3621 if (--yyextra->curlyCount<0)
3622 BEGIN(yyextra->lastCurlyContext);
3624<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3630 *yyextra->pCopyCurlyString += yytext;
3633<CopyCurly>[^"'{}\/\n,]+ {
3634 *yyextra->pCopyCurlyString += yytext;
3636<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3639 *yyextra->pCopyCurlyString += *yytext;
3642 *yyextra->pCopyCurlyString += *yytext;
3646<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3648<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3650 int s = line.
find(
' ');
3651 int e = line.
find(
'"',s);
3652 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3653 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3660 *yyextra->pCopyCurlyGString << *yytext;
3661 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3662 yyextra->lastStringContext=YY_START;
3666 *yyextra->pCopyCurlyGString << *yytext;
3667 if (yyextra->insidePHP)
3669 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3670 yyextra->lastStringContext=YY_START;
3671 BEGIN(CopyPHPGString);
3675 *yyextra->pCopyCurlyGString << *yytext;
3676 yyextra->curlyCount++;
3679 *yyextra->pCopyCurlyGString << *yytext;
3680 if (--yyextra->curlyCount<0)
3682 yyextra->current->endBodyLine = yyextra->yyLineNr;
3683 BEGIN(yyextra->lastCurlyContext);
3686<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3692 *yyextra->pCopyCurlyGString << yytext;
3695<GCopyCurly>[^"'{}\/\n,]+ {
3696 *yyextra->pCopyCurlyGString << yytext;
3699 *yyextra->pCopyCurlyGString << yytext;
3701<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3704 *yyextra->pCopyCurlyGString << *yytext;
3707 *yyextra->pCopyCurlyGString << *yytext;
3714 if (yyextra->current->type.isEmpty() &&
3715 yyextra->current->name==
"enum")
3717 yyextra->current->section = EntryType::makeEnum();
3718 yyextra->current->name.clear();
3719 yyextra->current->args.clear();
3720 BEGIN(EnumBaseType);
3724 if (yyextra->current->type.isEmpty())
3727 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3730 yyextra->current->bitfields+=
":";
3734 yyextra->current->bitfields+=*yytext;
3737 yyextra->current->args+=*yytext;
3741 yyextra->current->args+=
' ';
3744 QCString oldType = yyextra->current->type;
3745 if (yyextra->current->bodyLine==-1)
3747 yyextra->current->bodyLine = yyextra->yyLineNr;
3748 yyextra->current->bodyColumn = yyextra->yyColNr;
3750 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3752 yyextra->current->type = yyextra->current->type.mid(3);
3754 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3756 yyextra->current->type.prepend(
"typedef ");
3758 bool isStatic = yyextra->current->isStatic;
3759 Protection prot = yyextra->current->protection;
3760 bool isConcept = yyextra->current->section.isConcept();
3761 bool isModule = yyextra->current->section.isModuleDoc();
3764 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3769 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3772 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3774 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3776 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3777 if (yyextra->current->section.isClass())
3781 yyextra->current->section = EntryType::makeVariable() ;
3782 yyextra->current->fileName = yyextra->fileName;
3783 yyextra->current->startLine = yyextra->yyBegLineNr;
3784 yyextra->current->startColumn = yyextra->yyBegColNr;
3785 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3788 if ( *yytext ==
',')
3790 yyextra->current->isStatic = isStatic;
3791 yyextra->current->protection = prot;
3792 yyextra->current->name.clear();
3793 yyextra->current->args.clear();
3794 yyextra->current->brief.clear();
3795 yyextra->current->doc.clear();
3796 yyextra->current->initializer.str(std::string());
3797 yyextra->current->bitfields.clear();
3802 yyextra->mtype = MethodTypes::Method;
3803 yyextra->virt = Specifier::Normal;
3804 yyextra->current->bodyLine = -1;
3805 yyextra->current->bodyColumn = 1;
3806 yyextra->current->groups.clear();
3812 if (yyextra->insideSlice)
3814 yyextra->squareCount=1;
3815 yyextra->lastSquareContext = YY_START;
3816 yyextra->current->metaData +=
"[";
3817 BEGIN( SliceMetadata );
3819 else if (!yyextra->insideCS &&
3820 (yyextra->current->name.isEmpty() ||
3821 yyextra->current->name==
"typedef"
3825 yyextra->squareCount=1;
3826 yyextra->lastSquareContext = YY_START;
3827 yyextra->idlAttr.clear();
3828 yyextra->idlProp.clear();
3829 yyextra->current->mtype = yyextra->mtype;
3832 yyextra->current->mtype == MethodTypes::Property)
3834 yyextra->odlProp =
true;
3835 yyextra->current->spec.setGettable(
true).setSettable(
true);
3838 BEGIN( IDLAttribute );
3840 else if (yyextra->insideCS &&
3841 yyextra->current->name.isEmpty())
3843 yyextra->squareCount=1;
3844 yyextra->lastSquareContext = YY_START;
3847 yyextra->current->args.clear();
3848 BEGIN( SkipSquare );
3852 yyextra->current->args += yytext ;
3853 yyextra->squareCount=1;
3854 yyextra->externLinkage=
FALSE;
3859 yyextra->squareCount++;
3860 yyextra->current->metaData +=
"[";
3862<SliceMetadata>{BN}* {
3865<SliceMetadata>\"[^\"]*\" {
3866 yyextra->current->metaData += yytext;
3869 yyextra->current->metaData += yytext;
3872 yyextra->current->metaData += yytext;
3873 if (--yyextra->squareCount<=0)
3875 BEGIN (yyextra->lastSquareContext);
3879 yyextra->current->type +=
"(";
3880 yyextra->roundCount++;
3882<SliceOptional>[0-9]+ {
3883 yyextra->current->type += yytext;
3886 yyextra->current->type +=
")";
3887 if(--yyextra->roundCount<=0)
3889 BEGIN (yyextra->lastModifierContext);
3894 if (--yyextra->squareCount<=0)
3897 if (yyextra->current->mtype == MethodTypes::Property)
3898 BEGIN( IDLPropName );
3900 BEGIN( yyextra->lastSquareContext );
3903<IDLAttribute>"propput" {
3906 yyextra->current->mtype = MethodTypes::Property;
3908 yyextra->current->spec.setSettable(
true);
3910<IDLAttribute>"propget" {
3913 yyextra->current->mtype = MethodTypes::Property;
3915 yyextra->current->spec.setGettable(
true);
3917<IDLAttribute>"property" {
3918 yyextra->current->spec.setProperty(
true);
3920<IDLAttribute>"attribute" {
3921 yyextra->current->spec.setAttribute(
true);
3923<IDLAttribute>"optional" {
3924 yyextra->current->spec.setOptional(
true);
3926<IDLAttribute>"readonly" {
3929 yyextra->current->spec.setSettable(
false);
3933 yyextra->current->spec.setReadonly(
true);
3936<IDLAttribute>"bound" {
3937 yyextra->current->spec.setBound(
true);
3939<IDLAttribute>"removable" {
3940 yyextra->current->spec.setRemovable(
true);
3942<IDLAttribute>"constrained" {
3943 yyextra->current->spec.setConstrained(
true);
3945<IDLAttribute>"transient" {
3946 yyextra->current->spec.setTransient(
true);
3948<IDLAttribute>"maybevoid" {
3949 yyextra->current->spec.setMaybeVoid(
true);
3951<IDLAttribute>"maybedefault" {
3952 yyextra->current->spec.setMaybeDefault(
true);
3954<IDLAttribute>"maybeambiguous" {
3955 yyextra->current->spec.setMaybeAmbiguous(
true);
3959<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3962 if (yyextra->odlProp)
3964 yyextra->idlProp = yytext;
3967<IDLPropName>{ID}{BN}*"(" {
3968 yyextra->current->name = yytext;
3969 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3970 yyextra->current->startLine = yyextra->yyLineNr;
3971 yyextra->current->startColumn = yyextra->yyColNr;
3974<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3975 if (yyextra->odlProp)
3977 yyextra->idlProp += yytext;
3980<IDLPropName>{ID}{BNopt}/";" {
3981 if (yyextra->odlProp)
3983 yyextra->current->name = yytext;
3984 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3985 yyextra->odlProp =
false;
3990<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3991 yyextra->idlAttr = yytext;
3992 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3995 yyextra->idlProp = yytext;
3997<IDLProp>{BN}*{ID}{BN}*"," {
3998 if (yyextra->current->args.isEmpty())
3999 yyextra->current->args =
"(";
4001 yyextra->current->args +=
", ";
4002 yyextra->current->args += yyextra->idlAttr;
4003 yyextra->current->args +=
" ";
4004 yyextra->current->args += yyextra->idlProp;
4005 yyextra->current->args +=
" ";
4006 yyextra->current->args += yytext;
4007 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4008 yyextra->idlProp.clear();
4009 yyextra->idlAttr.clear();
4012<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4016 yyextra->current->fileName = yyextra->fileName;
4017 yyextra->current->type = yyextra->idlProp;
4018 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4019 if (!yyextra->current->args.isEmpty())
4020 yyextra->current->args +=
")";
4021 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4022 yyextra->current->section = EntryType::makeVariable();
4023 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4025 BEGIN( FindMembers );
4030<Array>"]" { yyextra->current->args += *yytext ;
4031 if (--yyextra->squareCount<=0)
4032 BEGIN( FindMembers ) ;
4034<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4035 if (--yyextra->squareCount<=0)
4036 BEGIN( SFunction ) ;
4038<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4039 yyextra->squareCount++;
4041<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4042<SkipSquare>"[" { yyextra->squareCount++; }
4044 if (--yyextra->squareCount<=0)
4045 BEGIN( yyextra->lastSquareContext );
4048 yyextra->lastStringContext=YY_START;
4049 BEGIN( SkipString );
4051<SkipSquare>[^\n\[\]\"]+
4052<FindMembers>"<" {
addType(yyscanner);
4053 yyextra->current->type += yytext ;
4056<Sharp>">" { yyextra->current->type += *yytext ;
4057 if (--yyextra->sharpCount<=0)
4058 BEGIN( FindMembers ) ;
4060<Sharp>"<" { yyextra->current->type += *yytext ;
4061 yyextra->sharpCount++;
4064 yyextra->current->type +=
' ';
4067<Sharp>. { yyextra->current->type += *yytext ; }
4070 yyextra->current->bodyLine = yyextra->yyLineNr;
4071 yyextra->current->bodyColumn = yyextra->yyColNr;
4072 yyextra->current->name = yytext;
4077 yyextra->lastInitializerContext = YY_START;
4078 yyextra->sharpCount=0;
4079 yyextra->initBracketCount=0;
4080 yyextra->current->initializer.str(
"=");
4081 BEGIN(ReadInitializer);
4084 yyextra->lastInitializerContext = YY_START;
4085 yyextra->sharpCount=0;
4086 yyextra->initBracketCount=0;
4087 yyextra->current->initializer.str(yytext);
4088 BEGIN(ReadInitializer);
4091 if (yyextra->insideJava)
4093 if (!yyextra->current->name.isEmpty())
4095 yyextra->current->fileName = yyextra->fileName;
4096 yyextra->current->startLine = yyextra->yyLineNr;
4097 yyextra->current->startColumn = yyextra->yyColNr;
4098 if (!yyextra->current_root->spec.isEnum())
4100 yyextra->current->type =
"@";
4102 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4103 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4104 yyextra->current->section = EntryType::makeVariable();
4105 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4109 BEGIN( FindMembers );
4120 if (!yyextra->current->name.isEmpty())
4122 yyextra->current->fileName = yyextra->fileName;
4123 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4125 yyextra->current->startLine = yyextra->current->bodyLine;
4126 yyextra->current->startColumn = yyextra->current->bodyColumn;
4130 yyextra->current->startLine = yyextra->yyLineNr;
4131 yyextra->current->startColumn = yyextra->yyColNr;
4133 if (!yyextra->current_root->spec.isEnum())
4135 yyextra->current->type =
"@";
4137 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4138 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4139 yyextra->current->section = EntryType::makeVariable();
4141 if (!yyextra->insideCS && !yyextra->insideJava &&
4142 !yyextra->current_root->spec.isStrong())
4149 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4151 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4156 yyextra->current->reset();
4161 yyextra->squareCount=1;
4162 yyextra->lastSquareContext = YY_START;
4165<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4166<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4167<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4170 yyextra->current->program << yytext ;
4173<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4174 yyextra->current->program << yytext ;
4175 yyextra->pSkipInterpString = &yyextra->current->program;
4176 yyextra->lastSkipInterpStringContext=YY_START;
4177 BEGIN( SkipInterpString );
4179<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})* {
4180 *yyextra->pSkipInterpString << yytext;
4182<SkipInterpString>\" {
4183 *yyextra->pSkipInterpString << *yytext;
4184 BEGIN( yyextra->lastSkipInterpStringContext );
4187<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4188 yyextra->current->program << yytext ;
4189 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4190 yyextra->lastSkipInterpVerbStringContext=YY_START;
4191 BEGIN( SkipInterpVerbString );
4193<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4194 *yyextra->pSkipInterpVerbString << yytext;
4196<SkipInterpString>"{"[^}]*"}" {
4197 *yyextra->pSkipInterpString << yytext;
4199<SkipInterpVerbString>"{"[^}]*"}" {
4200 *yyextra->pSkipInterpVerbString << yytext;
4202<SkipInterpVerbString>\" {
4203 *yyextra->pSkipInterpVerbString << *yytext;
4204 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4206<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4207<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4208 yyextra->pSkipVerbString = &yyextra->current->program;
4209 yyextra->lastSkipVerbStringContext=YY_START;
4210 BEGIN( SkipVerbString );
4212<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4214 yyextra->current->program << yytext ;
4215 yyextra->pCopyHereDocGString = &yyextra->current->program;
4216 yyextra->lastHereDocContext=YY_START;
4217 BEGIN( CopyHereDoc );
4224<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4225 yyextra->current->program << yytext;
4227 yyextra->lastRawStringContext = YY_START;
4228 yyextra->pCopyRawGString = &yyextra->current->program;
4231<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4232 yyextra->pCopyQuotedGString = &yyextra->current->program;
4233 yyextra->lastStringContext=YY_START;
4234 yyextra->stopAtInvalidString=
false;
4235 BEGIN( CopyGString );
4237<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4238<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4239 yyextra->lastContext = YY_START ;
4242<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4243 ++yyextra->yyLineNr ;
4244 yyextra->lastContext = YY_START ;
4247<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4248 if (!yyextra->insidePHP)
4250 yyextra->current->program << yytext;
4254 yyextra->current->program << yytext;
4255 yyextra->pCopyQuotedGString = &yyextra->current->program;
4256 yyextra->lastStringContext=YY_START;
4257 BEGIN(CopyPHPGString);
4260<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4261 if (yyextra->insidePHP)
4268 yyextra->current->program << yytext;
4271<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4272 ++yyextra->curlyCount ;
4275 yyextra->current->program << yytext ;
4276 --yyextra->curlyCount ;
4278<ReadBody,ReadNSBody>"}" {
4279 if ( yyextra->curlyCount>0 )
4281 yyextra->current->program << yytext ;
4282 --yyextra->curlyCount ;
4286 yyextra->current->endBodyLine = yyextra->yyLineNr;
4287 std::shared_ptr<Entry> original_root = yyextra->current_root;
4288 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4292 QCString doc = yyextra->current->doc;
4293 int docLine = yyextra->current->docLine;
4294 QCString docFile = yyextra->current->docFile;
4295 QCString brief = yyextra->current->brief;
4296 int briefLine = yyextra->current->briefLine;
4297 QCString briefFile = yyextra->current->briefFile;
4299 yyextra->current->doc =
"";
4300 yyextra->current->docLine = 0;
4301 yyextra->current->docFile =
"";
4302 yyextra->current->brief =
"";
4303 yyextra->current->briefLine = 0;
4304 yyextra->current->briefFile =
"";
4305 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4307 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4308 yyextra->current->program.str(std::string());
4309 new_current->name = yyextra->current->name.mid(split_point + 2);
4310 yyextra->current->name = yyextra->current->name.left(split_point);
4311 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4313 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4314 yyextra->current_root = yyextra->current;
4315 yyextra->current = new_current;
4318 yyextra->current->doc = doc;
4319 yyextra->current->docLine = docLine;
4320 yyextra->current->docFile = docFile;
4321 yyextra->current->brief = brief;
4322 yyextra->current->briefLine = briefLine;
4323 yyextra->current->briefFile = briefFile;
4325 QCString &cn = yyextra->current->name;
4326 QCString rn = yyextra->current_root->name;
4332 if (yyextra->isTypedef && cn.
isEmpty())
4335 BEGIN( TypedefName );
4339 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4341 yyextra->current->program <<
',';
4346 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4347 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4349 if (yyextra->insideObjC &&
4350 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4353 BEGIN( ReadBodyIntf ) ;
4357 yyextra->memspecEntry = yyextra->current;
4358 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4359 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4360 if (yyextra->current->section.isNamespace() ||
4361 yyextra->current->spec.isInterface() ||
4362 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4363 yyextra->insideSlice
4366 yyextra->current->reset();
4367 yyextra->current_root = std::move(original_root);
4369 yyextra->memspecEntry.reset();
4370 BEGIN( FindMembers ) ;
4374 static const reg::Ex re(R
"(@\d+$)");
4375 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4376 !
reg::search(yyextra->memspecEntry->name.str(),re))
4379 yyextra->current->doc.clear();
4380 yyextra->current->brief.clear();
4382 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.
4388<ReadBody>"}"{BN}+"typedef"{BN}+ {
4390 if ( yyextra->curlyCount>0 )
4392 yyextra->current->program << yytext ;
4393 --yyextra->curlyCount ;
4397 yyextra->isTypedef =
TRUE;
4398 yyextra->current->endBodyLine = yyextra->yyLineNr;
4399 QCString &cn = yyextra->current->name;
4400 QCString rn = yyextra->current_root->name;
4405 BEGIN( TypedefName );
4408<TypedefName>("const"|"volatile"){BN} {
4410 yyextra->current->type.prepend(yytext);
4413 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4415 yyextra->current->program <<
",";
4417 yyextra->current->name=yytext;
4419 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4420 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4422 if (!yyextra->firstTypedefEntry)
4424 yyextra->firstTypedefEntry = yyextra->current;
4426 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4428 yyextra->isTypedef=
TRUE;
4429 BEGIN(MemberSpecSkip);
4433 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4435 yyextra->current->program <<
',';
4438 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4439 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4440 yyextra->memspecEntry = yyextra->current;
4441 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4444 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4446<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4448 int i=0,l=(int)yyleng,j;
4449 while (i<l && (!
isId(yytext[i]))) i++;
4451 j=yyextra->msName.
find(
"[");
4454 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4455 yyextra->msName=yyextra->msName.left(j);
4460 if (yyextra->firstTypedefEntry)
4462 if (yyextra->firstTypedefEntry->spec.isStruct())
4464 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4466 else if (yyextra->firstTypedefEntry->spec.isUnion())
4468 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4470 else if (yyextra->firstTypedefEntry->section.isEnum())
4472 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4476 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4482 yyextra->current->name = yyextra->msName;
4488 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4494 const Entry *p=yyextra->current.get();
4502 int pi = (i==-1) ? 0 : i+2;
4512 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4516 if (!yyextra->msName.isEmpty()
4522 if (typedefHidesStruct &&
4523 yyextra->isTypedef &&
4524 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4525 yyextra->msType.stripWhiteSpace().isEmpty() &&
4526 yyextra->memspecEntry)
4528 yyextra->memspecEntry->name=yyextra->msName;
4532 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4533 varEntry->lang = yyextra->language;
4534 varEntry->protection = yyextra->current->protection ;
4535 varEntry->mtype = yyextra->current->mtype;
4536 varEntry->virt = yyextra->current->virt;
4537 varEntry->isStatic = yyextra->current->isStatic;
4538 varEntry->section = EntryType::makeVariable();
4539 varEntry->name = yyextra->msName.stripWhiteSpace();
4540 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4541 varEntry->args = yyextra->msArgs;
4542 if (yyextra->isTypedef)
4544 varEntry->type.prepend(
"typedef ");
4547 if (typedefHidesStruct &&
4548 yyextra->isTypedef &&
4549 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4550 yyextra->memspecEntry
4553 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4557 varEntry->type+=yyextra->current->name+yyextra->msType;
4559 varEntry->fileName = yyextra->fileName;
4560 varEntry->startLine = yyextra->yyLineNr;
4561 varEntry->startColumn = yyextra->yyColNr;
4562 varEntry->doc = yyextra->current->doc;
4563 varEntry->brief = yyextra->current->brief;
4564 varEntry->mGrpId = yyextra->current->mGrpId;
4565 varEntry->initializer.str(yyextra->current->initializer.str());
4566 varEntry->groups = yyextra->current->groups;
4567 varEntry->sli = yyextra->current->sli;
4572 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4577 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4579 if (!yyextra->current->doc.isEmpty())
4581 yyextra->memspecEntry->doc += yyextra->current->doc;
4583 if (!yyextra->current->brief.isEmpty())
4585 yyextra->memspecEntry->brief += yyextra->current->brief;
4588 yyextra->msType.clear();
4589 yyextra->msName.clear();
4590 yyextra->msArgs.clear();
4591 yyextra->isTypedef=
FALSE;
4592 yyextra->firstTypedefEntry.reset();
4593 yyextra->memspecEntry.reset();
4594 yyextra->current->reset();
4596 BEGIN( FindMembers );
4600 yyextra->current->doc.clear();
4601 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
4606 yyextra->lastInitializerContext=YY_START;
4607 yyextra->sharpCount=0;
4608 yyextra->initBracketCount=0;
4609 yyextra->current->initializer.str(yytext);
4610 BEGIN(ReadInitializer);
4621<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4622<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4623<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4626<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4627 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4629 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4630 yyextra->insideObjC=
FALSE;
4631 BEGIN( FindMembers );
4633<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4634<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4636<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4637<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4638 if (yyextra->insidePHP)
4644 yyextra->current->bodyLine = yyextra->yyLineNr;
4645 yyextra->current->bodyColumn = yyextra->yyColNr;
4648 yyextra->funcPtrType=yytext;
4649 yyextra->roundCount=0;
4654<FuncPtr>{SCOPENAME} {
4655 yyextra->current->name = yytext;
4658 BEGIN( FuncPtrOperator );
4662 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4664 yyextra->funcPtrType += yyextra->current->name;
4668 BEGIN( EndFuncPtr );
4675<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4676 yyextra->current->name += yytext;
4677 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4680<FuncPtrOperator>\n {
4682 yyextra->current->name += *yytext;
4684<FuncPtrOperator>"(" {
4686 BEGIN( EndFuncPtr );
4689 yyextra->current->name += *yytext;
4691<EndFuncPtr>")"{BNopt}/";" {
4693 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4696<EndFuncPtr>")"{BNopt}/"(" {
4698 if (yyextra->funcPtrType!=
"(")
4700 yyextra->current->type+=yyextra->funcPtrType+
")";
4704<EndFuncPtr>")"{BNopt}/"[" {
4706 yyextra->current->type+=yyextra->funcPtrType;
4707 yyextra->current->args +=
")";
4712 yyextra->current->args += *yytext ;
4715 yyextra->current->bodyLine = yyextra->yyLineNr;
4716 yyextra->current->bodyColumn = yyextra->yyColNr;
4717 yyextra->currentArgumentContext = FuncFuncEnd;
4718 yyextra->fullArgString=yyextra->current->args;
4719 yyextra->copyArgString=&yyextra->current->args;
4720 BEGIN( ReadFuncArgType ) ;
4722<EndFuncPtr>"["[^\n\]]*"]" {
4723 yyextra->funcPtrType+=yytext;
4729 yyextra->current->args += *yytext ;
4730 ++yyextra->roundCount;
4733 yyextra->current->args += *yytext ;
4734 if ( yyextra->roundCount )
4735 --yyextra->roundCount;
4741<FuncFuncEnd>")"{BN}*"(" {
4743 yyextra->current->type+=yyextra->funcPtrType+
")(";
4744 BEGIN(FuncFuncType);
4746<FuncFuncEnd>")"{BNopt}/[;{] {
4748 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4751<FuncFuncEnd>")"{BNopt}/"[" {
4753 yyextra->current->type+=yyextra->funcPtrType;
4754 yyextra->current->args+=
")";
4755 BEGIN(FuncFuncArray);
4758 yyextra->current->args += *yytext;
4761 yyextra->current->type += *yytext;
4762 yyextra->roundCount++;
4765 yyextra->current->type += *yytext;
4766 if (yyextra->roundCount)
4767 --yyextra->roundCount;
4771<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4772<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4774 yyextra->current->type += *yytext;
4776<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4777 if (yyextra->current->type.startsWith(
"typedef") &&
4778 yyextra->current->bodyLine==-1)
4781 yyextra->current->bodyLine = yyextra->yyLineNr;
4782 yyextra->current->bodyColumn = yyextra->yyColNr;
4783 BEGIN( GetCallType );
4785 else if (!yyextra->current->name.isEmpty())
4787 yyextra->current->args = yytext;
4788 yyextra->current->bodyLine = yyextra->yyLineNr;
4789 yyextra->current->bodyColumn = yyextra->yyColNr;
4790 yyextra->currentArgumentContext = FuncQual;
4791 yyextra->fullArgString=yyextra->current->args;
4792 yyextra->copyArgString=&yyextra->current->args;
4793 BEGIN( ReadFuncArgType ) ;
4797<GetCallType>{BN}*{ID}{BN}*"*" {
4800 yyextra->funcPtrType=
"(";
4801 yyextra->funcPtrType+=yytext;
4802 yyextra->roundCount=0;
4806 if (!yyextra->current->name.isEmpty())
4808 yyextra->current->args = yytext;
4809 yyextra->current->bodyLine = yyextra->yyLineNr;
4810 yyextra->current->bodyColumn = yyextra->yyColNr;
4811 yyextra->currentArgumentContext = FuncQual;
4812 yyextra->fullArgString=yyextra->current->args;
4813 yyextra->copyArgString=&yyextra->current->args;
4814 BEGIN( ReadFuncArgType ) ;
4828<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4829 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4830 else yyextra->fullArgString+=yytext;
4832<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4833 yyextra->fullArgString+=yytext;
4835<CopyArgRound>[^\/\n\)\(\"\']+ {
4836 *yyextra->copyArgString+=yytext;
4837 yyextra->fullArgString+=yytext;
4839<CopyArgSquare>[^\/\n\]\[\"\']+ {
4840 *yyextra->copyArgString+=yytext;
4841 yyextra->fullArgString+=yytext;
4843<ReadFuncArgType,ReadTempArgs>{BN}* {
4844 *yyextra->copyArgString+=
" ";
4845 yyextra->fullArgString+=
" ";
4848<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4850 yyextra->lastRawStringContext = YY_START;
4851 yyextra->pCopyRawString = yyextra->copyArgString;
4852 *yyextra->pCopyRawString+=yytext;
4853 yyextra->fullArgString+=yytext;
4856<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4857 *yyextra->copyArgString+=*yytext;
4858 yyextra->fullArgString+=*yytext;
4859 yyextra->lastCopyArgStringContext = YY_START;
4860 BEGIN( CopyArgString );
4862<ReadFuncArgType>"[" {
4863 if (!yyextra->insidePHP) REJECT;
4864 *yyextra->copyArgString+=*yytext;
4865 yyextra->fullArgString+=*yytext;
4866 yyextra->argSquareCount=0;
4867 yyextra->lastCopyArgContext = YY_START;
4868 BEGIN( CopyArgSquare );
4870<ReadFuncArgType,ReadTempArgs>"(" {
4871 *yyextra->copyArgString+=*yytext;
4872 yyextra->fullArgString+=*yytext;
4873 yyextra->argRoundCount=0;
4874 yyextra->lastCopyArgContext = YY_START;
4875 BEGIN( CopyArgRound );
4877<ReadFuncArgType>")" {
4878 *yyextra->copyArgString+=*yytext;
4879 yyextra->fullArgString+=*yytext;
4881 if (yyextra->insideJS)
4892 yyextra->docBackup = yyextra->current->doc;
4893 yyextra->briefBackup = yyextra->current->brief;
4895 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4898<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4899 if (yyextra->currentArgumentContext==DefineEnd)
4903 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4909 BEGIN( yyextra->currentArgumentContext );
4915 yyextra->fullArgString+=yytext;
4916 yyextra->lastCopyArgChar=0;
4917 yyextra->lastCommentInArgContext=YY_START;
4919 BEGIN( CopyArgCommentLine );
4921 BEGIN( CopyArgComment );
4925<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4926<ReadFuncArgType,ReadTempArgs>{CCS} {
4927 yyextra->lastCContext = YY_START;
4928 BEGIN( SkipComment );
4930<ReadFuncArgType,ReadTempArgs>{CPPC} {
4931 yyextra->lastCContext = YY_START;
4932 BEGIN( SkipCxxComment );
4948<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4950 if (yyextra->currentArgumentContext==DefineEnd)
4954 int i;
for (i=(
int)yyleng-1;i>0;i--)
4958 *yyextra->copyArgString+=*yytext;
4959 yyextra->fullArgString+=*yytext;
4962 BEGIN( yyextra->currentArgumentContext );
4968 yyextra->lastCopyArgChar=*yytext;
4971 yyextra->lastCommentInArgContext=YY_START;
4972 yyextra->fullArgString+=text;
4973 if (text.
find(
"//")!=-1)
4974 BEGIN( CopyArgCommentLine );
4976 BEGIN( CopyArgComment );
4979<CopyArgComment>^{B}*"*"+/{BN}+
4980<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4981<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4982 if (yyextra->lastCopyArgChar!=0)
4983 unput(yyextra->lastCopyArgChar);
4984 BEGIN( yyextra->lastCommentInArgContext );
4986<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4988 if (yyextra->lastCopyArgChar!=0)
4989 unput(yyextra->lastCopyArgChar);
4990 BEGIN( yyextra->lastCommentInArgContext );
4992<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4993 yyextra->docBlockName=
"uml";
4994 yyextra->fullArgString+=yytext;
4995 BEGIN(CopyArgVerbatim);
4997<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4998 yyextra->docBlockName=&yytext[1];
4999 yyextra->fullArgString+=yytext;
5000 BEGIN(CopyArgVerbatim);
5002<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5003 yyextra->docBlockName=&yytext[1];
5004 if (yyextra->docBlockName.at(1)==
'[')
5006 yyextra->docBlockName.at(1)=
']';
5008 if (yyextra->docBlockName.at(1)==
'{')
5010 yyextra->docBlockName.at(1)=
'}';
5012 if (yyextra->docBlockName.at(1)==
'(')
5014 yyextra->docBlockName.at(1)=
')';
5016 yyextra->fullArgString+=yytext;
5017 BEGIN(CopyArgVerbatim);
5019<CopyArgVerbatim>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5020 yyextra->fullArgString+=yytext;
5021 if (&yytext[4]==yyextra->docBlockName)
5023 yyextra->docBlockName=
"";
5024 BEGIN(CopyArgCommentLine);
5027<CopyArgVerbatim>[\\@]("f$"|"f]"|"f}"|"f)") {
5028 yyextra->fullArgString+=yytext;
5029 if (yyextra->docBlockName==&yytext[1])
5031 yyextra->docBlockName=
"";
5032 BEGIN(CopyArgCommentLine);
5035<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5036<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5037<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5038<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5039<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5040 warn(yyextra->fileName,yyextra->yyLineNr,
5041 "Ignoring {:c}brief command inside argument documentation",*yytext
5043 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5046 *yyextra->copyArgString+=*yytext;
5047 yyextra->fullArgString+=*yytext;
5048 yyextra->argSharpCount=1;
5049 BEGIN( CopyArgSharp );
5052 *yyextra->copyArgString+=*yytext;
5053 yyextra->fullArgString+=*yytext;
5055 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5057 BEGIN( yyextra->currentArgumentContext );
5060 yyextra->argRoundCount++;
5061 *yyextra->copyArgString+=*yytext;
5062 yyextra->fullArgString+=*yytext;
5065 *yyextra->copyArgString+=*yytext;
5066 yyextra->fullArgString+=*yytext;
5067 if (yyextra->argRoundCount>0)
5068 yyextra->argRoundCount--;
5070 BEGIN( yyextra->lastCopyArgContext );
5073 yyextra->argSquareCount++;
5074 *yyextra->copyArgString+=*yytext;
5075 yyextra->fullArgString+=*yytext;
5078 *yyextra->copyArgString+=*yytext;
5079 yyextra->fullArgString+=*yytext;
5080 if (yyextra->argSquareCount>0)
5081 yyextra->argSquareCount--;
5083 BEGIN( yyextra->lastCopyArgContext );
5086 *yyextra->copyArgString+=*yytext;
5087 yyextra->fullArgString+=*yytext;
5088 yyextra->argRoundCount=0;
5089 yyextra->lastCopyArgContext = YY_START;
5090 BEGIN( CopyArgRound );
5093 yyextra->argSharpCount++;
5095 *yyextra->copyArgString+=*yytext;
5096 yyextra->fullArgString+=*yytext;
5099 *yyextra->copyArgString+=*yytext;
5100 yyextra->fullArgString+=*yytext;
5101 yyextra->argSharpCount--;
5102 if (yyextra->argSharpCount>0)
5108 BEGIN( ReadTempArgs );
5112<CopyArgString,CopyArgPHPString>\\. {
5113 *yyextra->copyArgString+=yytext;
5114 yyextra->fullArgString+=yytext;
5117 *yyextra->copyArgString+=*yytext;
5118 yyextra->fullArgString+=*yytext;
5119 BEGIN( yyextra->lastCopyArgStringContext );
5121<CopyArgPHPString>\' {
5122 *yyextra->copyArgString+=*yytext;
5123 yyextra->fullArgString+=*yytext;
5124 BEGIN( yyextra->lastCopyArgStringContext );
5126<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5127 if (yyextra->insidePHP)
5133 *yyextra->copyArgString+=yytext;
5134 yyextra->fullArgString+=yytext;
5137<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5138 *yyextra->copyArgString+=yytext;
5139 yyextra->fullArgString+=yytext;
5140 if (yyextra->insidePHP)
5142 yyextra->lastCopyArgStringContext=YY_START;
5143 BEGIN(CopyArgPHPString);
5146<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5147 *yyextra->copyArgString+=yytext;
5148 yyextra->fullArgString+=yytext;
5150<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5152 *yyextra->copyArgString+=*yytext;
5153 yyextra->fullArgString+=*yytext;
5155<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5156 *yyextra->copyArgString+=yytext;
5157 yyextra->fullArgString+=yytext;
5159<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5160 *yyextra->copyArgString+=*yytext;
5161 yyextra->fullArgString+=*yytext;
5169<FuncRound>"(" { yyextra->current->args += *yytext ;
5170 ++yyextra->roundCount ;
5172<FuncRound>")" { yyextra->current->args += *yytext ;
5173 if ( yyextra->roundCount )
5174 --yyextra->roundCount ;
5186 if (
qstrcmp(yytext,
";")==0 &&
5187 ((yyextra->insideJS || yyextra->insidePHP) &&
5190 yyextra->current->reset();
5192 BEGIN( FindMembers );
5196 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5199<FuncQual>{BN}*"abstract"{BN}* {
5201 yyextra->current->virt = Specifier::Pure;
5202 yyextra->current->args +=
" override ";
5204<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5206 yyextra->current->spec.setOverride(
true);
5207 yyextra->current->args +=
" override ";
5210<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5212 yyextra->current->spec.setFinal(
true);
5213 yyextra->current->args +=
" final ";
5216<FuncQual>{BN}*"sealed"{BN}* {
5218 yyextra->current->spec.setSealed(
true);
5219 yyextra->current->args +=
" sealed ";
5221<FuncQual>{BN}*"new"{BN}* {
5223 yyextra->current->spec.setNew(
true);
5224 yyextra->current->args +=
" new ";
5226<FuncQual>{BN}*"const"{BN}* {
5228 yyextra->current->args +=
" const ";
5229 yyextra->current->argList.setConstSpecifier(
TRUE);
5231<FuncQual>{BN}*"volatile"{BN}* {
5233 yyextra->current->args +=
" volatile ";
5234 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5236<FuncQual>{BN}*"noexcept"{BN}* {
5238 yyextra->current->args +=
" noexcept ";
5239 yyextra->current->spec.setNoExcept(
true);
5241<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5243 yyextra->current->args +=
" noexcept(false)";
5245<FuncQual>{BN}*"noexcept"{BN}*"(" {
5247 yyextra->current->args +=
" noexcept(";
5248 yyextra->current->spec.setNoExcept(
true);
5249 yyextra->lastRoundContext=FuncQual;
5250 yyextra->pCopyRoundString=&yyextra->current->args;
5251 yyextra->roundCount=0;
5255 yyextra->current->args +=
" &";
5258<FuncQual>{BN}*"&&" {
5259 yyextra->current->args +=
" &&";
5263<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5265 yyextra->current->args +=
" = 0";
5266 yyextra->current->virt = Specifier::Pure;
5267 yyextra->current->argList.setPureSpecifier(
TRUE);
5270<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5272 yyextra->current->args +=
" = delete";
5273 yyextra->current->spec.setDelete(
true);
5274 yyextra->current->argList.setIsDeleted(
TRUE);
5277<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5279 yyextra->current->args +=
" = default";
5280 yyextra->current->spec.setDefault(
true);
5283<FuncQual>{BN}*"->"{BN}* {
5285 yyextra->current->argList.setTrailingReturnType(
" -> ");
5286 yyextra->current->args +=
" -> ";
5287 yyextra->roundCount=0;
5288 BEGIN(TrailingReturn);
5290<TrailingReturn>[{;] {
5291 if (yyextra->roundCount>0) REJECT;
5295<TrailingReturn>"requires"{BN}+ {
5296 if (yyextra->insideJava) REJECT;
5297 yyextra->requiresContext = FuncQual;
5298 yyextra->current->req+=
' ';
5299 BEGIN(RequiresClause);
5301<TrailingReturn>"(" {
5302 yyextra->roundCount++;
5303 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5304 yyextra->current->args+=yytext;
5306<TrailingReturn>")" {
5307 if (yyextra->roundCount>0)
5309 yyextra->roundCount--;
5313 warn(yyextra->fileName,yyextra->yyLineNr,
5314 "Found ')' without opening '(' for trailing return type '{})...'",
5315 yyextra->current->argList.trailingReturnType());
5317 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5318 yyextra->current->args+=yytext;
5321 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5322 yyextra->current->args+=yytext;
5326 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5327 yyextra->current->args+=
' ';
5329<FuncRound,FuncFunc>{BN}*","{BN}* {
5331 yyextra->current->args +=
", " ;
5333<FuncQual,FuncRound,FuncFunc>{BN}+ {
5335 yyextra->current->args +=
' ' ;
5337<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5339 yyextra->lastCPPContext = YY_START;
5343 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5350 yyextra->lastInitializerContext=YY_START;
5351 yyextra->sharpCount=0;
5352 yyextra->initBracketCount=0;
5353 yyextra->current->initializer.str(yytext);
5354 BEGIN(ReadInitializer);
5369 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5372 yyextra->requiresContext = YY_START;
5373 yyextra->current->req+=
' ';
5374 BEGIN(RequiresClause);
5376 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5379 yyextra->current->typeConstr.clear();
5380 yyextra->current->typeConstr.push_back(
Argument());
5381 yyextra->lastCSConstraint = YY_START;
5382 BEGIN( CSConstraintName );
5386 yyextra->current->args = yytext;
5387 yyextra->oldStyleArgType.clear();
5388 BEGIN(OldStyleArgs);
5392 yyextra->current->args += yytext;
5398 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5400 if (yyextra->current->doc!=yyextra->docBackup)
5402 doc=yyextra->current->doc;
5403 yyextra->current->doc=yyextra->docBackup;
5405 if (yyextra->current->brief!=yyextra->briefBackup)
5407 brief=yyextra->current->brief;
5408 yyextra->current->brief=yyextra->briefBackup;
5410 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5411 oldStyleArgName,brief,doc);
5412 yyextra->current->args.clear();
5413 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5415<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5417 if (yyextra->current->argList.empty())
5419 yyextra->current->argList.setNoParameters(
TRUE);
5425<OldStyleArgs>. { yyextra->current->args += *yytext; }
5426<FuncQual,FuncRound,FuncFunc>\" {
5427 if (yyextra->insideIDL && yyextra->insideCppQuote)
5433 yyextra->current->args += *yytext;
5436<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5437<FuncQual>{BN}*"try:" |
5438<FuncQual>{BN}*"try"{BN}+ {
5439 yyextra->insideTryBlock=
TRUE;
5441 if (yytext[yyleng-1]==
':')
5447<FuncQual>{BN}*"throw"{BN}*"(" {
5448 yyextra->current->exception =
" throw (" ;
5449 yyextra->roundCount=0;
5451 BEGIN( ExcpRound ) ;
5453<FuncQual>{BN}*"raises"{BN}*"(" {
5454 yyextra->current->exception =
" raises (" ;
5456 yyextra->roundCount=0;
5457 BEGIN( ExcpRound ) ;
5459<FuncQual>{BN}*"throws"{BN}+ {
5460 yyextra->current->exception =
" throws " ;
5464<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5465 ++yyextra->roundCount ;
5467<ExcpRound>")" { yyextra->current->exception += *yytext ;
5468 if ( yyextra->roundCount )
5469 --yyextra->roundCount ;
5474 yyextra->current->exception += *yytext;
5477 unput(
'{'); BEGIN( FuncQual );
5480 unput(
';'); BEGIN( FuncQual );
5483 yyextra->current->exception +=
' ';
5487 yyextra->current->exception += *yytext;
5489<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5490 yyextra->current->name = yyextra->current->args ;
5491 yyextra->current->args = yytext ;
5492 yyextra->roundCount=0;
5493 BEGIN( FuncRound ) ;
5496 if (!yyextra->insidePHP) BEGIN(SkipInits);
5502 yyextra->current->fileName = yyextra->fileName;
5503 yyextra->current->startLine = yyextra->yyBegLineNr;
5504 yyextra->current->startColumn = yyextra->yyBegColNr;
5505 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5507 std::string type = yyextra->current->type.str();
5511 ti = (int)
match.position();
5515 int di = yyextra->current->type.find(
"decltype(");
5516 if (di!=-1 && di<ti)
5521 int ts=yyextra->current->type.find(
'<');
5522 int te=yyextra->current->type.findRev(
'>');
5525 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5526 bool isFunction = ti==-1 ||
5527 (ts!=-1 && ts<te && ts<ti && ti<te);
5528 bool isVariable = !yyextra->current->type.isEmpty() &&
5529 (!isFunction || startsWithTypedef);
5534 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5539 if (yyextra->isTypedef && !startsWithTypedef)
5541 yyextra->current->type.prepend(
"typedef ");
5543 yyextra->current->section = EntryType::makeVariable() ;
5548 yyextra->current->section = EntryType::makeFunction() ;
5549 yyextra->current->proto = *yytext==
';';
5557 if (yyextra->isTypedef && !startsWithTypedef)
5559 yyextra->current->type.prepend(
"typedef ");
5562 yyextra->current->section = EntryType::makeVariable();
5567 yyextra->current->section = EntryType::makeFunction();
5568 yyextra->current->proto =
TRUE;
5572 if ( yyextra->insidePHP)
5576 yyextra->current->spec.setFinal(
true);
5580 yyextra->current->spec.setAbstract(
true);
5583 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5586 if ( *yytext ==
'{' )
5588 yyextra->lastCurlyContext = FindMembers;
5589 yyextra->curlyCount=0;
5594 BEGIN( FindMembers );
5599 if ( yyextra->insidePHP)
5603 yyextra->previous = yyextra->current;
5604 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5607 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5609 yyextra->current->spec.setOptional(
true).setRequired(
true);
5611 yyextra->lastCurlyContext = FindMembers;
5612 if ( *yytext ==
',' )
5614 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5616 if ( *yytext ==
'{' )
5618 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5620 yyextra->previous->spec.setInline(
true);
5623 yyextra->curlyCount=0;
5624 BEGIN( SkipCurly ) ;
5628 if (!yyextra->previous->section.isVariable())
5629 yyextra->previous->bodyLine=-1;
5630 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...
5634<SkipInits>">"{BN}*"{" {
5636 yyextra->curlyCount=1;
5637 BEGIN(SkipC11Inits);
5639<SkipInits>{ID}{BN}*"{" {
5641 yyextra->curlyCount=1;
5642 BEGIN(SkipC11Inits);
5645 ++yyextra->curlyCount;
5648 if ( --yyextra->curlyCount<=0 )
5653<SkipC11Attribute>"]]" {
5654 BEGIN(yyextra->lastC11AttributeContext);
5662 ++yyextra->curlyCount ;
5664<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5667 if( yyextra->curlyCount )
5669 --yyextra->curlyCount ;
5673 if (!yyextra->current->sli.empty() && yyextra->previous)
5675 yyextra->previous->sli = yyextra->current->sli;
5676 yyextra->current->sli.clear();
5678 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5679 BEGIN( yyextra->lastCurlyContext ) ;
5682<SkipCurly>"}"{BN}*{DCOMM}"<" {
5684 if ( yyextra->curlyCount )
5687 --yyextra->curlyCount ;
5691 yyextra->current->endBodyLine=yyextra->yyLineNr;
5692 yyextra->tempEntry = yyextra->current;
5693 yyextra->current = yyextra->previous;
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]==
'/')
5713<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5714 yyextra->docBlockContext = SkipCurlyEndDoc;
5715 yyextra->docBlockInBody =
FALSE;
5716 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5718 yyextra->docBlock.str(std::string());
5719 yyextra->docBlockTerm =
'}';
5720 if (yytext[yyleng-3]==
'/')
5731<SkipCurlyEndDoc>"}" {
5733 if (yyextra->tempEntry)
5735 yyextra->current = yyextra->tempEntry;
5736 yyextra->tempEntry.reset();
5738 BEGIN( yyextra->lastCurlyContext );
5742 yyextra->lastStringContext=SkipCurly;
5743 BEGIN( SkipString );
5745<SkipCurly>^{B}*"#" {
5746 if (yyextra->insidePHP)
5749 BEGIN( SkipCurlyCpp );
5751<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5755<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5756 if (!yyextra->insidePHP)
5762 yyextra->lastHereDocContext = YY_START;
5766<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5768 yyextra->lastRawStringContext = YY_START;
5769 yyextra->dummyRawString.clear();
5770 yyextra->pCopyRawString = &yyextra->dummyRawString;
5771 *yyextra->pCopyRawString += yytext;
5774<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<\$]+ {
5778<SkipCurly,SkipCurlyCpp>"\$" {}
5782 yyextra->lastCurlyContext = FindMembers;
5785<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5789<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5791 yyextra->lastCContext = YY_START;
5794<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5796 yyextra->lastCContext = YY_START;
5797 BEGIN(SkipCxxComment);
5799<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5800 yyextra->roundCount=0;
5801 yyextra->lastSkipRoundContext=YY_START;
5804<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5805 yyextra->lastStringContext=YY_START;
5806 BEGIN( SkipString );
5809 warn(yyextra->fileName,yyextra->yyLineNr,
5810 "Found ';' while parsing initializer list! "
5811 "(doxygen could be confused by a macro call without semicolon)"
5813 BEGIN( FindMembers );
5815<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5816 if (!yyextra->insidePHP)
5819 yyextra->lastCContext = YY_START;
5820 BEGIN(SkipCxxComment);
5822<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5823 if (!yyextra->insideCS) REJECT;
5826 yyextra->lastSkipVerbStringContext=YY_START;
5827 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5828 yyextra->dummyTextStream.clear();
5829 BEGIN(SkipVerbString);
5831<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5832 if (yyextra->insidePHP) REJECT;
5834<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5835 if (yyextra->insidePHP)
5837 yyextra->lastStringContext=YY_START;
5838 BEGIN(SkipPHPString);
5841<SkipC11Attribute>{ID} {
5844 yyextra->current->spec.setNoDiscard(
true);
5847<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5848<SkipString,SkipPHPString>\\. { }
5850 BEGIN( yyextra->lastStringContext );
5853 BEGIN( yyextra->lastStringContext );
5855<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5856<SkipString,SkipPHPString>\n {
5860<SkipString,SkipPHPString>. { }
5866 yyextra->current->section = EntryType::makeEmpty() ;
5867 yyextra->current->type.clear() ;
5868 yyextra->current->name.clear() ;
5869 yyextra->current->args.clear() ;
5870 yyextra->current->argList.clear();
5871 BEGIN( FindMembers ) ;
5874 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5878 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5882 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5884 if (!yyextra->baseName.isEmpty())
5886 yyextra->current->extends.emplace_back(
5887 yyextra->baseName,Protection::Public,Specifier::Normal);
5888 yyextra->baseName.clear();
5890 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5895 yyextra->current->section = EntryType::makeEmpty() ;
5896 yyextra->current->type.clear() ;
5897 yyextra->current->name.clear() ;
5898 yyextra->current->args.clear() ;
5899 yyextra->current->argList.clear();
5901 BEGIN( FindMembers ) ;
5903<CompoundName>{SCOPENAME}/{BN}*"<" {
5904 yyextra->sharpCount = 0;
5905 yyextra->current->name = yytext ;
5907 if (yyextra->current->spec.isProtocol())
5909 yyextra->current->name+=
"-p";
5912 yyextra->lastClassTemplSpecContext = ClassVar;
5913 if (yyextra->insideObjC)
5915 BEGIN( ObjCProtocolList );
5917 else if (yyextra->insideCS)
5924 yyextra->roundCount=0;
5925 BEGIN( ClassTemplSpec );
5932 yyextra->current->tArgLists.
push_back(al);
5933 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5934 yyextra->templateStr=
"<";
5935 yyextra->current->name +=
"<";
5936 yyextra->fullArgString = yyextra->templateStr;
5937 yyextra->copyArgString = &yyextra->current->name;
5939 yyextra->currentArgumentContext = ClassVar;
5940 BEGIN( ReadTempArgs );
5942<ObjCProtocolList>"<" {
5943 yyextra->insideProtocolList=
TRUE;
5946<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5947 yyextra->current->name += yytext;
5949 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5952 if (yyextra->current->spec.isProtocol())
5959 BEGIN( yyextra->lastClassTemplSpecContext );
5963<ClassTemplSpec>"<" {
5964 yyextra->current->name += yytext;
5965 if (yyextra->roundCount==0) yyextra->sharpCount++;
5968 yyextra->current->name += yytext;
5970<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5971 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5975 yyextra->current->name =
substitute(yytext,
".",
"::");
5976 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5981 else if (!yyextra->current->tArgLists.empty())
5985 yyextra->current->name = yytext;
5986 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5989 QCString rn = yyextra->current_root->name;
5991 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5995 yyextra->current->spec.setForwardDecl(
true);
5996 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5998 else if (yyextra->insideIDL &&
5999 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6000 yyextra->current->spec.isInterface()) ||
6001 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6002 yyextra->current->spec.isService())
6010 yyextra->current->name = yytext;
6011 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6012 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6015 yyextra->current->spec.setInterface(
false).setService(
false);
6019 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6022 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6025 yyextra->current->reset();
6027 if (yyextra->insideObjC)
6029 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6030 yyextra->insideObjC =
FALSE;
6032 if (yyextra->isTypedef)
6034 yyextra->current->type.prepend(
"typedef");
6036 BEGIN( FindMembers );
Wrapper class for the Entry type.
6039<CompoundName>{SCOPENAME}/{BN}*"(" {
6040 yyextra->current->name = yytext ;
6043 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6045 yyextra->lastAlignAsContext = YY_START;
6050 if (yyextra->current->spec.isProtocol())
6052 yyextra->current->name +=
"-p";
6057<AlignAs>"(" { yyextra->roundCount=0;
6058 BEGIN( AlignAsEnd );
6062<AlignAsEnd>"(" { yyextra->roundCount++; }
6063<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6065 BEGIN( yyextra->lastAlignAsContext );
6071 yyextra->current->name = yytext ;
6075 yyextra->current->bodyLine = yyextra->yyLineNr;
6076 yyextra->current->bodyColumn = yyextra->yyColNr;
6077 yyextra->current->initializer.str(std::string());
6078 yyextra->lastInitializerContext = FindMembers;
6079 yyextra->sharpCount=0;
6080 yyextra->initBracketCount=0;
6081 BEGIN(ReadInitializer);
6083<CompoundName>{SCOPENAME}/{BN}*"," {
6085 yyextra->current->reset();
6088<CompoundName>{SCOPENAME} {
6089 yyextra->current->name = yytext ;
6092 if (yyextra->current->spec.isProtocol())
6094 yyextra->current->name +=
"-p";
6096 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6102<CompoundName>{CSSCOPENAME} {
6103 yyextra->current->name =
substitute(yytext,
".",
"::");
6107<ClassVar>{SCOPENAME}{BNopt}/"(" {
6108 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6111 yyextra->roundCount=0;
6112 BEGIN(SkipUnionSwitch);
6117 yyextra->yyBegColNr=yyextra->yyColNr;
6118 yyextra->yyBegLineNr=yyextra->yyLineNr;
6119 yyextra->current->name = yytext;
6120 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6123 BEGIN( FindMembers );
6127 if (yyextra->isTypedef)
6131 yyextra->current->type.prepend(
"typedef ");
6139<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6140 if (yyextra->insideCli)
6143 yyextra->current->spec.setSealedClass(
true);
6145 yyextra->current->spec.setAbstractClass(
true);
6153<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6154 yyextra->yyBegColNr=yyextra->yyColNr;
6155 yyextra->yyBegLineNr=yyextra->yyLineNr;
6158 if (yyextra->current->section.isEnum())
6160 yyextra->current->section = EntryType::makeVariable() ;
6162 yyextra->current->type +=
' ' ;
6163 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...
6172 yyextra->yyBegColNr=yyextra->yyColNr;
6173 yyextra->yyBegLineNr=yyextra->yyLineNr;
6175 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6178 yyextra->roundCount=0;
6179 BEGIN(SkipUnionSwitch);
6181 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6183 yyextra->current->type.clear();
6184 yyextra->baseProt = Protection::Public;
6185 yyextra->baseVirt = Specifier::Normal;
6186 yyextra->baseName.clear();
6187 BEGIN( BasesProt ) ;
6189 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6191 yyextra->current->typeConstr.clear();
6192 yyextra->current->typeConstr.push_back(
Argument());
6193 yyextra->lastCSConstraint = YY_START;
6194 BEGIN( CSConstraintName );
6196 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6198 yyextra->current->spec.setAbstract(
true);
6200 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6202 yyextra->current->spec.setSealed(
true);
6204 else if (
qstrcmp(yytext,
"final")==0)
6206 yyextra->current->spec.setFinal(
true);
6210 if (yyextra->current->section.isEnum())
6212 yyextra->current->section = EntryType::makeVariable() ;
6214 yyextra->current->type +=
' ' ;
6215 yyextra->current->type += yyextra->current->name ;
6216 yyextra->current->name = yytext ;
6225 if (yyextra->insideObjC && *yytext==
'(')
6227 yyextra->current->name+=
'(';
6230 yyextra->current->spec.setCategory(
true);
6232 BEGIN( ClassCategory );
6238 BEGIN( FindMembers );
6241<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6242<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6243 yyextra->fullArgString.clear();
6244 yyextra->lastCopyArgChar=
'#';
6245 yyextra->lastCommentInArgContext=YY_START;
6247 BEGIN( CopyArgCommentLine );
6249 BEGIN( CopyArgComment );
6251<CSConstraintType,CSConstraintName>"#" {
6252 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6254<CSConstraintType>"=>" {
6259 BEGIN( yyextra->lastCSConstraint );
6261<CSConstraintType>"{" {
6265 BEGIN( yyextra->lastCSConstraint );
6267<CSConstraintType,CSConstraintName>";" {
6270 BEGIN( yyextra->lastCSConstraint );
6272<CSConstraintName>":" {
6273 BEGIN( CSConstraintType );
6275<CSConstraintName>{ID} {
6277 yyextra->current->typeConstr.back().name=yytext;
6279<CSConstraintType>"where" {
6280 yyextra->current->typeConstr.push_back(
Argument());
6281 BEGIN( CSConstraintName );
6283<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6284 if (yyextra->current->typeConstr.back().type.isEmpty())
6287 yyextra->current->typeConstr.back().type=yytext;
6291 QCString name = yyextra->current->typeConstr.back().name;
6292 yyextra->current->typeConstr.push_back(
Argument());
6293 yyextra->current->typeConstr.back().name=name;
6294 yyextra->current->typeConstr.back().type=yytext;
6297<CSConstraintName,CSConstraintType>\n {
6300<CSConstraintName,CSConstraintType>. {
6302<ClassCategory>{ID} {
6303 yyextra->current->name+=yytext;
6305<ClassCategory>")"/{BN}*"{" {
6306 yyextra->current->name+=
')';
6309<ClassCategory>")"/{BN}*"<" {
6310 yyextra->current->name+=
')';
6311 BEGIN( ObjCProtocolList );
6314 yyextra->current->name+=
')';
6315 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6327 if (yyextra->current->section.isVariable())
6329 yyextra->current->bitfields+=
":";
6330 yyextra->current->args.clear();
6333 else if (yyextra->current->section.isEnum())
6336 yyextra->current->args.clear();
6337 BEGIN(EnumBaseType);
6341 yyextra->current->type.clear();
6342 if (yyextra->current->spec.isInterface() ||
6343 yyextra->current->spec.isStruct() ||
6344 yyextra->current->spec.isRef() ||
6345 yyextra->current->spec.isValue() ||
6346 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6349 yyextra->baseProt = Protection::Public;
6353 yyextra->baseProt = Protection::Private;
6355 yyextra->baseVirt = Specifier::Normal;
6356 yyextra->baseName.clear();
6357 BEGIN( BasesProt ) ;
6361 if (yyextra->isTypedef)
6363 yyextra->current->type.prepend(
"typedef");
6365 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6367 yyextra->current->section = EntryType::makeVariable() ;
6369 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6371 yyextra->current->reset();
6378 BEGIN( FindMembers );
6380<Bases,ClassVar>{CPPC}"/"/[^/] {
6381 if (!yyextra->insideObjC)
6388 yyextra->current->program << yytext;
6389 yyextra->current->fileName = yyextra->fileName ;
6390 yyextra->current->startLine = yyextra->yyLineNr ;
6391 yyextra->current->startColumn = yyextra->yyColNr;
6392 yyextra->curlyCount=0;
6393 BEGIN( ReadBodyIntf );
6396<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6397<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6398<Bases,ClassVar>{CPPC}"!" |
6399<Bases,ClassVar>[\-+]{BN}* {
6400 if (!yyextra->insideObjC)
6407 yyextra->current->program << yytext;
6408 yyextra->current->fileName = yyextra->fileName ;
6409 yyextra->current->startLine = yyextra->yyLineNr ;
6410 yyextra->current->startColumn = yyextra->yyColNr;
6411 yyextra->curlyCount=0;
6412 BEGIN( ReadBodyIntf );
6415<CompoundName,ClassVar>{B}*"{"{B}* {
6416 yyextra->current->program.str(std::string());
6417 yyextra->current->fileName = yyextra->fileName ;
6418 yyextra->current->bodyLine = yyextra->yyLineNr;
6419 yyextra->current->bodyColumn = yyextra->yyColNr;
6421 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6423 if (yyextra->current->section.isNamespace())
6427 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6439 yyextra->curlyCount=0;
6440 if (yyextra->current_root &&
6441 !yyextra->current_root->spec.isInterface() &&
6442 (yyextra->current->spec.isInterface() ||
6443 yyextra->current->spec.isProtocol() ||
6444 yyextra->current->spec.isCategory() ||
6445 yyextra->current->section.isObjcImpl()
6450 BEGIN( ReadBodyIntf );
6452 else if (yyextra->current->section.isNamespace())
6454 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6461<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6462<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6463<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6464<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6465<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6466<BasesProt>{BN} {
lineCount(yyscanner); }
6467<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6468<Bases>"decltype"{BN}*"(" {
6470 yyextra->roundCount=0;
6471 yyextra->lastSkipRoundContext=YY_START;
6474<Bases>("\\")?({ID}"\\")*{ID} {
6475 if (!yyextra->insidePHP)
6484 yyextra->baseName += bn;
6485 yyextra->current->args +=
' ';
6486 yyextra->current->args += yytext;
6489<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6495 yyextra->current->typeConstr.clear();
6496 yyextra->current->typeConstr.push_back(
Argument());
6497 yyextra->lastCSConstraint = YY_START;
6498 BEGIN( CSConstraintName );
6502 yyextra->baseName+=yytext;
6503 yyextra->current->args +=
' ';
6504 yyextra->current->args += yytext;
6507<Bases>{BN}*{ID}("."{ID})* {
6509 yyextra->baseName += name;
6510 yyextra->current->args +=
' ';
6511 yyextra->current->args += name;
6513<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6514 if (!yyextra->insideObjC)
6524<ClassVar,Bases>"@end" {
6532<ClassVar>"<" { yyextra->current->name += *yytext;
6533 yyextra->sharpCount=1;
6534 yyextra->roundCount=0;
6535 yyextra->lastSkipSharpContext = YY_START;
6536 yyextra->specName = &yyextra->current->name;
6537 BEGIN ( Specialization );
6541 yyextra->sharpCount=1;
6542 yyextra->roundCount=0;
6543 yyextra->lastSkipSharpContext = YY_START;
6544 if (yyextra->insideObjC)
6554 yyextra->templateStr = yytext;
6555 yyextra->specName = &yyextra->templateStr;
6556 BEGIN ( Specialization );
6559<Specialization>"<" { *yyextra->specName += *yytext;
6560 if (yyextra->roundCount==0) yyextra->sharpCount++;
6562<Specialization>">" {
6563 *yyextra->specName += *yytext;
6564 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6567 BEGIN(yyextra->lastSkipSharpContext);
6570<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6571<Specialization>"<<" { *yyextra->specName += yytext; }
6572<Specialization>">>"/{B}*"::" {
6577<Specialization>">>" {
6578 if (yyextra->insideCS)
6588 if (yyextra->roundCount>0)
6590 *yyextra->specName += yytext;
6600<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6601<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6602<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6604<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6605<Specialization>"\\'" { *yyextra->specName += *yytext;}
6606<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6607<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6608<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6609<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6610<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6611<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6612<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6613<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6614<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6617 *yyextra->specName += *yytext;
6619<SkipRound>"(" { ++yyextra->roundCount; }
6620<SkipRound>")" {
if (--yyextra->roundCount<0)
6621 BEGIN ( yyextra->lastSkipRoundContext );
6624 yyextra->lastStringContext=SkipRound;
6627<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6628 if (yyextra->insideProtocolList)
6630 yyextra->baseName+=
"-p";
6634 yyextra->current->args +=
',' ;
6637 if (!yyextra->baseName.isEmpty())
6639 yyextra->current->extends.emplace_back(
6640 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6643 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6644 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6645 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6647 yyextra->baseProt=Protection::Public;
6651 yyextra->baseProt=Protection::Private;
6653 yyextra->baseVirt=Specifier::Normal;
6654 yyextra->baseName.clear();
6657 yyextra->insideProtocolList=
FALSE;
6669 if (*yytext==
',' && yyextra->insideObjC)
6671 yyextra->insideProtocolList=
TRUE;
6677 yyextra->current->program.str(std::string());
6678 yyextra->current->fileName = yyextra->fileName ;
6679 yyextra->current->bodyLine = yyextra->yyLineNr;
6680 yyextra->current->bodyColumn = yyextra->yyColNr;
6682 if (!yyextra->baseName.isEmpty())
6683 yyextra->current->extends.emplace_back(
6684 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6686 yyextra->curlyCount=0;
6687 if (yyextra->insideObjC)
6689 BEGIN( ReadBodyIntf );
6696<SkipUnionSwitch>{B}*"(" {
6697 yyextra->roundCount++;
6699<SkipUnionSwitch>")" {
6700 if (--yyextra->roundCount==0)
6705<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6707<Comment>{BN}+ { yyextra->current->program << yytext ;
6710<Comment>{CCS} { yyextra->current->program << yytext ; }
6711<Comment>{CPPC} { yyextra->current->program << yytext ; }
6712<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6713 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6714 yyextra->current->program << yytext ;
6716<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6717 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6718 yyextra->current->program << yytext ;
6720<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6721<Comment>{CCE} { yyextra->current->program << yytext ;
6722 if (!yyextra->insideCode)
6724 yyextra->doxygenComment=
false;
6725 BEGIN( yyextra->lastContext );
6728<Comment>. { yyextra->current->program << *yytext ; }
6730<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6732 if (!yyextra->current->doc.isEmpty())
6734 yyextra->current->doc+=
"\n\n";
6738 yyextra->current->docLine = yyextra->yyLineNr;
6739 yyextra->current->docFile = yyextra->fileName;
6742 yyextra->lastDocContext = YY_START;
6743 if (yyextra->current_root->section.isScope())
6745 yyextra->current->inside = yyextra->current_root->name+
"::";
6747 yyextra->docBlockContext = YY_START;
6748 yyextra->docBlockInBody = YY_START==SkipCurly;
6753 yyextra->docBlock.str(indent.
str());
6755 if (yyextra->docBlockAutoBrief)
6757 yyextra->current->briefLine = yyextra->yyLineNr;
6758 yyextra->current->briefFile = yyextra->fileName;
6763<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6769 yyextra->lastDocContext = YY_START;
6772 if (yyextra->current_root->section.isScope())
6774 yyextra->current->inside = yyextra->current_root->name+
"::";
6776 yyextra->current->docLine = yyextra->yyLineNr;
6777 yyextra->current->docFile = yyextra->fileName;
6778 yyextra->docBlockContext = YY_START;
6779 yyextra->docBlockInBody = YY_START==SkipCurly;
6781 yyextra->docBlockAutoBrief = javadocAutoBrief;
6785 yyextra->docBlock.str(indent.
str());
6787 if (yyextra->docBlockAutoBrief)
6789 yyextra->current->briefLine = yyextra->yyLineNr;
6790 yyextra->current->briefFile = yyextra->fileName;
6797 yyextra->current->program << yytext ;
6798 yyextra->lastContext = YY_START ;
6799 yyextra->doxygenComment=
true;
6803<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6808<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6809 yyextra->lastDocContext = YY_START;
6812 if (yyextra->current_root->section.isScope())
6814 yyextra->current->inside = yyextra->current_root->name+
"::";
6816 yyextra->current->docLine = yyextra->yyLineNr;
6817 yyextra->current->docFile = yyextra->fileName;
6818 yyextra->docBlockContext = YY_START;
6819 yyextra->docBlockInBody = YY_START==SkipCurly;
6821 yyextra->docBlockAutoBrief = javadocAutoBrief;
6825 yyextra->docBlock.str(indent.
str());
6827 if (yyextra->docBlockAutoBrief)
6829 yyextra->current->briefLine = yyextra->yyLineNr;
6830 yyextra->current->briefFile = yyextra->fileName;
6835<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6836 yyextra->lastDocContext = YY_START;
6837 if (yyextra->current_root->section.isScope())
6839 yyextra->current->inside = yyextra->current_root->name+
"::";
6841 yyextra->docBlockContext = YY_START;
6842 yyextra->docBlockInBody = YY_START==SkipCurly;
6843 yyextra->docBlockAutoBrief =
FALSE;
6847 yyextra->docBlock.str(indent.
str());
6852<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6853 yyextra->lastDocContext = YY_START;
6854 if (yyextra->current_root->section.isScope())
6856 yyextra->current->inside = yyextra->current_root->name+
"::";
6858 yyextra->docBlockContext = YY_START;
6859 yyextra->docBlockInBody = YY_START==SkipCurly;
6860 yyextra->docBlockAutoBrief =
FALSE;
6863 yyextra->docBlock.str(indent.
str());
6867<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6869 yyextra->externLinkage=
TRUE;
6872 if (yyextra->externLinkage)
6874 yyextra->externLinkage=
FALSE;
6876 else if (yyextra->insideCS &&
6877 !yyextra->current->name.isEmpty() &&
6878 !yyextra->current->type.isEmpty())
6880 if (yyextra->current->mtype == MethodTypes::Event)
6882 yyextra->mtype = MethodTypes::Event;
6886 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6890 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6892 yyextra->current->bodyLine = yyextra->yyLineNr;
6893 yyextra->current->bodyColumn = yyextra->yyColNr;
6894 yyextra->curlyCount=0;
6895 BEGIN( CSAccessorDecl );
6897 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6901 yyextra->current->exception =
" {";
6902 BEGIN(UNOIDLAttributeBlock);
6906 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6907 yyextra->current->name.isEmpty()
6911 yyextra->needsSemi =
FALSE;
6912 if (yyextra->current->isStatic)
6914 yyextra->current->name=
"[static initializer]";
6915 yyextra->current->type.clear();
6919 yyextra->current->name=
"[instance initializer]";
6936 yyextra->current->bodyLine = yyextra->yyLineNr;
6937 yyextra->current->bodyColumn = yyextra->yyColNr;
6938 yyextra->current->initializer.str(yytext);
6939 yyextra->lastInitializerContext = YY_START;
6940 yyextra->sharpCount=0;
6941 yyextra->initBracketCount=1;
6942 BEGIN(ReadInitializer);
6946<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6947<CSAccessorDecl>"}"{B}*"=" {
6949 if (yyextra->curlyCount != 0) REJECT;
6950 yyextra->current->initializer.str(
"=");
6951 yyextra->current->endBodyLine=yyextra->yyLineNr;
6952 yyextra->lastInitializerContext = FindMembers;
6953 BEGIN(ReadInitializer);
6955<CSAccessorDecl>"}" {
6956 if (yyextra->curlyCount)
6958 yyextra->curlyCount--;
6962 yyextra->mtype = MethodTypes::Method;
6963 yyextra->virt = Specifier::Normal;
6965 yyextra->current->endBodyLine=yyextra->yyLineNr;
6970<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6971<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6972<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6973<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6974<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6975<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6976<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6977<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6978<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6979<CSAccessorDecl>{CHARLIT} {}
6980<CSAccessorDecl>"\"" { BEGIN(CSString);}
6981<CSAccessorDecl>"." {}
6982<CSAccessorDecl>\n {
lineCount(yyscanner); }
6983<CSString>"\"" { BEGIN(CSAccessorDecl);}
6991<SliceSequence>{SCOPENAME} {
6992 if (yyextra->current->spec.isLocal())
6994 yyextra->current->type =
"local ";
6996 yyextra->current->type +=
"sequence<";
6997 yyextra->current->type += yytext;
6998 yyextra->current->type +=
">";
7001<SliceSequence>{BN}*">"{BN}* {
7003 BEGIN(SliceSequenceName);
7006<SliceSequenceName>{ID}{BN}* {
7008 yyextra->current->name = yytext ;
7009 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7012<SliceSequenceName>";" {
7013 yyextra->current->section = EntryType::makeVariable();
7014 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7019<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7021 if (yyextra->current->spec.isLocal())
7023 yyextra->current->type =
"local ";
7025 yyextra->current->type +=
"dictionary<";
7026 yyextra->current->type += yytext;
7027 yyextra->current->type +=
">";
7028 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7031<SliceDictionary>{BN}*">"{BN}* {
7033 BEGIN(SliceDictionaryName);
7036<SliceDictionaryName>{ID}{BN}* {
7038 yyextra->current->name = yytext ;
7039 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7042<SliceDictionaryName>";" {
7043 yyextra->current->section = EntryType::makeVariable();
7044 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7054<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7055 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7056 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7059<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7060 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7061 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7063<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7064 yyextra->docBlock << yytext;
7065 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7066 BEGIN( yyextra->docBlockContext );
7068<DocLine>{NONLopt}/"\n" {
7069 yyextra->docBlock << yytext;
7070 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7071 BEGIN( yyextra->docBlockContext );
7076<DocBlock>"*"*{CCE} {
7078 BEGIN(yyextra->docBlockContext);
7080<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7083 yyextra->docBlock <<
"\\ilinebr " << indent;
7085<DocBlock>^{B}*"*"+/[^/] {
7088 yyextra->docBlock << indent;
7090<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7093 yyextra->docBlock << indent;
7095<DocBlock>^{B}*({CPPC}){B}* {
7098 yyextra->docBlock << yytext;
7102 yyextra->docBlock << yytext;
7104<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7105 yyextra->docBlock << yytext;
7107<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7108 yyextra->docBlock << yytext;
7109 char blockName[] =
"f$";
7111 if (c==
'[') blockName[1]=
']';
7112 else if (c==
'{') blockName[1]=
'}';
7113 else if (c==
'(') blockName[1]=
')';
7115 BEGIN(DocCopyBlock);
7117<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7118 yyextra->fileName = &yytext[6];
7119 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7120 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7121 yyextra->docBlock << yytext;
7123<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7124 yyextra->fileName = &yytext[6];
7125 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7126 yyextra->docBlock << yytext;
7128<DocBlock>{CMD}"iline"{LINENR}{B} {
7133 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7137 yyextra->yyLineNr = nr;
7139 yyextra->docBlock << yytext;
7141<DocBlock>{B}*"<"{PRE}">" {
7142 yyextra->docBlock << yytext;
7144 BEGIN(DocCopyBlock);
7146<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7147 yyextra->docBlock << yytext;
7149 BEGIN(DocCopyBlock);
7151<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
7152 yyextra->docBlock << yytext;
7154 BEGIN(DocCopyBlock);
7156<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7158 yyextra->docBlock <<
"\\ilinebr ";
7159 yyextra->docBlock << pat;
7161 BEGIN(DocCopyBlock);
7163<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7165 yyextra->docBlock << pat;
7167 BEGIN(DocCopyBlock);
7169<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7170<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7171<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7173 yyextra->docBlock <<
"\\ilinebr ";
7174 yyextra->docBlock << pat;
7176 BEGIN(DocCopyBlock);
7178<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7179<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7180<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7182 yyextra->docBlock << pat;
7184 BEGIN(DocCopyBlock);
7186<DocBlock>{B}*"<"{CODE}">" {
7187 if (yyextra->insideCS)
7189 yyextra->docBlock << yytext;
7191 BEGIN(DocCopyBlock);
7198<DocBlock>[^@*~\/\\\n]+ {
7199 yyextra->docBlock << yytext;
7203 yyextra->docBlock << *yytext;
7206 yyextra->docBlock << *yytext;
7211<DocCopyBlock>"</"{PRE}">" {
7216 yyextra->docBlock << yytext;
7218<DocCopyBlock>"</"{CODE}">" {
7223 yyextra->docBlock << yytext;
7225<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7230 yyextra->docBlock << yytext;
7232<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7237 yyextra->docBlock << yytext;
7239<DocCopyBlock>^{B}*"*"+/{BN}+ {
7240 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7248 yyextra->docBlock << indent;
7251<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7252 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7256 yyextra->docBlock << indent;
7263<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7264 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7268 yyextra->docBlock << indent+
"*";
7275<DocCopyBlock>^{B}*"*"+/{BN}* {
7276 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7279 if (yyextra->nestedComment>0)
7282 yyextra->docBlock << indent+
"*";
7287 yyextra->docBlock << indent;
7295<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7301 yyextra->docBlock << pat;
7303<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7309 yyextra->docBlock << pat;
7311<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7312 yyextra->docBlock << yytext;
7315 yyextra->docBlock << yytext;
7316 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7320 yyextra->lastStringContext=YY_START;
7321 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7322 yyextra->stopAtInvalidString=
true;
7326<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7329 yyextra->nestedComment++;
7331 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7333 yyextra->nestedComment--;
7335 yyextra->docBlock << yytext;
7338 yyextra->docBlock << *yytext;
7342 yyextra->docBlock << *yytext;
7344<DocCopyBlock><<EOF>> {
7345 warn(yyextra->fileName,yyextra->yyLineNr,
7346 "reached end of file while inside a '{}' block!"
7347 " The command that should end the block seems to be missing!",
7348 yyextra->docBlockName);
7355<Prototype>"operator"{B}*"("{B}*")" {
7356 yyextra->current->name+=yytext;
7359 yyextra->current->args+=*yytext;
7360 yyextra->currentArgumentContext = PrototypeQual;
7361 yyextra->fullArgString = yyextra->current->args;
7362 yyextra->copyArgString = &yyextra->current->args;
7363 BEGIN( ReadFuncArgType ) ;
7365<Prototype>"("({ID}"::")*({B}*[&*])+ {
7366 if (yyextra->insidePHP)
7372 yyextra->current->type+=yyextra->current->name+yytext;
7373 yyextra->current->name.clear();
7374 BEGIN( PrototypePtr );
7377<PrototypePtr>{SCOPENAME} {
7378 yyextra->current->name+=yytext;
7381 yyextra->current->args+=*yytext;
7382 yyextra->currentArgumentContext = PrototypeQual;
7383 yyextra->fullArgString = yyextra->current->args;
7384 yyextra->copyArgString = &yyextra->current->args;
7385 BEGIN( ReadFuncArgType ) ;
7388 yyextra->current->type+=
')';
7392 yyextra->current->name+=yytext;
7395 BEGIN( PrototypeSkipLine);
7397<PrototypeQual>{B}*"const"{B}* {
7398 yyextra->current->args +=
" const ";
7399 yyextra->current->argList.setConstSpecifier(
TRUE);
7401<PrototypeQual>{B}*"volatile"{B}* {
7402 yyextra->current->args +=
" volatile ";
7403 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7405<PrototypeQual>{B}*"="{B}*"0"{B}* {
7406 yyextra->current->args +=
" = 0";
7407 yyextra->current->virt = Specifier::Pure;
7408 yyextra->current->argList.setPureSpecifier(
TRUE);
7410<PrototypeQual>"throw"{B}*"(" {
7411 yyextra->current->exception =
"throw(";
7412 BEGIN(PrototypeExc);
7415 yyextra->current->exception +=
')';
7416 BEGIN(PrototypeQual);
7419 yyextra->current->exception += *yytext;
7422 yyextra->current->args += *yytext;
7425 yyextra->current->name += *yytext;
7427<PrototypeSkipLine>. {
7433<SkipCxxComment>.*"\\\n" {
7434 if (yyextra->insideCS)
7443<SkipCxxComment>{ANYopt}/\n {
7444 BEGIN( yyextra->lastCContext ) ;
7446<SkipComment>[^\*\n]+
7451 if (!yyextra->insideCpp) REJECT;
7452 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7453 yyextra->lastC11AttributeContext = YY_START;
7454 BEGIN( SkipC11Attribute );
7459 if (yyextra->insideIDL && yyextra->insideCppQuote)
7463 else if (yyextra->insidePHP)
7465 yyextra->lastStringContext=YY_START;
7470 if (!yyextra->insidePHP)
7472 yyextra->lastCPPContext = YY_START;
7477 yyextra->lastCContext = YY_START ;
7478 BEGIN( SkipCxxComment ) ;
7482 if (!yyextra->insidePHP)
7484 yyextra->lastCContext = YY_START ;
7485 BEGIN( SkipCxxComment ) ;
7488 if (yyextra->insidePHP)
7490 yyextra->lastStringContext=YY_START;
7491 BEGIN(SkipPHPString);
7495 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7497 if (yyextra->current->type.isEmpty())
7499 if (yyextra->current->name.isEmpty())
7500 yyextra->current->name=
"?";
7502 yyextra->current->name+=
"?";
7506 yyextra->current->type+=
"?";
7510<*>"}" { yyextra->exported=
false; }
7512<SkipComment>{CPPC}|{CCS}
7513<*>{CCS} { yyextra->lastCContext = YY_START ;
7514 BEGIN( SkipComment ) ;
7516<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7518 yyextra->lastCContext = YY_START ;
7519 BEGIN( SkipCxxComment ) ;
7522 if (yyextra->insideCS && yyextra->fakeNS)
7526 BEGIN ( ReadNSBody);
7538 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7540 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7542 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7552 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7553 yyextra->outerScopeEntries.clear();
7554 yyextra->baseName.clear();
7555 yyextra->protection = Protection::Public;
7556 yyextra->baseProt = Protection::Public;
7557 yyextra->sharpCount = 0;
7558 yyextra->roundCount = 0;
7559 yyextra->curlyCount = 0;
7560 yyextra->mtype = MethodTypes::Method;
7561 yyextra->isStatic =
FALSE;
7562 yyextra->virt = Specifier::Normal;
7563 yyextra->baseVirt = Specifier::Normal;
7564 yyextra->isTypedef =
FALSE;
7565 yyextra->insideTryBlock =
FALSE;
7566 yyextra->insideFormula =
FALSE;
7567 yyextra->insideCode=
FALSE;
7569 yyextra->previous = 0;
7570 yyextra->firstTypedefEntry.reset();
7571 yyextra->memspecEntry.reset();
7576 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7577 if (yyextra->insideJava)
7579 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7581 yyextra->current->protection = yyextra->protection;
7582 yyextra->current->exported = yyextra->exported ;
7583 yyextra->current->mtype = yyextra->mtype;
7584 yyextra->current->virt = yyextra->virt;
7585 yyextra->current->isStatic = yyextra->isStatic;
7586 yyextra->current->lang = yyextra->language;
7588 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7589 yyextra->isTypedef=
FALSE;
7597 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7598 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7600 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7606 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7609 for (p = yytext ; *p ; ++p )
7613 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7617 yyextra->column+=tabSize - (yyextra->column%tabSize);
7621 yyextra->column++,yyextra->yyColNr++;
7629 int col=startIndent;
7635 if (c==
'\t') col+=tabSize-(col%tabSize);
7636 else if (c==
'\n') col=0;
7645 int i = text.
find(
'"');
7658 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7659 yyextra->current->protection = yyextra->protection = prot;
7660 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7661 yyextra->current->type.
clear();
7662 yyextra->current->name.clear();
7663 yyextra->current->args.clear();
7664 yyextra->current->argList.clear();
7670 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7671 size_t tl=yyextra->current->type.length();
7672 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7674 yyextra->current->type +=
' ' ;
7676 yyextra->current->type += yyextra->current->name;
7677 yyextra->current->name.clear() ;
7678 tl=yyextra->current->type.length();
7679 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7681 yyextra->current->type +=
' ' ;
7683 yyextra->current->type += yyextra->current->args ;
7684 yyextra->current->args.clear() ;
7685 yyextra->current->argList.clear();
7692 if (s==
nullptr || *s==0)
return name;
7694 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7706 bool funcPtr = i>0 && type[i-1]==
')';
7708 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7709 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7710 return type.
left(i);
7716 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7719 yyextra->docBlock <<
"\\iskip";
7721 yyextra->docBlockName=blockName;
7722 yyextra->fencedSize=fencedSize;
7723 yyextra->nestedComment=0;
7729 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7730 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7734 yyextra->docBlock <<
"\\endiskip";
7736 yyextra->docBlockName=
"";
7756 int i=name.
find(
"operator");
7757 if (i==-1)
return FALSE;
7767 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7769 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7770 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7771 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7772 yyextra->insideD = yyextra->language==SrcLangExt::D;
7773 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7774 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7775 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7776 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7777 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7778 yyextra->language==SrcLangExt::Lex);
7789 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7790 if (yyextra->current_root->section.isScope())
7793 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7795 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7797 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7807 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7808 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7809 if (yyextra->current->argList.empty())
return FALSE;
7810 for (
const Argument &a : yyextra->current->argList)
7821 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7822 if (yyextra->insideJava)
7825 yyextra->current->protection = Protection::Public;
7826 if (text.
find(
"protected")!=-1)
7827 yyextra->current->protection = Protection::Protected;
7828 else if (text.
find(
"private")!=-1)
7829 yyextra->current->protection = Protection::Private;
7830 else if (text.
find(
"package")!=-1)
7831 yyextra->current->protection = Protection::Package;
7838 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7839 int si =
static_cast<int>(yyextra->current->args.length());
7840 if (yyextra->oldStyleArgType.isEmpty())
7842 std::string args = yyextra->current->args.str();
7843 static const reg::Ex re(R
"(\([^)]*\).*)");
7849 bi1=(int)match.position();
7850 size_t secondMatchStart = match.position()+match.length();
7853 bi2=(int)match.position();
7857 if (bi1!=-1 && bi2!=-1)
7860 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7862 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7863 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7865 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7866 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7867 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7872 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7875 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7876 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7878 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7879 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7885 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7888 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7892 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7893 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7906 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7909 oldStyleArgPtr=yyextra->current->args.
left(j);
7928 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7929 for (
Argument &a : yyextra->current->argList)
7938 a.
docs=brief+
"\n\n"+docs;
7970 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7973 yyextra->current->briefFile = yyextra->fileName;
7974 yyextra->current->briefLine = yyextra->yyLineNr;
7978 yyextra->current->docFile = yyextra->fileName;
7979 yyextra->current->docLine = yyextra->yyLineNr;
7987 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7988 if (yyextra->tempEntry==0)
7993 yyextra->previous = yyextra->current;
7994 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7998 yyextra->previous = yyextra->current;
7999 yyextra->current = yyextra->tempEntry;
8000 yyextra->tempEntry.reset();
8007 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8010 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8011 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8014 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8015 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8017 docEntry->inbodyFile = yyextra->fileName;
8018 docEntry->inbodyLine = lineNr;
8022 bool needsEntry=
FALSE;
8024 Markdown markdown(yyextra->fileName,lineNr);
8027 while (yyextra->commentScanner.parseCommentBlock(
8028 yyextra->thisParser,
8029 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8033 yyextra->docBlockInBody ?
FALSE : brief,
8034 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8035 yyextra->docBlockInBody,
8036 yyextra->protection,
8047 QCString docFile = yyextra->current->docFile;
8049 yyextra->current->docFile = docFile;
8050 yyextra->current->docLine = lineNr;
8058 if (yyextra->docBlockTerm)
8060 unput(yyextra->docBlockTerm);
8061 yyextra->docBlockTerm=0;
8068 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8079 QCString orgDoc = yyextra->current->doc;
8080 QCString orgBrief = yyextra->current->brief;
8081 int orgDocLine = yyextra->current->docLine;
8082 int orgBriefLine = yyextra->current->briefLine;
8084 yyextra->current->doc.
clear();
8085 yyextra->current->brief.clear();
8088 int lineNr = orgDocLine;
8090 Markdown markdown(yyextra->fileName,lineNr);
8093 while (yyextra->commentScanner.parseCommentBlock(
8094 yyextra->thisParser,
8095 yyextra->current.get(),
8102 yyextra->protection,
8111 if (needsEntry)
newEntry(yyscanner);
8117 a.
docs = yyextra->current->doc;
8120 yyextra->current->doc = orgDoc;
8121 yyextra->current->brief = orgBrief;
8122 yyextra->current->docLine = orgDocLine;
8123 yyextra->current->briefLine = orgBriefLine;
8134 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8135 for (
const auto &ce : rt->children())
8137 if (!ce->program.empty())
8141 yyextra->padCount=0;
8144 yyextra->programStr = ce->program.str();
8145 yyextra->inputString = yyextra->programStr.data();
8146 yyextra->inputPosition = 0;
8147 if (ce->section.isEnum() || ce->spec.isEnum())
8148 BEGIN( FindFields ) ;
8150 BEGIN( FindMembers ) ;
8151 yyextra->current_root = ce;
8152 yyextra->fileName = ce->fileName;
8154 yyextra->yyLineNr = ce->bodyLine;
8155 yyextra->yyColNr = ce->bodyColumn;
8156 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8158 yyextra->current = std::make_shared<Entry>();
8159 yyextra->isStatic =
FALSE;
8164 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8166 ce->groups = rt->groups;
8169 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8171 if ( ce->section.isClass() )
8173 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8175 yyextra->current->protection = yyextra->protection = Protection::Public ;
8177 else if (yyextra->insideJava)
8179 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8181 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8183 if (ce->lang==SrcLangExt::ObjC)
8185 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8189 yyextra->current->protection = yyextra->protection = Protection::Public ;
8194 yyextra->current->protection = yyextra->protection = Protection::Private ;
8197 else if (ce->section.isEnum() )
8199 yyextra->current->protection = yyextra->protection = ce->protection;
8201 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8203 if (ce->section.isNamespace() )
8205 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8207 yyextra->current->protection = yyextra->protection = ce->protection;
8208 yyextra->current->exported = yyextra->exported =
false;
8210 else if (ce->section.isNamespace() )
8212 yyextra->current->protection = yyextra->protection = Protection::Public ;
8213 yyextra->current->exported = yyextra->exported = ce->exported;
8217 yyextra->current->protection = yyextra->protection = Protection::Public ;
8218 yyextra->current->exported = yyextra->exported =
false;
8220 yyextra->mtype = MethodTypes::Method;
8221 yyextra->virt = Specifier::Normal;
8228 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8230 scannerYYlex(yyscanner);
8231 yyextra->lexInit=
TRUE;
8234 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8236 yyextra->programStr.clear();
8237 ce->program.str(std::string());
8253 const char *fileBuf,
8254 const std::shared_ptr<Entry> &rt,
8258 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8261 yyextra->inputString = fileBuf;
8262 yyextra->inputPosition = 0;
8263 yyextra->column = 0;
8264 scannerYYrestart(
nullptr,yyscanner);
8267 yyextra->protection = Protection::Public;
8268 yyextra->mtype = MethodTypes::Method;
8269 yyextra->isStatic =
FALSE;
8270 yyextra->exported =
false;
8271 yyextra->virt = Specifier::Normal;
8272 yyextra->current_root = rt;
8273 yyextra->yyLineNr = 1 ;
8274 yyextra->yyBegLineNr = 1;
8275 yyextra->yyBegColNr = 0;
8276 yyextra->anonCount = 0;
8277 yyextra->anonNSCount = 0;
8278 yyextra->fileName = fileName;
8279 yyextra->clangParser = clangParser;
8281 rt->lang = yyextra->language;
8282 msg(
"Parsing file {}...\n",yyextra->fileName);
8284 yyextra->current_root = rt;
8286 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8287 yyextra->current = std::make_shared<Entry>();
8292 yyextra->current->name = yyextra->fileName;
8293 yyextra->current->section = sec;
8294 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8296 yyextra->current->reset();
8298 if ( yyextra->insidePHP )
8300 BEGIN( FindMembersPHP );
8302 else if ( yyextra->insideJava )
8304 yyextra->current->name=
"java::lang";
8305 yyextra->current->fileName = yyextra->fileName;
8306 yyextra->current->section = EntryType::makeUsingDir();
8307 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8309 BEGIN( FindMembers );
8313 BEGIN( FindMembers );
8316 scannerYYlex(yyscanner);
8317 yyextra->lexInit=
TRUE;
8319 if (YY_START==Comment)
8321 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8325 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8327 yyextra->programStr.clear();
8328 rt->program.str(std::string());
8332 yyextra->anonNSCount++;
8335 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8338 parent->moveToSubEntryAndKeep(child);
8340 yyextra->outerScopeEntries.clear();
8349 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8352 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8355 if (!yyextra->current)
8360 const char *orgInputString;
8361 int orgInputPosition;
8362 YY_BUFFER_STATE orgState;
8365 orgState = YY_CURRENT_BUFFER;
8366 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8367 orgInputString = yyextra->inputString;
8368 orgInputPosition = yyextra->inputPosition;
8371 yyextra->inputString = text.
data();
8372 yyextra->inputPosition = 0;
8373 yyextra->column = 0;
8374 scannerYYrestart(
nullptr, yyscanner);
8376 scannerYYlex(yyscanner);
8377 yyextra->lexInit=
TRUE;
8379 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8380 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8382 yyextra->current->section = EntryType::makeVariableDoc();
8386 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8387 yy_switch_to_buffer(orgState, yyscanner);
8388 yyextra->inputString = orgInputString;
8389 yyextra->inputPosition = orgInputPosition;
8405 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8413 scannerYYlex_destroy(
p->yyscanner);
8417 const char *fileBuf,
8418 const std::shared_ptr<Entry> &root,
8422 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8423 yyextra->thisParser =
this;
8427 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8435 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8436 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8437 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8448#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)