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->initBracketCount=0;
2068 BEGIN(ReadInitializer);
2071 yyextra->current->section = EntryType::makeVariable();
2073 init.stripPrefix(
"class ");
2074 init.stripPrefix(
"struct ");
2076 yyextra->current->type =
"typedef "+
init;
2077 yyextra->current->args.clear();
2078 yyextra->current->spec.setAlias(
true);
2079 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2084 yyextra->current->initializer << yytext;
2087 yyextra->current->initializer << yytext;
2091 yyextra->current->fileName = yyextra->fileName;
2092 yyextra->current->section = EntryType::makeUsingDir();
2093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2097<Using>";" { BEGIN(FindMembers); }
2098<FindMembers>{SCOPENAME}{BN}*"<>" {
2103<FindMembers>{SCOPENAME}{BNopt}/"<" {
2105 if (yyextra->insideCpp && name==
"import") REJECT;
2106 yyextra->roundCount=0;
2107 yyextra->sharpCount=0;
2110 yyextra->current->name=name;
2116 BEGIN( EndTemplate );
2118<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2119 yyextra->sharpCount=0;
2120 yyextra->roundCount=0;
2128 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...
2131 if (!yyextra->insidePHP)
2137 yyextra->lastHereDocContext = YY_START;
2141<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2142 yyextra->current->name+=yytext;
2146 if (yyextra->roundCount==0)
2149 yyextra->sharpCount++;
2151 yyextra->current->name+=yytext;
2153<ClassTemplSpec,EndTemplate>">=" {
2154 yyextra->current->name+=yytext;
2156<ClassTemplSpec,EndTemplate>(">>") {
2157 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2165 yyextra->current->name+=yytext;
2170 yyextra->current->name+=
'>';
2172 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2174 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2179<EndTemplate>">"{BN}*"(" {
2181 yyextra->current->name+=
'>';
2183 if (yyextra->roundCount==0)
2185 --yyextra->sharpCount;
2187 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2189 yyextra->current->bodyLine = yyextra->yyLineNr;
2190 yyextra->current->bodyColumn = yyextra->yyColNr;
2191 yyextra->current->args =
"(";
2192 yyextra->currentArgumentContext = FuncQual;
2193 yyextra->fullArgString = yyextra->current->args;
2194 yyextra->copyArgString = &yyextra->current->args;
2196 BEGIN( ReadFuncArgType ) ;
2200 yyextra->current->name+=
"(";
2201 yyextra->roundCount++;
2204<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2206 yyextra->current->name+=
'>';
2207 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2212<EndTemplate>">"{BNopt}/"::" {
2214 yyextra->current->name+=
'>';
2216 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2218 BEGIN(FindMemberName);
2221<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2222 yyextra->roundCount++;
2224<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2225 if (yyextra->roundCount>0) yyextra->roundCount--;
2228 yyextra->current->name+=*yytext;
2231<FindMembers>"define"{BN}*"("{BN}*["'] {
2232 if (yyextra->insidePHP)
2234 yyextra->current->bodyLine = yyextra->yyLineNr;
2235 yyextra->current->bodyColumn = yyextra->yyColNr;
2242 yyextra->delimiter = yytext;
2243 *yyextra->pCopyHereDocGString << yytext;
2244 BEGIN(CopyHereDocEnd);
2246<CopyHereDoc>"\""{ID}/"\"" {
2247 yyextra->delimiter = &yytext[1];
2248 *yyextra->pCopyHereDocGString << yytext;
2249 BEGIN(CopyHereDocEnd);
2251<CopyHereDoc>"'"{ID}/"'" {
2252 yyextra->delimiter = &yytext[1];
2253 *yyextra->pCopyHereDocGString << yytext;
2254 BEGIN(CopyHereDocEnd);
2257 yyextra->delimiter = yytext;
2260<HereDoc>"\""{ID}/"\"" {
2261 yyextra->delimiter = &yytext[1];
2264<HereDoc>"'"{ID}/"'" {
2265 yyextra->delimiter = &yytext[1];
2269 if (yyextra->delimiter==yytext)
2271 BEGIN(yyextra->lastHereDocContext);
2275<CopyHereDocEnd>^{Bopt}{ID} {
2276 *yyextra->pCopyHereDocGString << yytext;
2279 BEGIN(yyextra->lastHereDocContext);
2284 *yyextra->pCopyHereDocGString << yytext;
2286<CopyHereDocEnd>{ID} {
2287 *yyextra->pCopyHereDocGString << yytext;
2290 *yyextra->pCopyHereDocGString << yytext;
2292<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2294<FindMembers>"Q_PROPERTY" {
2295 yyextra->yyBegLineNr = yyextra->yyLineNr;
2296 yyextra->yyBegColNr = yyextra->yyColNr;
2297 yyextra->current->protection = Protection::Public ;
2298 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2299 yyextra->current->type.clear();
2309 yyextra->current->name+=yytext;
2312 yyextra->current->type+= yyextra->current->name;
2313 yyextra->current->type+= yytext;
2314 yyextra->current->name=
"";
2316<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2317 yyextra->current->type+= yyextra->current->name;
2318 yyextra->current->name=yytext;
2320<QtPropType,QtPropAttr>{B}+"READ"{B}+ {
2321 yyextra->current->spec.setReadable(
true);
2324<QtPropType,QtPropAttr>{B}+"WRITE"{B}+ {
2325 yyextra->current->spec.setWritable(
true);
2328<QtPropType,QtPropAttr>{B}+"MEMBER"{B}+{ID} |
2329<QtPropType,QtPropAttr>{B}+"RESET"{B}+{ID} |
2330<QtPropType,QtPropAttr>{B}+"SCRIPTABLE"{B}+{ID} |
2331<QtPropType,QtPropAttr>{B}+"DESIGNABLE"{B}+{ID} |
2332<QtPropType,QtPropAttr>{B}+"NOTIFY"{B}+{ID} |
2333<QtPropType,QtPropAttr>{B}+"REVISION"{B}+{ID} |
2334<QtPropType,QtPropAttr>{B}+"STORED"{B}+{ID} |
2335<QtPropType,QtPropAttr>{B}+"USER"{B}+{ID} |
2336<QtPropType,QtPropAttr>{B}+"CONSTANT"{B} |
2337<QtPropType,QtPropAttr>{B}+"FINAL"{B} {
2341 yyextra->current->read = yytext;
2345 yyextra->current->write = yytext;
2348<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2349 yyextra->current->name=yytext;
2353<FindMembers>"requires" {
2354 if (yyextra->insideJava) REJECT;
2355 yyextra->current->req.clear();
2356 yyextra->requiresContext = YY_START;
2357 BEGIN(RequiresClause);
2359<RequiresClause>"requires"{BN}*/"{" {
2360 if (yyextra->insideJava) REJECT;
2362 yyextra->current->req+=yytext;
2363 BEGIN( RequiresExpression ) ;
2365<RequiresClause>"requires"{BN}*"(" {
2366 if (yyextra->insideJava) REJECT;
2368 yyextra->current->req+=yytext;
2369 yyextra->lastRoundContext=RequiresExpression;
2370 yyextra->pCopyRoundString=&yyextra->current->req;
2371 yyextra->roundCount=0;
2372 BEGIN( CopyRound ) ;
2374<RequiresExpression>"{" {
2375 yyextra->current->req+=yytext;
2376 yyextra->lastCurlyContext=RequiresClause;
2377 yyextra->pCopyCurlyString=&yyextra->current->req;
2378 yyextra->curlyCount=0;
2379 BEGIN( CopyCurly ) ;
2381<RequiresExpression>\n {
2382 yyextra->current->req+=
' ';
2385<RequiresExpression>. {
2386 yyextra->current->req+=yytext;
2388<RequiresClause>"(" {
2389 yyextra->current->req+=yytext;
2390 yyextra->lastRoundContext=RequiresClause;
2391 yyextra->pCopyRoundString=&yyextra->current->req;
2392 yyextra->roundCount=0;
2393 BEGIN( CopyRound ) ;
2395<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2399 yyextra->current->req+=yytext;
2400 yyextra->lastRoundContext=RequiresClause;
2401 yyextra->pCopyRoundString=&yyextra->current->req;
2402 yyextra->roundCount=0;
2410<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2414 yyextra->current->req+=yytext;
2415 yyextra->lastSharpContext=RequiresClause;
2416 yyextra->pCopySharpString=&yyextra->current->req;
2417 yyextra->sharpCount=0;
2425<RequiresClause>{NOTopt}{SCOPENAME} {
2429 yyextra->current->req=yytext;
2430 BEGIN(yyextra->requiresContext);
2437<RequiresClause>{NOTopt}"::"{ID} {
2439 yyextra->current->req+=yytext;
2441<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2443 yyextra->current->req+=yytext;
2445<RequiresClause>{BN}+ {
2446 yyextra->current->req+=
' ';
2451 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2452 BEGIN(yyextra->requiresContext);
2454<FindMembers,FindMemberName>{SCOPENAME} {
2456 yyextra->yyBegColNr=yyextra->yyColNr;
2457 yyextra->yyBegLineNr=yyextra->yyLineNr;
2459 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2463 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2465 if (yyextra->insideIDL)
2470 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2474 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2479 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2481 BEGIN(IDLUnionCase);
2483 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2485 yyextra->insideTryBlock=
FALSE;
2486 BEGIN(TryFunctionBlock);
2488 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2490 yyextra->lastAlignAsContext = YY_START;
2493 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2495 yyextra->current->type=
"var";
2497 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2499 yyextra->current->type=
"function";
2501 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2505 yyextra->current->name=
"this";
2508 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2511 BEGIN(StaticAssert);
2513 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2517 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2518 yyextra->current->type+=yytext;
2521 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2523 if (yyextra->current->type.isEmpty())
2525 yyextra->current->type =
"optional";
2529 yyextra->current->type +=
" optional";
2531 yyextra->lastModifierContext = YY_START;
2532 BEGIN(SliceOptional);
2536 if (YY_START==FindMembers)
2540 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2541 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2543 yyextra->current->protection = Protection::Public;
2545 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2547 yyextra->current->protection = Protection::Protected;
2549 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2551 yyextra->current->protection = Protection::Package;
2553 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2555 yyextra->current->protection = Protection::Private;
2557 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2559 if (YY_START==FindMembers)
2560 yyextra->current->name = yytext;
2562 yyextra->current->name += yytext;
2563 yyextra->current->isStatic =
TRUE;
2567 if (YY_START==FindMembers)
2568 yyextra->current->name = yytext;
2570 yyextra->current->name += yytext;
2571 if (yyextra->current->name.startsWith(
"static "))
2573 yyextra->current->isStatic =
TRUE;
2574 yyextra->current->name= yyextra->current->name.mid(7);
2576 else if (yyextra->current->name.startsWith(
"inline "))
2578 if (yyextra->current->type.isEmpty())
2580 yyextra->current->type=
"inline";
2584 yyextra->current->type+=
"inline ";
2586 yyextra->current->name= yyextra->current->name.mid(7);
2588 else if (yyextra->current->name.startsWith(
"constexpr "))
2590 if (yyextra->current->type.isEmpty())
2592 yyextra->current->type=
"constexpr";
2596 yyextra->current->type+=
"constexpr ";
2598 yyextra->current->name=yyextra->current->name.mid(10);
2600 else if (yyextra->current->name.startsWith(
"consteval "))
2602 if (yyextra->current->type.isEmpty())
2604 yyextra->current->type=
"consteval";
2608 yyextra->current->type+=
"consteval ";
2610 yyextra->current->name=yyextra->current->name.mid(10);
2612 else if (yyextra->current->name.startsWith(
"constinit "))
2614 if (yyextra->current->type.isEmpty())
2616 yyextra->current->type=
"constinit";
2620 yyextra->current->type+=
"constinit ";
2622 yyextra->current->name=yyextra->current->name.mid(10);
2624 else if (yyextra->current->name.startsWith(
"const "))
2626 if (yyextra->current->type.isEmpty())
2628 yyextra->current->type=
"const";
2632 yyextra->current->type+=
"const ";
2634 yyextra->current->name=yyextra->current->name.mid(6);
2636 else if (yyextra->current->name.startsWith(
"volatile "))
2638 if (yyextra->current->type.isEmpty())
2640 yyextra->current->type=
"volatile";
2644 yyextra->current->type+=
"volatile ";
2646 yyextra->current->name=yyextra->current->name.mid(9);
2648 else if (yyextra->current->name.startsWith(
"typedef "))
2650 if (yyextra->current->type.isEmpty())
2652 yyextra->current->type=
"typedef";
2656 yyextra->current->type+=
"typedef ";
2658 yyextra->current->name=yyextra->current->name.mid(8);
2668 yyextra->externLinkage=
FALSE;
2672 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2675 yyextra->lastSkipRoundContext = FindMembers;
2676 yyextra->roundCount=0;
2679<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2685 yyextra->current->type+=yytext;
2686 yyextra->lastRoundContext=FindMembers;
2687 yyextra->pCopyRoundString=&yyextra->current->type;
2688 yyextra->roundCount=0;
2691<DeclType>{BN}+ {
lineCount(yyscanner); }
2696<CSIndexer>"["[^\n\]]*"]" {
2700<FindMembers>[0-9]{ID} {
2703 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2705 yyextra->current->name+=
".";
2709 yyextra->current->name+=yytext;
2711<CppQuote>"("{B}*"\"" {
2712 yyextra->insideCppQuote=
TRUE;
2716<IDLUnionCase>":" { BEGIN(FindMembers); }
2717<IDLUnionCase>\n {
lineCount(yyscanner); }
2719<TryFunctionBlock>\n {
lineCount(yyscanner); }
2720<TryFunctionBlock>"{" {
2721 yyextra->curlyCount=0;
2722 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2726<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2728<TryFunctionBlockEnd>\n { unput(*yytext);
2729 BEGIN( FindMembers );
2731<TryFunctionBlockEnd>. { unput(*yytext);
2732 BEGIN( FindMembers );
2735 yyextra->insideCppQuote=
FALSE;
2738<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2740 yyextra->lastCPPContext = YY_START;
2743<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2744<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2745 if (yyextra->insidePHP)
2747 yyextra->current->bodyLine = yyextra->yyLineNr;
2748 yyextra->current->bodyColumn = yyextra->yyColNr;
2749 yyextra->current->fileName = yyextra->fileName;
2750 yyextra->current->startLine = yyextra->yyLineNr;
2751 yyextra->current->startColumn = yyextra->yyColNr;
2752 yyextra->current->type.clear();
2753 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2754 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2755 yyextra->current->section = EntryType::makeDefine();
2756 yyextra->lastDefineContext = YY_START;
2759<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2760 yyextra->yyLineNr = atoi(&yytext[1]);
2762 yyextra->lastPreLineCtrlContext = YY_START;
2763 if (YY_START==ReadBody ||
2764 YY_START==ReadNSBody ||
2765 YY_START==ReadBodyIntf)
2767 yyextra->current->program << yytext;
2769 BEGIN( PreLineCtrl );
2771<PreLineCtrl>"\""[^\n\"]*"\"" {
2773 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2774 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2775 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2777 yyextra->current->program << yytext;
2781 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2782 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2783 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2785 yyextra->current->program << yytext;
2789 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2790 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2791 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2793 yyextra->current->program << yytext;
2796 BEGIN( yyextra->lastPreLineCtrlContext );
2799<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2800<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2801 BEGIN( yyextra->lastCPPContext) ;
2803<SDefine>{ID}{B}*"(" {
2804 yyextra->current->name = yytext;
2805 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2806 yyextra->current->args =
"(";
2807 yyextra->current->bodyLine = yyextra->yyLineNr;
2808 yyextra->current->bodyColumn = yyextra->yyColNr;
2809 yyextra->currentArgumentContext = DefineEnd;
2810 yyextra->fullArgString=yyextra->current->args;
2811 yyextra->copyArgString=&yyextra->current->args;
2812 BEGIN( ReadFuncArgType ) ;
2827 yyextra->current->bodyLine = yyextra->yyLineNr;
2828 yyextra->current->bodyColumn = yyextra->yyColNr;
2829 yyextra->current->name = yytext;
2836 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2838 BEGIN(yyextra->lastDefineContext);
2842 yyextra->current->fileName = yyextra->fileName;
2843 yyextra->current->startLine = yyextra->yyLineNr;
2844 yyextra->current->startColumn = yyextra->yyColNr;
2845 yyextra->current->type.clear();
2846 yyextra->current->type =
"const";
2850 yyextra->current->initializer.str(
init.str());
2851 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2852 yyextra->current->section = EntryType::makeVariable();
2853 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2858<DefineEnd>\\[\r]?\n {
2860 yyextra->current->endBodyLine = yyextra->yyLineNr;
2863 if (yyextra->insideIDL && yyextra->insideCppQuote)
2869 yyextra->lastStringContext=DefineEnd;
2874<DefinePHP>{ID}["']{BN}*","{BN}* {
2875 yyextra->current->name = yytext;
2876 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2877 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2878 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
2879 yyextra->current->bodyLine = yyextra->yyLineNr;
2880 yyextra->current->bodyColumn = yyextra->yyColNr;
2881 yyextra->lastRoundContext = DefinePHPEnd;
2882 yyextra->pCopyRoundGString = &yyextra->current->initializer;
2883 yyextra->roundCount = 0;
2884 BEGIN( GCopyRound );
2888 if (yyextra->insideCli)
2891 yyextra->current->name = yytext ;
2899 yyextra->current->name += yytext ;
2902<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
2903 if (yyextra->current->bodyLine==-1)
2905 yyextra->current->bodyLine=yyextra->yyLineNr;
2906 yyextra->current->bodyColumn = yyextra->yyColNr;
2908 yyextra->docBlockContext = YY_START;
2909 yyextra->docBlockInBody =
FALSE;
2910 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2915 yyextra->docBlock.str(indent.
str());
2919 yyextra->docBlockTerm =
';';
2920 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2922 yyextra->current->bitfields =
":"+yyextra->current->args;
2923 yyextra->current->args.clear();
2924 yyextra->current->section = EntryType::makeVariable();
2926 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)
2937<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
2938 yyextra->docBlockContext = YY_START;
2939 yyextra->docBlockInBody =
FALSE;
2940 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2945 yyextra->docBlock.str(indent.
str());
2948 yyextra->docBlockTerm =
',';
2949 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
2951 yyextra->current->bitfields =
":"+yyextra->current->args;
2952 yyextra->current->args.clear();
2953 yyextra->current->section = EntryType::makeVariable();
2955 if (yytext[yyleng-3]==
'/')
2966<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
2967 if (yyextra->current->bodyLine==-1)
2969 yyextra->current->bodyLine=yyextra->yyLineNr;
2970 yyextra->current->bodyColumn = yyextra->yyColNr;
2972 yyextra->docBlockContext = YY_START;
2973 yyextra->docBlockInBody =
FALSE;
2974 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
2978 yyextra->docBlock.str(indent.
str());
2981 yyextra->docBlockTerm = 0;
2982 if (yytext[yyleng-3]==
'/')
2994<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
2996 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
2999 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3004 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3010 if (yytext[2]==
'!' || yytext[2]==
'/')
3012 yyextra->docBlockContext = YY_START;
3013 yyextra->docBlockInBody =
FALSE;
3014 yyextra->docBlockAutoBrief =
FALSE;
3015 yyextra->docBlock.str(std::string());
3016 yyextra->docBlockTerm = 0;
3022 yyextra->lastCContext=YY_START;
3023 BEGIN(SkipCxxComment);
3028 if (yytext[2]==
'!' || yytext[2]==
'*')
3030 yyextra->docBlockContext = YY_START;
3031 yyextra->docBlockInBody =
FALSE;
3032 yyextra->docBlock.str(std::string());
3033 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3035 yyextra->docBlockTerm = 0;
3041 yyextra->lastCContext=YY_START;
3046<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3047 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3048 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3052 if (!yyextra->insideCS) REJECT;
3053 yyextra->current->bodyLine = yyextra->yyLineNr;
3054 yyextra->current->bodyColumn = yyextra->yyColNr;
3055 yyextra->current->initializer.str(yytext);
3056 yyextra->lastInitializerContext = YY_START;
3057 yyextra->initBracketCount=0;
3058 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3059 yyextra->current->spec.setGettable(
true);
3060 BEGIN(ReadInitializerPtr);
3063 yyextra->current->bodyLine = yyextra->yyLineNr;
3064 yyextra->current->bodyColumn = yyextra->yyColNr;
3065 yyextra->current->initializer.str(yytext);
3066 yyextra->lastInitializerContext = YY_START;
3067 yyextra->initBracketCount=0;
3068 BEGIN(ReadInitializer);
3070<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3072 yyextra->current->exception +=
" ";
3075<UNOIDLAttributeBlock>"}" {
3076 yyextra->current->exception +=
" }";
3080<ReadInitializer,ReadInitializerPtr>"(" {
3081 yyextra->lastRoundContext=YY_START;
3082 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3083 yyextra->roundCount=0;
3084 yyextra->current->initializer << *yytext;
3087<ReadInitializer,ReadInitializerPtr>"[" {
3088 if (!yyextra->insidePHP) REJECT;
3089 yyextra->lastSquareContext=YY_START;
3090 yyextra->pCopySquareGString=&yyextra->current->initializer;
3091 yyextra->squareCount=0;
3092 yyextra->current->initializer << *yytext;
3095<ReadInitializer,ReadInitializerPtr>"{" {
3096 yyextra->lastCurlyContext=YY_START;
3097 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3098 yyextra->curlyCount=0;
3099 yyextra->current->initializer << *yytext;
3102<ReadInitializer,ReadInitializerPtr>[;,] {
3104 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3106 yyextra->current->fileName = yyextra->fileName;
3107 yyextra->current->startLine = yyextra->yyLineNr;
3108 yyextra->current->startColumn = yyextra->yyColNr;
3109 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3110 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3111 yyextra->current->section = EntryType::makeVariable();
3112 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3116 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3119 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3120 BEGIN(yyextra->lastInitializerContext);
3122 else if (*yytext==
',' && yyextra->initBracketCount==0)
3125 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3126 BEGIN(yyextra->lastInitializerContext);
3130 yyextra->current->initializer << *yytext;
3133<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3134 if (!yyextra->insideCpp)
3140 yyextra->current->initializer << yytext;
3142 yyextra->lastRawStringContext = YY_START;
3143 yyextra->pCopyRawGString = &yyextra->current->initializer;
3148<RawGString>{RAWEND} {
3151 *yyextra->pCopyRawGString << yytext;
3152 BEGIN(yyextra->lastRawStringContext);
3159<RawGString>[^)\n]+ {
3160 *yyextra->pCopyRawGString << yytext;
3163 *yyextra->pCopyRawGString << yytext;
3166 *yyextra->pCopyRawGString << yytext;
3169<RawString>{RAWEND} {
3170 *yyextra->pCopyRawString+=yytext;
3171 yyextra->fullArgString+=yytext;
3174 BEGIN(yyextra->lastRawStringContext);
3178 *yyextra->pCopyRawString += yytext;
3179 yyextra->fullArgString+=yytext;
3182 *yyextra->pCopyRawString += yytext;
3183 yyextra->fullArgString+=yytext;
3186 *yyextra->pCopyRawString += yytext;
3187 yyextra->fullArgString+=yytext;
3190<ReadInitializer,ReadInitializerPtr>\" {
3191 if (yyextra->insideIDL && yyextra->insideCppQuote)
3197 yyextra->lastStringContext=YY_START;
3198 yyextra->current->initializer << yytext;
3199 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3200 yyextra->stopAtInvalidString=
false;
3204<ReadInitializer,ReadInitializerPtr>"->" {
3205 yyextra->current->initializer << yytext;
3207<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3208 yyextra->current->initializer << yytext;
3210<ReadInitializer,ReadInitializerPtr>(">>"|">=") {
3211 yyextra->current->initializer << yytext;
3213<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3214 yyextra->initBracketCount++;
3215 yyextra->current->initializer << *yytext;
3217<ReadInitializer,ReadInitializerPtr>[>\]})] {
3218 yyextra->initBracketCount--;
3221 yyextra->current->endBodyLine=yyextra->yyLineNr;
3223 yyextra->current->initializer << *yytext;
3225<ReadInitializer,ReadInitializerPtr>\' {
3226 if (yyextra->insidePHP)
3228 yyextra->current->initializer << yytext;
3229 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3230 yyextra->lastStringContext=YY_START;
3231 BEGIN(CopyPHPGString);
3235 yyextra->current->initializer << yytext;
3238<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3239 if (yyextra->insidePHP)
3245 yyextra->current->initializer << yytext;
3248<ReadInitializer,ReadInitializerPtr>\n {
3249 yyextra->current->initializer << *yytext;
3252<ReadInitializer,ReadInitializerPtr>"@\"" {
3254 yyextra->current->initializer << yytext;
3255 if (!yyextra->insideCS && !yyextra->insideObjC)
3262 yyextra->lastSkipVerbStringContext=YY_START;
3263 yyextra->pSkipVerbString=&yyextra->current->initializer;
3264 BEGIN(SkipVerbString);
3267<SkipVerbString>[^\n"\\]+ {
3268 *yyextra->pSkipVerbString << yytext;
3270<SkipVerbString>"\\\\" {
3271 if (yyextra->insideCS) REJECT
3272 *yyextra->pSkipVerbString << yytext;
3274<SkipVerbString>"\\\"" {
3275 if (yyextra->insideCS) REJECT
3276 *yyextra->pSkipVerbString << yytext;
3278<SkipVerbString>"\"\"" {
3279 *yyextra->pSkipVerbString << yytext;
3281<SkipVerbString>"\"" {
3282 *yyextra->pSkipVerbString << *yytext;
3283 BEGIN(yyextra->lastSkipVerbStringContext);
3286 *yyextra->pSkipVerbString << *yytext;
3290 *yyextra->pSkipVerbString << *yytext;
3292<ReadInitializer,ReadInitializerPtr>"?>" {
3293 if (yyextra->insidePHP)
3294 BEGIN( FindMembersPHP );
3296 yyextra->current->initializer << yytext;
3298<ReadInitializer,ReadInitializerPtr>. {
3299 yyextra->current->initializer << *yytext;
3303<CopyString,CopyPHPString>\\. {
3304 *yyextra->pCopyQuotedString+=yytext;
3307 *yyextra->pCopyQuotedString+=*yytext;
3308 BEGIN( yyextra->lastStringContext );
3311 *yyextra->pCopyQuotedString+=*yytext;
3312 BEGIN( yyextra->lastStringContext );
3314<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3315 *yyextra->pCopyQuotedString+=yytext;
3317<CopyString,CopyPHPString>\n {
3318 *yyextra->pCopyQuotedString+=*yytext;
3321<CopyString,CopyPHPString>. {
3322 *yyextra->pCopyQuotedString+=*yytext;
3326<CopyGString,CopyPHPGString>\\. {
3327 *yyextra->pCopyQuotedGString << yytext;
3330 *yyextra->pCopyQuotedGString << *yytext;
3331 BEGIN( yyextra->lastStringContext );
3334 *yyextra->pCopyQuotedGString << *yytext;
3335 BEGIN( yyextra->lastStringContext );
3337<CopyGString,CopyPHPGString>"<?php" {
3338 *yyextra->pCopyQuotedGString << yytext;
3339 BEGIN( yyextra->lastStringContext );
3341<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3342 *yyextra->pCopyQuotedGString << yytext;
3344<CopyGString,CopyPHPGString>\n {
3345 *yyextra->pCopyQuotedGString << *yytext;
3346 if (yyextra->stopAtInvalidString)
3348 BEGIN( yyextra->lastStringContext );
3355<CopyGString,CopyPHPGString>. {
3356 *yyextra->pCopyQuotedGString << *yytext;
3361 *yyextra->pCopyRoundString += *yytext;
3362 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3363 yyextra->lastStringContext=YY_START;
3367 *yyextra->pCopyRoundString += *yytext;
3368 yyextra->roundCount++;
3371 *yyextra->pCopyRoundString += *yytext;
3372 if (--yyextra->roundCount<0)
3373 BEGIN(yyextra->lastRoundContext);
3377 *yyextra->pCopyRoundString += *yytext;
3380 if (yyextra->insidePHP)
3382 yyextra->current->initializer << yytext;
3383 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3384 yyextra->lastStringContext=YY_START;
3385 BEGIN(CopyPHPString);
3389 *yyextra->pCopyRoundString += yytext;
3392<CopyRound>{CHARLIT} {
3393 if (yyextra->insidePHP)
3399 *yyextra->pCopyRoundString+=yytext;
3402<CopyRound>[^"'()\n,]+ {
3403 *yyextra->pCopyRoundString+=yytext;
3406 *yyextra->pCopyRoundString+=*yytext;
3411 *yyextra->pCopySharpString += *yytext;
3412 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3413 yyextra->lastStringContext=YY_START;
3417 *yyextra->pCopySharpString += *yytext;
3418 yyextra->sharpCount++;
3421 *yyextra->pCopySharpString += *yytext;
3422 if (--yyextra->sharpCount<0)
3424 BEGIN(yyextra->lastSharpContext);
3429 *yyextra->pCopySharpString += *yytext;
3432 if (yyextra->insidePHP)
3434 yyextra->current->initializer << yytext;
3435 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3436 yyextra->lastStringContext=YY_START;
3437 BEGIN(CopyPHPString);
3441 *yyextra->pCopySharpString += yytext;
3444<CopySharp>{CHARLIT} {
3445 if (yyextra->insidePHP)
3451 *yyextra->pCopySharpString+=yytext;
3454<CopySharp>[^"'<>\n,]+ {
3455 *yyextra->pCopySharpString+=yytext;
3458 *yyextra->pCopySharpString+=*yytext;
3464 *yyextra->pCopyRoundGString << *yytext;
3465 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3466 yyextra->lastStringContext=YY_START;
3470 *yyextra->pCopyRoundGString << *yytext;
3471 yyextra->roundCount++;
3474 *yyextra->pCopyRoundGString << *yytext;
3475 if (--yyextra->roundCount<0)
3476 BEGIN(yyextra->lastRoundContext);
3480 *yyextra->pCopyRoundGString << *yytext;
3483 if (yyextra->insidePHP)
3485 yyextra->current->initializer << yytext;
3486 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3487 yyextra->lastStringContext=YY_START;
3488 BEGIN(CopyPHPGString);
3492 *yyextra->pCopyRoundGString << yytext;
3495<GCopyRound>{CHARLIT} {
3496 if (yyextra->insidePHP)
3502 *yyextra->pCopyRoundGString << yytext;
3506 if (!yyextra->insideCS) REJECT;
3507 *yyextra->pCopyRoundGString << yytext;
3508 yyextra->lastSkipVerbStringContext=YY_START;
3509 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3510 BEGIN(SkipVerbString);
3512<GCopyRound>[^"'()\n\/,R]+ {
3513 *yyextra->pCopyRoundGString << yytext;
3515<GCopyRound>{RAWBEGIN} {
3516 *yyextra->pCopyRoundGString << yytext;
3518 yyextra->lastRawStringContext = YY_START;
3519 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3523 *yyextra->pCopyRoundGString << *yytext;
3528 *yyextra->pCopySquareGString << *yytext;
3529 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3530 yyextra->lastStringContext=YY_START;
3534 *yyextra->pCopySquareGString << *yytext;
3535 if (yyextra->insidePHP)
3537 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3538 yyextra->lastStringContext=YY_START;
3539 BEGIN(CopyPHPGString);
3543 *yyextra->pCopySquareGString << *yytext;
3544 yyextra->squareCount++;
3547 *yyextra->pCopySquareGString << *yytext;
3548 if (--yyextra->squareCount<0)
3549 BEGIN(yyextra->lastSquareContext);
3553 *yyextra->pCopySquareGString << *yytext;
3556 if (yyextra->insidePHP)
3558 yyextra->current->initializer << yytext;
3559 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3560 yyextra->lastStringContext=YY_START;
3561 BEGIN(CopyPHPGString);
3565 *yyextra->pCopySquareGString << yytext;
3568<GCopySquare>{CHARLIT} {
3569 if (yyextra->insidePHP)
3575 *yyextra->pCopySquareGString << yytext;
3578<GCopySquare>[^"'\[\]\n\/,]+ {
3579 *yyextra->pCopySquareGString << yytext;
3582 *yyextra->pCopySquareGString << *yytext;
3587 *yyextra->pCopyCurlyString += *yytext;
3588 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3589 yyextra->lastStringContext=YY_START;
3593 *yyextra->pCopyCurlyString += *yytext;
3594 if (yyextra->insidePHP)
3596 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3597 yyextra->lastStringContext=YY_START;
3598 BEGIN(CopyPHPString);
3602 *yyextra->pCopyCurlyString += *yytext;
3603 yyextra->curlyCount++;
3606 *yyextra->pCopyCurlyString += *yytext;
3607 if (--yyextra->curlyCount<0)
3608 BEGIN(yyextra->lastCurlyContext);
3610<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3616 *yyextra->pCopyCurlyString += yytext;
3619<CopyCurly>[^"'{}\/\n,]+ {
3620 *yyextra->pCopyCurlyString += yytext;
3622<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3625 *yyextra->pCopyCurlyString += *yytext;
3628 *yyextra->pCopyCurlyString += *yytext;
3632<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3634<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3636 int s = line.
find(
' ');
3637 int e = line.
find(
'"',s);
3638 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3639 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3646 *yyextra->pCopyCurlyGString << *yytext;
3647 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3648 yyextra->lastStringContext=YY_START;
3652 *yyextra->pCopyCurlyGString << *yytext;
3653 if (yyextra->insidePHP)
3655 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3656 yyextra->lastStringContext=YY_START;
3657 BEGIN(CopyPHPGString);
3661 *yyextra->pCopyCurlyGString << *yytext;
3662 yyextra->curlyCount++;
3665 *yyextra->pCopyCurlyGString << *yytext;
3666 if (--yyextra->curlyCount<0)
3668 yyextra->current->endBodyLine = yyextra->yyLineNr;
3669 BEGIN(yyextra->lastCurlyContext);
3672<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3678 *yyextra->pCopyCurlyGString << yytext;
3681<GCopyCurly>[^"'{}\/\n,]+ {
3682 *yyextra->pCopyCurlyGString << yytext;
3685 *yyextra->pCopyCurlyGString << yytext;
3687<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3690 *yyextra->pCopyCurlyGString << *yytext;
3693 *yyextra->pCopyCurlyGString << *yytext;
3700 if (yyextra->current->type.isEmpty() &&
3701 yyextra->current->name==
"enum")
3703 yyextra->current->section = EntryType::makeEnum();
3704 yyextra->current->name.clear();
3705 yyextra->current->args.clear();
3706 BEGIN(EnumBaseType);
3710 if (yyextra->current->type.isEmpty())
3713 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3716 yyextra->current->bitfields+=
":";
3720 yyextra->current->bitfields+=*yytext;
3723 yyextra->current->args+=*yytext;
3727 yyextra->current->args+=
' ';
3730 QCString oldType = yyextra->current->type;
3731 if (yyextra->current->bodyLine==-1)
3733 yyextra->current->bodyLine = yyextra->yyLineNr;
3734 yyextra->current->bodyColumn = yyextra->yyColNr;
3736 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3738 yyextra->current->type = yyextra->current->type.mid(3);
3740 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3742 yyextra->current->type.prepend(
"typedef ");
3744 bool isStatic = yyextra->current->isStatic;
3745 Protection prot = yyextra->current->protection;
3746 bool isConcept = yyextra->current->section.isConcept();
3747 bool isModule = yyextra->current->section.isModuleDoc();
3750 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3755 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3758 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
3760 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
3762 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
3763 if (yyextra->current->section.isClass())
3767 yyextra->current->section = EntryType::makeVariable() ;
3768 yyextra->current->fileName = yyextra->fileName;
3769 yyextra->current->startLine = yyextra->yyBegLineNr;
3770 yyextra->current->startColumn = yyextra->yyBegColNr;
3771 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3774 if ( *yytext ==
',')
3776 yyextra->current->isStatic = isStatic;
3777 yyextra->current->protection = prot;
3778 yyextra->current->name.clear();
3779 yyextra->current->args.clear();
3780 yyextra->current->brief.clear();
3781 yyextra->current->doc.clear();
3782 yyextra->current->initializer.str(std::string());
3783 yyextra->current->bitfields.clear();
3788 yyextra->mtype = MethodTypes::Method;
3789 yyextra->virt = Specifier::Normal;
3790 yyextra->current->bodyLine = -1;
3791 yyextra->current->bodyColumn = 1;
3792 yyextra->current->groups.clear();
3798 if (yyextra->insideSlice)
3800 yyextra->squareCount=1;
3801 yyextra->lastSquareContext = YY_START;
3802 yyextra->current->metaData +=
"[";
3803 BEGIN( SliceMetadata );
3805 else if (!yyextra->insideCS &&
3806 (yyextra->current->name.isEmpty() ||
3807 yyextra->current->name==
"typedef"
3811 yyextra->squareCount=1;
3812 yyextra->lastSquareContext = YY_START;
3813 yyextra->idlAttr.clear();
3814 yyextra->idlProp.clear();
3815 yyextra->current->mtype = yyextra->mtype;
3818 yyextra->current->mtype == MethodTypes::Property)
3820 yyextra->odlProp =
true;
3821 yyextra->current->spec.setGettable(
true).setSettable(
true);
3824 BEGIN( IDLAttribute );
3826 else if (yyextra->insideCS &&
3827 yyextra->current->name.isEmpty())
3829 yyextra->squareCount=1;
3830 yyextra->lastSquareContext = YY_START;
3833 yyextra->current->args.clear();
3834 BEGIN( SkipSquare );
3838 yyextra->current->args += yytext ;
3839 yyextra->squareCount=1;
3840 yyextra->externLinkage=
FALSE;
3845 yyextra->squareCount++;
3846 yyextra->current->metaData +=
"[";
3848<SliceMetadata>{BN}* {
3851<SliceMetadata>\"[^\"]*\" {
3852 yyextra->current->metaData += yytext;
3855 yyextra->current->metaData += yytext;
3858 yyextra->current->metaData += yytext;
3859 if (--yyextra->squareCount<=0)
3861 BEGIN (yyextra->lastSquareContext);
3865 yyextra->current->type +=
"(";
3866 yyextra->roundCount++;
3868<SliceOptional>[0-9]+ {
3869 yyextra->current->type += yytext;
3872 yyextra->current->type +=
")";
3873 if(--yyextra->roundCount<=0)
3875 BEGIN (yyextra->lastModifierContext);
3880 if (--yyextra->squareCount<=0)
3883 if (yyextra->current->mtype == MethodTypes::Property)
3884 BEGIN( IDLPropName );
3886 BEGIN( yyextra->lastSquareContext );
3889<IDLAttribute>"propput" {
3892 yyextra->current->mtype = MethodTypes::Property;
3894 yyextra->current->spec.setSettable(
true);
3896<IDLAttribute>"propget" {
3899 yyextra->current->mtype = MethodTypes::Property;
3901 yyextra->current->spec.setGettable(
true);
3903<IDLAttribute>"property" {
3904 yyextra->current->spec.setProperty(
true);
3906<IDLAttribute>"attribute" {
3907 yyextra->current->spec.setAttribute(
true);
3909<IDLAttribute>"optional" {
3910 yyextra->current->spec.setOptional(
true);
3912<IDLAttribute>"readonly" {
3915 yyextra->current->spec.setSettable(
false);
3919 yyextra->current->spec.setReadonly(
true);
3922<IDLAttribute>"bound" {
3923 yyextra->current->spec.setBound(
true);
3925<IDLAttribute>"removable" {
3926 yyextra->current->spec.setRemovable(
true);
3928<IDLAttribute>"constrained" {
3929 yyextra->current->spec.setConstrained(
true);
3931<IDLAttribute>"transient" {
3932 yyextra->current->spec.setTransient(
true);
3934<IDLAttribute>"maybevoid" {
3935 yyextra->current->spec.setMaybeVoid(
true);
3937<IDLAttribute>"maybedefault" {
3938 yyextra->current->spec.setMaybeDefault(
true);
3940<IDLAttribute>"maybeambiguous" {
3941 yyextra->current->spec.setMaybeAmbiguous(
true);
3945<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
3948 if (yyextra->odlProp)
3950 yyextra->idlProp = yytext;
3953<IDLPropName>{ID}{BN}*"(" {
3954 yyextra->current->name = yytext;
3955 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3956 yyextra->current->startLine = yyextra->yyLineNr;
3957 yyextra->current->startColumn = yyextra->yyColNr;
3960<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
3961 if (yyextra->odlProp)
3963 yyextra->idlProp += yytext;
3966<IDLPropName>{ID}{BNopt}/";" {
3967 if (yyextra->odlProp)
3969 yyextra->current->name = yytext;
3970 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
3971 yyextra->odlProp =
false;
3976<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
3977 yyextra->idlAttr = yytext;
3978 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
3981 yyextra->idlProp = yytext;
3983<IDLProp>{BN}*{ID}{BN}*"," {
3984 if (yyextra->current->args.isEmpty())
3985 yyextra->current->args =
"(";
3987 yyextra->current->args +=
", ";
3988 yyextra->current->args += yyextra->idlAttr;
3989 yyextra->current->args +=
" ";
3990 yyextra->current->args += yyextra->idlProp;
3991 yyextra->current->args +=
" ";
3992 yyextra->current->args += yytext;
3993 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
3994 yyextra->idlProp.clear();
3995 yyextra->idlAttr.clear();
3998<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4002 yyextra->current->fileName = yyextra->fileName;
4003 yyextra->current->type = yyextra->idlProp;
4004 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4005 if (!yyextra->current->args.isEmpty())
4006 yyextra->current->args +=
")";
4007 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4008 yyextra->current->section = EntryType::makeVariable();
4009 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4011 BEGIN( FindMembers );
4016<Array>"]" { yyextra->current->args += *yytext ;
4017 if (--yyextra->squareCount<=0)
4018 BEGIN( FindMembers ) ;
4020<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4021 if (--yyextra->squareCount<=0)
4022 BEGIN( SFunction ) ;
4024<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4025 yyextra->squareCount++;
4027<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4028<SkipSquare>"[" { yyextra->squareCount++; }
4030 if (--yyextra->squareCount<=0)
4031 BEGIN( yyextra->lastSquareContext );
4034 yyextra->lastStringContext=YY_START;
4035 BEGIN( SkipString );
4037<SkipSquare>[^\n\[\]\"]+
4038<FindMembers>"<" {
addType(yyscanner);
4039 yyextra->current->type += yytext ;
4042<Sharp>">" { yyextra->current->type += *yytext ;
4043 if (--yyextra->sharpCount<=0)
4044 BEGIN( FindMembers ) ;
4046<Sharp>"<" { yyextra->current->type += *yytext ;
4047 yyextra->sharpCount++;
4050 yyextra->current->type +=
' ';
4053<Sharp>. { yyextra->current->type += *yytext ; }
4056 yyextra->current->bodyLine = yyextra->yyLineNr;
4057 yyextra->current->bodyColumn = yyextra->yyColNr;
4058 yyextra->current->name = yytext;
4063 yyextra->lastInitializerContext = YY_START;
4064 yyextra->initBracketCount=0;
4065 yyextra->current->initializer.str(
"=");
4066 BEGIN(ReadInitializer);
4069 yyextra->lastInitializerContext = YY_START;
4070 yyextra->initBracketCount=0;
4071 yyextra->current->initializer.str(yytext);
4072 BEGIN(ReadInitializer);
4075 if (yyextra->insideJava)
4077 if (!yyextra->current->name.isEmpty())
4079 yyextra->current->fileName = yyextra->fileName;
4080 yyextra->current->startLine = yyextra->yyLineNr;
4081 yyextra->current->startColumn = yyextra->yyColNr;
4082 if (!yyextra->current_root->spec.isEnum())
4084 yyextra->current->type =
"@";
4086 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4087 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4088 yyextra->current->section = EntryType::makeVariable();
4089 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4093 BEGIN( FindMembers );
4104 if (!yyextra->current->name.isEmpty())
4106 yyextra->current->fileName = yyextra->fileName;
4107 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4109 yyextra->current->startLine = yyextra->current->bodyLine;
4110 yyextra->current->startColumn = yyextra->current->bodyColumn;
4114 yyextra->current->startLine = yyextra->yyLineNr;
4115 yyextra->current->startColumn = yyextra->yyColNr;
4117 if (!yyextra->current_root->spec.isEnum())
4119 yyextra->current->type =
"@";
4121 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4122 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4123 yyextra->current->section = EntryType::makeVariable();
4125 if (!yyextra->insideCS && !yyextra->insideJava &&
4126 !yyextra->current_root->spec.isStrong())
4133 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4135 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4140 yyextra->current->reset();
4145 yyextra->squareCount=1;
4146 yyextra->lastSquareContext = YY_START;
4149<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4150<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4151<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4154 yyextra->current->program << yytext ;
4157<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4158 yyextra->current->program << yytext ;
4159 yyextra->pSkipInterpString = &yyextra->current->program;
4160 yyextra->lastSkipInterpStringContext=YY_START;
4161 BEGIN( SkipInterpString );
4163<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})* {
4164 *yyextra->pSkipInterpString << yytext;
4166<SkipInterpString>\" {
4167 *yyextra->pSkipInterpString << *yytext;
4168 BEGIN( yyextra->lastSkipInterpStringContext );
4171<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4172 yyextra->current->program << yytext ;
4173 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4174 yyextra->lastSkipInterpVerbStringContext=YY_START;
4175 BEGIN( SkipInterpVerbString );
4177<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4178 *yyextra->pSkipInterpVerbString << yytext;
4180<SkipInterpString>"{"[^}]*"}" {
4181 *yyextra->pSkipInterpString << yytext;
4183<SkipInterpVerbString>"{"[^}]*"}" {
4184 *yyextra->pSkipInterpVerbString << yytext;
4186<SkipInterpVerbString>\" {
4187 *yyextra->pSkipInterpVerbString << *yytext;
4188 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4190<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4191<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4192 yyextra->pSkipVerbString = &yyextra->current->program;
4193 yyextra->lastSkipVerbStringContext=YY_START;
4194 BEGIN( SkipVerbString );
4196<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4198 yyextra->current->program << yytext ;
4199 yyextra->pCopyHereDocGString = &yyextra->current->program;
4200 yyextra->lastHereDocContext=YY_START;
4201 BEGIN( CopyHereDoc );
4208<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4209 yyextra->current->program << yytext;
4211 yyextra->lastRawStringContext = YY_START;
4212 yyextra->pCopyRawGString = &yyextra->current->program;
4215<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4216 yyextra->pCopyQuotedGString = &yyextra->current->program;
4217 yyextra->lastStringContext=YY_START;
4218 yyextra->stopAtInvalidString=
false;
4219 BEGIN( CopyGString );
4221<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4222<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4223 yyextra->lastContext = YY_START ;
4226<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4227 ++yyextra->yyLineNr ;
4228 yyextra->lastContext = YY_START ;
4231<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4232 if (!yyextra->insidePHP)
4234 yyextra->current->program << yytext;
4238 yyextra->current->program << yytext;
4239 yyextra->pCopyQuotedGString = &yyextra->current->program;
4240 yyextra->lastStringContext=YY_START;
4241 BEGIN(CopyPHPGString);
4244<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4245 if (yyextra->insidePHP)
4252 yyextra->current->program << yytext;
4255<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4256 ++yyextra->curlyCount ;
4259 yyextra->current->program << yytext ;
4260 --yyextra->curlyCount ;
4262<ReadBody,ReadNSBody>"}" {
4263 if ( yyextra->curlyCount>0 )
4265 yyextra->current->program << yytext ;
4266 --yyextra->curlyCount ;
4270 yyextra->current->endBodyLine = yyextra->yyLineNr;
4271 std::shared_ptr<Entry> original_root = yyextra->current_root;
4272 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4276 QCString doc = yyextra->current->doc;
4277 int docLine = yyextra->current->docLine;
4278 QCString docFile = yyextra->current->docFile;
4279 QCString brief = yyextra->current->brief;
4280 int briefLine = yyextra->current->briefLine;
4281 QCString briefFile = yyextra->current->briefFile;
4283 yyextra->current->doc =
"";
4284 yyextra->current->docLine = 0;
4285 yyextra->current->docFile =
"";
4286 yyextra->current->brief =
"";
4287 yyextra->current->briefLine = 0;
4288 yyextra->current->briefFile =
"";
4289 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4291 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4292 yyextra->current->program.str(std::string());
4293 new_current->name = yyextra->current->name.mid(split_point + 2);
4294 yyextra->current->name = yyextra->current->name.left(split_point);
4295 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4297 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4298 yyextra->current_root = yyextra->current;
4299 yyextra->current = new_current;
4302 yyextra->current->doc = doc;
4303 yyextra->current->docLine = docLine;
4304 yyextra->current->docFile = docFile;
4305 yyextra->current->brief = brief;
4306 yyextra->current->briefLine = briefLine;
4307 yyextra->current->briefFile = briefFile;
4309 QCString &cn = yyextra->current->name;
4310 QCString rn = yyextra->current_root->name;
4316 if (yyextra->isTypedef && cn.
isEmpty())
4319 BEGIN( TypedefName );
4323 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4325 yyextra->current->program <<
',';
4330 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4331 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4333 if (yyextra->insideObjC &&
4334 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4337 BEGIN( ReadBodyIntf ) ;
4341 yyextra->memspecEntry = yyextra->current;
4342 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4343 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4344 if (yyextra->current->section.isNamespace() ||
4345 yyextra->current->spec.isInterface() ||
4346 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4347 yyextra->insideSlice
4350 yyextra->current->reset();
4351 yyextra->current_root = std::move(original_root);
4353 yyextra->memspecEntry.reset();
4354 BEGIN( FindMembers ) ;
4358 static const reg::Ex re(R
"(@\d+$)");
4359 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4360 !
reg::search(yyextra->memspecEntry->name.str(),re))
4363 yyextra->current->doc.clear();
4364 yyextra->current->brief.clear();
4366 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.
4372<ReadBody>"}"{BN}+"typedef"{BN}+ {
4374 if ( yyextra->curlyCount>0 )
4376 yyextra->current->program << yytext ;
4377 --yyextra->curlyCount ;
4381 yyextra->isTypedef =
TRUE;
4382 yyextra->current->endBodyLine = yyextra->yyLineNr;
4383 QCString &cn = yyextra->current->name;
4384 QCString rn = yyextra->current_root->name;
4389 BEGIN( TypedefName );
4392<TypedefName>("const"|"volatile"){BN} {
4394 yyextra->current->type.prepend(yytext);
4397 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4399 yyextra->current->program <<
",";
4401 yyextra->current->name=yytext;
4403 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4404 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4406 if (!yyextra->firstTypedefEntry)
4408 yyextra->firstTypedefEntry = yyextra->current;
4410 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4412 yyextra->isTypedef=
TRUE;
4413 BEGIN(MemberSpecSkip);
4417 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4419 yyextra->current->program <<
',';
4422 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4423 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4424 yyextra->memspecEntry = yyextra->current;
4425 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4428 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4430<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4432 int i=0,l=(int)yyleng,j;
4433 while (i<l && (!
isId(yytext[i]))) i++;
4435 j=yyextra->msName.
find(
"[");
4438 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4439 yyextra->msName=yyextra->msName.left(j);
4444 if (yyextra->firstTypedefEntry)
4446 if (yyextra->firstTypedefEntry->spec.isStruct())
4448 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4450 else if (yyextra->firstTypedefEntry->spec.isUnion())
4452 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4454 else if (yyextra->firstTypedefEntry->section.isEnum())
4456 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4460 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4466 yyextra->current->name = yyextra->msName;
4472 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4478 const Entry *p=yyextra->current.get();
4486 int pi = (i==-1) ? 0 : i+2;
4496 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4500 if (!yyextra->msName.isEmpty()
4506 if (typedefHidesStruct &&
4507 yyextra->isTypedef &&
4508 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4509 yyextra->msType.stripWhiteSpace().isEmpty() &&
4510 yyextra->memspecEntry)
4512 yyextra->memspecEntry->name=yyextra->msName;
4516 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4517 varEntry->lang = yyextra->language;
4518 varEntry->protection = yyextra->current->protection ;
4519 varEntry->mtype = yyextra->current->mtype;
4520 varEntry->virt = yyextra->current->virt;
4521 varEntry->isStatic = yyextra->current->isStatic;
4522 varEntry->section = EntryType::makeVariable();
4523 varEntry->name = yyextra->msName.stripWhiteSpace();
4524 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4525 varEntry->args = yyextra->msArgs;
4526 if (yyextra->isTypedef)
4528 varEntry->type.prepend(
"typedef ");
4531 if (typedefHidesStruct &&
4532 yyextra->isTypedef &&
4533 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4534 yyextra->memspecEntry
4537 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4541 varEntry->type+=yyextra->current->name+yyextra->msType;
4543 varEntry->fileName = yyextra->fileName;
4544 varEntry->startLine = yyextra->yyLineNr;
4545 varEntry->startColumn = yyextra->yyColNr;
4546 varEntry->doc = yyextra->current->doc;
4547 varEntry->brief = yyextra->current->brief;
4548 varEntry->mGrpId = yyextra->current->mGrpId;
4549 varEntry->initializer.str(yyextra->current->initializer.str());
4550 varEntry->groups = yyextra->current->groups;
4551 varEntry->sli = yyextra->current->sli;
4556 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4561 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4563 if (!yyextra->current->doc.isEmpty())
4565 yyextra->memspecEntry->doc += yyextra->current->doc;
4567 if (!yyextra->current->brief.isEmpty())
4569 yyextra->memspecEntry->brief += yyextra->current->brief;
4572 yyextra->msType.clear();
4573 yyextra->msName.clear();
4574 yyextra->msArgs.clear();
4575 yyextra->isTypedef=
FALSE;
4576 yyextra->firstTypedefEntry.reset();
4577 yyextra->memspecEntry.reset();
4578 yyextra->current->reset();
4580 BEGIN( FindMembers );
4584 yyextra->current->doc.clear();
4585 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
4590 yyextra->lastInitializerContext=YY_START;
4591 yyextra->initBracketCount=0;
4592 yyextra->current->initializer.str(yytext);
4593 BEGIN(ReadInitializer);
4604<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4605<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4606<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4609<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4610 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4612 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4613 yyextra->insideObjC=
FALSE;
4614 BEGIN( FindMembers );
4616<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4617<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4619<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4620<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4621 if (yyextra->insidePHP)
4627 yyextra->current->bodyLine = yyextra->yyLineNr;
4628 yyextra->current->bodyColumn = yyextra->yyColNr;
4631 yyextra->funcPtrType=yytext;
4632 yyextra->roundCount=0;
4637<FuncPtr>{SCOPENAME} {
4638 yyextra->current->name = yytext;
4641 BEGIN( FuncPtrOperator );
4645 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4647 yyextra->funcPtrType += yyextra->current->name;
4651 BEGIN( EndFuncPtr );
4658<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4659 yyextra->current->name += yytext;
4660 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4663<FuncPtrOperator>\n {
4665 yyextra->current->name += *yytext;
4667<FuncPtrOperator>"(" {
4669 BEGIN( EndFuncPtr );
4672 yyextra->current->name += *yytext;
4674<EndFuncPtr>")"{BNopt}/";" {
4676 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4679<EndFuncPtr>")"{BNopt}/"(" {
4681 if (yyextra->funcPtrType!=
"(")
4683 yyextra->current->type+=yyextra->funcPtrType+
")";
4687<EndFuncPtr>")"{BNopt}/"[" {
4689 yyextra->current->type+=yyextra->funcPtrType;
4690 yyextra->current->args +=
")";
4695 yyextra->current->args += *yytext ;
4698 yyextra->current->bodyLine = yyextra->yyLineNr;
4699 yyextra->current->bodyColumn = yyextra->yyColNr;
4700 yyextra->currentArgumentContext = FuncFuncEnd;
4701 yyextra->fullArgString=yyextra->current->args;
4702 yyextra->copyArgString=&yyextra->current->args;
4703 BEGIN( ReadFuncArgType ) ;
4705<EndFuncPtr>"["[^\n\]]*"]" {
4706 yyextra->funcPtrType+=yytext;
4712 yyextra->current->args += *yytext ;
4713 ++yyextra->roundCount;
4716 yyextra->current->args += *yytext ;
4717 if ( yyextra->roundCount )
4718 --yyextra->roundCount;
4724<FuncFuncEnd>")"{BN}*"(" {
4726 yyextra->current->type+=yyextra->funcPtrType+
")(";
4727 BEGIN(FuncFuncType);
4729<FuncFuncEnd>")"{BNopt}/[;{] {
4731 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4734<FuncFuncEnd>")"{BNopt}/"[" {
4736 yyextra->current->type+=yyextra->funcPtrType;
4737 yyextra->current->args+=
")";
4738 BEGIN(FuncFuncArray);
4741 yyextra->current->args += *yytext;
4744 yyextra->current->type += *yytext;
4745 yyextra->roundCount++;
4748 yyextra->current->type += *yytext;
4749 if (yyextra->roundCount)
4750 --yyextra->roundCount;
4754<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
4755<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
4757 yyextra->current->type += *yytext;
4759<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
4760 if (yyextra->current->type.startsWith(
"typedef") &&
4761 yyextra->current->bodyLine==-1)
4764 yyextra->current->bodyLine = yyextra->yyLineNr;
4765 yyextra->current->bodyColumn = yyextra->yyColNr;
4766 BEGIN( GetCallType );
4768 else if (!yyextra->current->name.isEmpty())
4770 yyextra->current->args = yytext;
4771 yyextra->current->bodyLine = yyextra->yyLineNr;
4772 yyextra->current->bodyColumn = yyextra->yyColNr;
4773 yyextra->currentArgumentContext = FuncQual;
4774 yyextra->fullArgString=yyextra->current->args;
4775 yyextra->copyArgString=&yyextra->current->args;
4776 BEGIN( ReadFuncArgType ) ;
4780<GetCallType>{BN}*{ID}{BN}*"*" {
4783 yyextra->funcPtrType=
"(";
4784 yyextra->funcPtrType+=yytext;
4785 yyextra->roundCount=0;
4789 if (!yyextra->current->name.isEmpty())
4791 yyextra->current->args = yytext;
4792 yyextra->current->bodyLine = yyextra->yyLineNr;
4793 yyextra->current->bodyColumn = yyextra->yyColNr;
4794 yyextra->currentArgumentContext = FuncQual;
4795 yyextra->fullArgString=yyextra->current->args;
4796 yyextra->copyArgString=&yyextra->current->args;
4797 BEGIN( ReadFuncArgType ) ;
4811<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
4812 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
4813 else yyextra->fullArgString+=yytext;
4815<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
4816 yyextra->fullArgString+=yytext;
4818<CopyArgRound>[^\/\n\)\(\"\']+ {
4819 *yyextra->copyArgString+=yytext;
4820 yyextra->fullArgString+=yytext;
4822<CopyArgSquare>[^\/\n\]\[\"\']+ {
4823 *yyextra->copyArgString+=yytext;
4824 yyextra->fullArgString+=yytext;
4826<ReadFuncArgType,ReadTempArgs>{BN}* {
4827 *yyextra->copyArgString+=
" ";
4828 yyextra->fullArgString+=
" ";
4831<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
4833 yyextra->lastRawStringContext = YY_START;
4834 yyextra->pCopyRawString = yyextra->copyArgString;
4835 *yyextra->pCopyRawString+=yytext;
4836 yyextra->fullArgString+=yytext;
4839<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
4840 *yyextra->copyArgString+=*yytext;
4841 yyextra->fullArgString+=*yytext;
4842 yyextra->lastCopyArgStringContext = YY_START;
4843 BEGIN( CopyArgString );
4845<ReadFuncArgType>"[" {
4846 if (!yyextra->insidePHP) REJECT;
4847 *yyextra->copyArgString+=*yytext;
4848 yyextra->fullArgString+=*yytext;
4849 yyextra->argSquareCount=0;
4850 yyextra->lastCopyArgContext = YY_START;
4851 BEGIN( CopyArgSquare );
4853<ReadFuncArgType,ReadTempArgs>"(" {
4854 *yyextra->copyArgString+=*yytext;
4855 yyextra->fullArgString+=*yytext;
4856 yyextra->argRoundCount=0;
4857 yyextra->lastCopyArgContext = YY_START;
4858 BEGIN( CopyArgRound );
4860<ReadFuncArgType>")" {
4861 *yyextra->copyArgString+=*yytext;
4862 yyextra->fullArgString+=*yytext;
4864 if (yyextra->insideJS)
4875 yyextra->docBackup = yyextra->current->doc;
4876 yyextra->briefBackup = yyextra->current->brief;
4878 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
4881<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
4882 if (yyextra->currentArgumentContext==DefineEnd)
4886 int i;
for (i=(
int)yyleng-1;i>=0;i--)
4892 BEGIN( yyextra->currentArgumentContext );
4898 yyextra->fullArgString+=yytext;
4899 yyextra->lastCopyArgChar=0;
4900 yyextra->lastCommentInArgContext=YY_START;
4902 BEGIN( CopyArgCommentLine );
4904 BEGIN( CopyArgComment );
4908<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
4909<ReadFuncArgType,ReadTempArgs>{CCS} {
4910 yyextra->lastCContext = YY_START;
4911 BEGIN( SkipComment );
4913<ReadFuncArgType,ReadTempArgs>{CPPC} {
4914 yyextra->lastCContext = YY_START;
4915 BEGIN( SkipCxxComment );
4931<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
4933 if (yyextra->currentArgumentContext==DefineEnd)
4937 int i;
for (i=(
int)yyleng-1;i>0;i--)
4941 *yyextra->copyArgString+=*yytext;
4942 yyextra->fullArgString+=*yytext;
4945 BEGIN( yyextra->currentArgumentContext );
4951 yyextra->lastCopyArgChar=*yytext;
4954 yyextra->lastCommentInArgContext=YY_START;
4955 yyextra->fullArgString+=text;
4956 if (text.
find(
"//")!=-1)
4957 BEGIN( CopyArgCommentLine );
4959 BEGIN( CopyArgComment );
4962<CopyArgComment>^{B}*"*"+/{BN}+
4963<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
4964<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
4965 if (yyextra->lastCopyArgChar!=0)
4966 unput(yyextra->lastCopyArgChar);
4967 BEGIN( yyextra->lastCommentInArgContext );
4969<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
4971 if (yyextra->lastCopyArgChar!=0)
4972 unput(yyextra->lastCopyArgChar);
4973 BEGIN( yyextra->lastCommentInArgContext );
4975<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
4976 yyextra->docBlockName=
"uml";
4977 yyextra->fullArgString+=yytext;
4978 BEGIN(CopyArgVerbatim);
4980<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
4981 yyextra->docBlockName=&yytext[1];
4982 yyextra->fullArgString+=yytext;
4983 BEGIN(CopyArgVerbatim);
4985<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
4986 yyextra->docBlockName=&yytext[1];
4987 if (yyextra->docBlockName.at(1)==
'[')
4989 yyextra->docBlockName.at(1)=
']';
4991 if (yyextra->docBlockName.at(1)==
'{')
4993 yyextra->docBlockName.at(1)=
'}';
4995 if (yyextra->docBlockName.at(1)==
'(')
4997 yyextra->docBlockName.at(1)=
')';
4999 yyextra->fullArgString+=yytext;
5000 BEGIN(CopyArgVerbatim);
5002<CopyArgVerbatim>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5003 yyextra->fullArgString+=yytext;
5004 if (&yytext[4]==yyextra->docBlockName)
5006 yyextra->docBlockName=
"";
5007 BEGIN(CopyArgCommentLine);
5010<CopyArgVerbatim>[\\@]("f$"|"f]"|"f}"|"f)") {
5011 yyextra->fullArgString+=yytext;
5012 if (yyextra->docBlockName==&yytext[1])
5014 yyextra->docBlockName=
"";
5015 BEGIN(CopyArgCommentLine);
5018<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5019<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5020<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5021<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5022<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5023 warn(yyextra->fileName,yyextra->yyLineNr,
5024 "Ignoring {:c}brief command inside argument documentation",*yytext
5026 yyextra->fullArgString+=
' ';
#define warn(file, line, fmt,...)
5029 *yyextra->copyArgString+=*yytext;
5030 yyextra->fullArgString+=*yytext;
5031 yyextra->argSharpCount=1;
5032 BEGIN( CopyArgSharp );
5035 *yyextra->copyArgString+=*yytext;
5036 yyextra->fullArgString+=*yytext;
5038 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5040 BEGIN( yyextra->currentArgumentContext );
5043 yyextra->argRoundCount++;
5044 *yyextra->copyArgString+=*yytext;
5045 yyextra->fullArgString+=*yytext;
5048 *yyextra->copyArgString+=*yytext;
5049 yyextra->fullArgString+=*yytext;
5050 if (yyextra->argRoundCount>0)
5051 yyextra->argRoundCount--;
5053 BEGIN( yyextra->lastCopyArgContext );
5056 yyextra->argSquareCount++;
5057 *yyextra->copyArgString+=*yytext;
5058 yyextra->fullArgString+=*yytext;
5061 *yyextra->copyArgString+=*yytext;
5062 yyextra->fullArgString+=*yytext;
5063 if (yyextra->argSquareCount>0)
5064 yyextra->argSquareCount--;
5066 BEGIN( yyextra->lastCopyArgContext );
5069 *yyextra->copyArgString+=*yytext;
5070 yyextra->fullArgString+=*yytext;
5071 yyextra->argRoundCount=0;
5072 yyextra->lastCopyArgContext = YY_START;
5073 BEGIN( CopyArgRound );
5076 yyextra->argSharpCount++;
5078 *yyextra->copyArgString+=*yytext;
5079 yyextra->fullArgString+=*yytext;
5082 *yyextra->copyArgString+=*yytext;
5083 yyextra->fullArgString+=*yytext;
5084 yyextra->argSharpCount--;
5085 if (yyextra->argSharpCount>0)
5091 BEGIN( ReadTempArgs );
5095<CopyArgString,CopyArgPHPString>\\. {
5096 *yyextra->copyArgString+=yytext;
5097 yyextra->fullArgString+=yytext;
5100 *yyextra->copyArgString+=*yytext;
5101 yyextra->fullArgString+=*yytext;
5102 BEGIN( yyextra->lastCopyArgStringContext );
5104<CopyArgPHPString>\' {
5105 *yyextra->copyArgString+=*yytext;
5106 yyextra->fullArgString+=*yytext;
5107 BEGIN( yyextra->lastCopyArgStringContext );
5109<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5110 if (yyextra->insidePHP)
5116 *yyextra->copyArgString+=yytext;
5117 yyextra->fullArgString+=yytext;
5120<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5121 *yyextra->copyArgString+=yytext;
5122 yyextra->fullArgString+=yytext;
5123 if (yyextra->insidePHP)
5125 yyextra->lastCopyArgStringContext=YY_START;
5126 BEGIN(CopyArgPHPString);
5129<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5130 *yyextra->copyArgString+=yytext;
5131 yyextra->fullArgString+=yytext;
5133<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5135 *yyextra->copyArgString+=*yytext;
5136 yyextra->fullArgString+=*yytext;
5138<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5139 *yyextra->copyArgString+=yytext;
5140 yyextra->fullArgString+=yytext;
5142<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5143 *yyextra->copyArgString+=*yytext;
5144 yyextra->fullArgString+=*yytext;
5152<FuncRound>"(" { yyextra->current->args += *yytext ;
5153 ++yyextra->roundCount ;
5155<FuncRound>")" { yyextra->current->args += *yytext ;
5156 if ( yyextra->roundCount )
5157 --yyextra->roundCount ;
5169 if (
qstrcmp(yytext,
";")==0 &&
5170 ((yyextra->insideJS || yyextra->insidePHP) &&
5173 yyextra->current->reset();
5175 BEGIN( FindMembers );
5179 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5182<FuncQual>{BN}*"abstract"{BN}* {
5184 yyextra->current->virt = Specifier::Pure;
5185 yyextra->current->args +=
" override ";
5187<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5189 yyextra->current->spec.setOverride(
true);
5190 yyextra->current->args +=
" override ";
5193<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5195 yyextra->current->spec.setFinal(
true);
5196 yyextra->current->args +=
" final ";
5199<FuncQual>{BN}*"sealed"{BN}* {
5201 yyextra->current->spec.setSealed(
true);
5202 yyextra->current->args +=
" sealed ";
5204<FuncQual>{BN}*"new"{BN}* {
5206 yyextra->current->spec.setNew(
true);
5207 yyextra->current->args +=
" new ";
5209<FuncQual>{BN}*"const"{BN}* {
5211 yyextra->current->args +=
" const ";
5212 yyextra->current->argList.setConstSpecifier(
TRUE);
5214<FuncQual>{BN}*"volatile"{BN}* {
5216 yyextra->current->args +=
" volatile ";
5217 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5219<FuncQual>{BN}*"noexcept"{BN}* {
5221 yyextra->current->args +=
" noexcept ";
5222 yyextra->current->spec.setNoExcept(
true);
5224<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5226 yyextra->current->args +=
" noexcept(false)";
5228<FuncQual>{BN}*"noexcept"{BN}*"(" {
5230 yyextra->current->args +=
" noexcept(";
5231 yyextra->current->spec.setNoExcept(
true);
5232 yyextra->lastRoundContext=FuncQual;
5233 yyextra->pCopyRoundString=&yyextra->current->args;
5234 yyextra->roundCount=0;
5238 yyextra->current->args +=
" &";
5241<FuncQual>{BN}*"&&" {
5242 yyextra->current->args +=
" &&";
5246<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5248 yyextra->current->args +=
" = 0";
5249 yyextra->current->virt = Specifier::Pure;
5250 yyextra->current->argList.setPureSpecifier(
TRUE);
5253<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5255 yyextra->current->args +=
" = delete";
5256 yyextra->current->spec.setDelete(
true);
5257 yyextra->current->argList.setIsDeleted(
TRUE);
5260<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5262 yyextra->current->args +=
" = default";
5263 yyextra->current->spec.setDefault(
true);
5266<FuncQual>{BN}*"->"{BN}* {
5268 yyextra->current->argList.setTrailingReturnType(
" -> ");
5269 yyextra->current->args +=
" -> ";
5270 yyextra->roundCount=0;
5271 BEGIN(TrailingReturn);
5273<TrailingReturn>[{;] {
5274 if (yyextra->roundCount>0) REJECT;
5278<TrailingReturn>"requires"{BN}+ {
5279 if (yyextra->insideJava) REJECT;
5280 yyextra->requiresContext = FuncQual;
5281 yyextra->current->req+=
' ';
5282 BEGIN(RequiresClause);
5284<TrailingReturn>"(" {
5285 yyextra->roundCount++;
5286 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5287 yyextra->current->args+=yytext;
5289<TrailingReturn>")" {
5290 if (yyextra->roundCount>0)
5292 yyextra->roundCount--;
5296 warn(yyextra->fileName,yyextra->yyLineNr,
5297 "Found ')' without opening '(' for trailing return type '{})...'",
5298 yyextra->current->argList.trailingReturnType());
5300 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5301 yyextra->current->args+=yytext;
5304 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5305 yyextra->current->args+=yytext;
5309 yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
5310 yyextra->current->args+=
' ';
5312<FuncRound,FuncFunc>{BN}*","{BN}* {
5314 yyextra->current->args +=
", " ;
5316<FuncQual,FuncRound,FuncFunc>{BN}+ {
5318 yyextra->current->args +=
' ' ;
5320<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5322 yyextra->lastCPPContext = YY_START;
5326 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5333 yyextra->lastInitializerContext=YY_START;
5334 yyextra->initBracketCount=0;
5335 yyextra->current->initializer.str(yytext);
5336 BEGIN(ReadInitializer);
5351 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5354 yyextra->requiresContext = YY_START;
5355 yyextra->current->req+=
' ';
5356 BEGIN(RequiresClause);
5358 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5361 yyextra->current->typeConstr.clear();
5362 yyextra->current->typeConstr.push_back(
Argument());
5363 yyextra->lastCSConstraint = YY_START;
5364 BEGIN( CSConstraintName );
5368 yyextra->current->args = yytext;
5369 yyextra->oldStyleArgType.clear();
5370 BEGIN(OldStyleArgs);
5374 yyextra->current->args += yytext;
5380 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5382 if (yyextra->current->doc!=yyextra->docBackup)
5384 doc=yyextra->current->doc;
5385 yyextra->current->doc=yyextra->docBackup;
5387 if (yyextra->current->brief!=yyextra->briefBackup)
5389 brief=yyextra->current->brief;
5390 yyextra->current->brief=yyextra->briefBackup;
5392 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5393 oldStyleArgName,brief,doc);
5394 yyextra->current->args.clear();
5395 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5397<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5399 if (yyextra->current->argList.empty())
5401 yyextra->current->argList.setNoParameters(
TRUE);
5407<OldStyleArgs>. { yyextra->current->args += *yytext; }
5408<FuncQual,FuncRound,FuncFunc>\" {
5409 if (yyextra->insideIDL && yyextra->insideCppQuote)
5415 yyextra->current->args += *yytext;
5418<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5419<FuncQual>{BN}*"try:" |
5420<FuncQual>{BN}*"try"{BN}+ {
5421 yyextra->insideTryBlock=
TRUE;
5423 if (yytext[yyleng-1]==
':')
5429<FuncQual>{BN}*"throw"{BN}*"(" {
5430 yyextra->current->exception =
" throw (" ;
5431 yyextra->roundCount=0;
5433 BEGIN( ExcpRound ) ;
5435<FuncQual>{BN}*"raises"{BN}*"(" {
5436 yyextra->current->exception =
" raises (" ;
5438 yyextra->roundCount=0;
5439 BEGIN( ExcpRound ) ;
5441<FuncQual>{BN}*"throws"{BN}+ {
5442 yyextra->current->exception =
" throws " ;
5446<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5447 ++yyextra->roundCount ;
5449<ExcpRound>")" { yyextra->current->exception += *yytext ;
5450 if ( yyextra->roundCount )
5451 --yyextra->roundCount ;
5456 yyextra->current->exception += *yytext;
5459 unput(
'{'); BEGIN( FuncQual );
5462 unput(
';'); BEGIN( FuncQual );
5465 yyextra->current->exception +=
' ';
5469 yyextra->current->exception += *yytext;
5471<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5472 yyextra->current->name = yyextra->current->args ;
5473 yyextra->current->args = yytext ;
5474 yyextra->roundCount=0;
5475 BEGIN( FuncRound ) ;
5478 if (!yyextra->insidePHP) BEGIN(SkipInits);
5484 yyextra->current->fileName = yyextra->fileName;
5485 yyextra->current->startLine = yyextra->yyBegLineNr;
5486 yyextra->current->startColumn = yyextra->yyBegColNr;
5487 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5489 std::string type = yyextra->current->type.str();
5493 ti = (int)
match.position();
5497 int di = yyextra->current->type.find(
"decltype(");
5498 if (di!=-1 && di<ti)
5503 int ts=yyextra->current->type.find(
'<');
5504 int te=yyextra->current->type.findRev(
'>');
5507 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5508 bool isFunction = ti==-1 ||
5509 (ts!=-1 && ts<te && ts<ti && ti<te);
5510 bool isVariable = !yyextra->current->type.isEmpty() &&
5511 (!isFunction || startsWithTypedef);
5516 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5521 if (yyextra->isTypedef && !startsWithTypedef)
5523 yyextra->current->type.prepend(
"typedef ");
5525 yyextra->current->section = EntryType::makeVariable() ;
5530 yyextra->current->section = EntryType::makeFunction() ;
5531 yyextra->current->proto = *yytext==
';';
5539 if (yyextra->isTypedef && !startsWithTypedef)
5541 yyextra->current->type.prepend(
"typedef ");
5544 yyextra->current->section = EntryType::makeVariable();
5549 yyextra->current->section = EntryType::makeFunction();
5550 yyextra->current->proto =
TRUE;
5554 if ( yyextra->insidePHP)
5558 yyextra->current->spec.setFinal(
true);
5562 yyextra->current->spec.setAbstract(
true);
5565 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5568 if ( *yytext ==
'{' )
5570 yyextra->lastCurlyContext = FindMembers;
5571 yyextra->curlyCount=0;
5576 BEGIN( FindMembers );
5581 if ( yyextra->insidePHP)
5585 yyextra->previous = yyextra->current;
5586 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5589 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5591 yyextra->current->spec.setOptional(
true).setRequired(
true);
5593 yyextra->lastCurlyContext = FindMembers;
5594 if ( *yytext ==
',' )
5596 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5598 if ( *yytext ==
'{' )
5600 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5602 yyextra->previous->spec.setInline(
true);
5605 yyextra->curlyCount=0;
5606 BEGIN( SkipCurly ) ;
5610 if (!yyextra->previous->section.isVariable())
5611 yyextra->previous->bodyLine=-1;
5612 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...
5616<SkipInits>">"{BN}*"{" {
5618 yyextra->curlyCount=1;
5619 BEGIN(SkipC11Inits);
5621<SkipInits>{ID}{BN}*"{" {
5623 yyextra->curlyCount=1;
5624 BEGIN(SkipC11Inits);
5627 ++yyextra->curlyCount;
5630 if ( --yyextra->curlyCount<=0 )
5635<SkipC11Attribute>"]]" {
5636 BEGIN(yyextra->lastC11AttributeContext);
5644 ++yyextra->curlyCount ;
5646<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5649 if( yyextra->curlyCount )
5651 --yyextra->curlyCount ;
5655 if (!yyextra->current->sli.empty() && yyextra->previous)
5657 yyextra->previous->sli = yyextra->current->sli;
5658 yyextra->current->sli.clear();
5660 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5661 BEGIN( yyextra->lastCurlyContext ) ;
5664<SkipCurly>"}"{BN}*{DCOMM}"<" {
5666 if ( yyextra->curlyCount )
5669 --yyextra->curlyCount ;
5673 yyextra->current->endBodyLine=yyextra->yyLineNr;
5674 yyextra->tempEntry = yyextra->current;
5675 yyextra->current = yyextra->previous;
5677 yyextra->docBlockContext = SkipCurlyEndDoc;
5678 yyextra->docBlockInBody =
FALSE;
5679 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5681 yyextra->docBlock.str(std::string());
5682 yyextra->docBlockTerm =
'}';
5683 if (yytext[yyleng-3]==
'/')
5695<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5696 yyextra->docBlockContext = SkipCurlyEndDoc;
5697 yyextra->docBlockInBody =
FALSE;
5698 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5700 yyextra->docBlock.str(std::string());
5701 yyextra->docBlockTerm =
'}';
5702 if (yytext[yyleng-3]==
'/')
5713<SkipCurlyEndDoc>"}" {
5715 if (yyextra->tempEntry)
5717 yyextra->current = yyextra->tempEntry;
5718 yyextra->tempEntry.reset();
5720 BEGIN( yyextra->lastCurlyContext );
5724 yyextra->lastStringContext=SkipCurly;
5725 BEGIN( SkipString );
5727<SkipCurly>^{B}*"#" {
5728 if (yyextra->insidePHP)
5731 BEGIN( SkipCurlyCpp );
5733<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute>\n {
5737<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
5738 if (!yyextra->insidePHP)
5744 yyextra->lastHereDocContext = YY_START;
5748<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
5750 yyextra->lastRawStringContext = YY_START;
5751 yyextra->dummyRawString.clear();
5752 yyextra->pCopyRawString = &yyextra->dummyRawString;
5753 *yyextra->pCopyRawString += yytext;
5756<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<\$]+ {
5760<SkipCurly,SkipCurlyCpp>"\$" {}
5764 yyextra->lastCurlyContext = FindMembers;
5767<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
5771<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CCS} {
5773 yyextra->lastCContext = YY_START;
5776<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>{CPPC} {
5778 yyextra->lastCContext = YY_START;
5779 BEGIN(SkipCxxComment);
5781<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
5782 yyextra->roundCount=0;
5783 yyextra->lastSkipRoundContext=YY_START;
5786<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
5787 yyextra->lastStringContext=YY_START;
5788 BEGIN( SkipString );
5791 warn(yyextra->fileName,yyextra->yyLineNr,
5792 "Found ';' while parsing initializer list! "
5793 "(doxygen could be confused by a macro call without semicolon)"
5795 BEGIN( FindMembers );
5797<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
5798 if (!yyextra->insidePHP)
5801 yyextra->lastCContext = YY_START;
5802 BEGIN(SkipCxxComment);
5804<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
5805 if (!yyextra->insideCS) REJECT;
5808 yyextra->lastSkipVerbStringContext=YY_START;
5809 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
5810 yyextra->dummyTextStream.clear();
5811 BEGIN(SkipVerbString);
5813<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
5814 if (yyextra->insidePHP) REJECT;
5816<SkipInits,SkipCurly,SkipCurlyCpp>\' {
5817 if (yyextra->insidePHP)
5819 yyextra->lastStringContext=YY_START;
5820 BEGIN(SkipPHPString);
5823<SkipC11Attribute>{ID} {
5826 yyextra->current->spec.setNoDiscard(
true);
5829<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute>. { }
5830<SkipString,SkipPHPString>\\. { }
5832 BEGIN( yyextra->lastStringContext );
5835 BEGIN( yyextra->lastStringContext );
5837<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
5838<SkipString,SkipPHPString>\n {
5842<SkipString,SkipPHPString>. { }
5848 yyextra->current->section = EntryType::makeEmpty() ;
5849 yyextra->current->type.clear() ;
5850 yyextra->current->name.clear() ;
5851 yyextra->current->args.clear() ;
5852 yyextra->current->argList.clear();
5853 BEGIN( FindMembers ) ;
5856 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
5860 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
5864 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
5866 if (!yyextra->baseName.isEmpty())
5868 yyextra->current->extends.emplace_back(
5869 yyextra->baseName,Protection::Public,Specifier::Normal);
5870 yyextra->baseName.clear();
5872 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5877 yyextra->current->section = EntryType::makeEmpty() ;
5878 yyextra->current->type.clear() ;
5879 yyextra->current->name.clear() ;
5880 yyextra->current->args.clear() ;
5881 yyextra->current->argList.clear();
5883 BEGIN( FindMembers ) ;
5885<CompoundName>{SCOPENAME}/{BN}*"<" {
5886 yyextra->sharpCount = 0;
5887 yyextra->current->name = yytext ;
5889 if (yyextra->current->spec.isProtocol())
5891 yyextra->current->name+=
"-p";
5894 yyextra->lastClassTemplSpecContext = ClassVar;
5895 if (yyextra->insideObjC)
5897 BEGIN( ObjCProtocolList );
5899 else if (yyextra->insideCS)
5906 yyextra->roundCount=0;
5907 BEGIN( ClassTemplSpec );
5914 yyextra->current->tArgLists.
push_back(al);
5915 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
5916 yyextra->templateStr=
"<";
5917 yyextra->current->name +=
"<";
5918 yyextra->fullArgString = yyextra->templateStr;
5919 yyextra->copyArgString = &yyextra->current->name;
5921 yyextra->currentArgumentContext = ClassVar;
5922 BEGIN( ReadTempArgs );
5924<ObjCProtocolList>"<" {
5925 yyextra->insideProtocolList=
TRUE;
5928<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
5929 yyextra->current->name += yytext;
5931 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
5934 if (yyextra->current->spec.isProtocol())
5941 BEGIN( yyextra->lastClassTemplSpecContext );
5945<ClassTemplSpec>"<" {
5946 yyextra->current->name += yytext;
5947 if (yyextra->roundCount==0) yyextra->sharpCount++;
5950 yyextra->current->name += yytext;
5952<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
5953 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
5957 yyextra->current->name =
substitute(yytext,
".",
"::");
5958 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5963 else if (!yyextra->current->tArgLists.empty())
5967 yyextra->current->name = yytext;
5968 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5971 QCString rn = yyextra->current_root->name;
5973 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
5977 yyextra->current->spec.setForwardDecl(
true);
5978 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5980 else if (yyextra->insideIDL &&
5981 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
5982 yyextra->current->spec.isInterface()) ||
5983 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
5984 yyextra->current->spec.isService())
5992 yyextra->current->name = yytext;
5993 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
5994 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
5997 yyextra->current->spec.setInterface(
false).setService(
false);
6001 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6004 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6007 yyextra->current->reset();
6009 if (yyextra->insideObjC)
6011 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6012 yyextra->insideObjC =
FALSE;
6014 if (yyextra->isTypedef)
6016 yyextra->current->type.prepend(
"typedef");
6018 BEGIN( FindMembers );
Wrapper class for the Entry type.
6021<CompoundName>{SCOPENAME}/{BN}*"(" {
6022 yyextra->current->name = yytext ;
6025 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6027 yyextra->lastAlignAsContext = YY_START;
6032 if (yyextra->current->spec.isProtocol())
6034 yyextra->current->name +=
"-p";
6039<AlignAs>"(" { yyextra->roundCount=0;
6040 BEGIN( AlignAsEnd );
6044<AlignAsEnd>"(" { yyextra->roundCount++; }
6045<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6047 BEGIN( yyextra->lastAlignAsContext );
6053 yyextra->current->name = yytext ;
6057 yyextra->current->bodyLine = yyextra->yyLineNr;
6058 yyextra->current->bodyColumn = yyextra->yyColNr;
6059 yyextra->current->initializer.str(std::string());
6060 yyextra->lastInitializerContext = FindMembers;
6061 yyextra->initBracketCount=0;
6062 BEGIN(ReadInitializer);
6064<CompoundName>{SCOPENAME}/{BN}*"," {
6066 yyextra->current->reset();
6069<CompoundName>{SCOPENAME} {
6070 yyextra->current->name = yytext ;
6073 if (yyextra->current->spec.isProtocol())
6075 yyextra->current->name +=
"-p";
6077 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6083<CompoundName>{CSSCOPENAME} {
6084 yyextra->current->name =
substitute(yytext,
".",
"::");
6088<ClassVar>{SCOPENAME}{BNopt}/"(" {
6089 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6092 yyextra->roundCount=0;
6093 BEGIN(SkipUnionSwitch);
6098 yyextra->yyBegColNr=yyextra->yyColNr;
6099 yyextra->yyBegLineNr=yyextra->yyLineNr;
6100 yyextra->current->name = yytext;
6101 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6104 BEGIN( FindMembers );
6108 if (yyextra->isTypedef)
6112 yyextra->current->type.prepend(
"typedef ");
6120<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6121 if (yyextra->insideCli)
6124 yyextra->current->spec.setSealedClass(
true);
6126 yyextra->current->spec.setAbstractClass(
true);
6134<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6135 yyextra->yyBegColNr=yyextra->yyColNr;
6136 yyextra->yyBegLineNr=yyextra->yyLineNr;
6139 if (yyextra->current->section.isEnum())
6141 yyextra->current->section = EntryType::makeVariable() ;
6143 yyextra->current->type +=
' ' ;
6144 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...
6153 yyextra->yyBegColNr=yyextra->yyColNr;
6154 yyextra->yyBegLineNr=yyextra->yyLineNr;
6156 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6159 yyextra->roundCount=0;
6160 BEGIN(SkipUnionSwitch);
6162 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6164 yyextra->current->type.clear();
6165 yyextra->baseProt = Protection::Public;
6166 yyextra->baseVirt = Specifier::Normal;
6167 yyextra->baseName.clear();
6168 BEGIN( BasesProt ) ;
6170 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6172 yyextra->current->typeConstr.clear();
6173 yyextra->current->typeConstr.push_back(
Argument());
6174 yyextra->lastCSConstraint = YY_START;
6175 BEGIN( CSConstraintName );
6177 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6179 yyextra->current->spec.setAbstract(
true);
6181 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6183 yyextra->current->spec.setSealed(
true);
6185 else if (
qstrcmp(yytext,
"final")==0)
6187 yyextra->current->spec.setFinal(
true);
6191 if (yyextra->current->section.isEnum())
6193 yyextra->current->section = EntryType::makeVariable() ;
6195 yyextra->current->type +=
' ' ;
6196 yyextra->current->type += yyextra->current->name ;
6197 yyextra->current->name = yytext ;
6206 if (yyextra->insideObjC && *yytext==
'(')
6208 yyextra->current->name+=
'(';
6211 yyextra->current->spec.setCategory(
true);
6213 BEGIN( ClassCategory );
6219 BEGIN( FindMembers );
6222<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6223<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6224 yyextra->fullArgString.clear();
6225 yyextra->lastCopyArgChar=
'#';
6226 yyextra->lastCommentInArgContext=YY_START;
6228 BEGIN( CopyArgCommentLine );
6230 BEGIN( CopyArgComment );
6232<CSConstraintType,CSConstraintName>"#" {
6233 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6235<CSConstraintType>"=>" {
6240 BEGIN( yyextra->lastCSConstraint );
6242<CSConstraintType>"{" {
6246 BEGIN( yyextra->lastCSConstraint );
6248<CSConstraintType,CSConstraintName>";" {
6251 BEGIN( yyextra->lastCSConstraint );
6253<CSConstraintName>":" {
6254 BEGIN( CSConstraintType );
6256<CSConstraintName>{ID} {
6258 yyextra->current->typeConstr.back().name=yytext;
6260<CSConstraintType>"where" {
6261 yyextra->current->typeConstr.push_back(
Argument());
6262 BEGIN( CSConstraintName );
6264<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6265 if (yyextra->current->typeConstr.back().type.isEmpty())
6268 yyextra->current->typeConstr.back().type=yytext;
6272 QCString name = yyextra->current->typeConstr.back().name;
6273 yyextra->current->typeConstr.push_back(
Argument());
6274 yyextra->current->typeConstr.back().name=name;
6275 yyextra->current->typeConstr.back().type=yytext;
6278<CSConstraintName,CSConstraintType>\n {
6281<CSConstraintName,CSConstraintType>. {
6283<ClassCategory>{ID} {
6284 yyextra->current->name+=yytext;
6286<ClassCategory>")"/{BN}*"{" {
6287 yyextra->current->name+=
')';
6290<ClassCategory>")"/{BN}*"<" {
6291 yyextra->current->name+=
')';
6292 BEGIN( ObjCProtocolList );
6295 yyextra->current->name+=
')';
6296 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6308 if (yyextra->current->section.isVariable())
6310 yyextra->current->bitfields+=
":";
6311 yyextra->current->args.clear();
6314 else if (yyextra->current->section.isEnum())
6317 yyextra->current->args.clear();
6318 BEGIN(EnumBaseType);
6322 yyextra->current->type.clear();
6323 if (yyextra->current->spec.isInterface() ||
6324 yyextra->current->spec.isStruct() ||
6325 yyextra->current->spec.isRef() ||
6326 yyextra->current->spec.isValue() ||
6327 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6330 yyextra->baseProt = Protection::Public;
6334 yyextra->baseProt = Protection::Private;
6336 yyextra->baseVirt = Specifier::Normal;
6337 yyextra->baseName.clear();
6338 BEGIN( BasesProt ) ;
6342 if (yyextra->isTypedef)
6344 yyextra->current->type.prepend(
"typedef");
6346 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6348 yyextra->current->section = EntryType::makeVariable() ;
6350 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6352 yyextra->current->reset();
6359 BEGIN( FindMembers );
6361<Bases,ClassVar>{CPPC}"/"/[^/] {
6362 if (!yyextra->insideObjC)
6369 yyextra->current->program << yytext;
6370 yyextra->current->fileName = yyextra->fileName ;
6371 yyextra->current->startLine = yyextra->yyLineNr ;
6372 yyextra->current->startColumn = yyextra->yyColNr;
6373 yyextra->curlyCount=0;
6374 BEGIN( ReadBodyIntf );
6377<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6378<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6379<Bases,ClassVar>{CPPC}"!" |
6380<Bases,ClassVar>[\-+]{BN}* {
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<CompoundName,ClassVar>{B}*"{"{B}* {
6397 yyextra->current->program.str(std::string());
6398 yyextra->current->fileName = yyextra->fileName ;
6399 yyextra->current->bodyLine = yyextra->yyLineNr;
6400 yyextra->current->bodyColumn = yyextra->yyColNr;
6402 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6404 if (yyextra->current->section.isNamespace())
6408 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6420 yyextra->curlyCount=0;
6421 if (yyextra->current_root &&
6422 !yyextra->current_root->spec.isInterface() &&
6423 (yyextra->current->spec.isInterface() ||
6424 yyextra->current->spec.isProtocol() ||
6425 yyextra->current->spec.isCategory() ||
6426 yyextra->current->section.isObjcImpl()
6431 BEGIN( ReadBodyIntf );
6433 else if (yyextra->current->section.isNamespace())
6435 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6442<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6443<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6444<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6445<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6446<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6447<BasesProt>{BN} {
lineCount(yyscanner); }
6448<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6449<Bases>"decltype"{BN}*"(" {
6451 yyextra->roundCount=0;
6452 yyextra->lastSkipRoundContext=YY_START;
6455<Bases>("\\")?({ID}"\\")*{ID} {
6456 if (!yyextra->insidePHP)
6465 yyextra->baseName += bn;
6466 yyextra->current->args +=
' ';
6467 yyextra->current->args += yytext;
6470<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6476 yyextra->current->typeConstr.clear();
6477 yyextra->current->typeConstr.push_back(
Argument());
6478 yyextra->lastCSConstraint = YY_START;
6479 BEGIN( CSConstraintName );
6483 yyextra->baseName+=yytext;
6484 yyextra->current->args +=
' ';
6485 yyextra->current->args += yytext;
6488<Bases>{BN}*{ID}("."{ID})* {
6490 yyextra->baseName += name;
6491 yyextra->current->args +=
' ';
6492 yyextra->current->args += name;
6494<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6495 if (!yyextra->insideObjC)
6505<ClassVar,Bases>"@end" {
6513<ClassVar>"<" { yyextra->current->name += *yytext;
6514 yyextra->sharpCount=1;
6515 yyextra->roundCount=0;
6516 yyextra->lastSkipSharpContext = YY_START;
6517 yyextra->specName = &yyextra->current->name;
6518 BEGIN ( Specialization );
6522 yyextra->sharpCount=1;
6523 yyextra->roundCount=0;
6524 yyextra->lastSkipSharpContext = YY_START;
6525 if (yyextra->insideObjC)
6535 yyextra->templateStr = yytext;
6536 yyextra->specName = &yyextra->templateStr;
6537 BEGIN ( Specialization );
6540<Specialization>"<" { *yyextra->specName += *yytext;
6541 if (yyextra->roundCount==0) yyextra->sharpCount++;
6543<Specialization>">" {
6544 *yyextra->specName += *yytext;
6545 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6548 BEGIN(yyextra->lastSkipSharpContext);
6551<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6552<Specialization>"<<" { *yyextra->specName += yytext; }
6553<Specialization>">>"/{B}*"::" {
6558<Specialization>">>" {
6559 if (yyextra->insideCS)
6569 if (yyextra->roundCount>0)
6571 *yyextra->specName += yytext;
6581<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6582<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6583<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6585<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6586<Specialization>"\\'" { *yyextra->specName += *yytext;}
6587<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6588<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6589<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6590<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6591<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6592<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6593<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6594<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6595<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6598 *yyextra->specName += *yytext;
6600<SkipRound>"(" { ++yyextra->roundCount; }
6601<SkipRound>")" {
if (--yyextra->roundCount<0)
6602 BEGIN ( yyextra->lastSkipRoundContext );
6605 yyextra->lastStringContext=SkipRound;
6608<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6609 if (yyextra->insideProtocolList)
6611 yyextra->baseName+=
"-p";
6615 yyextra->current->args +=
',' ;
6618 if (!yyextra->baseName.isEmpty())
6620 yyextra->current->extends.emplace_back(
6621 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6624 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6625 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6626 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6628 yyextra->baseProt=Protection::Public;
6632 yyextra->baseProt=Protection::Private;
6634 yyextra->baseVirt=Specifier::Normal;
6635 yyextra->baseName.clear();
6638 yyextra->insideProtocolList=
FALSE;
6650 if (*yytext==
',' && yyextra->insideObjC)
6652 yyextra->insideProtocolList=
TRUE;
6658 yyextra->current->program.str(std::string());
6659 yyextra->current->fileName = yyextra->fileName ;
6660 yyextra->current->bodyLine = yyextra->yyLineNr;
6661 yyextra->current->bodyColumn = yyextra->yyColNr;
6663 if (!yyextra->baseName.isEmpty())
6664 yyextra->current->extends.emplace_back(
6665 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6667 yyextra->curlyCount=0;
6668 if (yyextra->insideObjC)
6670 BEGIN( ReadBodyIntf );
6677<SkipUnionSwitch>{B}*"(" {
6678 yyextra->roundCount++;
6680<SkipUnionSwitch>")" {
6681 if (--yyextra->roundCount==0)
6686<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6688<Comment>{BN}+ { yyextra->current->program << yytext ;
6691<Comment>{CCS} { yyextra->current->program << yytext ; }
6692<Comment>{CPPC} { yyextra->current->program << yytext ; }
6693<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6694 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6695 yyextra->current->program << yytext ;
6697<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
6698 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
6699 yyextra->current->program << yytext ;
6701<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
6702<Comment>{CCE} { yyextra->current->program << yytext ;
6703 if (!yyextra->insideCode)
6705 yyextra->doxygenComment=
false;
6706 BEGIN( yyextra->lastContext );
6709<Comment>. { yyextra->current->program << *yytext ; }
6711<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
6713 if (!yyextra->current->doc.isEmpty())
6715 yyextra->current->doc+=
"\n\n";
6719 yyextra->current->docLine = yyextra->yyLineNr;
6720 yyextra->current->docFile = yyextra->fileName;
6723 yyextra->lastDocContext = YY_START;
6724 if (yyextra->current_root->section.isScope())
6726 yyextra->current->inside = yyextra->current_root->name+
"::";
6728 yyextra->docBlockContext = YY_START;
6729 yyextra->docBlockInBody = YY_START==SkipCurly;
6734 yyextra->docBlock.str(indent.
str());
6736 if (yyextra->docBlockAutoBrief)
6738 yyextra->current->briefLine = yyextra->yyLineNr;
6739 yyextra->current->briefFile = yyextra->fileName;
6744<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
6750 yyextra->lastDocContext = YY_START;
6753 if (yyextra->current_root->section.isScope())
6755 yyextra->current->inside = yyextra->current_root->name+
"::";
6757 yyextra->current->docLine = yyextra->yyLineNr;
6758 yyextra->current->docFile = yyextra->fileName;
6759 yyextra->docBlockContext = YY_START;
6760 yyextra->docBlockInBody = YY_START==SkipCurly;
6762 yyextra->docBlockAutoBrief = javadocAutoBrief;
6766 yyextra->docBlock.str(indent.
str());
6768 if (yyextra->docBlockAutoBrief)
6770 yyextra->current->briefLine = yyextra->yyLineNr;
6771 yyextra->current->briefFile = yyextra->fileName;
6778 yyextra->current->program << yytext ;
6779 yyextra->lastContext = YY_START ;
6780 yyextra->doxygenComment=
true;
6784<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6789<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
6790 yyextra->lastDocContext = YY_START;
6793 if (yyextra->current_root->section.isScope())
6795 yyextra->current->inside = yyextra->current_root->name+
"::";
6797 yyextra->current->docLine = yyextra->yyLineNr;
6798 yyextra->current->docFile = yyextra->fileName;
6799 yyextra->docBlockContext = YY_START;
6800 yyextra->docBlockInBody = YY_START==SkipCurly;
6802 yyextra->docBlockAutoBrief = javadocAutoBrief;
6806 yyextra->docBlock.str(indent.
str());
6808 if (yyextra->docBlockAutoBrief)
6810 yyextra->current->briefLine = yyextra->yyLineNr;
6811 yyextra->current->briefFile = yyextra->fileName;
6816<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
6817 yyextra->lastDocContext = YY_START;
6818 if (yyextra->current_root->section.isScope())
6820 yyextra->current->inside = yyextra->current_root->name+
"::";
6822 yyextra->docBlockContext = YY_START;
6823 yyextra->docBlockInBody = YY_START==SkipCurly;
6824 yyextra->docBlockAutoBrief =
FALSE;
6828 yyextra->docBlock.str(indent.
str());
6833<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
6834 yyextra->lastDocContext = YY_START;
6835 if (yyextra->current_root->section.isScope())
6837 yyextra->current->inside = yyextra->current_root->name+
"::";
6839 yyextra->docBlockContext = YY_START;
6840 yyextra->docBlockInBody = YY_START==SkipCurly;
6841 yyextra->docBlockAutoBrief =
FALSE;
6844 yyextra->docBlock.str(indent.
str());
6848<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
6850 yyextra->externLinkage=
TRUE;
6853 if (yyextra->externLinkage)
6855 yyextra->externLinkage=
FALSE;
6857 else if (yyextra->insideCS &&
6858 !yyextra->current->name.isEmpty() &&
6859 !yyextra->current->type.isEmpty())
6861 if (yyextra->current->mtype == MethodTypes::Event)
6863 yyextra->mtype = MethodTypes::Event;
6867 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
6871 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
6873 yyextra->current->bodyLine = yyextra->yyLineNr;
6874 yyextra->current->bodyColumn = yyextra->yyColNr;
6875 yyextra->curlyCount=0;
6876 BEGIN( CSAccessorDecl );
6878 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
6882 yyextra->current->exception =
" {";
6883 BEGIN(UNOIDLAttributeBlock);
6887 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
6888 yyextra->current->name.isEmpty()
6892 yyextra->needsSemi =
FALSE;
6893 if (yyextra->current->isStatic)
6895 yyextra->current->name=
"[static initializer]";
6896 yyextra->current->type.clear();
6900 yyextra->current->name=
"[instance initializer]";
6917 yyextra->current->bodyLine = yyextra->yyLineNr;
6918 yyextra->current->bodyColumn = yyextra->yyColNr;
6919 yyextra->current->initializer.str(yytext);
6920 yyextra->lastInitializerContext = YY_START;
6921 yyextra->initBracketCount=1;
6922 BEGIN(ReadInitializer);
6926<CSAccessorDecl>"{" { yyextra->curlyCount++; }
6927<CSAccessorDecl>"}"{B}*"=" {
6929 if (yyextra->curlyCount != 0) REJECT;
6930 yyextra->current->initializer.str(
"=");
6931 yyextra->current->endBodyLine=yyextra->yyLineNr;
6932 yyextra->lastInitializerContext = FindMembers;
6933 BEGIN(ReadInitializer);
6935<CSAccessorDecl>"}" {
6936 if (yyextra->curlyCount)
6938 yyextra->curlyCount--;
6942 yyextra->mtype = MethodTypes::Method;
6943 yyextra->virt = Specifier::Normal;
6945 yyextra->current->endBodyLine=yyextra->yyLineNr;
6950<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
6951<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
6952<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
6953<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
6954<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
6955<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
6956<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
6957<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
6958<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
6959<CSAccessorDecl>{CHARLIT} {}
6960<CSAccessorDecl>"\"" { BEGIN(CSString);}
6961<CSAccessorDecl>"." {}
6962<CSAccessorDecl>\n {
lineCount(yyscanner); }
6963<CSString>"\"" { BEGIN(CSAccessorDecl);}
6971<SliceSequence>{SCOPENAME} {
6972 if (yyextra->current->spec.isLocal())
6974 yyextra->current->type =
"local ";
6976 yyextra->current->type +=
"sequence<";
6977 yyextra->current->type += yytext;
6978 yyextra->current->type +=
">";
6981<SliceSequence>{BN}*">"{BN}* {
6983 BEGIN(SliceSequenceName);
6986<SliceSequenceName>{ID}{BN}* {
6988 yyextra->current->name = yytext ;
6989 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6992<SliceSequenceName>";" {
6993 yyextra->current->section = EntryType::makeVariable();
6994 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6999<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7001 if (yyextra->current->spec.isLocal())
7003 yyextra->current->type =
"local ";
7005 yyextra->current->type +=
"dictionary<";
7006 yyextra->current->type += yytext;
7007 yyextra->current->type +=
">";
7008 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7011<SliceDictionary>{BN}*">"{BN}* {
7013 BEGIN(SliceDictionaryName);
7016<SliceDictionaryName>{ID}{BN}* {
7018 yyextra->current->name = yytext ;
7019 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7022<SliceDictionaryName>";" {
7023 yyextra->current->section = EntryType::makeVariable();
7024 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7034<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7035 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7036 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7039<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7040 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7041 BEGIN( yyextra->docBlockContext );
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
7043<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7044 yyextra->docBlock << yytext;
7045 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7046 BEGIN( yyextra->docBlockContext );
7048<DocLine>{NONLopt}/"\n" {
7049 yyextra->docBlock << yytext;
7050 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7051 BEGIN( yyextra->docBlockContext );
7056<DocBlock>"*"*{CCE} {
7058 BEGIN(yyextra->docBlockContext);
7060<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7063 yyextra->docBlock <<
"\\ilinebr " << indent;
7065<DocBlock>^{B}*"*"+/[^/] {
7068 yyextra->docBlock << indent;
7070<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7073 yyextra->docBlock << indent;
7075<DocBlock>^{B}*({CPPC}){B}* {
7078 yyextra->docBlock << yytext;
7082 yyextra->docBlock << yytext;
7084<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7085 yyextra->docBlock << yytext;
7087<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7088 yyextra->docBlock << yytext;
7089 char blockName[] =
"f$";
7091 if (c==
'[') blockName[1]=
']';
7092 else if (c==
'{') blockName[1]=
'}';
7093 else if (c==
'(') blockName[1]=
')';
7095 BEGIN(DocCopyBlock);
7097<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7098 yyextra->fileName = &yytext[6];
7099 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7100 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7101 yyextra->docBlock << yytext;
7103<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7104 yyextra->fileName = &yytext[6];
7105 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7106 yyextra->docBlock << yytext;
7108<DocBlock>{CMD}"iline"{LINENR}{B} {
7113 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7117 yyextra->yyLineNr = nr;
7119 yyextra->docBlock << yytext;
7121<DocBlock>{B}*"<"{PRE}">" {
7122 yyextra->docBlock << yytext;
7124 BEGIN(DocCopyBlock);
7126<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7127 yyextra->docBlock << yytext;
7129 BEGIN(DocCopyBlock);
7131<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
7132 yyextra->docBlock << yytext;
7134 BEGIN(DocCopyBlock);
7136<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7138 yyextra->docBlock <<
"\\ilinebr ";
7139 yyextra->docBlock << pat;
7141 BEGIN(DocCopyBlock);
7143<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7145 yyextra->docBlock << pat;
7147 BEGIN(DocCopyBlock);
7149<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7150<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7151<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7153 yyextra->docBlock <<
"\\ilinebr ";
7154 yyextra->docBlock << pat;
7156 BEGIN(DocCopyBlock);
7158<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7159<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7160<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7162 yyextra->docBlock << pat;
7164 BEGIN(DocCopyBlock);
7166<DocBlock>{B}*"<"{CODE}">" {
7167 if (yyextra->insideCS)
7169 yyextra->docBlock << yytext;
7171 BEGIN(DocCopyBlock);
7178<DocBlock>[^@*~\/\\\n]+ {
7179 yyextra->docBlock << yytext;
7183 yyextra->docBlock << *yytext;
7186 yyextra->docBlock << *yytext;
7191<DocCopyBlock>"</"{PRE}">" {
7196 yyextra->docBlock << yytext;
7198<DocCopyBlock>"</"{CODE}">" {
7203 yyextra->docBlock << yytext;
7205<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7210 yyextra->docBlock << yytext;
7212<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7217 yyextra->docBlock << yytext;
7219<DocCopyBlock>^{B}*"*"+/{BN}+ {
7220 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7228 yyextra->docBlock << indent;
7231<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7232 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7236 yyextra->docBlock << indent;
7243<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7244 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7248 yyextra->docBlock << indent+
"*";
7255<DocCopyBlock>^{B}*"*"+/{BN}* {
7256 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7259 if (yyextra->nestedComment>0)
7262 yyextra->docBlock << indent+
"*";
7267 yyextra->docBlock << indent;
7275<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7281 yyextra->docBlock << pat;
7283<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7289 yyextra->docBlock << pat;
7291<DocCopyBlock>[^<@/\*\]~"\$\\\n]+ {
7292 yyextra->docBlock << yytext;
7295 yyextra->docBlock << yytext;
7296 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7300 yyextra->lastStringContext=YY_START;
7301 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7302 yyextra->stopAtInvalidString=
true;
7306<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7309 yyextra->nestedComment++;
7311 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7313 yyextra->nestedComment--;
7315 yyextra->docBlock << yytext;
7318 yyextra->docBlock << *yytext;
7322 yyextra->docBlock << *yytext;
7324<DocCopyBlock><<EOF>> {
7325 warn(yyextra->fileName,yyextra->yyLineNr,
7326 "reached end of file while inside a '{}' block!"
7327 " The command that should end the block seems to be missing!",
7328 yyextra->docBlockName);
7335<Prototype>"operator"{B}*"("{B}*")" {
7336 yyextra->current->name+=yytext;
7339 yyextra->current->args+=*yytext;
7340 yyextra->currentArgumentContext = PrototypeQual;
7341 yyextra->fullArgString = yyextra->current->args;
7342 yyextra->copyArgString = &yyextra->current->args;
7343 BEGIN( ReadFuncArgType ) ;
7345<Prototype>"("({ID}"::")*({B}*[&*])+ {
7346 if (yyextra->insidePHP)
7352 yyextra->current->type+=yyextra->current->name+yytext;
7353 yyextra->current->name.clear();
7354 BEGIN( PrototypePtr );
7357<PrototypePtr>{SCOPENAME} {
7358 yyextra->current->name+=yytext;
7361 yyextra->current->args+=*yytext;
7362 yyextra->currentArgumentContext = PrototypeQual;
7363 yyextra->fullArgString = yyextra->current->args;
7364 yyextra->copyArgString = &yyextra->current->args;
7365 BEGIN( ReadFuncArgType ) ;
7368 yyextra->current->type+=
')';
7372 yyextra->current->name+=yytext;
7375 BEGIN( PrototypeSkipLine);
7377<PrototypeQual>{B}*"const"{B}* {
7378 yyextra->current->args +=
" const ";
7379 yyextra->current->argList.setConstSpecifier(
TRUE);
7381<PrototypeQual>{B}*"volatile"{B}* {
7382 yyextra->current->args +=
" volatile ";
7383 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7385<PrototypeQual>{B}*"="{B}*"0"{B}* {
7386 yyextra->current->args +=
" = 0";
7387 yyextra->current->virt = Specifier::Pure;
7388 yyextra->current->argList.setPureSpecifier(
TRUE);
7390<PrototypeQual>"throw"{B}*"(" {
7391 yyextra->current->exception =
"throw(";
7392 BEGIN(PrototypeExc);
7395 yyextra->current->exception +=
')';
7396 BEGIN(PrototypeQual);
7399 yyextra->current->exception += *yytext;
7402 yyextra->current->args += *yytext;
7405 yyextra->current->name += *yytext;
7407<PrototypeSkipLine>. {
7413<SkipCxxComment>.*"\\\n" {
7414 if (yyextra->insideCS)
7423<SkipCxxComment>{ANYopt}/\n {
7424 BEGIN( yyextra->lastCContext ) ;
7426<SkipComment>[^\*\n]+
7431 if (!yyextra->insideCpp) REJECT;
7432 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7433 yyextra->lastC11AttributeContext = YY_START;
7434 BEGIN( SkipC11Attribute );
7439 if (yyextra->insideIDL && yyextra->insideCppQuote)
7443 else if (yyextra->insidePHP)
7445 yyextra->lastStringContext=YY_START;
7450 if (!yyextra->insidePHP)
7452 yyextra->lastCPPContext = YY_START;
7457 yyextra->lastCContext = YY_START ;
7458 BEGIN( SkipCxxComment ) ;
7462 if (!yyextra->insidePHP)
7464 yyextra->lastCContext = YY_START ;
7465 BEGIN( SkipCxxComment ) ;
7468 if (yyextra->insidePHP)
7470 yyextra->lastStringContext=YY_START;
7471 BEGIN(SkipPHPString);
7475 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7477 if (yyextra->current->type.isEmpty())
7479 if (yyextra->current->name.isEmpty())
7480 yyextra->current->name=
"?";
7482 yyextra->current->name+=
"?";
7486 yyextra->current->type+=
"?";
7490<*>"}" { yyextra->exported=
false; }
7492<SkipComment>{CPPC}|{CCS}
7493<*>{CCS} { yyextra->lastCContext = YY_START ;
7494 BEGIN( SkipComment ) ;
7496<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7498 yyextra->lastCContext = YY_START ;
7499 BEGIN( SkipCxxComment ) ;
7502 if (yyextra->insideCS && yyextra->fakeNS)
7506 BEGIN ( ReadNSBody);
7518 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7520 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7522 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7532 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7533 yyextra->outerScopeEntries.clear();
7534 yyextra->baseName.clear();
7535 yyextra->protection = Protection::Public;
7536 yyextra->baseProt = Protection::Public;
7537 yyextra->sharpCount = 0;
7538 yyextra->roundCount = 0;
7539 yyextra->curlyCount = 0;
7540 yyextra->mtype = MethodTypes::Method;
7541 yyextra->isStatic =
FALSE;
7542 yyextra->virt = Specifier::Normal;
7543 yyextra->baseVirt = Specifier::Normal;
7544 yyextra->isTypedef =
FALSE;
7545 yyextra->insideTryBlock =
FALSE;
7546 yyextra->insideFormula =
FALSE;
7547 yyextra->insideCode=
FALSE;
7549 yyextra->previous = 0;
7550 yyextra->firstTypedefEntry.reset();
7551 yyextra->memspecEntry.reset();
7556 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7557 if (yyextra->insideJava)
7559 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7561 yyextra->current->protection = yyextra->protection;
7562 yyextra->current->exported = yyextra->exported ;
7563 yyextra->current->mtype = yyextra->mtype;
7564 yyextra->current->virt = yyextra->virt;
7565 yyextra->current->isStatic = yyextra->isStatic;
7566 yyextra->current->lang = yyextra->language;
7568 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7569 yyextra->isTypedef=
FALSE;
7577 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7578 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7580 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7586 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7589 for (p = yytext ; *p ; ++p )
7593 yyextra->yyLineNr++,yyextra->column=0,yyextra->yyColNr=1;
7597 yyextra->column+=tabSize - (yyextra->column%tabSize);
7601 yyextra->column++,yyextra->yyColNr++;
7609 int col=startIndent;
7615 if (c==
'\t') col+=tabSize-(col%tabSize);
7616 else if (c==
'\n') col=0;
7625 int i = text.
find(
'"');
7638 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7639 yyextra->current->protection = yyextra->protection = prot;
7640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7641 yyextra->current->type.
clear();
7642 yyextra->current->name.clear();
7643 yyextra->current->args.clear();
7644 yyextra->current->argList.clear();
7650 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7651 size_t tl=yyextra->current->type.length();
7652 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7654 yyextra->current->type +=
' ' ;
7656 yyextra->current->type += yyextra->current->name;
7657 yyextra->current->name.clear() ;
7658 tl=yyextra->current->type.length();
7659 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
7661 yyextra->current->type +=
' ' ;
7663 yyextra->current->type += yyextra->current->args ;
7664 yyextra->current->args.clear() ;
7665 yyextra->current->argList.clear();
7672 if (s==
nullptr || *s==0)
return name;
7674 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
7686 bool funcPtr = i>0 && type[i-1]==
')';
7688 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
7689 if (funcPtr && i>0 && type[i-1]==
'(') i--;
7690 return type.
left(i);
7696 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7699 yyextra->docBlock <<
"\\iskip";
7701 yyextra->docBlockName=blockName;
7702 yyextra->fencedSize=fencedSize;
7703 yyextra->nestedComment=0;
7709 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7710 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
7714 yyextra->docBlock <<
"\\endiskip";
7716 yyextra->docBlockName=
"";
7736 int i=name.
find(
"operator");
7737 if (i==-1)
return FALSE;
7747 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7749 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
7750 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
7751 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
7752 yyextra->insideD = yyextra->language==SrcLangExt::D;
7753 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
7754 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
7755 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
7756 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
7757 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
7758 yyextra->language==SrcLangExt::Lex);
7769 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7770 if (yyextra->current_root->section.isScope())
7773 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
7775 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
7777 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
7787 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7788 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
7789 if (yyextra->current->argList.empty())
return FALSE;
7790 for (
const Argument &a : yyextra->current->argList)
7801 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7802 if (yyextra->insideJava)
7805 yyextra->current->protection = Protection::Public;
7806 if (text.
find(
"protected")!=-1)
7807 yyextra->current->protection = Protection::Protected;
7808 else if (text.
find(
"private")!=-1)
7809 yyextra->current->protection = Protection::Private;
7810 else if (text.
find(
"package")!=-1)
7811 yyextra->current->protection = Protection::Package;
7818 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7819 int si =
static_cast<int>(yyextra->current->args.length());
7820 if (yyextra->oldStyleArgType.isEmpty())
7822 std::string args = yyextra->current->args.str();
7823 static const reg::Ex re(R
"(\([^)]*\).*)");
7829 bi1=(int)match.position();
7830 size_t secondMatchStart = match.position()+match.length();
7833 bi2=(int)match.position();
7837 if (bi1!=-1 && bi2!=-1)
7840 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7842 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7843 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7845 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7846 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7847 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
7852 yyextra->oldStyleArgType = yyextra->current->args.left(s);
7855 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
7856 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
7858 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
7859 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
7865 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
7868 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
7872 yyextra->oldStyleArgType=yyextra->current->args.left(i);
7873 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
7886 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
7889 oldStyleArgPtr=yyextra->current->args.
left(j);
7908 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7909 for (
Argument &a : yyextra->current->argList)
7918 a.
docs=brief+
"\n\n"+docs;
7950 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7953 yyextra->current->briefFile = yyextra->fileName;
7954 yyextra->current->briefLine = yyextra->yyLineNr;
7958 yyextra->current->docFile = yyextra->fileName;
7959 yyextra->current->docLine = yyextra->yyLineNr;
7967 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7968 if (yyextra->tempEntry==0)
7973 yyextra->previous = yyextra->current;
7974 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7978 yyextra->previous = yyextra->current;
7979 yyextra->current = yyextra->tempEntry;
7980 yyextra->tempEntry.reset();
7987 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7990 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
7991 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
7994 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
7995 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
7997 docEntry->inbodyFile = yyextra->fileName;
7998 docEntry->inbodyLine = lineNr;
8002 bool needsEntry=
FALSE;
8004 Markdown markdown(yyextra->fileName,lineNr);
8007 while (yyextra->commentScanner.parseCommentBlock(
8008 yyextra->thisParser,
8009 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8013 yyextra->docBlockInBody ?
FALSE : brief,
8014 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8015 yyextra->docBlockInBody,
8016 yyextra->protection,
8027 QCString docFile = yyextra->current->docFile;
8029 yyextra->current->docFile = docFile;
8030 yyextra->current->docLine = lineNr;
8038 if (yyextra->docBlockTerm)
8040 unput(yyextra->docBlockTerm);
8041 yyextra->docBlockTerm=0;
8048 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8059 QCString orgDoc = yyextra->current->doc;
8060 QCString orgBrief = yyextra->current->brief;
8061 int orgDocLine = yyextra->current->docLine;
8062 int orgBriefLine = yyextra->current->briefLine;
8064 yyextra->current->doc.
clear();
8065 yyextra->current->brief.clear();
8068 int lineNr = orgDocLine;
8070 Markdown markdown(yyextra->fileName,lineNr);
8073 while (yyextra->commentScanner.parseCommentBlock(
8074 yyextra->thisParser,
8075 yyextra->current.get(),
8082 yyextra->protection,
8091 if (needsEntry)
newEntry(yyscanner);
8097 a.
docs = yyextra->current->doc;
8100 yyextra->current->doc = orgDoc;
8101 yyextra->current->brief = orgBrief;
8102 yyextra->current->docLine = orgDocLine;
8103 yyextra->current->briefLine = orgBriefLine;
8114 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8115 for (
const auto &ce : rt->children())
8117 if (!ce->program.empty())
8121 yyextra->padCount=0;
8124 yyextra->programStr = ce->program.str();
8125 yyextra->inputString = yyextra->programStr.data();
8126 yyextra->inputPosition = 0;
8127 if (ce->section.isEnum() || ce->spec.isEnum())
8128 BEGIN( FindFields ) ;
8130 BEGIN( FindMembers ) ;
8131 yyextra->current_root = ce;
8132 yyextra->fileName = ce->fileName;
8134 yyextra->yyLineNr = ce->bodyLine;
8135 yyextra->yyColNr = ce->bodyColumn;
8136 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8138 yyextra->current = std::make_shared<Entry>();
8139 yyextra->isStatic =
FALSE;
8144 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8146 ce->groups = rt->groups;
8149 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8151 if ( ce->section.isClass() )
8153 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8155 yyextra->current->protection = yyextra->protection = Protection::Public ;
8157 else if (yyextra->insideJava)
8159 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8161 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8163 if (ce->lang==SrcLangExt::ObjC)
8165 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8169 yyextra->current->protection = yyextra->protection = Protection::Public ;
8174 yyextra->current->protection = yyextra->protection = Protection::Private ;
8177 else if (ce->section.isEnum() )
8179 yyextra->current->protection = yyextra->protection = ce->protection;
8181 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8183 if (ce->section.isNamespace() )
8185 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8187 yyextra->current->protection = yyextra->protection = ce->protection;
8188 yyextra->current->exported = yyextra->exported =
false;
8190 else if (ce->section.isNamespace() )
8192 yyextra->current->protection = yyextra->protection = Protection::Public ;
8193 yyextra->current->exported = yyextra->exported = ce->exported;
8197 yyextra->current->protection = yyextra->protection = Protection::Public ;
8198 yyextra->current->exported = yyextra->exported =
false;
8200 yyextra->mtype = MethodTypes::Method;
8201 yyextra->virt = Specifier::Normal;
8208 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8210 scannerYYlex(yyscanner);
8211 yyextra->lexInit=
TRUE;
8214 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8216 yyextra->programStr.clear();
8217 ce->program.str(std::string());
8233 const char *fileBuf,
8234 const std::shared_ptr<Entry> &rt,
8238 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8241 yyextra->inputString = fileBuf;
8242 yyextra->inputPosition = 0;
8243 yyextra->column = 0;
8244 scannerYYrestart(
nullptr,yyscanner);
8247 yyextra->protection = Protection::Public;
8248 yyextra->mtype = MethodTypes::Method;
8249 yyextra->isStatic =
FALSE;
8250 yyextra->exported =
false;
8251 yyextra->virt = Specifier::Normal;
8252 yyextra->current_root = rt;
8253 yyextra->yyLineNr = 1 ;
8254 yyextra->yyBegLineNr = 1;
8255 yyextra->yyBegColNr = 0;
8256 yyextra->anonCount = 0;
8257 yyextra->anonNSCount = 0;
8258 yyextra->fileName = fileName;
8259 yyextra->clangParser = clangParser;
8261 rt->lang = yyextra->language;
8262 msg(
"Parsing file {}...\n",yyextra->fileName);
8264 yyextra->current_root = rt;
8266 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8267 yyextra->current = std::make_shared<Entry>();
8272 yyextra->current->name = yyextra->fileName;
8273 yyextra->current->section = sec;
8274 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8276 yyextra->current->reset();
8278 if ( yyextra->insidePHP )
8280 BEGIN( FindMembersPHP );
8282 else if ( yyextra->insideJava )
8284 yyextra->current->name=
"java::lang";
8285 yyextra->current->fileName = yyextra->fileName;
8286 yyextra->current->section = EntryType::makeUsingDir();
8287 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8289 BEGIN( FindMembers );
8293 BEGIN( FindMembers );
8296 scannerYYlex(yyscanner);
8297 yyextra->lexInit=
TRUE;
8299 if (YY_START==Comment)
8301 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8305 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8307 yyextra->programStr.clear();
8308 rt->program.str(std::string());
8312 yyextra->anonNSCount++;
8315 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8318 parent->moveToSubEntryAndKeep(child);
8320 yyextra->outerScopeEntries.clear();
8329 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8332 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8335 if (!yyextra->current)
8340 const char *orgInputString;
8341 int orgInputPosition;
8342 YY_BUFFER_STATE orgState;
8345 orgState = YY_CURRENT_BUFFER;
8346 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8347 orgInputString = yyextra->inputString;
8348 orgInputPosition = yyextra->inputPosition;
8351 yyextra->inputString = text.
data();
8352 yyextra->inputPosition = 0;
8353 yyextra->column = 0;
8354 scannerYYrestart(
nullptr, yyscanner);
8356 scannerYYlex(yyscanner);
8357 yyextra->lexInit=
TRUE;
8359 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8360 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8362 yyextra->current->section = EntryType::makeVariableDoc();
8366 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8367 yy_switch_to_buffer(orgState, yyscanner);
8368 yyextra->inputString = orgInputString;
8369 yyextra->inputPosition = orgInputPosition;
8385 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8393 scannerYYlex_destroy(
p->yyscanner);
8397 const char *fileBuf,
8398 const std::shared_ptr<Entry> &root,
8402 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8403 yyextra->thisParser =
this;
8407 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8415 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8416 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8417 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8428#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)