13%option never-interactive
14%option prefix="scannerYY"
16%option extra-type="struct scannerYY_state *"
20#define YY_TYPEDEF_YY_SCANNER_T
60#define YY_NO_UNISTD_H 1
225static inline int computeIndent(
const char *s,
int startIndent);
256#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
259static inline const char *
getLexerFILE() {
return __FILE__;}
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static const char * getLexerFILE()
static void addType(yyscan_t yyscanner)
#define lineCount(s, len)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static void setContext(yyscan_t yyscanner)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
void fixArgumentListForJavaScript(ArgumentList &al)
static bool startOfRequiresExpression(const QCString &req)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
Some helper functions for std::string.
TextStream * pSkipInterpString
EntryRelations outerScopeEntries
QCString * pCopyRoundString
int lastCopyArgStringContext
std::shared_ptr< Entry > firstTypedefEntry
int lastDeprecatedContext
bool insideJS
processing JavaScript code?
OutlineParserInterface * thisParser
std::shared_ptr< Entry > tempEntry
std::shared_ptr< Entry > memspecEntry
TextStream * pCopySquareGString
int lastInitializerContext
std::shared_ptr< Entry > previous
int lastPreLineCtrlContext
ClangTUParser * clangParser
bool insideCS
processing C# code?
ArgumentList * currentArgumentList
TextStream * pCopyCurlyGString
int lastCommentInArgContext
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
std::pair< Entry *, std::shared_ptr< Entry > > EntryRelation
int lastC11AttributeContext
QCString * pCopyQuotedString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
QCString * pCopyCurlyString
CommentScanner commentScanner
bool insideIDL
processing IDL code?
bool insideSlice
processing Slice code?
TextStream * pCopyHereDocGString
bool insideObjC
processing Objective C code?
bool insideCli
processing C++/CLI code?
int currentArgumentContext
int lastSkipVerbStringContext
QCString * pCopyRawString
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
QCString * pCopySharpString
std::vector< EntryRelation > EntryRelations
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
271NOTopt (("!"{BNopt})|("not"{BN}+))?
273HEXDIGIT ({DIGIT}|[a-f]|[A-F])
274ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
275SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
276TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
277CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
280CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
281PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
282PHPUSEKW ("public"|"private"|"protected")
283IDLATTR ("["[^\]]*"]"){BN}*
284TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
285RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
286RAWEND ")"[^ \t\(\)\\]{0,16}\"
287ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
288ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
289LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
290BITOP "&"|"|"|"^"|"<<"|">>"|"~"
291OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
292FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
293MODULE_ID ({ID}".")*{ID}
294LINENR {B}*[1-9][0-9]*
295FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
296FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
297FILECHARS {FILEICHAR}*{FILEECHAR}+
298HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
299VFILEMASK {FILECHARS}("."{FILECHARS})*
300FILEMASK {VFILEMASK}|{HFILEMASK}
311DCOMMC ("/\*!"|"/\**")
313DCOMMCPP ("/\/!"|"/\/\/")
315DCOMM {DCOMMC}|{DCOMMCPP}
387%x TryFunctionBlockEnd
402%x SkipInterpVerbString
416%x UNOIDLAttributeBlock
445%x SpecializationSingleQuote
446%x SpecializationDoubleQuote
479%x SliceDictionaryName
510<*>"DEPRECATED_ATTRIBUTE" {
511 if (!yyextra->insideObjC) REJECT;
513<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
514 if (!yyextra->insideObjC) REJECT;
515 yyextra->lastDeprecatedContext=YY_START;
516 yyextra->lastStringContext=Deprecated_round;
519<Deprecated_round>")" {
520 BEGIN(yyextra->lastDeprecatedContext);
522<Deprecated_round>{BNopt} {
525<Deprecated_round>. { }
527 yyextra->curlyCount=0;
528 yyextra->needsSemi =
TRUE;
529 BEGIN(SkipCurlyBlock);
532 yyextra->roundCount=0;
533 BEGIN(SkipRoundBlock);
536 ++yyextra->roundCount;
539 if (yyextra->roundCount )
540 --yyextra->roundCount ;
545 ++yyextra->curlyCount ;
548 if( yyextra->curlyCount )
550 --yyextra->curlyCount ;
552 else if (yyextra->needsSemi)
558 BEGIN( FindMembers );
562 if (yyextra->insidePHP)
564 yyextra->lastStringContext=NextSemi;
565 BEGIN(SkipPHPString);
568<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
570 yyextra->lastStringContext=NextSemi;
575 BEGIN( FindMembers );
579 BEGIN( FindMembers );
582 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
586<FindMembers>"<?php" {
587 yyextra->insidePHP =
TRUE;
589<FindMembersPHP>"<?"("php"?) {
590 BEGIN( FindMembers );
592<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
594 BEGIN( FindMembers );
596<FindMembers>"?>"|"</script>" {
597 if (yyextra->insidePHP)
598 BEGIN( FindMembersPHP );
602<FindMembersPHP>[^\n<]+ {
609<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
614<FindMembers>"%{"[^\n]* {
615 if (!yyextra->insideIDL)
619 if (!yyextra->insideIDL)
622<FindMembers>{B}*("properties"){BN}*":"{BN}* {
624 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
627<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
629 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
632<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
634 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
637<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
639 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
642<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
644 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
647<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
649 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
651<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
654<FindMembers>{B}*"internal"{BN}*":"{BN}* {
655 if (yyextra->insideCli)
664<FindMembers>{B}*"protected"{BN}*":"{BN}* {
667<FindMembers>{B}*"private"{BN}*":"{BN}* {
670<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
671 if (!yyextra->insideCpp) REJECT;
675<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
676 if (!yyextra->insideCpp) REJECT;
680<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
681 if (!yyextra->insideCpp) REJECT;
693<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
694<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
695 BEGIN( SkipComment ) ;
697<CppProt>("slots"|"Q_SLOTS") {
698 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
700<FindMembers>{B}*"event"{BN}+ {
701 if (yyextra->insideCli)
705 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
706 yyextra->current->bodyLine = yyextra->yyLineNr;
707 yyextra->current->bodyColumn = yyextra->yyColNr;
708 yyextra->curlyCount=0;
709 BEGIN( CliPropertyType );
711 else if (yyextra->insideCS)
714 yyextra->current->mtype = MethodTypes::Event;
715 yyextra->current->bodyLine = yyextra->yyLineNr;
716 yyextra->current->bodyColumn = yyextra->yyColNr;
723<FindMembers>{B}*"property"{BN}+ {
724 if (yyextra->insideCli)
728 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
729 yyextra->current->bodyLine = yyextra->yyLineNr;
730 yyextra->current->bodyColumn = yyextra->yyColNr;
731 yyextra->curlyCount=0;
732 BEGIN( CliPropertyType );
739<CliPropertyType>{ID} {
741 yyextra->current->name = yytext;
743<CliPropertyType>"[" {
744 yyextra->current->args =
"[";
745 BEGIN( CliPropertyIndex );
747<CliPropertyType>"{" {
748 yyextra->curlyCount=0;
750 BEGIN( CSAccessorDecl );
752<CliPropertyType>";" {
754 BEGIN( FindMembers );
759<CliPropertyType>{B}* {
763 yyextra->current->type += yytext;
765<CliPropertyIndex>"]" {
766 BEGIN( CliPropertyType );
767 yyextra->current->args+=yytext;
770 yyextra->current->args+=yytext;
785<FindMembers>{B}*"@private"{BN}+ {
788<FindMembers>{B}*"@protected"{BN}+ {
791<FindMembers>{B}*"@public"{BN}+ {
794<FindMembers>[\-+]{BN}* {
795 if (!yyextra->insideObjC)
801 yyextra->current->fileName = yyextra->fileName;
802 yyextra->current->startLine = yyextra->yyLineNr;
803 yyextra->current->startColumn = yyextra->yyColNr;
804 yyextra->current->bodyLine = yyextra->yyLineNr;
805 yyextra->current->bodyColumn = yyextra->yyColNr;
806 yyextra->current->section = EntryType::makeFunction();
807 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
808 yyextra->insideObjC =
TRUE;
809 yyextra->yyBegColNr = yyextra->yyColNr;
810 yyextra->yyBegLineNr = yyextra->yyLineNr;
811 yyextra->current->virt = Specifier::Virtual;
813 yyextra->current->isStatic=yytext[0]==
'+';
819 BEGIN( ObjCReturnType );
820 yyextra->current->type.clear();
821 yyextra->roundCount=0;
824 if (yyextra->current->type.isEmpty())
826 yyextra->current->type +=
"id";
828 yyextra->current->name = yytext;
832 yyextra->current->name +=
':';
834 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
837<ObjCReturnType>[^()]* {
838 yyextra->current->type += yytext;
840<ObjCReturnType>"(^)(" {
841 yyextra->current->type += yytext;
842 yyextra->roundCount++;
845 yyextra->current->type += yytext;
846 yyextra->roundCount++;
849 if (yyextra->roundCount<=0)
855 yyextra->current->type += yytext;
856 yyextra->roundCount--;
859<ObjCParams>({ID})?{BN}*":" {
864 yyextra->current->name +=
" :";
868 yyextra->current->name += keyw+
":";
870 if (yyextra->current->argList.back().type.isEmpty())
872 yyextra->current->argList.back().type=
"id";
876 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
878<ObjCParams>{ID}{BN}* {
882<ObjCParams>","{BN}*"..." {
889 yyextra->current->argList.push_back(a);
897 yyextra->roundCount=0;
898 yyextra->current->argList.back().type.clear();
899 BEGIN( ObjCParamType );
902 yyextra->roundCount++;
903 yyextra->current->argList.back().type+=yytext;
905<ObjCParamType>")"/{B}* {
906 if (yyextra->roundCount<=0)
912 yyextra->current->argList.back().type+=yytext;
913 yyextra->roundCount--;
916<ObjCParamType>[^()]* {
919<ObjCMethod,ObjCParams>";" {
920 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
922 yyextra->current->argList.back().type=
"id";
924 if (yyextra->current->argList.empty())
926 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
933<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
938 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
940 yyextra->current->argList.back().type=
"id";
942 if (yyextra->current->argList.empty())
944 yyextra->current->argList.setNoParameters(
TRUE);
950<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
951 if (yyextra->insideSlice)
954 yyextra->current->bodyLine = yyextra->yyLineNr;
955 yyextra->current->bodyColumn = yyextra->yyColNr;
956 yyextra->current->fileName = yyextra->fileName ;
957 yyextra->current->startLine = yyextra->yyLineNr ;
958 yyextra->current->startColumn = yyextra->yyColNr;
959 yyextra->current->args.clear();
960 yyextra->current->section = EntryType::makeTypedef();
961 yyextra->isTypedef =
TRUE;
962 BEGIN( SliceSequence );
967<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
968 if (yyextra->insideSlice)
971 yyextra->current->bodyLine = yyextra->yyLineNr;
972 yyextra->current->bodyColumn = yyextra->yyColNr;
973 yyextra->current->fileName = yyextra->fileName ;
974 yyextra->current->startLine = yyextra->yyLineNr ;
975 yyextra->current->startColumn = yyextra->yyColNr;
976 yyextra->current->args.clear();
977 yyextra->current->section = EntryType::makeTypedef() ;
978 yyextra->isTypedef =
TRUE;
979 BEGIN( SliceDictionary );
984<FindMembers>{BN}{1,80} {
987<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
988 if (yyextra->insideJava)
991 yyextra->lastSkipRoundContext = YY_START;
992 yyextra->roundCount=0;
997 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
998 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
999 yyextra->current->protection = Protection::Public ;
1001 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
1008<ObjCPropAttr>"getter="{ID} {
1009 yyextra->current->read = yytext+7;
1011<ObjCPropAttr>"setter="{ID} {
1012 yyextra->current->write = yytext+7;
1014<ObjCPropAttr>"readonly" {
1015 yyextra->current->spec.setWritable(
false);
1017<ObjCPropAttr>"readwrite" {
1019<ObjCPropAttr>"assign" {
1021<ObjCPropAttr>"unsafe_unretained" {
1022 yyextra->current->spec.setAssign(
false);
1023 yyextra->current->spec.setUnretained(
true);
1025<ObjCPropAttr>"retain" {
1026 yyextra->current->spec.setAssign(
false);
1027 yyextra->current->spec.setRetain(
true);
1029<ObjCPropAttr>"copy" {
1030 yyextra->current->spec.setAssign(
false);
1031 yyextra->current->spec.setCopy(
true);
1033<ObjCPropAttr>"weak" {
1034 yyextra->current->spec.setAssign(
false);
1035 yyextra->current->spec.setWeak(
true);
1037<ObjCPropAttr>"strong" {
1038 yyextra->current->spec.setAssign(
false);
1039 yyextra->current->spec.setStrong(
true);
1041<ObjCPropAttr>"nonatomic" {
1042 yyextra->current->spec.setNonAtomic(
true);
1047<FindMembers>"@"{ID}("."{ID})+ {
1048 if (yyextra->insideJava)
1057<FindMembers>"@"{ID} {
1058 if (yyextra->insideJava)
1062 else if (
qstrcmp(yytext,
"@property")==0)
1064 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1065 yyextra->current->spec.setWritable(
true).setReadable(
true);
1066 yyextra->current->protection = Protection::Public ;
1068 else if (
qstrcmp(yytext,
"@synthesize")==0)
1070 BEGIN( ObjCSkipStatement );
1072 else if (
qstrcmp(yytext,
"@dynamic")==0)
1074 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1081<ObjCSkipStatement>";" {
1084<PackageName>{ID}(("."|"\\"){ID})* {
1085 yyextra->isTypedef=
FALSE;
1087 yyextra->current->name = yytext;
1088 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1089 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1090 yyextra->current->section = EntryType::makeNamespace();
1091 yyextra->current->type =
"namespace" ;
1092 yyextra->current->fileName = yyextra->fileName;
1093 yyextra->current->startLine = yyextra->yyLineNr;
1094 yyextra->current->startColumn = yyextra->yyColNr;
1095 yyextra->current->bodyLine = yyextra->yyLineNr;
1096 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
1100 std::shared_ptr<Entry> tmp = yyextra->current;
1101 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1102 yyextra->current_root = std::move(tmp);
1107 yyextra->curlyCount=0;
1108 BEGIN( ReadNSBody );
1110<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1111 if (!yyextra->insideCpp) REJECT;
1113 yyextra->current->exported =
true;
1115 BEGIN( ModuleName );
1117<FindMembers>{B}*"module"{BN}*";" {
1118 if (!yyextra->insideCpp) REJECT;
1119 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1122 BEGIN( FindMembers );
1124<FindMembers>{B}*"module"{BN}+ {
1125 if (!yyextra->insideCpp) REJECT;
1127 yyextra->current->exported =
false;
1129 BEGIN( ModuleName );
1131<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1132 if (!yyextra->insideCpp) REJECT;
1133 yyextra->current->exported =
true;
1135 BEGIN( ModuleImport );
1137<FindMembers>{B}*"import"{BN}+ {
1138 if (!yyextra->insideCpp) REJECT;
1140 BEGIN( ModuleImport );
1142<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1144 int i = name.
find(
':');
1150 yyextra->current->exported,
1153 yyextra->current->section = EntryType::makeModuleDoc();
1154 yyextra->isTypedef=
FALSE;
1156 yyextra->current->type +=
" module";
1157 yyextra->current->fileName = yyextra->fileName;
1158 yyextra->current->startLine = yyextra->yyLineNr;
1159 yyextra->current->startColumn = yyextra->yyColNr;
1160 yyextra->current->bodyLine = yyextra->yyLineNr;
1161 yyextra->current->bodyColumn = yyextra->yyColNr;
1162 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
1165<ModuleName>{MODULE_ID} {
1169 yyextra->current->exported,
1171 yyextra->current->section = EntryType::makeModuleDoc();
1172 yyextra->isTypedef=
FALSE;
1174 yyextra->current->type +=
" module";
1175 yyextra->current->fileName = yyextra->fileName;
1176 yyextra->current->startLine = yyextra->yyLineNr;
1177 yyextra->current->startColumn = yyextra->yyColNr;
1178 yyextra->current->bodyLine = yyextra->yyLineNr;
1179 yyextra->current->bodyColumn = yyextra->yyColNr;
1180 yyextra->current->name = yytext;
1183<ModuleName>":"{BN}+"private" {
1184 yyextra->current->exported = yyextra->exported =
false;
1187<ModuleName>";" { unput(
';');
1192<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1198<ModuleImport>"<"[^>\n]*">" {
1204<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1206 int i = name.
find(
':');
1212 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1216<ModuleImport>{MODULE_ID} {
1220 yyextra->current->exported);
1223<ModuleImport>";" { BEGIN(FindMembers); }
1224<ModuleImport>\n {
lineCount(yyscanner); }
1226<FindMembers>{B}*"export"{BN}+"{" {
1227 yyextra->current->exported = yyextra->exported =
true;
1229<FindMembers>{B}*"export"{BN}+ {
1230 if (!yyextra->insideCpp) REJECT;
1231 yyextra->current->exported=
true;
1233<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1234 yyextra->current->type +=
" initonly ";
1235 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1238<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1239 yyextra->current->isStatic =
TRUE;
1242<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1243 yyextra->current->isStatic =
TRUE;
1246<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1247 yyextra->current->isStatic =
FALSE;
1248 yyextra->current->explicitExternal =
TRUE;
1251<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1253 yyextra->current->type +=
" const ";
1254 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1262<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1263 yyextra->current->type +=
" virtual ";
1264 yyextra->current->virt = Specifier::Virtual;
1267<FindMembers>{B}*"constexpr"{BN}+ {
1268 if (yyextra->insideCpp)
1270 yyextra->current->spec.setConstExpr(
true);
1274<FindMembers>{B}*"consteval"{BN}+ {
1275 if (yyextra->insideCpp)
1277 yyextra->current->spec.setConstEval(
true);
1281<FindMembers>{B}*"constinit"{BN}+ {
1282 if (yyextra->insideCpp)
1284 yyextra->current->spec.setConstInit(
true);
1288<FindMembers>{B}*"published"{BN}+ {
1289 if (yyextra->insideIDL)
1292 yyextra->current->spec.setPublished(
true);
1299<FindMembers>{B}*"sealed"{BN}+ {
1300 if (yyextra->insideCS)
1302 yyextra->current->spec.setSealed(
true);
1309<FindMembers>{B}*"abstract"{BN}+ {
1310 if (yyextra->insidePHP || yyextra->insideCS)
1312 yyextra->current->spec.setAbstract(
true);
1316 if (yyextra->insideCpp) REJECT;
1317 yyextra->current->type +=
" abstract ";
1318 if (!yyextra->insideJava)
1320 yyextra->current->virt = Specifier::Pure;
1324 yyextra->current->spec.setAbstract(
true);
1329<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1330 yyextra->current->spec.setInline(
true);
1333<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1334 yyextra->current->spec.setMutable(
true);
1337<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1338 yyextra->current->spec.setThreadLocal(
true);
1341<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1342 yyextra->current->spec.setExplicit(
true);
1345<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1346 yyextra->current->spec.setLocal(
true);
1349<FindMembers>{B}*"@required"{BN}+ {
1350 yyextra->current->spec.setOptional(
false).setRequired(
true);
1353<FindMembers>{B}*"@optional"{BN}+ {
1354 yyextra->current->spec.setRequired(
false).setOptional(
true);
1362<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1363<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1364 yyextra->isTypedef=
FALSE;
1365 yyextra->current->section = EntryType::makeNamespace();
1366 yyextra->current->type =
"namespace" ;
1367 yyextra->current->fileName = yyextra->fileName;
1368 yyextra->current->startLine = yyextra->yyLineNr;
1369 yyextra->current->startColumn = yyextra->yyColNr;
1370 yyextra->current->bodyLine = yyextra->yyLineNr;
1371 yyextra->current->bodyColumn = yyextra->yyColNr;
1373 if (yyextra->insidePHP)
1375 BEGIN( PackageName );
1379 BEGIN( CompoundName );
1382<FindMembers>{B}*"module"{BN}+ {
1384 if (yyextra->insideIDL || yyextra->insideSlice)
1386 yyextra->isTypedef=
FALSE;
1387 yyextra->current->section = EntryType::makeNamespace();
1388 yyextra->current->type =
"module" ;
1389 yyextra->current->fileName = yyextra->fileName;
1390 yyextra->current->startLine = yyextra->yyLineNr;
1391 yyextra->current->startColumn = yyextra->yyColNr;
1392 yyextra->current->bodyLine = yyextra->yyLineNr;
1393 yyextra->current->bodyColumn = yyextra->yyColNr;
1394 BEGIN( CompoundName );
1396 else if (yyextra->insideD)
1407<FindMembers>{B}*"library"{BN}+ {
1409 if (yyextra->insideIDL)
1411 yyextra->isTypedef=
FALSE;
1412 yyextra->current->section = EntryType::makeNamespace();
1413 yyextra->current->type =
"library" ;
1414 yyextra->current->fileName = yyextra->fileName;
1415 yyextra->current->startLine = yyextra->yyLineNr;
1416 yyextra->current->startColumn = yyextra->yyColNr;
1417 yyextra->current->bodyLine = yyextra->yyLineNr;
1418 yyextra->current->bodyColumn = yyextra->yyColNr;
1419 BEGIN( CompoundName );
1427<FindMembers>{B}*"constants"{BN}+ {
1429 if (yyextra->insideIDL)
1431 yyextra->isTypedef=
FALSE;
1432 yyextra->current->section = EntryType::makeNamespace();
1433 yyextra->current->type =
"constants";
1434 yyextra->current->fileName = yyextra->fileName;
1435 yyextra->current->startLine = yyextra->yyLineNr;
1436 yyextra->current->startColumn = yyextra->yyColNr;
1437 yyextra->current->bodyLine = yyextra->yyLineNr;
1438 yyextra->current->bodyColumn = yyextra->yyColNr;
1439 BEGIN( CompoundName );
1447<FindMembers>{BN}*("service"){BN}+ {
1449 if (yyextra->insideIDL)
1451 yyextra->isTypedef=
FALSE;
1452 yyextra->current->section = EntryType::makeClass();
1456 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1458 yyextra->current->type +=
" service " ;
1459 yyextra->current->fileName = yyextra->fileName;
1460 yyextra->current->startLine = yyextra->yyLineNr;
1461 yyextra->current->bodyLine = yyextra->yyLineNr;
1462 yyextra->current->bodyColumn = yyextra->yyColNr;
1463 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1471<FindMembers>{BN}*("singleton"){BN}+ {
1473 if (yyextra->insideIDL)
1475 yyextra->isTypedef=
FALSE;
1476 yyextra->current->section = EntryType::makeClass();
1478 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1479 setPublished(spec.isPublished());
1481 yyextra->current->type +=
" singleton " ;
1482 yyextra->current->fileName = yyextra->fileName;
1483 yyextra->current->startLine = yyextra->yyLineNr;
1484 yyextra->current->bodyLine = yyextra->yyLineNr;
1485 yyextra->current->bodyColumn = yyextra->yyColNr;
1486 BEGIN( CompoundName );
1494<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1496 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1498 yyextra->isTypedef=
FALSE;
1499 yyextra->current->section = EntryType::makeClass();
1501 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1503 setOptional(spec.isOptional()).
1504 setPublished(spec.isPublished()).
1505 setLocal(spec.isLocal());
1507 yyextra->current->type +=
" interface" ;
1508 yyextra->current->fileName = yyextra->fileName;
1509 yyextra->current->startLine = yyextra->yyLineNr;
1510 yyextra->current->startColumn = yyextra->yyColNr;
1511 yyextra->current->bodyLine = yyextra->yyLineNr;
1512 yyextra->current->bodyColumn = yyextra->yyColNr;
1514 BEGIN( CompoundName );
1522<FindMembers>{B}*"@implementation"{BN}+ {
1524 yyextra->isTypedef=
FALSE;
1525 yyextra->current->section = EntryType::makeObjcImpl();
1526 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1527 yyextra->insideObjC =
TRUE;
1528 yyextra->current->protection = yyextra->protection = Protection::Public ;
1530 yyextra->current->type +=
" implementation" ;
1531 yyextra->current->fileName = yyextra->fileName;
1532 yyextra->current->startLine = yyextra->yyLineNr;
1533 yyextra->current->bodyLine = yyextra->yyLineNr;
1534 yyextra->current->bodyColumn = yyextra->yyColNr;
1535 BEGIN( CompoundName );
1537<FindMembers>{B}*"@interface"{BN}+ {
1539 yyextra->isTypedef=
FALSE;
1540 yyextra->current->section = EntryType::makeClass();
1541 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1542 if (!yyextra->insideJava)
1544 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1545 yyextra->insideObjC =
TRUE;
1547 yyextra->current->protection = yyextra->protection = Protection::Public ;
1549 yyextra->current->type +=
" interface" ;
1550 yyextra->current->fileName = yyextra->fileName;
1551 yyextra->current->startLine = yyextra->yyLineNr;
1552 yyextra->current->startColumn = yyextra->yyColNr;
1553 yyextra->current->bodyLine = yyextra->yyLineNr;
1554 yyextra->current->bodyColumn = yyextra->yyColNr;
1555 BEGIN( CompoundName );
1557<FindMembers>{B}*"@protocol"{BN}+ {
1559 yyextra->isTypedef=
FALSE;
1560 yyextra->current->section = EntryType::makeClass();
1562 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1563 yyextra->insideObjC =
TRUE;
1564 yyextra->current->protection = yyextra->protection = Protection::Public ;
1566 yyextra->current->type +=
" protocol" ;
1567 yyextra->current->fileName = yyextra->fileName;
1568 yyextra->current->startLine = yyextra->yyLineNr;
1569 yyextra->current->startColumn = yyextra->yyColNr;
1570 yyextra->current->bodyLine = yyextra->yyLineNr;
1571 yyextra->current->bodyColumn = yyextra->yyColNr;
1572 BEGIN( CompoundName );
1574<FindMembers>{B}*"exception"{BN}+ {
1575 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1576 yyextra->isTypedef=
FALSE;
1577 yyextra->current->section = EntryType::makeClass();
1580 yyextra->current->spec =
TypeSpecifier().setException(
true).
1581 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1583 yyextra->current->type +=
" exception" ;
1584 yyextra->current->fileName = yyextra->fileName;
1585 yyextra->current->startLine = yyextra->yyLineNr;
1586 yyextra->current->startColumn = yyextra->yyColNr;
1587 yyextra->current->bodyLine = yyextra->yyLineNr;
1588 yyextra->current->bodyColumn = yyextra->yyColNr;
1590 BEGIN( CompoundName );
1592<FindMembers>"@class" |
1593<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1594<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1596 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1597 bool isConst=decl.
find(
"const")!=-1;
1598 bool isVolatile=decl.
find(
"volatile")!=-1;
1599 yyextra->current->section = EntryType::makeClass();
1601 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1604 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1606 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1608 yyextra->current->spec.setLocal(
true);
1612 yyextra->current->type +=
" const";
1614 else if (isVolatile)
1616 yyextra->current->type +=
" volatile";
1618 yyextra->current->type +=
" class" ;
1619 yyextra->current->fileName = yyextra->fileName;
1620 yyextra->current->startLine = yyextra->yyLineNr;
1621 yyextra->current->startColumn = yyextra->yyColNr;
1622 yyextra->current->bodyLine = yyextra->yyLineNr;
1623 yyextra->current->bodyColumn = yyextra->yyColNr;
1626 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1627 yyextra->insideObjC =
TRUE;
1630 if (yytext[yyleng-1]==
'{') unput(
'{');
1631 BEGIN( CompoundName ) ;
1633<FindMembers>{B}*"value class{" |
1634<FindMembers>{B}*"value class"{BN}+ {
1635 yyextra->isTypedef=
FALSE;
1636 yyextra->current->section = EntryType::makeClass();
1639 yyextra->current->type +=
" value class" ;
1640 yyextra->current->fileName = yyextra->fileName;
1641 yyextra->current->startLine = yyextra->yyLineNr;
1642 yyextra->current->startColumn = yyextra->yyColNr;
1643 yyextra->current->bodyLine = yyextra->yyLineNr;
1644 yyextra->current->bodyColumn = yyextra->yyColNr;
1646 if (yytext[yyleng-1]==
'{') unput(
'{');
1647 BEGIN( CompoundName ) ;
1649<FindMembers>{B}*"ref class{" |
1650<FindMembers>{B}*"ref class"{BN}+ {
1651 yyextra->isTypedef=
FALSE;
1652 yyextra->current->section = EntryType::makeClass();
1655 yyextra->current->type +=
" ref class" ;
1656 yyextra->current->fileName = yyextra->fileName;
1657 yyextra->current->startLine = yyextra->yyLineNr;
1658 yyextra->current->startColumn = yyextra->yyColNr;
1659 yyextra->current->bodyLine = yyextra->yyLineNr;
1660 yyextra->current->bodyColumn = yyextra->yyColNr;
1662 if (yytext[yyleng-1]==
'{') unput(
'{');
1663 BEGIN( CompoundName ) ;
1665<FindMembers>{B}*"interface class{" |
1666<FindMembers>{B}*"interface class"{BN}+ {
1667 yyextra->isTypedef=
FALSE;
1668 yyextra->current->section = EntryType::makeClass();
1669 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1671 yyextra->current->type +=
" interface class" ;
1672 yyextra->current->fileName = yyextra->fileName;
1673 yyextra->current->startLine = yyextra->yyLineNr;
1674 yyextra->current->startColumn = yyextra->yyColNr;
1675 yyextra->current->bodyLine = yyextra->yyLineNr;
1676 yyextra->current->bodyColumn = yyextra->yyColNr;
1678 if (yytext[yyleng-1]==
'{') unput(
'{');
1679 BEGIN( CompoundName ) ;
1681<FindMembers>{B}*"coclass"{BN}+ {
1682 if (yyextra->insideIDL)
1684 yyextra->isTypedef=
FALSE;
1685 yyextra->current->section = EntryType::makeClass();
1687 yyextra->current->type +=
" coclass" ;
1688 yyextra->current->fileName = yyextra->fileName;
1689 yyextra->current->startLine = yyextra->yyLineNr;
1690 yyextra->current->startColumn = yyextra->yyColNr;
1691 yyextra->current->bodyLine = yyextra->yyLineNr;
1692 yyextra->current->bodyColumn = yyextra->yyColNr;
1694 BEGIN( CompoundName ) ;
1699 yyextra->current->name = yytext;
1700 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1704<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1705<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1706 if (yyextra->insideJava) REJECT;
1708 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1709 bool isConst=decl.
find(
"const")!=-1;
1710 bool isVolatile=decl.
find(
"volatile")!=-1;
1711 yyextra->current->section = EntryType::makeClass() ;
1715 setPublished(spec.isPublished()).
1716 setInline(spec.isInline()).
1717 setLocal(spec.isLocal());
1723 yyextra->current->type +=
" const";
1725 else if (isVolatile)
1727 yyextra->current->type +=
" volatile";
1729 yyextra->current->type +=
" struct" ;
1730 yyextra->current->fileName = yyextra->fileName;
1731 yyextra->current->startLine = yyextra->yyLineNr;
1732 yyextra->current->startColumn = yyextra->yyColNr;
1733 yyextra->current->bodyLine = yyextra->yyLineNr;
1734 yyextra->current->bodyColumn = yyextra->yyColNr;
1736 if (yytext[yyleng-1]==
'{') unput(
'{');
1737 BEGIN( CompoundName ) ;
1739<FindMembers>{B}*"value struct{" |
1740<FindMembers>{B}*"value struct"{BN}+ {
1741 yyextra->isTypedef=
FALSE;
1742 yyextra->current->section = EntryType::makeClass();
1743 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1745 yyextra->current->type +=
" value struct" ;
1746 yyextra->current->fileName = yyextra->fileName;
1747 yyextra->current->startLine = yyextra->yyLineNr;
1748 yyextra->current->startColumn = yyextra->yyColNr;
1749 yyextra->current->bodyLine = yyextra->yyLineNr;
1750 yyextra->current->bodyColumn = yyextra->yyColNr;
1752 if (yytext[yyleng-1]==
'{') unput(
'{');
1753 BEGIN( CompoundName ) ;
1755<FindMembers>{B}*"ref struct{" |
1756<FindMembers>{B}*"ref struct"{BN}+ {
1757 yyextra->isTypedef=
FALSE;
1758 yyextra->current->section = EntryType::makeClass();
1759 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1761 yyextra->current->type +=
" ref struct" ;
1762 yyextra->current->fileName = yyextra->fileName;
1763 yyextra->current->startLine = yyextra->yyLineNr;
1764 yyextra->current->startColumn = yyextra->yyColNr;
1765 yyextra->current->bodyLine = yyextra->yyLineNr;
1766 yyextra->current->bodyColumn = yyextra->yyColNr;
1768 if (yytext[yyleng-1]==
'{') unput(
'{');
1769 BEGIN( CompoundName ) ;
1771<FindMembers>{B}*"interface struct{" |
1772<FindMembers>{B}*"interface struct"{BN}+ {
1773 yyextra->isTypedef=
FALSE;
1774 yyextra->current->section = EntryType::makeClass();
1775 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1777 yyextra->current->type +=
" interface struct";
1778 yyextra->current->fileName = yyextra->fileName;
1779 yyextra->current->startLine = yyextra->yyLineNr;
1780 yyextra->current->startColumn = yyextra->yyColNr;
1781 yyextra->current->bodyLine = yyextra->yyLineNr;
1782 yyextra->current->bodyColumn = yyextra->yyColNr;
1784 if (yytext[yyleng-1]==
'{') unput(
'{');
1785 BEGIN( CompoundName ) ;
1787<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1788<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1789 if (yyextra->insideJava) REJECT;
1791 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1792 bool isConst=decl.
find(
"const")!=-1;
1793 bool isVolatile=decl.
find(
"volatile")!=-1;
1794 yyextra->current->section = EntryType::makeClass();
1801 yyextra->current->type +=
" const";
1803 else if (isVolatile)
1805 yyextra->current->type +=
" volatile";
1807 yyextra->current->type +=
" union" ;
1808 yyextra->current->fileName = yyextra->fileName;
1809 yyextra->current->startLine = yyextra->yyLineNr;
1810 yyextra->current->startColumn = yyextra->yyColNr;
1811 yyextra->current->bodyLine = yyextra->yyLineNr;
1812 yyextra->current->bodyColumn = yyextra->yyColNr;
1814 if (yytext[yyleng-1]==
'{') unput(
'{');
1815 BEGIN( CompoundName ) ;
1817<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1818<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1820 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1821 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1822 bool isEnumSytruct = text.
find(
"struct")!=-1;
1823 if (yyextra->insideJava)
1825 yyextra->current->section = EntryType::makeClass();
1831 yyextra->current->section = EntryType::makeEnum() ;
1834 yyextra->current->type +=
" enum";
1837 yyextra->current->spec.setStrong(
true);
1841 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1843 yyextra->current->fileName = yyextra->fileName;
1844 yyextra->current->startLine = yyextra->yyLineNr;
1845 yyextra->current->startColumn = yyextra->yyColNr;
1846 yyextra->current->bodyLine = yyextra->yyLineNr;
1847 yyextra->current->bodyColumn = yyextra->yyColNr;
1849 if (yytext[yyleng-1]==
'{') unput(
'{');
1850 BEGIN( CompoundName ) ;
1852<FindMembers>{B}*"concept"{BN}+ {
1853 if (yyextra->insideJava) REJECT;
1854 yyextra->isTypedef=
FALSE;
1855 yyextra->current->section = EntryType::makeConcept();
1857 yyextra->current->type +=
" concept";
1858 yyextra->current->fileName = yyextra->fileName;
1859 yyextra->current->startLine = yyextra->yyLineNr;
1860 yyextra->current->startColumn = yyextra->yyColNr;
1861 yyextra->current->bodyLine = yyextra->yyLineNr;
1862 yyextra->current->bodyColumn = yyextra->yyColNr;
1863 yyextra->current->args = yyextra->fullArgString;
1864 yyextra->keepComment =
true;
1866 BEGIN( ConceptName ) ;
1868<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1870 yyextra->current->name +=
"()";
1871 BEGIN( FindMembers );
1873<Operator>"("{BN}*")"{BNopt}/"(" {
1875 yyextra->current->name += yytext ;
1876 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1877 BEGIN( FindMembers ) ;
1881 BEGIN( FindMembers ) ;
1885 yyextra->current->name += *yytext ;
1887<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1888 if (!yyextra->current->type.startsWith(
"friend "))
1890 yyextra->current->name += yytext;
1894 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1896 BEGIN( FindMembers ) ;
1898<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1901 yyextra->current->tArgLists.
push_back(al);
1902 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1903 yyextra->templateStr=
"<";
1904 yyextra->fullArgString = yyextra->templateStr;
1905 yyextra->copyArgString = &yyextra->templateStr;
1906 yyextra->currentArgumentContext = FindMembers;
1907 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1909<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1910 if (yyextra->insideJava) REJECT;
1912 BEGIN( NSAliasName );
1915 yyextra->aliasName = yytext;
1916 BEGIN( NSAliasArg );
1918<NSAliasArg>({ID}"::")*{ID} {
1920 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1931 BEGIN( FindMembers );
1933<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1935 yyextra->aliasName=yytext;
1938<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1942 yyextra->current->fileName = yyextra->fileName;
1944 yyextra->current->section = EntryType::makeUsingDecl();
1945 yyextra->current_root->copyToSubEntry(yyextra->current);
1947 yyextra->current->section = EntryType::makeUsingDir();
1948 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1950 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1952<PHPUseAs>{BN}+"as"{BN}+ {
1955<PHPUseAs>{PHPUSEKW} {
1959 if (!yyextra->aliasName.isEmpty())
1964 yyextra->aliasName.clear();
const std::string & str() const
1966<PHPUse,PHPUseAs>[,;] {
1976<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1980 yyextra->current->fileName = yyextra->fileName;
1987 yyextra->current->section = EntryType::makeUsingDir();
1988 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)
1992<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1996 yyextra->current->fileName = yyextra->fileName;
2008 if (yyextra->insideD)
2010 yyextra->current->section = EntryType::makeUsingDir();
2015 yyextra->current->section = EntryType::makeUsingDecl();
2017 yyextra->previous = yyextra->current;
2018 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2022<IDLImport>"\""[^"]*"\"" {
2023 QCString fileName(&yytext[1],yyleng-2);
2039<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2040 if (yyextra->insideJava) REJECT;
2041 yyextra->current->startLine=yyextra->yyLineNr;
2042 yyextra->current->startColumn = yyextra->yyColNr;
2046<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2047<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2049 yyextra->current->name=yytext;
2050 yyextra->current->fileName = yyextra->fileName;
2051 yyextra->current->section = EntryType::makeUsingDecl();
2052 yyextra->current->startLine = yyextra->yyLineNr;
2053 yyextra->previous = yyextra->current;
2054 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2056 if (yyextra->insideCS)
2061 yyextra->current->name=yytext;
2062 yyextra->current->fileName = yyextra->fileName;
2063 yyextra->current->startLine = yyextra->yyLineNr;
2064 yyextra->current->startColumn = yyextra->yyColNr;
2065 yyextra->current->section = EntryType::makeUsingDir();
2066 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2071<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2073 yyextra->current->fileName = yyextra->fileName;
2074 yyextra->current->section = EntryType::makeUsingDecl();
2075 yyextra->current->startLine = yyextra->yyLineNr;
2076 yyextra->current->bodyLine = yyextra->yyLineNr;
2077 yyextra->current->bodyColumn = yyextra->yyColNr;
2078 yyextra->lastInitializerContext = UsingAlias;
2079 yyextra->sharpCount=0;
2080 yyextra->initBracketCount=0;
2082 BEGIN(ReadInitializer);
2085 yyextra->current->section = EntryType::makeVariable();
2087 init.stripPrefix(
"class ");
2088 init.stripPrefix(
"struct ");
2090 yyextra->current->type =
"typedef "+
init;
2091 yyextra->current->args.clear();
2092 yyextra->current->spec.setAlias(
true);
2093 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2098 yyextra->current->initializer << yytext;
2101 yyextra->current->initializer << yytext;
2105 yyextra->current->fileName = yyextra->fileName;
2106 yyextra->current->section = EntryType::makeUsingDir();
2107 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2111<Using>";" { BEGIN(FindMembers); }
2112<FindMembers>{SCOPENAME}{BN}*"<>" {
2117<FindMembers>{SCOPENAME}{BNopt}/"<" {
2119 if (yyextra->insideCpp && name==
"import") REJECT;
2120 yyextra->roundCount=0;
2121 yyextra->sharpCount=0;
2124 yyextra->current->name=name;
2130 BEGIN( EndTemplate );
2132<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2133 yyextra->sharpCount=0;
2134 yyextra->roundCount=0;
2142 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...
2145 if (!yyextra->insidePHP)
2151 yyextra->lastHereDocContext = YY_START;
2155<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2156 yyextra->current->name+=yytext;
2160 if (yyextra->roundCount==0)
2163 yyextra->sharpCount++;
2165 yyextra->current->name+=yytext;
2167<ClassTemplSpec,EndTemplate>">=" {
2168 yyextra->current->name+=yytext;
2170<ClassTemplSpec,EndTemplate>(">>") {
2171 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2179 yyextra->current->name+=yytext;
2184 yyextra->current->name+=
'>';
2186 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2188 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2193<EndTemplate>">"{BN}*"(" {
2195 yyextra->current->name+=
'>';
2197 if (yyextra->roundCount==0)
2199 --yyextra->sharpCount;
2201 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2203 yyextra->current->bodyLine = yyextra->yyLineNr;
2204 yyextra->current->bodyColumn = yyextra->yyColNr;
2205 yyextra->current->args =
"(";
2206 yyextra->currentArgumentContext = FuncQual;
2207 yyextra->fullArgString = yyextra->current->args;
2208 yyextra->copyArgString = &yyextra->current->args;
2210 BEGIN( ReadFuncArgType ) ;
2214 yyextra->current->name+=
"(";
2215 yyextra->roundCount++;
2218<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2220 yyextra->current->name+=
'>';
2221 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2226<EndTemplate>">"{BNopt}/"::" {
2228 yyextra->current->name+=
'>';
2230 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2232 BEGIN(FindMemberName);
2235<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2236 yyextra->roundCount++;
2238<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2239 if (yyextra->roundCount>0) yyextra->roundCount--;
2242 yyextra->current->name+=*yytext;
2245<FindMembers>"define"{BN}*"("{BN}*["'] {
2246 if (yyextra->insidePHP)
2248 yyextra->current->bodyLine = yyextra->yyLineNr;
2249 yyextra->current->bodyColumn = yyextra->yyColNr;
2256 yyextra->delimiter = yytext;
2257 *yyextra->pCopyHereDocGString << yytext;
2258 BEGIN(CopyHereDocEnd);
2260<CopyHereDoc>"\""{ID}/"\"" {
2261 yyextra->delimiter = &yytext[1];
2262 *yyextra->pCopyHereDocGString << yytext;
2263 BEGIN(CopyHereDocEnd);
2265<CopyHereDoc>"'"{ID}/"'" {
2266 yyextra->delimiter = &yytext[1];
2267 *yyextra->pCopyHereDocGString << yytext;
2268 BEGIN(CopyHereDocEnd);
2271 yyextra->delimiter = yytext;
2274<HereDoc>"\""{ID}/"\"" {
2275 yyextra->delimiter = &yytext[1];
2278<HereDoc>"'"{ID}/"'" {
2279 yyextra->delimiter = &yytext[1];
2282<HereDocEnd>^{Bopt}{ID} {
2285 BEGIN(yyextra->lastHereDocContext);
2289<CopyHereDocEnd>^{Bopt}{ID} {
2290 *yyextra->pCopyHereDocGString << yytext;
2293 BEGIN(yyextra->lastHereDocContext);
2298 *yyextra->pCopyHereDocGString << yytext;
2300<CopyHereDocEnd>{ID} {
2301 *yyextra->pCopyHereDocGString << yytext;
2304 *yyextra->pCopyHereDocGString << yytext;
2306<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2308<FindMembers>"Q_PROPERTY" {
2309 yyextra->yyBegLineNr = yyextra->yyLineNr;
2310 yyextra->yyBegColNr = yyextra->yyColNr;
2311 yyextra->current->protection = Protection::Public ;
2312 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2313 yyextra->current->type.clear();
2323 yyextra->current->name+=yytext;
2326 yyextra->current->type+= yyextra->current->name;
2327 yyextra->current->type+= yytext;
2328 yyextra->current->name=
"";
2330<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2331 yyextra->current->type+= yyextra->current->name;
2332 yyextra->current->name=yytext;
2334<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2335 yyextra->current->spec.setReadable(
true);
2338<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2339 yyextra->current->spec.setWritable(
true);
2342<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2343<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2344<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2345<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2346<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2347<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2348<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2349<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2350<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2351<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2355 yyextra->current->read = yytext;
2359 yyextra->current->write = yytext;
2362<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2363 yyextra->current->name=yytext;
2367<FindMembers>"requires" {
2368 if (yyextra->insideJava) REJECT;
2369 yyextra->current->req.clear();
2370 yyextra->requiresContext = YY_START;
2371 BEGIN(RequiresClause);
2373<RequiresClause>"requires"{BN}*/"{" {
2374 if (yyextra->insideJava) REJECT;
2376 yyextra->current->req+=yytext;
2377 BEGIN( RequiresExpression ) ;
2379<RequiresClause>"requires"{BN}*"(" {
2380 if (yyextra->insideJava) REJECT;
2382 yyextra->current->req+=yytext;
2383 yyextra->lastRoundContext=RequiresExpression;
2384 yyextra->pCopyRoundString=&yyextra->current->req;
2385 yyextra->roundCount=0;
2386 BEGIN( CopyRound ) ;
2388<RequiresExpression>"{" {
2389 yyextra->current->req+=yytext;
2390 yyextra->lastCurlyContext=RequiresClause;
2391 yyextra->pCopyCurlyString=&yyextra->current->req;
2392 yyextra->curlyCount=0;
2393 BEGIN( CopyCurly ) ;
2395<RequiresExpression>\n {
2396 yyextra->current->req+=
' ';
2399<RequiresExpression>. {
2400 yyextra->current->req+=yytext;
2402<RequiresClause>"(" {
2403 yyextra->current->req+=yytext;
2404 yyextra->lastRoundContext=RequiresClause;
2405 yyextra->pCopyRoundString=&yyextra->current->req;
2406 yyextra->roundCount=0;
2407 BEGIN( CopyRound ) ;
2409<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2413 yyextra->current->req+=yytext;
2414 yyextra->lastRoundContext=RequiresClause;
2415 yyextra->pCopyRoundString=&yyextra->current->req;
2416 yyextra->roundCount=0;
2424<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2428 yyextra->current->req+=yytext;
2429 yyextra->lastSharpContext=RequiresClause;
2430 yyextra->pCopySharpString=&yyextra->current->req;
2431 yyextra->sharpCount=0;
2439<RequiresClause>{NOTopt}{SCOPENAME} {
2443 yyextra->current->req=yytext;
2444 BEGIN(yyextra->requiresContext);
2451<RequiresClause>{NOTopt}"::"{ID} {
2453 yyextra->current->req+=yytext;
2455<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2457 yyextra->current->req+=yytext;
2459<RequiresClause>{BN}+ {
2460 yyextra->current->req+=
' ';
2465 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2466 BEGIN(yyextra->requiresContext);
2468<FindMembers,FindMemberName>{SCOPENAME} {
2470 yyextra->yyBegColNr=yyextra->yyColNr;
2471 yyextra->yyBegLineNr=yyextra->yyLineNr;
2473 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2477 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2479 if (yyextra->insideIDL)
2484 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2488 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2493 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2495 BEGIN(IDLUnionCase);
2497 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2499 yyextra->insideTryBlock=
FALSE;
2500 BEGIN(TryFunctionBlock);
2502 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2504 yyextra->lastAlignAsContext = YY_START;
2507 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2509 yyextra->current->type=
"var";
2511 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2513 yyextra->current->type=
"function";
2515 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2519 yyextra->current->name=
"this";
2522 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2525 BEGIN(StaticAssert);
2527 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2531 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2532 yyextra->current->type+=yytext;
2535 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2537 if (yyextra->current->type.isEmpty())
2539 yyextra->current->type =
"optional";
2543 yyextra->current->type +=
" optional";
2545 yyextra->lastModifierContext = YY_START;
2546 BEGIN(SliceOptional);
2550 if (YY_START==FindMembers)
2554 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2555 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2557 yyextra->current->protection = Protection::Public;
2559 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2561 yyextra->current->protection = Protection::Protected;
2563 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2565 yyextra->current->protection = Protection::Package;
2567 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2569 yyextra->current->protection = Protection::Private;
2571 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2573 if (YY_START==FindMembers)
2574 yyextra->current->name = yytext;
2576 yyextra->current->name += yytext;
2577 yyextra->current->isStatic =
TRUE;
2581 if (YY_START==FindMembers)
2582 yyextra->current->name = yytext;
2584 yyextra->current->name += yytext;
2585 if (yyextra->current->name.startsWith(
"static "))
2587 yyextra->current->isStatic =
TRUE;
2588 yyextra->current->name= yyextra->current->name.mid(7);
2590 else if (yyextra->current->name.startsWith(
"inline "))
2592 if (yyextra->current->type.isEmpty())
2594 yyextra->current->type=
"inline";
2598 yyextra->current->type+=
"inline ";
2600 yyextra->current->name= yyextra->current->name.mid(7);
2602 else if (yyextra->current->name.startsWith(
"constexpr "))
2604 if (yyextra->current->type.isEmpty())
2606 yyextra->current->type=
"constexpr";
2610 yyextra->current->type+=
"constexpr ";
2612 yyextra->current->name=yyextra->current->name.mid(10);
2614 else if (yyextra->current->name.startsWith(
"consteval "))
2616 if (yyextra->current->type.isEmpty())
2618 yyextra->current->type=
"consteval";
2622 yyextra->current->type+=
"consteval ";
2624 yyextra->current->name=yyextra->current->name.mid(10);
2626 else if (yyextra->current->name.startsWith(
"constinit "))
2628 if (yyextra->current->type.isEmpty())
2630 yyextra->current->type=
"constinit";
2634 yyextra->current->type+=
"constinit ";
2636 yyextra->current->name=yyextra->current->name.mid(10);
2638 else if (yyextra->current->name.startsWith(
"const "))
2640 if (yyextra->current->type.isEmpty())
2642 yyextra->current->type=
"const";
2646 yyextra->current->type+=
"const ";
2648 yyextra->current->name=yyextra->current->name.mid(6);
2650 else if (yyextra->current->name.startsWith(
"volatile "))
2652 if (yyextra->current->type.isEmpty())
2654 yyextra->current->type=
"volatile";
2658 yyextra->current->type+=
"volatile ";
2660 yyextra->current->name=yyextra->current->name.mid(9);
2662 else if (yyextra->current->name.startsWith(
"typedef "))
2664 if (yyextra->current->type.isEmpty())
2666 yyextra->current->type=
"typedef";
2670 yyextra->current->type+=
"typedef ";
2672 yyextra->current->name=yyextra->current->name.mid(8);
2682 yyextra->externLinkage=
FALSE;
2686 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2689 yyextra->lastSkipRoundContext = FindMembers;
2690 yyextra->roundCount=0;
2693<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2699 yyextra->current->type+=yytext;
2700 yyextra->lastRoundContext=FindMembers;
2701 yyextra->pCopyRoundString=&yyextra->current->type;
2702 yyextra->roundCount=0;
2705<DeclType>{BN}+ {
lineCount(yyscanner); }
2710<CSIndexer>"["[^\n\]]*"]" {
2714<FindMembers>[0-9]{ID} {
2717 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2719 yyextra->current->name+=
".";
2723 yyextra->current->name+=yytext;
2725<CppQuote>"("{B}*"\"" {
2726 yyextra->insideCppQuote=
TRUE;
2730<IDLUnionCase>":" { BEGIN(FindMembers); }
2731<IDLUnionCase>\n {
lineCount(yyscanner); }
2733<TryFunctionBlock>\n {
lineCount(yyscanner); }
2734<TryFunctionBlock>"{" {
2735 yyextra->curlyCount=0;
2736 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2740<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2742<TryFunctionBlockEnd>\n { unput(*yytext);
2743 BEGIN( FindMembers );
2745<TryFunctionBlockEnd>. { unput(*yytext);
2746 BEGIN( FindMembers );
2749 yyextra->insideCppQuote=
FALSE;
2752<FindConceptParts>[^\/\n]* {
2753 yyextra->current->initializer << yytext;
2755<FindConceptParts>. {
2756 yyextra->current->initializer << yytext;
2758<FindConceptParts>\n {
2759 yyextra->current->initializer << yytext;
2760 yyextra->yyLineNr++;
2762<FindConceptParts>{CCS} {
2763 yyextra->current->initializer << yytext;
2765<FindConceptParts>{CPPC} {
2766 yyextra->current->initializer << yytext;
2768<FindConceptParts>^[ \t]*{CCS}[!*] {
2770 int indent = text.
find(
'/');
2772 if (!yyextra->current->initializer.empty())
2774 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2777 yyextra->current->section = EntryType::makeConceptDocPart();
2778 yyextra->current->startLine = yyextra->yyLineNr;
2779 yyextra->current->startColumn = indent;
2780 yyextra->current->initializer.clear();
2781 BEGIN(FindConceptDocs);
2783<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2784 if (!yyextra->current->initializer.empty())
2786 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2790 int indent = line.find(
'/');
2791 yyextra->current->section = EntryType::makeConceptDocPart();
2792 yyextra->current->startLine = yyextra->yyLineNr;
2793 yyextra->current->startColumn = indent;
2794 yyextra->current->initializer.clear();
2795 yyextra->current->initializer << line.mid(indent+3);
2796 yyextra->yyLineNr++;
2797 BEGIN(FindConceptCxxDocs);
2799<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2801 int p = line.find(
'/');
2802 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2803 yyextra->current->initializer << line.mid(p+2);
2804 yyextra->yyLineNr++;
2806<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2807 yyextra->current->initializer << yytext;
2809<FindConceptCxxDocs>. {
2810 if (!yyextra->current->initializer.empty())
2814 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2818 yyextra->current->section = EntryType::makeConceptCodePart();
2819 yyextra->current->startLine = yyextra->yyLineNr;
2820 BEGIN(FindConceptParts);
2822<FindConceptDocs>^[ \t]*"*"+/[^/] {
2824<FindConceptDocs>[^\*\n]+ {
2825 yyextra->current->initializer << yytext;
2827<FindConceptDocs>\n {
2828 yyextra->current->initializer << yytext;
2829 yyextra->yyLineNr++;
2831<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2832 if (!yyextra->current->initializer.empty())
2836 yyextra->current->section = EntryType::makeConceptDocPart();
2837 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2841 yyextra->current->section = EntryType::makeConceptCodePart();
2842 yyextra->current->startLine = yyextra->yyLineNr;
2843 BEGIN(FindConceptParts);
2845<FindConceptDocs>"*"*{CCE} {
2846 if (!yyextra->current->initializer.empty())
2850 yyextra->current->section = EntryType::makeConceptDocPart();
2851 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2854 yyextra->current->section = EntryType::makeConceptCodePart();
2855 yyextra->current->startLine = yyextra->yyLineNr;
2856 BEGIN(FindConceptParts);
2858<FindConceptParts><<EOF>> {
2859 if (!yyextra->current->initializer.empty())
2861 if (!yyextra->current->section.isConceptCodePart())
2863 yyextra->current->section = EntryType::makeConceptDocPart();
2865 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2870<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2872 yyextra->lastCPPContext = YY_START;
2875<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2876<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2877 if (yyextra->insidePHP)
2879 yyextra->current->bodyLine = yyextra->yyLineNr;
2880 yyextra->current->bodyColumn = yyextra->yyColNr;
2881 yyextra->current->fileName = yyextra->fileName;
2882 yyextra->current->startLine = yyextra->yyLineNr;
2883 yyextra->current->startColumn = yyextra->yyColNr;
2884 yyextra->current->type.clear();
2885 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2886 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2887 yyextra->current->section = EntryType::makeDefine();
2888 yyextra->lastDefineContext = YY_START;
2891<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2892 yyextra->yyLineNr = atoi(&yytext[1]);
2894 yyextra->lastPreLineCtrlContext = YY_START;
2895 if (YY_START==ReadBody ||
2896 YY_START==ReadNSBody ||
2897 YY_START==ReadBodyIntf)
2899 yyextra->current->program << yytext;
2901 BEGIN( PreLineCtrl );
2903<PreLineCtrl>"\""[^\n\"]*"\"" {
2905 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2906 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2907 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2909 yyextra->current->program << yytext;
2913 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2914 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2915 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2917 yyextra->current->program << yytext;
2921 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2922 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2923 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2925 yyextra->current->program << yytext;
2928 BEGIN( yyextra->lastPreLineCtrlContext );
2931<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2932<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2933 BEGIN( yyextra->lastCPPContext) ;
2935<SDefine>{ID}{B}*"(" {
2936 yyextra->current->name = yytext;
2937 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2938 yyextra->current->args =
"(";
2939 yyextra->current->bodyLine = yyextra->yyLineNr;
2940 yyextra->current->bodyColumn = yyextra->yyColNr;
2941 yyextra->currentArgumentContext = DefineEnd;
2942 yyextra->fullArgString=yyextra->current->args;
2943 yyextra->copyArgString=&yyextra->current->args;
2944 BEGIN( ReadFuncArgType ) ;
2959 yyextra->current->bodyLine = yyextra->yyLineNr;
2960 yyextra->current->bodyColumn = yyextra->yyColNr;
2961 yyextra->current->name = yytext;
2968 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2970 BEGIN(yyextra->lastDefineContext);
2974 yyextra->current->fileName = yyextra->fileName;
2975 yyextra->current->startLine = yyextra->yyLineNr;
2976 yyextra->current->startColumn = yyextra->yyColNr;
2977 yyextra->current->type.clear();
2978 yyextra->current->type =
"const";
2982 yyextra->current->initializer.str(
init.str());
2983 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2984 yyextra->current->section = EntryType::makeVariable();
2985 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2990<DefineEnd>\\[\r]?\n {
2992 yyextra->current->endBodyLine = yyextra->yyLineNr;
2995 if (yyextra->insideIDL && yyextra->insideCppQuote)
3001 yyextra->lastStringContext=DefineEnd;
3006<DefinePHP>{ID}["']{BN}*","{BN}* {
3007 yyextra->current->name = yytext;
3008 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3009 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3010 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3011 yyextra->current->bodyLine = yyextra->yyLineNr;
3012 yyextra->current->bodyColumn = yyextra->yyColNr;
3013 yyextra->lastRoundContext = DefinePHPEnd;
3014 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3015 yyextra->roundCount = 0;
3016 BEGIN( GCopyRound );
3020 if (yyextra->insideCli)
3023 yyextra->current->name = yytext ;
3031 yyextra->current->name += yytext ;
3034<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3035 if (yyextra->current->bodyLine==-1)
3037 yyextra->current->bodyLine=yyextra->yyLineNr;
3038 yyextra->current->bodyColumn = yyextra->yyColNr;
3040 yyextra->docBlockContext = YY_START;
3041 yyextra->docBlockInBody =
FALSE;
3042 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3047 yyextra->docBlock.
str(indent.
str());
3051 yyextra->docBlockTerm =
';';
3052 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3054 yyextra->current->bitfields =
":"+yyextra->current->args;
3055 yyextra->current->args.clear();
3056 yyextra->current->section = EntryType::makeVariable();
3058 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
3069<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3070 yyextra->docBlockContext = YY_START;
3071 yyextra->docBlockInBody =
FALSE;
3072 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3077 yyextra->docBlock.
str(indent.
str());
3080 yyextra->docBlockTerm =
',';
3081 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3083 yyextra->current->bitfields =
":"+yyextra->current->args;
3084 yyextra->current->args.clear();
3085 yyextra->current->section = EntryType::makeVariable();
3087 if (yytext[yyleng-3]==
'/')
3098<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3099 if (yyextra->current->bodyLine==-1)
3101 yyextra->current->bodyLine=yyextra->yyLineNr;
3102 yyextra->current->bodyColumn = yyextra->yyColNr;
3104 yyextra->docBlockContext = YY_START;
3105 yyextra->docBlockInBody =
FALSE;
3106 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3110 yyextra->docBlock.
str(indent.
str());
3113 yyextra->docBlockTerm = 0;
3114 if (yytext[yyleng-3]==
'/')
3126<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3128 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3131 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3136 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3142 if (yytext[2]==
'!' || yytext[2]==
'/')
3144 yyextra->docBlockContext = YY_START;
3145 yyextra->docBlockInBody =
FALSE;
3146 yyextra->docBlockAutoBrief =
FALSE;
3147 yyextra->docBlock.str(std::string());
3148 yyextra->docBlockTerm = 0;
3154 yyextra->lastCContext=YY_START;
3155 BEGIN(SkipCxxComment);
3160 if (yytext[2]==
'!' || yytext[2]==
'*')
3162 yyextra->docBlockContext = YY_START;
3163 yyextra->docBlockInBody =
FALSE;
3164 yyextra->docBlock.str(std::string());
3165 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3167 yyextra->docBlockTerm = 0;
3173 yyextra->lastCContext=YY_START;
3178<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3179 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3180 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3184 if (!yyextra->insideCS) REJECT;
3185 yyextra->current->bodyLine = yyextra->yyLineNr;
3186 yyextra->current->bodyColumn = yyextra->yyColNr;
3187 yyextra->current->initializer.str(yytext);
3188 yyextra->lastInitializerContext = YY_START;
3189 yyextra->sharpCount=0;
3190 yyextra->initBracketCount=0;
3191 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3192 yyextra->current->spec.setGettable(
true);
3193 BEGIN(ReadInitializerPtr);
3196 yyextra->current->bodyLine = yyextra->yyLineNr;
3197 yyextra->current->bodyColumn = yyextra->yyColNr;
3198 yyextra->current->initializer.str(
" ");
3199 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3200 yyextra->current->initializer <<
" ";
3201 yyextra->current->initializer <<
"=";
3202 yyextra->lastInitializerContext = YY_START;
3203 yyextra->sharpCount=0;
3204 yyextra->initBracketCount=0;
3205 BEGIN(ReadInitializer);
3207<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3209 yyextra->current->exception +=
" ";
3212<UNOIDLAttributeBlock>"}" {
3213 yyextra->current->exception +=
" }";
3217<ReadInitializer,ReadInitializerPtr>"(" {
3218 yyextra->lastRoundContext=YY_START;
3219 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3220 yyextra->roundCount=0;
3221 yyextra->current->initializer << *yytext;
3224<ReadInitializer,ReadInitializerPtr>"[" {
3225 if (!yyextra->insidePHP) REJECT;
3226 yyextra->lastSquareContext=YY_START;
3227 yyextra->pCopySquareGString=&yyextra->current->initializer;
3228 yyextra->squareCount=0;
3229 yyextra->current->initializer << *yytext;
3232<ReadInitializer,ReadInitializerPtr>"{" {
3233 yyextra->lastCurlyContext=YY_START;
3234 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3235 yyextra->curlyCount=0;
3236 yyextra->current->initializer << *yytext;
3239<ReadInitializer,ReadInitializerPtr>[;,] {
3241 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3243 yyextra->current->fileName = yyextra->fileName;
3244 yyextra->current->startLine = yyextra->yyLineNr;
3245 yyextra->current->startColumn = yyextra->yyColNr;
3246 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3247 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3248 yyextra->current->section = EntryType::makeVariable();
3249 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3253 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3256 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3257 BEGIN(yyextra->lastInitializerContext);
3259 else if (*yytext==
',' && yyextra->initBracketCount==0)
3262 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3263 BEGIN(yyextra->lastInitializerContext);
3267 yyextra->current->initializer << *yytext;
3270<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3271 if (!yyextra->insideCpp)
3277 yyextra->current->initializer << yytext;
3279 yyextra->lastRawStringContext = YY_START;
3280 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3285<ReadInitializer>{CPPC}|{CCS} {
3286 if (yyextra->keepComment)
3288 yyextra->current->initializer << yytext;
3295<RawGString>{RAWEND} {
3298 *yyextra->pCopyRawGString << yytext;
3299 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3306<RawGString>[^)\n]+ {
3307 *yyextra->pCopyRawGString << yytext;
3310 *yyextra->pCopyRawGString << yytext;
3313 *yyextra->pCopyRawGString << yytext;
3316<RawString>{RAWEND} {
3317 *yyextra->pCopyRawString+=yytext;
3318 yyextra->fullArgString+=yytext;
3321 BEGIN(yyextra->lastRawStringContext);
3325 *yyextra->pCopyRawString += yytext;
3326 yyextra->fullArgString+=yytext;
3329 *yyextra->pCopyRawString += yytext;
3330 yyextra->fullArgString+=yytext;
3333 *yyextra->pCopyRawString += yytext;
3334 yyextra->fullArgString+=yytext;
3337<ReadInitializer,ReadInitializerPtr>\" {
3338 if (yyextra->insideIDL && yyextra->insideCppQuote)
3344 yyextra->lastStringContext=YY_START;
3345 yyextra->current->initializer << yytext;
3346 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3347 yyextra->stopAtInvalidString=
false;
3351<ReadInitializer,ReadInitializerPtr>"->" {
3352 yyextra->current->initializer << yytext;
3354<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3355 yyextra->current->initializer << yytext;
3357<ReadInitializer,ReadInitializerPtr>(">>") {
3358 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3361 yyextra->initBracketCount-=2;
3362 yyextra->sharpCount-=2;
3364 yyextra->current->initializer << yytext;
3366<ReadInitializer,ReadInitializerPtr>(">=") {
3367 yyextra->current->initializer << yytext;
3369<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3370 yyextra->initBracketCount++;
3371 yyextra->sharpCount++;
3372 yyextra->current->initializer << *yytext;
3374<ReadInitializer,ReadInitializerPtr>[>\]})] {
3375 yyextra->initBracketCount--;
3376 yyextra->sharpCount--;
3379 yyextra->current->endBodyLine=yyextra->yyLineNr;
3381 yyextra->current->initializer << *yytext;
3383<ReadInitializer,ReadInitializerPtr>\' {
3384 if (yyextra->insidePHP)
3386 yyextra->current->initializer << yytext;
3387 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3388 yyextra->lastStringContext=YY_START;
3389 BEGIN(CopyPHPGString);
3393 yyextra->current->initializer << yytext;
3396<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3397 if (yyextra->insidePHP)
3403 yyextra->current->initializer << yytext;
3406<ReadInitializer,ReadInitializerPtr>\n {
3407 yyextra->current->initializer << *yytext;
3410<ReadInitializer,ReadInitializerPtr>"@\"" {
3412 yyextra->current->initializer << yytext;
3413 if (!yyextra->insideCS && !yyextra->insideObjC)
3420 yyextra->lastSkipVerbStringContext=YY_START;
3421 yyextra->pSkipVerbString=&yyextra->current->initializer;
3422 BEGIN(SkipVerbString);
3425<SkipVerbString>[^\n"\\]+ {
3426 *yyextra->pSkipVerbString << yytext;
3428<SkipVerbString>"\\\\" {
3429 if (yyextra->insideCS) REJECT
3430 *yyextra->pSkipVerbString << yytext;
3432<SkipVerbString>"\\\"" {
3433 if (yyextra->insideCS) REJECT
3434 *yyextra->pSkipVerbString << yytext;
3436<SkipVerbString>"\"\"" {
3437 *yyextra->pSkipVerbString << yytext;
3439<SkipVerbString>"\"" {
3440 *yyextra->pSkipVerbString << *yytext;
3441 BEGIN(yyextra->lastSkipVerbStringContext);
3444 *yyextra->pSkipVerbString << *yytext;
3448 *yyextra->pSkipVerbString << *yytext;
3450<ReadInitializer,ReadInitializerPtr>"?>" {
3451 if (yyextra->insidePHP)
3452 BEGIN( FindMembersPHP );
3454 yyextra->current->initializer << yytext;
3456<ReadInitializer,ReadInitializerPtr>. {
3457 yyextra->current->initializer << *yytext;
3461<CopyString,CopyPHPString>\\. {
3462 *yyextra->pCopyQuotedString+=yytext;
3465 *yyextra->pCopyQuotedString+=*yytext;
3466 BEGIN( yyextra->lastStringContext );
3469 *yyextra->pCopyQuotedString+=*yytext;
3470 BEGIN( yyextra->lastStringContext );
3472<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3473 *yyextra->pCopyQuotedString+=yytext;
3475<CopyString,CopyPHPString>\n {
3476 *yyextra->pCopyQuotedString+=*yytext;
3479<CopyString,CopyPHPString>. {
3480 *yyextra->pCopyQuotedString+=*yytext;
3484<CopyGString,CopyPHPGString>\\. {
3485 *yyextra->pCopyQuotedGString << yytext;
3488 *yyextra->pCopyQuotedGString << *yytext;
3489 BEGIN( yyextra->lastStringContext );
3492 *yyextra->pCopyQuotedGString << *yytext;
3493 BEGIN( yyextra->lastStringContext );
3495<CopyGString,CopyPHPGString>"<?php" {
3496 *yyextra->pCopyQuotedGString << yytext;
3497 BEGIN( yyextra->lastStringContext );
3499<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3500 *yyextra->pCopyQuotedGString << yytext;
3502<CopyGString,CopyPHPGString>\n {
3503 *yyextra->pCopyQuotedGString << *yytext;
3504 if (yyextra->stopAtInvalidString)
3506 BEGIN( yyextra->lastStringContext );
3513<CopyGString,CopyPHPGString>. {
3514 *yyextra->pCopyQuotedGString << *yytext;
3519 *yyextra->pCopyRoundString += *yytext;
3520 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3521 yyextra->lastStringContext=YY_START;
3525 *yyextra->pCopyRoundString += *yytext;
3526 yyextra->roundCount++;
3529 *yyextra->pCopyRoundString += *yytext;
3530 if (--yyextra->roundCount<0)
3531 BEGIN(yyextra->lastRoundContext);
3535 *yyextra->pCopyRoundString += *yytext;
3538 if (yyextra->insidePHP)
3540 yyextra->current->initializer << yytext;
3541 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3542 yyextra->lastStringContext=YY_START;
3543 BEGIN(CopyPHPString);
3547 *yyextra->pCopyRoundString += yytext;
3550<CopyRound>{CHARLIT} {
3551 if (yyextra->insidePHP)
3557 *yyextra->pCopyRoundString+=yytext;
3560<CopyRound>[^"'()\n,]+ {
3561 *yyextra->pCopyRoundString+=yytext;
3564 *yyextra->pCopyRoundString+=*yytext;
3569 *yyextra->pCopySharpString += *yytext;
3570 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3571 yyextra->lastStringContext=YY_START;
3575 *yyextra->pCopySharpString += *yytext;
3576 yyextra->sharpCount++;
3579 *yyextra->pCopySharpString += *yytext;
3580 if (--yyextra->sharpCount<0)
3582 BEGIN(yyextra->lastSharpContext);
3587 *yyextra->pCopySharpString += *yytext;
3590 if (yyextra->insidePHP)
3592 yyextra->current->initializer << yytext;
3593 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3594 yyextra->lastStringContext=YY_START;
3595 BEGIN(CopyPHPString);
3599 *yyextra->pCopySharpString += yytext;
3602<CopySharp>{CHARLIT} {
3603 if (yyextra->insidePHP)
3609 *yyextra->pCopySharpString+=yytext;
3612<CopySharp>[^"'<>\n,]+ {
3613 *yyextra->pCopySharpString+=yytext;
3616 *yyextra->pCopySharpString+=*yytext;
3622 *yyextra->pCopyRoundGString << *yytext;
3623 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3624 yyextra->lastStringContext=YY_START;
3628 *yyextra->pCopyRoundGString << *yytext;
3629 yyextra->roundCount++;
3632 *yyextra->pCopyRoundGString << *yytext;
3633 if (--yyextra->roundCount<0)
3634 BEGIN(yyextra->lastRoundContext);
3638 *yyextra->pCopyRoundGString << *yytext;
3641 if (yyextra->insidePHP)
3643 yyextra->current->initializer << yytext;
3644 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3645 yyextra->lastStringContext=YY_START;
3646 BEGIN(CopyPHPGString);
3650 *yyextra->pCopyRoundGString << yytext;
3653<GCopyRound>{CHARLIT} {
3654 if (yyextra->insidePHP)
3660 *yyextra->pCopyRoundGString << yytext;
3664 if (!yyextra->insideCS) REJECT;
3665 *yyextra->pCopyRoundGString << yytext;
3666 yyextra->lastSkipVerbStringContext=YY_START;
3667 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3668 BEGIN(SkipVerbString);
3670<GCopyRound>[^"'()\n\/,R]+ {
3671 *yyextra->pCopyRoundGString << yytext;
3673<GCopyRound>{RAWBEGIN} {
3674 *yyextra->pCopyRoundGString << yytext;
3676 yyextra->lastRawStringContext = YY_START;
3677 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3681 *yyextra->pCopyRoundGString << *yytext;
3686 *yyextra->pCopySquareGString << *yytext;
3687 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3688 yyextra->lastStringContext=YY_START;
3692 *yyextra->pCopySquareGString << *yytext;
3693 if (yyextra->insidePHP)
3695 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3696 yyextra->lastStringContext=YY_START;
3697 BEGIN(CopyPHPGString);
3701 *yyextra->pCopySquareGString << *yytext;
3702 yyextra->squareCount++;
3705 *yyextra->pCopySquareGString << *yytext;
3706 if (--yyextra->squareCount<0)
3707 BEGIN(yyextra->lastSquareContext);
3711 *yyextra->pCopySquareGString << *yytext;
3714 if (yyextra->insidePHP)
3716 yyextra->current->initializer << yytext;
3717 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3718 yyextra->lastStringContext=YY_START;
3719 BEGIN(CopyPHPGString);
3723 *yyextra->pCopySquareGString << yytext;
3726<GCopySquare>{CHARLIT} {
3727 if (yyextra->insidePHP)
3733 *yyextra->pCopySquareGString << yytext;
3736<GCopySquare>[^"'\[\]\n\/,]+ {
3737 *yyextra->pCopySquareGString << yytext;
3740 *yyextra->pCopySquareGString << *yytext;
3745 *yyextra->pCopyCurlyString += *yytext;
3746 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3747 yyextra->lastStringContext=YY_START;
3748 yyextra->keepComment=
false;
3752 *yyextra->pCopyCurlyString += *yytext;
3753 if (yyextra->insidePHP)
3755 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3756 yyextra->lastStringContext=YY_START;
3757 yyextra->keepComment=
false;
3758 BEGIN(CopyPHPString);
3762 *yyextra->pCopyCurlyString += *yytext;
3763 yyextra->curlyCount++;
3766 *yyextra->pCopyCurlyString += *yytext;
3767 if (--yyextra->curlyCount<0)
3769 yyextra->keepComment=
false;
3770 BEGIN(yyextra->lastCurlyContext);
3773<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3779 *yyextra->pCopyCurlyString += yytext;
3782<CopyCurly>[^"'{}\/\n,]+ {
3783 *yyextra->pCopyCurlyString += yytext;
3785<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3788 *yyextra->pCopyCurlyString += *yytext;
3791 *yyextra->pCopyCurlyString += *yytext;
3793<CopyCurly>{CPPC}[^\n]* {
3794 if (yyextra->keepComment)
3796 *yyextra->pCopyCurlyString += yytext;
3804 if (yyextra->keepComment)
3806 *yyextra->pCopyCurlyString += yytext;
3815 *yyextra->pCopyCurlyString += yytext;
3820 *yyextra->pCopyCurlyString += *yytext;
3823 *yyextra->pCopyCurlyString += *yytext;
3825<CopyComment><<EOF>> {
3826 warn(yyextra->fileName,yyextra->yyLineNr,
3827 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3832<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3834<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3836 int s = line.
find(
' ');
3837 int e = line.
find(
'"',s);
3838 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3839 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3846 *yyextra->pCopyCurlyGString << *yytext;
3847 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3848 yyextra->lastStringContext=YY_START;
3849 yyextra->keepComment =
false;
3853 *yyextra->pCopyCurlyGString << *yytext;
3854 if (yyextra->insidePHP)
3856 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3857 yyextra->lastStringContext=YY_START;
3858 yyextra->keepComment =
false;
3859 BEGIN(CopyPHPGString);
3863 *yyextra->pCopyCurlyGString << *yytext;
3864 yyextra->curlyCount++;
3867 *yyextra->pCopyCurlyGString << *yytext;
3868 if (--yyextra->curlyCount<0)
3870 yyextra->current->endBodyLine = yyextra->yyLineNr;
3871 yyextra->keepComment =
false;
3872 BEGIN(yyextra->lastCurlyContext);
3875<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3881 *yyextra->pCopyCurlyGString << yytext;
3884<GCopyCurly>[^"'{}\/\n,]+ {
3885 *yyextra->pCopyCurlyGString << yytext;
3888 *yyextra->pCopyCurlyGString << yytext;
3890<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3893 *yyextra->pCopyCurlyGString << *yytext;
3896 *yyextra->pCopyCurlyGString << *yytext;
3898<GCopyCurly>{CPPC}[^\n]* {
3899 if (yyextra->keepComment)
3901 *yyextra->pCopyCurlyGString << yytext;
3909 if (yyextra->keepComment)
3911 *yyextra->pCopyCurlyGString << yytext;
3912 BEGIN(GCopyComment);
3919<GCopyComment>{CCE} {
3920 *yyextra->pCopyCurlyGString << yytext;
3925 *yyextra->pCopyCurlyGString << *yytext;
3928 *yyextra->pCopyCurlyGString << *yytext;
3930<GCopyComment><<EOF>> {
3931 warn(yyextra->fileName,yyextra->yyLineNr,
3932 "reached end of file while inside a C style comment block!");
3940 if (yyextra->current->type.isEmpty() &&
3941 yyextra->current->name==
"enum")
3943 yyextra->current->section = EntryType::makeEnum();
3944 yyextra->current->name.clear();
3945 yyextra->current->args.clear();
3946 BEGIN(EnumBaseType);
3950 if (yyextra->current->type.isEmpty())
3953 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
3956 yyextra->current->bitfields+=
":";
3960 yyextra->current->bitfields+=*yytext;
3963 yyextra->current->args+=*yytext;
3967 yyextra->current->args+=
' ';
3970 QCString oldType = yyextra->current->type;
3971 if (yyextra->current->bodyLine==-1)
3973 yyextra->current->bodyLine = yyextra->yyLineNr;
3974 yyextra->current->bodyColumn = yyextra->yyColNr;
3976 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
3978 yyextra->current->type = yyextra->current->type.mid(3);
3980 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
3982 yyextra->current->type.prepend(
"typedef ");
3984 bool isStatic = yyextra->current->isStatic;
3985 Protection prot = yyextra->current->protection;
3986 bool isConcept = yyextra->current->section.isConcept();
3987 bool isModule = yyextra->current->section.isModuleDoc();
3990 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3995 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
3998 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4000 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4002 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4003 if (yyextra->current->section.isClass())
4007 yyextra->current->section = EntryType::makeVariable() ;
4008 yyextra->current->fileName = yyextra->fileName;
4009 yyextra->current->startLine = yyextra->yyBegLineNr;
4010 yyextra->current->startColumn = yyextra->yyBegColNr;
4011 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4014 if ( *yytext ==
',')
4016 yyextra->current->isStatic = isStatic;
4017 yyextra->current->protection = prot;
4018 yyextra->current->name.clear();
4019 yyextra->current->args.clear();
4020 yyextra->current->brief.clear();
4021 yyextra->current->doc.clear();
4022 yyextra->current->initializer.str(std::string());
4023 yyextra->current->bitfields.clear();
4028 yyextra->mtype = MethodTypes::Method;
4029 yyextra->virt = Specifier::Normal;
4030 yyextra->current->bodyLine = -1;
4031 yyextra->current->bodyColumn = 1;
4032 yyextra->current->groups.clear();
4038 if (yyextra->insideSlice)
4040 yyextra->squareCount=1;
4041 yyextra->lastSquareContext = YY_START;
4042 yyextra->current->metaData +=
"[";
4043 BEGIN( SliceMetadata );
4045 else if (!yyextra->insideCS &&
4046 (yyextra->current->name.isEmpty() ||
4047 yyextra->current->name==
"typedef"
4051 yyextra->squareCount=1;
4052 yyextra->lastSquareContext = YY_START;
4053 yyextra->idlAttr.clear();
4054 yyextra->idlProp.clear();
4055 yyextra->current->mtype = yyextra->mtype;
4058 yyextra->current->mtype == MethodTypes::Property)
4060 yyextra->odlProp =
true;
4061 yyextra->current->spec.setGettable(
true).setSettable(
true);
4064 BEGIN( IDLAttribute );
4066 else if (yyextra->insideCS &&
4067 yyextra->current->name.isEmpty())
4069 yyextra->squareCount=1;
4070 yyextra->lastSquareContext = YY_START;
4073 yyextra->current->args.clear();
4074 BEGIN( SkipSquare );
4078 yyextra->current->args += yytext ;
4079 yyextra->squareCount=1;
4080 yyextra->externLinkage=
FALSE;
4085 yyextra->squareCount++;
4086 yyextra->current->metaData +=
"[";
4088<SliceMetadata>{BN}* {
4091<SliceMetadata>\"[^\"]*\" {
4092 yyextra->current->metaData += yytext;
4095 yyextra->current->metaData += yytext;
4098 yyextra->current->metaData += yytext;
4099 if (--yyextra->squareCount<=0)
4101 BEGIN (yyextra->lastSquareContext);
4105 yyextra->current->type +=
"(";
4106 yyextra->roundCount++;
4108<SliceOptional>[0-9]+ {
4109 yyextra->current->type += yytext;
4112 yyextra->current->type +=
")";
4113 if(--yyextra->roundCount<=0)
4115 BEGIN (yyextra->lastModifierContext);
4120 if (--yyextra->squareCount<=0)
4123 if (yyextra->current->mtype == MethodTypes::Property)
4124 BEGIN( IDLPropName );
4126 BEGIN( yyextra->lastSquareContext );
4129<IDLAttribute>"propput" {
4132 yyextra->current->mtype = MethodTypes::Property;
4134 yyextra->current->spec.setSettable(
true);
4136<IDLAttribute>"propget" {
4139 yyextra->current->mtype = MethodTypes::Property;
4141 yyextra->current->spec.setGettable(
true);
4143<IDLAttribute>"property" {
4144 yyextra->current->spec.setProperty(
true);
4146<IDLAttribute>"attribute" {
4147 yyextra->current->spec.setAttribute(
true);
4149<IDLAttribute>"optional" {
4150 yyextra->current->spec.setOptional(
true);
4152<IDLAttribute>"readonly" {
4155 yyextra->current->spec.setSettable(
false);
4159 yyextra->current->spec.setReadonly(
true);
4162<IDLAttribute>"bound" {
4163 yyextra->current->spec.setBound(
true);
4165<IDLAttribute>"removable" {
4166 yyextra->current->spec.setRemovable(
true);
4168<IDLAttribute>"constrained" {
4169 yyextra->current->spec.setConstrained(
true);
4171<IDLAttribute>"transient" {
4172 yyextra->current->spec.setTransient(
true);
4174<IDLAttribute>"maybevoid" {
4175 yyextra->current->spec.setMaybeVoid(
true);
4177<IDLAttribute>"maybedefault" {
4178 yyextra->current->spec.setMaybeDefault(
true);
4180<IDLAttribute>"maybeambiguous" {
4181 yyextra->current->spec.setMaybeAmbiguous(
true);
4185<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4188 if (yyextra->odlProp)
4190 yyextra->idlProp = yytext;
4193<IDLPropName>{ID}{BN}*"(" {
4194 yyextra->current->name = yytext;
4195 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4196 yyextra->current->startLine = yyextra->yyLineNr;
4197 yyextra->current->startColumn = yyextra->yyColNr;
4200<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4201 if (yyextra->odlProp)
4203 yyextra->idlProp += yytext;
4206<IDLPropName>{ID}{BNopt}/";" {
4207 if (yyextra->odlProp)
4209 yyextra->current->name = yytext;
4210 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4211 yyextra->odlProp =
false;
4216<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4217 yyextra->idlAttr = yytext;
4218 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4221 yyextra->idlProp = yytext;
4223<IDLProp>{BN}*{ID}{BN}*"," {
4224 if (yyextra->current->args.isEmpty())
4225 yyextra->current->args =
"(";
4227 yyextra->current->args +=
", ";
4228 yyextra->current->args += yyextra->idlAttr;
4229 yyextra->current->args +=
" ";
4230 yyextra->current->args += yyextra->idlProp;
4231 yyextra->current->args +=
" ";
4232 yyextra->current->args += yytext;
4233 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4234 yyextra->idlProp.clear();
4235 yyextra->idlAttr.clear();
4238<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4242 yyextra->current->fileName = yyextra->fileName;
4243 yyextra->current->type = yyextra->idlProp;
4244 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4245 if (!yyextra->current->args.isEmpty())
4246 yyextra->current->args +=
")";
4247 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4248 yyextra->current->section = EntryType::makeVariable();
4249 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4251 BEGIN( FindMembers );
4256<Array>"]" { yyextra->current->args += *yytext ;
4257 if (--yyextra->squareCount<=0)
4258 BEGIN( FindMembers ) ;
4260<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4261 if (--yyextra->squareCount<=0)
4262 BEGIN( SFunction ) ;
4264<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4265 yyextra->squareCount++;
4267<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4268<SkipSquare>"[" { yyextra->squareCount++; }
4270 if (--yyextra->squareCount<=0)
4271 BEGIN( yyextra->lastSquareContext );
4274 yyextra->lastStringContext=YY_START;
4275 BEGIN( SkipString );
4277<SkipSquare>[^\n\[\]\"]+
4278<FindMembers>"<" {
addType(yyscanner);
4279 yyextra->current->type += yytext ;
4282<Sharp>">" { yyextra->current->type += *yytext ;
4283 if (--yyextra->sharpCount<=0)
4284 BEGIN( FindMembers ) ;
4286<Sharp>"<" { yyextra->current->type += *yytext ;
4287 yyextra->sharpCount++;
4290 yyextra->current->type +=
' ';
4293<Sharp>. { yyextra->current->type += *yytext ; }
4296 yyextra->current->bodyLine = yyextra->yyLineNr;
4297 yyextra->current->bodyColumn = yyextra->yyColNr;
4298 yyextra->current->name = yytext;
4303 yyextra->lastInitializerContext = YY_START;
4304 yyextra->sharpCount=0;
4305 yyextra->initBracketCount=0;
4306 yyextra->current->initializer.str(
"=");
4307 BEGIN(ReadInitializer);
4310 yyextra->lastInitializerContext = YY_START;
4311 yyextra->sharpCount=0;
4312 yyextra->initBracketCount=0;
4313 yyextra->current->initializer.str(yytext);
4314 BEGIN(ReadInitializer);
4317 if (yyextra->insideJava)
4319 if (!yyextra->current->name.isEmpty())
4321 yyextra->current->fileName = yyextra->fileName;
4322 yyextra->current->startLine = yyextra->yyLineNr;
4323 yyextra->current->startColumn = yyextra->yyColNr;
4324 if (!yyextra->current_root->spec.isEnum())
4326 yyextra->current->type =
"@";
4328 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4329 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4330 yyextra->current->section = EntryType::makeVariable();
4331 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4335 BEGIN( FindMembers );
4346 if (!yyextra->current->name.isEmpty())
4348 yyextra->current->fileName = yyextra->fileName;
4349 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4351 yyextra->current->startLine = yyextra->current->bodyLine;
4352 yyextra->current->startColumn = yyextra->current->bodyColumn;
4356 yyextra->current->startLine = yyextra->yyLineNr;
4357 yyextra->current->startColumn = yyextra->yyColNr;
4359 if (!yyextra->current_root->spec.isEnum())
4361 yyextra->current->type =
"@";
4363 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4364 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4365 yyextra->current->section = EntryType::makeVariable();
4367 if (!yyextra->insideCS && !yyextra->insideJava &&
4368 !yyextra->current_root->spec.isStrong())
4375 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4377 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4382 yyextra->current->reset();
4387 yyextra->squareCount=1;
4388 yyextra->lastSquareContext = YY_START;
4391<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4392<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4393<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4396 yyextra->current->program << yytext ;
4399<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4400 yyextra->current->program << yytext ;
4401 yyextra->pSkipInterpString = &yyextra->current->program;
4402 yyextra->lastSkipInterpStringContext=YY_START;
4403 yyextra->strCurlyCount = 0;
4404 BEGIN( SkipInterpString );
4406<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})* {
4407 *yyextra->pSkipInterpString << yytext;
4409<SkipInterpString>"{" {
4410 *yyextra->pSkipInterpString << *yytext;
4411 yyextra->strCurlyCount++;
4413<SkipInterpString>"}" {
4414 *yyextra->pSkipInterpString << *yytext;
4415 yyextra->strCurlyCount--;
4417<SkipInterpString>\" {
4418 *yyextra->pSkipInterpString << *yytext;
4419 if (yyextra->strCurlyCount==0)
4421 BEGIN( yyextra->lastSkipInterpStringContext );
4424<SkipInterpString>. {
4425 *yyextra->pSkipInterpString << *yytext;
4428<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4429 yyextra->current->program << yytext ;
4430 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4431 yyextra->lastSkipInterpVerbStringContext=YY_START;
4432 yyextra->strCurlyCount = 0;
4433 BEGIN( SkipInterpVerbString );
4435<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4436 *yyextra->pSkipInterpVerbString << yytext;
4438<SkipInterpVerbString>"{" {
4439 *yyextra->pSkipInterpVerbString << *yytext;
4440 yyextra->strCurlyCount++;
4442<SkipInterpVerbString>"}" {
4443 *yyextra->pSkipInterpVerbString << *yytext;
4444 yyextra->strCurlyCount--;
4446<SkipInterpVerbString>\" {
4447 *yyextra->pSkipInterpVerbString << *yytext;
4448 if (yyextra->strCurlyCount==0)
4450 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4453<SkipInterpVerbString>. {
4454 *yyextra->pSkipInterpVerbString << *yytext;
4456<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4457<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4458 yyextra->pSkipVerbString = &yyextra->current->program;
4459 yyextra->lastSkipVerbStringContext=YY_START;
4460 BEGIN( SkipVerbString );
4462<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4464 yyextra->current->program << yytext ;
4465 yyextra->pCopyHereDocGString = &yyextra->current->program;
4466 yyextra->lastHereDocContext=YY_START;
4467 BEGIN( CopyHereDoc );
4474<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4475 yyextra->current->program << yytext;
4477 yyextra->lastRawStringContext = YY_START;
4478 yyextra->pCopyRawGString = &yyextra->current->program;
4481<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4482 yyextra->pCopyQuotedGString = &yyextra->current->program;
4483 yyextra->lastStringContext=YY_START;
4484 yyextra->stopAtInvalidString=
false;
4485 BEGIN( CopyGString );
4487<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4488<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4489 yyextra->lastContext = YY_START ;
4492<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4493 ++yyextra->yyLineNr ;
4494 yyextra->lastContext = YY_START ;
4497<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4498 if (!yyextra->insidePHP)
4500 yyextra->current->program << yytext;
4504 yyextra->current->program << yytext;
4505 yyextra->pCopyQuotedGString = &yyextra->current->program;
4506 yyextra->lastStringContext=YY_START;
4507 BEGIN(CopyPHPGString);
4510<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4511 if (yyextra->insidePHP)
4518 yyextra->current->program << yytext;
4521<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4522 ++yyextra->curlyCount ;
4525 yyextra->current->program << yytext ;
4526 --yyextra->curlyCount ;
4528<ReadBody,ReadNSBody>"}" {
4529 if ( yyextra->curlyCount>0 )
4531 yyextra->current->program << yytext ;
4532 --yyextra->curlyCount ;
4536 yyextra->current->endBodyLine = yyextra->yyLineNr;
4537 std::shared_ptr<Entry> original_root = yyextra->current_root;
4538 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4542 QCString doc = yyextra->current->doc;
4543 int docLine = yyextra->current->docLine;
4544 QCString docFile = yyextra->current->docFile;
4545 QCString brief = yyextra->current->brief;
4546 int briefLine = yyextra->current->briefLine;
4547 QCString briefFile = yyextra->current->briefFile;
4549 yyextra->current->doc =
"";
4550 yyextra->current->docLine = 0;
4551 yyextra->current->docFile =
"";
4552 yyextra->current->brief =
"";
4553 yyextra->current->briefLine = 0;
4554 yyextra->current->briefFile =
"";
4555 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4557 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4558 yyextra->current->program.str(std::string());
4559 new_current->name = yyextra->current->name.mid(split_point + 2);
4560 yyextra->current->name = yyextra->current->name.left(split_point);
4561 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4563 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4564 yyextra->current_root = yyextra->current;
4565 yyextra->current = new_current;
4568 yyextra->current->doc = doc;
4569 yyextra->current->docLine = docLine;
4570 yyextra->current->docFile = docFile;
4571 yyextra->current->brief = brief;
4572 yyextra->current->briefLine = briefLine;
4573 yyextra->current->briefFile = briefFile;
4575 QCString &cn = yyextra->current->name;
4576 QCString rn = yyextra->current_root->name;
4582 if (yyextra->isTypedef && cn.
isEmpty())
4585 BEGIN( TypedefName );
4589 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4591 yyextra->current->program <<
',';
4596 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4597 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4599 if (yyextra->insideObjC &&
4600 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4603 BEGIN( ReadBodyIntf ) ;
4607 yyextra->memspecEntry = yyextra->current;
4608 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4609 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4610 if (yyextra->current->section.isNamespace() ||
4611 yyextra->current->spec.isInterface() ||
4612 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4613 yyextra->insideSlice
4616 yyextra->current->reset();
4617 yyextra->current_root = std::move(original_root);
4619 yyextra->memspecEntry.reset();
4620 BEGIN( FindMembers ) ;
4624 static const reg::Ex re(R
"(@\d+$)");
4625 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4626 !
reg::search(yyextra->memspecEntry->name.str(),re))
4629 yyextra->current->doc.clear();
4630 yyextra->current->brief.clear();
4632 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.
4638<ReadBody>"}"{BN}+"typedef"{BN}+ {
4640 if ( yyextra->curlyCount>0 )
4642 yyextra->current->program << yytext ;
4643 --yyextra->curlyCount ;
4647 yyextra->isTypedef =
TRUE;
4648 yyextra->current->endBodyLine = yyextra->yyLineNr;
4649 QCString &cn = yyextra->current->name;
4650 QCString rn = yyextra->current_root->name;
4655 BEGIN( TypedefName );
4658<TypedefName>("const"|"volatile"){BN} {
4660 yyextra->current->type.prepend(yytext);
4663 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4665 yyextra->current->program <<
",";
4667 yyextra->current->name=yytext;
4669 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4670 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4672 if (!yyextra->firstTypedefEntry)
4674 yyextra->firstTypedefEntry = yyextra->current;
4676 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4678 yyextra->isTypedef=
TRUE;
4679 BEGIN(MemberSpecSkip);
4683 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4685 yyextra->current->program <<
',';
4688 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4689 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4690 yyextra->memspecEntry = yyextra->current;
4691 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4694 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4696<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4698 int i=0,l=(int)yyleng,j;
4699 while (i<l && (!
isId(yytext[i]))) i++;
4701 j=yyextra->msName.
find(
"[");
4704 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4705 yyextra->msName=yyextra->msName.left(j);
4710 if (yyextra->firstTypedefEntry)
4712 if (yyextra->firstTypedefEntry->spec.isStruct())
4714 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4716 else if (yyextra->firstTypedefEntry->spec.isUnion())
4718 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4720 else if (yyextra->firstTypedefEntry->section.isEnum())
4722 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4726 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4732 yyextra->current->name = yyextra->msName;
4738 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4744 const Entry *p=yyextra->current.get();
4752 int pi = (i==-1) ? 0 : i+2;
4762 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4766 if (!yyextra->msName.isEmpty()
4772 if (typedefHidesStruct &&
4773 yyextra->isTypedef &&
4774 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4775 yyextra->msType.stripWhiteSpace().isEmpty() &&
4776 yyextra->memspecEntry)
4778 yyextra->memspecEntry->name=yyextra->msName;
4782 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4783 varEntry->lang = yyextra->language;
4784 varEntry->protection = yyextra->current->protection ;
4785 varEntry->mtype = yyextra->current->mtype;
4786 varEntry->virt = yyextra->current->virt;
4787 varEntry->isStatic = yyextra->current->isStatic;
4788 varEntry->section = EntryType::makeVariable();
4789 varEntry->name = yyextra->msName.stripWhiteSpace();
4790 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4791 varEntry->args = yyextra->msArgs;
4792 if (yyextra->isTypedef)
4794 varEntry->type.prepend(
"typedef ");
4797 if (typedefHidesStruct &&
4798 yyextra->isTypedef &&
4799 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4800 yyextra->memspecEntry
4803 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4807 varEntry->type+=yyextra->current->name+yyextra->msType;
4809 varEntry->fileName = yyextra->fileName;
4810 varEntry->startLine = yyextra->yyLineNr;
4811 varEntry->startColumn = yyextra->yyColNr;
4812 varEntry->doc = yyextra->current->doc;
4813 varEntry->brief = yyextra->current->brief;
4814 varEntry->mGrpId = yyextra->current->mGrpId;
4815 varEntry->initializer.str(yyextra->current->initializer.str());
4816 varEntry->groups = yyextra->current->groups;
4817 varEntry->sli = yyextra->current->sli;
4822 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4827 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4829 if (!yyextra->current->doc.isEmpty())
4831 yyextra->memspecEntry->doc += yyextra->current->doc;
4833 if (!yyextra->current->brief.isEmpty())
4835 yyextra->memspecEntry->brief += yyextra->current->brief;
4838 yyextra->msType.clear();
4839 yyextra->msName.clear();
4840 yyextra->msArgs.clear();
4841 yyextra->isTypedef=
FALSE;
4842 yyextra->firstTypedefEntry.reset();
4843 yyextra->memspecEntry.reset();
4844 yyextra->current->reset();
4846 BEGIN( FindMembers );
4850 yyextra->current->doc.clear();
4851 yyextra->current->brief.clear();
Represents an unstructured piece of information, about an entity found in the sources.
EntryType section
entry type (see Sections);
ENTRY_TYPES constexpr bool isCompound() const noexcept
char & at(size_t i)
Returns a reference to the character at index i.
int findRev(char c, int index=-1, bool cs=TRUE) const
4856 yyextra->lastInitializerContext=YY_START;
4857 yyextra->sharpCount=0;
4858 yyextra->initBracketCount=0;
4859 yyextra->current->initializer.str(yytext);
4860 BEGIN(ReadInitializer);
4871<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4872<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4873<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4876<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4877 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4879 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4880 yyextra->insideObjC=
FALSE;
4881 BEGIN( FindMembers );
4883<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4884<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4886<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4887<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4888 if (yyextra->insidePHP)
4894 yyextra->current->bodyLine = yyextra->yyLineNr;
4895 yyextra->current->bodyColumn = yyextra->yyColNr;
4898 yyextra->funcPtrType=yytext;
4899 yyextra->roundCount=0;
4904<FuncPtr>{SCOPENAME} {
4905 yyextra->current->name = yytext;
4908 BEGIN( FuncPtrOperator );
4912 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4914 yyextra->funcPtrType += yyextra->current->name;
4918 BEGIN( EndFuncPtr );
4925<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4926 yyextra->current->name += yytext;
4927 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4930<FuncPtrOperator>\n {
4932 yyextra->current->name += *yytext;
4934<FuncPtrOperator>"(" {
4936 BEGIN( EndFuncPtr );
4939 yyextra->current->name += *yytext;
4941<EndFuncPtr>")"{BNopt}/";" {
4943 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4946<EndFuncPtr>")"{BNopt}/"(" {
4948 if (yyextra->funcPtrType!=
"(")
4950 yyextra->current->type+=yyextra->funcPtrType+
")";
4954<EndFuncPtr>")"{BNopt}/"[" {
4956 yyextra->current->type+=yyextra->funcPtrType;
4957 yyextra->current->args +=
")";
4962 yyextra->current->args += *yytext ;
4965 yyextra->current->bodyLine = yyextra->yyLineNr;
4966 yyextra->current->bodyColumn = yyextra->yyColNr;
4967 yyextra->currentArgumentContext = FuncFuncEnd;
4968 yyextra->fullArgString=yyextra->current->args;
4969 yyextra->copyArgString=&yyextra->current->args;
4970 BEGIN( ReadFuncArgType ) ;
4972<EndFuncPtr>"["[^\n\]]*"]" {
4973 yyextra->funcPtrType+=yytext;
4979 yyextra->current->args += *yytext ;
4980 ++yyextra->roundCount;
4983 yyextra->current->args += *yytext ;
4984 if ( yyextra->roundCount )
4985 --yyextra->roundCount;
4991<FuncFuncEnd>")"{BN}*"(" {
4993 yyextra->current->type+=yyextra->funcPtrType+
")(";
4994 BEGIN(FuncFuncType);
4996<FuncFuncEnd>")"{BNopt}/[;{] {
4998 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5001<FuncFuncEnd>")"{BNopt}/"[" {
5003 yyextra->current->type+=yyextra->funcPtrType;
5004 yyextra->current->args+=
")";
5005 BEGIN(FuncFuncArray);
5008 yyextra->current->args += *yytext;
5011 yyextra->current->type += *yytext;
5012 yyextra->roundCount++;
5015 yyextra->current->type += *yytext;
5016 if (yyextra->roundCount)
5017 --yyextra->roundCount;
5021<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5022<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5024 yyextra->current->type += *yytext;
5026<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5027 if (yyextra->current->type.startsWith(
"typedef") &&
5028 yyextra->current->bodyLine==-1)
5031 yyextra->current->bodyLine = yyextra->yyLineNr;
5032 yyextra->current->bodyColumn = yyextra->yyColNr;
5033 BEGIN( GetCallType );
5035 else if (!yyextra->current->name.isEmpty())
5037 yyextra->current->args = yytext;
5038 yyextra->current->bodyLine = yyextra->yyLineNr;
5039 yyextra->current->bodyColumn = yyextra->yyColNr;
5040 yyextra->currentArgumentContext = FuncQual;
5041 yyextra->fullArgString=yyextra->current->args;
5042 yyextra->copyArgString=&yyextra->current->args;
5043 BEGIN( ReadFuncArgType ) ;
5047<GetCallType>{BN}*{ID}{BN}*"*" {
5050 yyextra->funcPtrType=
"(";
5051 yyextra->funcPtrType+=yytext;
5052 yyextra->roundCount=0;
5056 if (!yyextra->current->name.isEmpty())
5058 yyextra->current->args = yytext;
5059 yyextra->current->bodyLine = yyextra->yyLineNr;
5060 yyextra->current->bodyColumn = yyextra->yyColNr;
5061 yyextra->currentArgumentContext = FuncQual;
5062 yyextra->current->req.clear();
5063 yyextra->fullArgString=yyextra->current->args;
5064 yyextra->copyArgString=&yyextra->current->args;
5065 BEGIN( ReadFuncArgType ) ;
5079<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5080 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5081 else yyextra->fullArgString+=yytext;
5083<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5084 yyextra->fullArgString+=yytext;
5086<CopyArgRound>[^\/\n\)\(\"\']+ {
5087 *yyextra->copyArgString+=yytext;
5088 yyextra->fullArgString+=yytext;
5090<CopyArgSquare>[^\/\n\]\[\"\']+ {
5091 *yyextra->copyArgString+=yytext;
5092 yyextra->fullArgString+=yytext;
5094<ReadFuncArgType,ReadTempArgs>{BN}* {
5095 *yyextra->copyArgString+=
" ";
5096 yyextra->fullArgString+=
" ";
5099<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5101 yyextra->lastRawStringContext = YY_START;
5102 yyextra->pCopyRawString = yyextra->copyArgString;
5103 *yyextra->pCopyRawString+=yytext;
5104 yyextra->fullArgString+=yytext;
5107<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5108 *yyextra->copyArgString+=*yytext;
5109 yyextra->fullArgString+=*yytext;
5110 yyextra->lastCopyArgStringContext = YY_START;
5111 BEGIN( CopyArgString );
5113<ReadFuncArgType>"[" {
5114 if (!yyextra->insidePHP) REJECT;
5115 *yyextra->copyArgString+=*yytext;
5116 yyextra->fullArgString+=*yytext;
5117 yyextra->argSquareCount=0;
5118 yyextra->lastCopyArgContext = YY_START;
5119 BEGIN( CopyArgSquare );
5121<ReadFuncArgType,ReadTempArgs>"(" {
5122 *yyextra->copyArgString+=*yytext;
5123 yyextra->fullArgString+=*yytext;
5124 yyextra->argRoundCount=0;
5125 yyextra->lastCopyArgContext = YY_START;
5126 BEGIN( CopyArgRound );
5128<ReadFuncArgType>")" {
5129 *yyextra->copyArgString+=*yytext;
5130 yyextra->fullArgString+=*yytext;
5132 if (yyextra->insideJS)
5143 yyextra->docBackup = yyextra->current->doc;
5144 yyextra->briefBackup = yyextra->current->brief;
5146 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5149<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5150 if (yyextra->currentArgumentContext==DefineEnd)
5154 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5160 BEGIN( yyextra->currentArgumentContext );
5166 yyextra->fullArgString+=yytext;
5167 yyextra->lastCopyArgChar=0;
5168 yyextra->lastCommentInArgContext=YY_START;
5170 BEGIN( CopyArgCommentLine );
5172 BEGIN( CopyArgComment );
5176<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5177<ReadFuncArgType,ReadTempArgs>{CCS} {
5178 yyextra->lastCContext = YY_START;
5179 BEGIN( SkipComment );
5181<ReadFuncArgType,ReadTempArgs>{CPPC} {
5182 yyextra->lastCContext = YY_START;
5183 BEGIN( SkipCxxComment );
5199<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5201 if (yyextra->currentArgumentContext==DefineEnd)
5205 int i;
for (i=(
int)yyleng-1;i>0;i--)
5209 *yyextra->copyArgString+=*yytext;
5210 yyextra->fullArgString+=*yytext;
5213 BEGIN( yyextra->currentArgumentContext );
5219 yyextra->lastCopyArgChar=*yytext;
5222 yyextra->lastCommentInArgContext=YY_START;
5223 yyextra->fullArgString+=text;
5224 if (text.
find(
"//")!=-1)
5225 BEGIN( CopyArgCommentLine );
5227 BEGIN( CopyArgComment );
5230<CopyArgComment>^{B}*"*"+/{BN}+
5231<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5232<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5233 if (yyextra->lastCopyArgChar!=0)
5234 unput(yyextra->lastCopyArgChar);
5235 BEGIN( yyextra->lastCommentInArgContext );
5237<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5239 if (yyextra->lastCopyArgChar!=0)
5240 unput(yyextra->lastCopyArgChar);
5241 BEGIN( yyextra->lastCommentInArgContext );
5243<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5244 yyextra->docBlockName=
"uml";
5245 yyextra->fullArgString+=yytext;
5246 BEGIN(CopyArgVerbatim);
5248<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5249 yyextra->docBlockName=&yytext[1];
5250 yyextra->fullArgString+=yytext;
5251 BEGIN(CopyArgVerbatim);
5253<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5254 yyextra->docBlockName=&yytext[1];
5255 if (yyextra->docBlockName.at(1)==
'[')
5257 yyextra->docBlockName.at(1)=
']';
5259 if (yyextra->docBlockName.at(1)==
'{')
5261 yyextra->docBlockName.at(1)=
'}';
5263 if (yyextra->docBlockName.at(1)==
'(')
5265 yyextra->docBlockName.at(1)=
')';
5267 yyextra->fullArgString+=yytext;
5268 BEGIN(CopyArgVerbatim);
5270<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5271 yyextra->fullArgString+=yytext;
5272 if (&yytext[4]==yyextra->docBlockName)
5274 yyextra->docBlockName=
"";
5275 BEGIN(CopyArgCommentLine);
5278<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5279 yyextra->fullArgString+=yytext;
5280 if (yyextra->docBlockName==&yytext[1])
5282 yyextra->docBlockName=
"";
5283 BEGIN(CopyArgCommentLine);
5286<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5287<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5288<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5289<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5290<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5291 warn(yyextra->fileName,yyextra->yyLineNr,
5292 "Ignoring {:c}brief command inside argument documentation",*yytext
5294 yyextra->fullArgString+=
' ';
5297 *yyextra->copyArgString+=*yytext;
5298 yyextra->fullArgString+=*yytext;
5299 yyextra->argSharpCount=1;
5300 BEGIN( CopyArgSharp );
5303 *yyextra->copyArgString+=*yytext;
5304 yyextra->fullArgString+=*yytext;
5306 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5308 BEGIN( yyextra->currentArgumentContext );
5311 yyextra->argRoundCount++;
5312 *yyextra->copyArgString+=*yytext;
5313 yyextra->fullArgString+=*yytext;
5316 *yyextra->copyArgString+=*yytext;
5317 yyextra->fullArgString+=*yytext;
5318 if (yyextra->argRoundCount>0)
5319 yyextra->argRoundCount--;
5321 BEGIN( yyextra->lastCopyArgContext );
5324 yyextra->argSquareCount++;
5325 *yyextra->copyArgString+=*yytext;
5326 yyextra->fullArgString+=*yytext;
5329 *yyextra->copyArgString+=*yytext;
5330 yyextra->fullArgString+=*yytext;
5331 if (yyextra->argSquareCount>0)
5332 yyextra->argSquareCount--;
5334 BEGIN( yyextra->lastCopyArgContext );
5337 *yyextra->copyArgString+=*yytext;
5338 yyextra->fullArgString+=*yytext;
5339 yyextra->argRoundCount=0;
5340 yyextra->lastCopyArgContext = YY_START;
5341 BEGIN( CopyArgRound );
5344 yyextra->argSharpCount++;
5346 *yyextra->copyArgString+=*yytext;
5347 yyextra->fullArgString+=*yytext;
5350 *yyextra->copyArgString+=*yytext;
5351 yyextra->fullArgString+=*yytext;
5352 yyextra->argSharpCount--;
5353 if (yyextra->argSharpCount>0)
5359 BEGIN( ReadTempArgs );
5363<CopyArgString,CopyArgPHPString>\\. {
5364 *yyextra->copyArgString+=yytext;
5365 yyextra->fullArgString+=yytext;
5368 *yyextra->copyArgString+=*yytext;
5369 yyextra->fullArgString+=*yytext;
5370 BEGIN( yyextra->lastCopyArgStringContext );
5372<CopyArgPHPString>\' {
5373 *yyextra->copyArgString+=*yytext;
5374 yyextra->fullArgString+=*yytext;
5375 BEGIN( yyextra->lastCopyArgStringContext );
5377<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5378 if (yyextra->insidePHP)
5384 *yyextra->copyArgString+=yytext;
5385 yyextra->fullArgString+=yytext;
5388<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5389 *yyextra->copyArgString+=yytext;
5390 yyextra->fullArgString+=yytext;
5391 if (yyextra->insidePHP)
5393 yyextra->lastCopyArgStringContext=YY_START;
5394 BEGIN(CopyArgPHPString);
5397<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5398 *yyextra->copyArgString+=yytext;
5399 yyextra->fullArgString+=yytext;
5401<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5403 *yyextra->copyArgString+=*yytext;
5404 yyextra->fullArgString+=*yytext;
5406<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5407 *yyextra->copyArgString+=yytext;
5408 yyextra->fullArgString+=yytext;
5410<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5411 *yyextra->copyArgString+=*yytext;
5412 yyextra->fullArgString+=*yytext;
5420<FuncRound>"(" { yyextra->current->args += *yytext ;
5421 ++yyextra->roundCount ;
5423<FuncRound>")" { yyextra->current->args += *yytext ;
5424 if ( yyextra->roundCount )
5425 --yyextra->roundCount ;
5437 if (
qstrcmp(yytext,
";")==0 &&
5438 ((yyextra->insideJS || yyextra->insidePHP) &&
5441 yyextra->current->reset();
5443 BEGIN( FindMembers );
5447 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5450<FuncQual>{BN}*"abstract"{BN}* {
5452 yyextra->current->virt = Specifier::Pure;
5453 yyextra->current->args +=
" override ";
5455<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5457 yyextra->current->spec.setOverride(
true);
5458 yyextra->current->args +=
" override ";
5459 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5462<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5464 yyextra->current->spec.setFinal(
true);
5465 yyextra->current->args +=
" final ";
5466 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5469<FuncQual>{BN}*"sealed"{BN}* {
5471 yyextra->current->spec.setSealed(
true);
5472 yyextra->current->args +=
" sealed ";
5474<FuncQual>{BN}*"new"{BN}* {
5476 yyextra->current->spec.setNew(
true);
5477 yyextra->current->args +=
" new ";
5479<FuncQual>{BN}*"const"{BN}* {
5481 yyextra->current->args +=
" const ";
5482 yyextra->current->argList.setConstSpecifier(
TRUE);
5484<FuncQual>{BN}*"volatile"{BN}* {
5486 yyextra->current->args +=
" volatile ";
5487 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5489<FuncQual>{BN}*"noexcept"{BN}* {
5491 yyextra->current->args +=
" noexcept ";
5492 yyextra->current->spec.setNoExcept(
true);
5494<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5496 yyextra->current->args +=
" noexcept(false)";
5498<FuncQual>{BN}*"noexcept"{BN}*"(" {
5500 yyextra->current->args +=
" noexcept(";
5501 yyextra->current->spec.setNoExcept(
true);
5502 yyextra->lastRoundContext=FuncQual;
5503 yyextra->pCopyRoundString=&yyextra->current->args;
5504 yyextra->roundCount=0;
5508 yyextra->current->args +=
" &";
5511<FuncQual>{BN}*"&&" {
5512 yyextra->current->args +=
" &&";
5516<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5518 yyextra->current->args +=
" = 0";
5519 yyextra->current->virt = Specifier::Pure;
5520 yyextra->current->argList.setPureSpecifier(
TRUE);
5521 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5524<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5526 yyextra->current->args +=
" = delete";
5527 yyextra->current->spec.setDelete(
true);
5528 yyextra->current->argList.setIsDeleted(
TRUE);
5529 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5532<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5534 yyextra->current->args +=
" = default";
5535 yyextra->current->spec.setDefault(
true);
5536 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5539<FuncQual>{BN}*"->"{BN}* {
5541 yyextra->current->argList.setTrailingReturnType(
" -> ");
5542 yyextra->current->args +=
" -> ";
5543 yyextra->roundCount=0;
5544 BEGIN(TrailingReturn);
5546<TrailingReturn>[{;] {
5547 if (yyextra->roundCount>0) REJECT;
5549 yyextra->current->argList.finishTrailingReturnType();
5552<TrailingReturn>"requires"{BN}+ {
5553 if (yyextra->insideJava) REJECT;
5554 yyextra->requiresContext = FuncQual;
5555 yyextra->current->req+=
' ';
5556 yyextra->current->argList.finishTrailingReturnType();
5557 BEGIN(RequiresClause);
5559<TrailingReturn>"(" {
5560 yyextra->roundCount++;
5561 yyextra->current->argList.appendTrailingReturnType(yytext);
5562 yyextra->current->args+=yytext;
5564<TrailingReturn>")" {
5565 if (yyextra->roundCount>0)
5567 yyextra->roundCount--;
5571 warn(yyextra->fileName,yyextra->yyLineNr,
5572 "Found ')' without opening '(' for trailing return type '{})...'",
5573 yyextra->current->argList.trailingReturnType());
5575 yyextra->current->argList.appendTrailingReturnType(yytext);
5576 yyextra->current->args+=yytext;
5579 yyextra->current->argList.appendTrailingReturnType(yytext);
5580 yyextra->current->args+=yytext;
5584 yyextra->current->argList.appendTrailingReturnType(yytext);
5585 yyextra->current->args+=
' ';
5587<FuncRound,FuncFunc>{BN}*","{BN}* {
5589 yyextra->current->args +=
", " ;
5591<FuncQual,FuncRound,FuncFunc>{BN}+ {
5593 yyextra->current->args +=
' ' ;
5595<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5597 yyextra->lastCPPContext = YY_START;
5601 if (!yyextra->insideCS)
5608 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5615 yyextra->lastInitializerContext=YY_START;
5616 yyextra->sharpCount=0;
5617 yyextra->initBracketCount=0;
5618 yyextra->current->initializer.str(yytext);
5619 BEGIN(ReadInitializer);
5622<ReadExpressionBody>";" {
5623 if (!yyextra->current->sli.empty() && yyextra->previous)
5625 yyextra->previous->sli = yyextra->current->sli;
5626 yyextra->current->sli.clear();
5628 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5643 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5646 yyextra->requiresContext = YY_START;
5647 yyextra->current->req+=
' ';
5648 BEGIN(RequiresClause);
5650 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5653 yyextra->current->typeConstr.clear();
5654 yyextra->current->typeConstr.push_back(
Argument());
5655 yyextra->lastCSConstraint = YY_START;
5656 BEGIN( CSConstraintName );
5660 yyextra->current->args = yytext;
5661 yyextra->oldStyleArgType.clear();
5662 BEGIN(OldStyleArgs);
5666 yyextra->current->args += yytext;
5672 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5674 if (yyextra->current->doc!=yyextra->docBackup)
5676 doc=yyextra->current->doc;
5677 yyextra->current->doc=yyextra->docBackup;
5679 if (yyextra->current->brief!=yyextra->briefBackup)
5681 brief=yyextra->current->brief;
5682 yyextra->current->brief=yyextra->briefBackup;
5684 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5685 oldStyleArgName,brief,doc);
5686 yyextra->current->args.clear();
5687 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5689<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5691 if (yyextra->current->argList.empty())
5693 yyextra->current->argList.setNoParameters(
TRUE);
5699<OldStyleArgs>. { yyextra->current->args += *yytext; }
5700<FuncQual,FuncRound,FuncFunc>\" {
5701 if (yyextra->insideIDL && yyextra->insideCppQuote)
5707 yyextra->current->args += *yytext;
5710<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5711<FuncQual>{BN}*"try:" |
5712<FuncQual>{BN}*"try"{BN}+ {
5713 yyextra->insideTryBlock=
TRUE;
5715 if (yytext[yyleng-1]==
':')
5721<FuncQual>{BN}*"throw"{BN}*"(" {
5722 yyextra->current->exception =
" throw (" ;
5723 yyextra->roundCount=0;
5725 BEGIN( ExcpRound ) ;
5727<FuncQual>{BN}*"raises"{BN}*"(" {
5728 yyextra->current->exception =
" raises (" ;
5730 yyextra->roundCount=0;
5731 BEGIN( ExcpRound ) ;
5733<FuncQual>{BN}*"throws"{BN}+ {
5734 yyextra->current->exception =
" throws " ;
5738<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5739 ++yyextra->roundCount ;
5741<ExcpRound>")" { yyextra->current->exception += *yytext ;
5742 if ( yyextra->roundCount )
5743 --yyextra->roundCount ;
5748 yyextra->current->exception += *yytext;
5751 unput(
'{'); BEGIN( FuncQual );
5754 unput(
';'); BEGIN( FuncQual );
5757 yyextra->current->exception +=
' ';
5761 yyextra->current->exception += *yytext;
5763<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5764 yyextra->current->name = yyextra->current->args ;
5765 yyextra->current->args = yytext ;
5766 yyextra->roundCount=0;
5767 BEGIN( FuncRound ) ;
5770 if (!yyextra->insidePHP) BEGIN(SkipInits);
5776 yyextra->current->fileName = yyextra->fileName;
5777 yyextra->current->startLine = yyextra->yyBegLineNr;
5778 yyextra->current->startColumn = yyextra->yyBegColNr;
5779 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5781 std::string type = yyextra->current->type.str();
5785 ti = (int)
match.position();
5789 int di = yyextra->current->type.find(
"decltype(");
5790 if (di!=-1 && di<ti)
5795 int ts=yyextra->current->type.find(
'<');
5796 int te=yyextra->current->type.findRev(
'>');
5799 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5800 bool isFunction = ti==-1 ||
5801 (ts!=-1 && ts<te && ts<ti && ti<te);
5802 bool isVariable = !yyextra->current->type.isEmpty() &&
5803 (!isFunction || startsWithTypedef);
5808 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5813 if (yyextra->isTypedef && !startsWithTypedef)
5815 yyextra->current->type.prepend(
"typedef ");
5817 yyextra->current->section = EntryType::makeVariable() ;
5822 yyextra->current->section = EntryType::makeFunction() ;
5823 yyextra->current->proto = *yytext==
';';
5831 if (yyextra->isTypedef && !startsWithTypedef)
5833 yyextra->current->type.prepend(
"typedef ");
5836 yyextra->current->section = EntryType::makeVariable();
5841 yyextra->current->section = EntryType::makeFunction();
5842 yyextra->current->proto =
TRUE;
5846 if ( yyextra->insidePHP)
5850 yyextra->current->spec.setFinal(
true);
5854 yyextra->current->spec.setAbstract(
true);
5857 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5860 if ( *yytext ==
'{' )
5862 yyextra->lastCurlyContext = FindMembers;
5863 yyextra->curlyCount=0;
5868 BEGIN( FindMembers );
5873 if ( yyextra->insidePHP)
5877 yyextra->previous = yyextra->current;
5878 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5881 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5883 yyextra->current->spec.setOptional(
true).setRequired(
true);
5885 yyextra->lastCurlyContext = FindMembers;
5886 if ( *yytext ==
',' )
5888 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5890 if ( *yytext ==
'{' )
5892 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5894 yyextra->previous->spec.setInline(
true);
5896 yyextra->curlyCount=0;
5897 BEGIN( SkipCurly ) ;
5899 else if ( *yytext ==
'=' )
5901 yyextra->previous->spec.setInline(
true);
5902 yyextra->curlyCount=0;
5903 BEGIN( ReadExpressionBody );
5907 if (!yyextra->previous->section.isVariable())
5908 yyextra->previous->bodyLine=-1;
5909 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...
5913<SkipInits>">"{BN}*"{" {
5915 yyextra->curlyCount=1;
5916 BEGIN(SkipC11Inits);
5918<SkipInits>{ID}{BN}*"{" {
5920 yyextra->curlyCount=1;
5921 BEGIN(SkipC11Inits);
5924 ++yyextra->curlyCount;
5927 if ( --yyextra->curlyCount<=0 )
5932<SkipC11Attribute>"]]" {
5933 BEGIN(yyextra->lastC11AttributeContext);
5941 ++yyextra->curlyCount ;
5943<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5946 if( yyextra->curlyCount )
5948 --yyextra->curlyCount ;
5952 if (!yyextra->current->sli.empty() && yyextra->previous)
5954 yyextra->previous->sli = yyextra->current->sli;
5955 yyextra->current->sli.clear();
5957 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5958 BEGIN( yyextra->lastCurlyContext ) ;
5961<SkipCurly>"}"{BN}*{DCOMM}"<" {
5963 if ( yyextra->curlyCount )
5966 --yyextra->curlyCount ;
5970 yyextra->current->endBodyLine=yyextra->yyLineNr;
5971 yyextra->tempEntry = yyextra->current;
5972 yyextra->current = yyextra->previous;
5974 yyextra->docBlockContext = SkipCurlyEndDoc;
5975 yyextra->docBlockInBody =
FALSE;
5976 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5978 yyextra->docBlock.str(std::string());
5979 yyextra->docBlockTerm =
'}';
5980 if (yytext[yyleng-3]==
'/')
5992<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
5993 yyextra->docBlockContext = SkipCurlyEndDoc;
5994 yyextra->docBlockInBody =
FALSE;
5995 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
5997 yyextra->docBlock.str(std::string());
5998 yyextra->docBlockTerm =
'}';
5999 if (yytext[yyleng-3]==
'/')
6010<SkipCurlyEndDoc>"}" {
6012 if (yyextra->tempEntry)
6014 yyextra->current = yyextra->tempEntry;
6015 yyextra->tempEntry.reset();
6017 BEGIN( yyextra->lastCurlyContext );
6019<SkipCurly,ReadExpressionBody>\" {
6021 yyextra->lastStringContext=YY_START;
6022 BEGIN( SkipString );
6024<SkipCurly>^{B}*"#" {
6025 if (yyextra->insidePHP)
6028 BEGIN( SkipCurlyCpp );
6030<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6034<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6035 if (!yyextra->insidePHP)
6041 yyextra->lastHereDocContext = YY_START;
6045<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6047 yyextra->lastRawStringContext = YY_START;
6048 yyextra->dummyRawString.clear();
6049 yyextra->pCopyRawString = &yyextra->dummyRawString;
6050 *yyextra->pCopyRawString += yytext;
6053<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6057<SkipCurly,SkipCurlyCpp>"\$" {}
6061 yyextra->lastCurlyContext = FindMembers;
6064<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6068<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6070 yyextra->lastCContext = YY_START;
6073<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6075 yyextra->lastCContext = YY_START;
6076 BEGIN(SkipCxxComment);
6078<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6079 yyextra->roundCount=0;
6080 yyextra->lastSkipRoundContext=YY_START;
6083<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6084 yyextra->lastStringContext=YY_START;
6085 BEGIN( SkipString );
6088 warn(yyextra->fileName,yyextra->yyLineNr,
6089 "Found ';' while parsing initializer list! "
6090 "(doxygen could be confused by a macro call without semicolon)"
6092 BEGIN( FindMembers );
6094<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6095 if (!yyextra->insidePHP)
6098 yyextra->lastCContext = YY_START;
6099 BEGIN(SkipCxxComment);
6101<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6102 if (!yyextra->insideCS) REJECT;
6105 yyextra->lastSkipVerbStringContext=YY_START;
6106 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6107 yyextra->dummyTextStream.clear();
6108 BEGIN(SkipVerbString);
6110<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6111 if (yyextra->insidePHP) REJECT;
6113<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6114 if (yyextra->insidePHP)
6116 yyextra->lastStringContext=YY_START;
6117 BEGIN(SkipPHPString);
6120<SkipC11Attribute>{ID} {
6123 yyextra->current->spec.setNoDiscard(
true);
6126<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6127<SkipString,SkipPHPString>\\. { }
6129 BEGIN( yyextra->lastStringContext );
6132 BEGIN( yyextra->lastStringContext );
6134<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6135<SkipString,SkipPHPString>\n {
6139<SkipString,SkipPHPString>. { }
6145 yyextra->current->section = EntryType::makeEmpty() ;
6146 yyextra->current->type.clear() ;
6147 yyextra->current->name.clear() ;
6148 yyextra->current->args.clear() ;
6149 yyextra->current->argList.clear();
6150 BEGIN( FindMembers ) ;
6153 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6157 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6161 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6163 if (!yyextra->baseName.isEmpty())
6165 yyextra->current->extends.emplace_back(
6166 yyextra->baseName,Protection::Public,Specifier::Normal);
6167 yyextra->baseName.clear();
6169 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6174 yyextra->current->section = EntryType::makeEmpty() ;
6175 yyextra->current->type.clear() ;
6176 yyextra->current->name.clear() ;
6177 yyextra->current->args.clear() ;
6178 yyextra->current->argList.clear();
6180 BEGIN( FindMembers ) ;
6182<CompoundName>{SCOPENAME}/{BN}*"<" {
6183 yyextra->sharpCount = 0;
6184 yyextra->current->name = yytext ;
6186 if (yyextra->current->spec.isProtocol())
6188 yyextra->current->name+=
"-p";
6191 yyextra->lastClassTemplSpecContext = ClassVar;
6192 if (yyextra->insideObjC)
6194 BEGIN( ObjCProtocolList );
6196 else if (yyextra->insideCS)
6203 yyextra->roundCount=0;
6204 BEGIN( ClassTemplSpec );
6211 yyextra->current->tArgLists.
push_back(al);
6212 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6213 yyextra->templateStr=
"<";
6214 yyextra->current->name +=
"<";
6215 yyextra->fullArgString = yyextra->templateStr;
6216 yyextra->copyArgString = &yyextra->current->name;
6218 yyextra->currentArgumentContext = ClassVar;
6219 BEGIN( ReadTempArgs );
6221<ObjCProtocolList>"<" {
6222 yyextra->insideProtocolList=
TRUE;
6225<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6226 yyextra->current->name += yytext;
6228 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6231 if (yyextra->current->spec.isProtocol())
6238 BEGIN( yyextra->lastClassTemplSpecContext );
6242<ClassTemplSpec>"<" {
6243 yyextra->current->name += yytext;
6244 if (yyextra->roundCount==0) yyextra->sharpCount++;
6247 yyextra->current->name += yytext;
6249<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6250 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6254 yyextra->current->name =
substitute(yytext,
".",
"::");
6255 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6260 else if (!yyextra->current->tArgLists.empty())
6264 yyextra->current->name = yytext;
6265 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6268 QCString rn = yyextra->current_root->name;
6270 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6274 yyextra->current->spec.setForwardDecl(
true);
6275 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6277 else if (yyextra->insideIDL &&
6278 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6279 yyextra->current->spec.isInterface()) ||
6280 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6281 yyextra->current->spec.isService())
6289 yyextra->current->name = yytext;
6290 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6291 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6294 yyextra->current->spec.setInterface(
false).setService(
false);
6298 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6301 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6304 yyextra->current->reset();
6306 if (yyextra->insideObjC)
6308 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6309 yyextra->insideObjC =
FALSE;
6311 if (yyextra->isTypedef)
6313 yyextra->current->type.prepend(
"typedef");
6315 BEGIN( FindMembers );
Wrapper class for the Entry type.
6318<CompoundName>{SCOPENAME}/{BN}*"(" {
6319 yyextra->current->name = yytext ;
6322 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6324 yyextra->lastAlignAsContext = YY_START;
6329 if (yyextra->current->spec.isProtocol())
6331 yyextra->current->name +=
"-p";
6336<AlignAs>"(" { yyextra->roundCount=0;
6337 BEGIN( AlignAsEnd );
6341<AlignAsEnd>"(" { yyextra->roundCount++; }
6342<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6344 BEGIN( yyextra->lastAlignAsContext );
6350 yyextra->current->name = yytext ;
6354 yyextra->current->bodyLine = yyextra->yyLineNr;
6355 yyextra->current->bodyColumn = yyextra->yyColNr;
6356 yyextra->current->initializer.str(std::string());
6357 yyextra->lastInitializerContext = FindMembers;
6358 yyextra->sharpCount=0;
6359 yyextra->initBracketCount=0;
6360 BEGIN(ReadInitializer);
6362<CompoundName>{SCOPENAME}/{BN}*"," {
6364 yyextra->current->reset();
6367<CompoundName>{SCOPENAME} {
6368 yyextra->current->name = yytext ;
6371 if (yyextra->current->spec.isProtocol())
6373 yyextra->current->name +=
"-p";
6375 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6381<CompoundName>{CSSCOPENAME} {
6382 yyextra->current->name =
substitute(yytext,
".",
"::");
6386<ClassVar>{SCOPENAME}{BNopt}/"(" {
6387 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6390 yyextra->roundCount=0;
6391 BEGIN(SkipUnionSwitch);
6396 yyextra->yyBegColNr=yyextra->yyColNr;
6397 yyextra->yyBegLineNr=yyextra->yyLineNr;
6398 yyextra->current->name = yytext;
6399 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6402 BEGIN( FindMembers );
6406 if (yyextra->isTypedef)
6410 yyextra->current->type.prepend(
"typedef ");
6418<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6419 if (yyextra->insideCli)
6422 yyextra->current->spec.setSealedClass(
true);
6424 yyextra->current->spec.setAbstractClass(
true);
6432<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6433 yyextra->yyBegColNr=yyextra->yyColNr;
6434 yyextra->yyBegLineNr=yyextra->yyLineNr;
6437 if (yyextra->current->section.isEnum())
6439 yyextra->current->section = EntryType::makeVariable() ;
6441 yyextra->current->type +=
' ' ;
6442 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...
6451 yyextra->yyBegColNr=yyextra->yyColNr;
6452 yyextra->yyBegLineNr=yyextra->yyLineNr;
6454 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6457 yyextra->roundCount=0;
6458 BEGIN(SkipUnionSwitch);
6460 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6462 yyextra->current->type.clear();
6463 yyextra->baseProt = Protection::Public;
6464 yyextra->baseVirt = Specifier::Normal;
6465 yyextra->baseName.clear();
6466 BEGIN( BasesProt ) ;
6468 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6470 yyextra->current->typeConstr.clear();
6471 yyextra->current->typeConstr.push_back(
Argument());
6472 yyextra->lastCSConstraint = YY_START;
6473 BEGIN( CSConstraintName );
6475 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6477 yyextra->current->spec.setAbstract(
true);
6479 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6481 yyextra->current->spec.setSealed(
true);
6483 else if (
qstrcmp(yytext,
"final")==0)
6485 yyextra->current->spec.setFinal(
true);
6489 if (yyextra->current->section.isEnum())
6491 yyextra->current->section = EntryType::makeVariable() ;
6493 yyextra->current->type +=
' ' ;
6494 yyextra->current->type += yyextra->current->name ;
6495 yyextra->current->name = yytext ;
6504 if (yyextra->insideObjC && *yytext==
'(')
6506 yyextra->current->name+=
'(';
6507 yyextra->current->spec.setCategory(
true);
6508 BEGIN( ClassCategory );
6510 else if (yyextra->insideCS && *yytext==
'(')
6512 yyextra->current->args=yytext;
6513 yyextra->currentArgumentContext = ClassVar;
6514 yyextra->fullArgString = yyextra->current->args;
6515 yyextra->copyArgString = &yyextra->current->args;
6516 BEGIN( ReadFuncArgType ) ;
6522 BEGIN( FindMembers );
6525<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6526<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6527 yyextra->fullArgString.clear();
6528 yyextra->lastCopyArgChar=
'#';
6529 yyextra->lastCommentInArgContext=YY_START;
6531 BEGIN( CopyArgCommentLine );
6533 BEGIN( CopyArgComment );
6535<CSConstraintType,CSConstraintName>"#" {
6536 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6538<CSConstraintType>"=>" {
6543 BEGIN( yyextra->lastCSConstraint );
6545<CSConstraintType>"{" {
6549 BEGIN( yyextra->lastCSConstraint );
6551<CSConstraintType,CSConstraintName>";" {
6554 BEGIN( yyextra->lastCSConstraint );
6556<CSConstraintName>":" {
6557 BEGIN( CSConstraintType );
6559<CSConstraintName>{ID} {
6561 yyextra->current->typeConstr.back().name=yytext;
6563<CSConstraintType>"where" {
6564 yyextra->current->typeConstr.push_back(
Argument());
6565 BEGIN( CSConstraintName );
6567<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6568 if (yyextra->current->typeConstr.back().type.isEmpty())
6571 yyextra->current->typeConstr.back().type=yytext;
6575 QCString name = yyextra->current->typeConstr.back().name;
6576 yyextra->current->typeConstr.push_back(
Argument());
6577 yyextra->current->typeConstr.back().name=name;
6578 yyextra->current->typeConstr.back().type=yytext;
6581<CSConstraintName,CSConstraintType>\n {
6584<CSConstraintName,CSConstraintType>. {
6586<ClassCategory>{ID} {
6587 yyextra->current->name+=yytext;
6589<ClassCategory>")"/{BN}*"{" {
6590 yyextra->current->name+=
')';
6593<ClassCategory>")"/{BN}*"<" {
6594 yyextra->current->name+=
')';
6595 BEGIN( ObjCProtocolList );
6598 yyextra->current->name+=
')';
6599 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6611 if (yyextra->current->section.isVariable())
6613 yyextra->current->bitfields+=
":";
6614 yyextra->current->args.clear();
6617 else if (yyextra->current->section.isEnum())
6620 yyextra->current->args.clear();
6621 BEGIN(EnumBaseType);
6625 yyextra->current->type.clear();
6626 if (yyextra->current->spec.isInterface() ||
6627 yyextra->current->spec.isStruct() ||
6628 yyextra->current->spec.isRef() ||
6629 yyextra->current->spec.isValue() ||
6630 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6633 yyextra->baseProt = Protection::Public;
6637 yyextra->baseProt = Protection::Private;
6639 yyextra->baseVirt = Specifier::Normal;
6640 yyextra->baseName.clear();
6641 BEGIN( BasesProt ) ;
6645 if (yyextra->isTypedef)
6647 yyextra->current->type.prepend(
"typedef");
6649 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6651 yyextra->current->section = EntryType::makeVariable() ;
6653 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6655 yyextra->current->reset();
6662 BEGIN( FindMembers );
6664<Bases,ClassVar>{CPPC}"/"/[^/] {
6665 if (!yyextra->insideObjC)
6672 yyextra->current->program << yytext;
6673 yyextra->current->fileName = yyextra->fileName ;
6674 yyextra->current->startLine = yyextra->yyLineNr ;
6675 yyextra->current->startColumn = yyextra->yyColNr;
6676 yyextra->curlyCount=0;
6677 BEGIN( ReadBodyIntf );
6680<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6681<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6682<Bases,ClassVar>{CPPC}"!" |
6683<Bases,ClassVar>[\-+]{BN}* {
6684 if (!yyextra->insideObjC)
6691 yyextra->current->program << yytext;
6692 yyextra->current->fileName = yyextra->fileName ;
6693 yyextra->current->startLine = yyextra->yyLineNr ;
6694 yyextra->current->startColumn = yyextra->yyColNr;
6695 yyextra->curlyCount=0;
6696 BEGIN( ReadBodyIntf );
6699<CompoundName,ClassVar>{B}*"{"{B}* {
6700 yyextra->current->program.str(std::string());
6701 yyextra->current->fileName = yyextra->fileName ;
6702 yyextra->current->bodyLine = yyextra->yyLineNr;
6703 yyextra->current->bodyColumn = yyextra->yyColNr;
6705 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6707 if (yyextra->current->section.isNamespace())
6711 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6723 yyextra->curlyCount=0;
6724 if (yyextra->current_root &&
6725 !yyextra->current_root->spec.isInterface() &&
6726 (yyextra->current->spec.isInterface() ||
6727 yyextra->current->spec.isProtocol() ||
6728 yyextra->current->spec.isCategory() ||
6729 yyextra->current->section.isObjcImpl()
6734 BEGIN( ReadBodyIntf );
6736 else if (yyextra->current->section.isNamespace())
6738 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6745<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6746<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6747<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6748<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6749<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6750<BasesProt>{BN} {
lineCount(yyscanner); }
6751<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6752<Bases>"decltype"{BN}*"(" {
6754 yyextra->roundCount=0;
6755 yyextra->lastSkipRoundContext=YY_START;
6758<Bases>("\\")?({ID}"\\")*{ID} {
6759 if (!yyextra->insidePHP)
6768 yyextra->baseName += bn;
6769 yyextra->current->args +=
' ';
6770 yyextra->current->args += yytext;
6773<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6779 yyextra->current->typeConstr.clear();
6780 yyextra->current->typeConstr.push_back(
Argument());
6781 yyextra->lastCSConstraint = YY_START;
6782 BEGIN( CSConstraintName );
6786 yyextra->baseName+=yytext;
6787 yyextra->current->args +=
' ';
6788 yyextra->current->args += yytext;
6791<Bases>{BN}*{ID}("."{ID})* {
6793 yyextra->baseName += name;
6794 yyextra->current->args +=
' ';
6795 yyextra->current->args += name;
6797<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6798 if (!yyextra->insideObjC)
6808<ClassVar,Bases>"@end" {
6816<ClassVar>"<" { yyextra->current->name += *yytext;
6817 yyextra->sharpCount=1;
6818 yyextra->roundCount=0;
6819 yyextra->lastSkipSharpContext = YY_START;
6820 yyextra->specName = &yyextra->current->name;
6821 BEGIN ( Specialization );
6825 yyextra->sharpCount=1;
6826 yyextra->roundCount=0;
6827 yyextra->lastSkipSharpContext = YY_START;
6828 if (yyextra->insideObjC)
6838 yyextra->templateStr = yytext;
6839 yyextra->specName = &yyextra->templateStr;
6840 BEGIN ( Specialization );
6843<Specialization>"<" { *yyextra->specName += *yytext;
6844 if (yyextra->roundCount==0) yyextra->sharpCount++;
6846<Specialization>">" {
6847 *yyextra->specName += *yytext;
6848 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6851 BEGIN(yyextra->lastSkipSharpContext);
6854<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6855<Specialization>"<<" { *yyextra->specName += yytext; }
6856<Specialization>">>"/{B}*"::" {
6861<Specialization>">>" {
6862 if (yyextra->insideCS)
6872 if (yyextra->roundCount>0)
6874 *yyextra->specName += yytext;
6884<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6885<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6886<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6888<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6889<Specialization>"\\'" { *yyextra->specName += *yytext;}
6890<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6891<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6892<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6893<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6894<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6895<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6896<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6897<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6898<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6901 *yyextra->specName += *yytext;
6903<SkipRound>"(" { ++yyextra->roundCount; }
6904<SkipRound>")" {
if (--yyextra->roundCount<0)
6905 BEGIN ( yyextra->lastSkipRoundContext );
6908 yyextra->lastStringContext=SkipRound;
6911<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6912 if (yyextra->insideProtocolList)
6914 yyextra->baseName+=
"-p";
6918 yyextra->current->args +=
',' ;
6921 if (!yyextra->baseName.isEmpty())
6923 yyextra->current->extends.emplace_back(
6924 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6927 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6928 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6929 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6931 yyextra->baseProt=Protection::Public;
6935 yyextra->baseProt=Protection::Private;
6937 yyextra->baseVirt=Specifier::Normal;
6938 yyextra->baseName.clear();
6941 yyextra->insideProtocolList=
FALSE;
6953 if (*yytext==
',' && yyextra->insideObjC)
6955 yyextra->insideProtocolList=
TRUE;
6961 yyextra->current->program.str(std::string());
6962 yyextra->current->fileName = yyextra->fileName ;
6963 yyextra->current->bodyLine = yyextra->yyLineNr;
6964 yyextra->current->bodyColumn = yyextra->yyColNr;
6966 if (!yyextra->baseName.isEmpty())
6967 yyextra->current->extends.emplace_back(
6968 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6970 yyextra->curlyCount=0;
6971 if (yyextra->insideObjC)
6973 BEGIN( ReadBodyIntf );
6980<SkipUnionSwitch>{B}*"(" {
6981 yyextra->roundCount++;
6983<SkipUnionSwitch>")" {
6984 if (--yyextra->roundCount==0)
6989<SkipUnionSwitch>\n {
lineCount(yyscanner); }
6991<Comment>{BN}+ { yyextra->current->program << yytext ;
6994<Comment>{CCS} { yyextra->current->program << yytext ; }
6995<Comment>{CPPC} { yyextra->current->program << yytext ; }
6996<Comment>{CMD}("code"|"verbatim"|"iliteral") {
6997 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
6998 yyextra->current->program << yytext ;
7000<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7001 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7002 yyextra->current->program << yytext ;
7004<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7005<Comment>{CCE} { yyextra->current->program << yytext ;
7006 if (!yyextra->insideCode)
7008 yyextra->doxygenComment=
false;
7009 BEGIN( yyextra->lastContext );
7012<Comment>. { yyextra->current->program << *yytext ; }
7014<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7016 if (!yyextra->current->doc.isEmpty())
7018 yyextra->current->doc+=
"\n\n";
7022 yyextra->current->docLine = yyextra->yyLineNr;
7023 yyextra->current->docFile = yyextra->fileName;
7026 yyextra->lastDocContext = YY_START;
7027 if (yyextra->current_root->section.isScope())
7029 yyextra->current->inside = yyextra->current_root->name+
"::";
7031 yyextra->docBlockContext = YY_START;
7032 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7037 yyextra->docBlock.
str(indent.
str());
7039 if (yyextra->docBlockAutoBrief)
7041 yyextra->current->briefLine = yyextra->yyLineNr;
7042 yyextra->current->briefFile = yyextra->fileName;
7047<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7053 yyextra->lastDocContext = YY_START;
7056 if (yyextra->current_root->section.isScope())
7058 yyextra->current->inside = yyextra->current_root->name+
"::";
7060 yyextra->current->docLine = yyextra->yyLineNr;
7061 yyextra->current->docFile = yyextra->fileName;
7062 yyextra->docBlockContext = YY_START;
7063 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7065 yyextra->docBlockAutoBrief = javadocAutoBrief;
7069 yyextra->docBlock.
str(indent.
str());
7071 if (yyextra->docBlockAutoBrief)
7073 yyextra->current->briefLine = yyextra->yyLineNr;
7074 yyextra->current->briefFile = yyextra->fileName;
7081 yyextra->current->program << yytext ;
7082 yyextra->lastContext = YY_START ;
7083 yyextra->doxygenComment=
true;
7087<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7092<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7093 yyextra->lastDocContext = YY_START;
7096 if (yyextra->current_root->section.isScope())
7098 yyextra->current->inside = yyextra->current_root->name+
"::";
7100 yyextra->current->docLine = yyextra->yyLineNr;
7101 yyextra->current->docFile = yyextra->fileName;
7102 yyextra->docBlockContext = YY_START;
7103 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7105 yyextra->docBlockAutoBrief = javadocAutoBrief;
7109 yyextra->docBlock.
str(indent.
str());
7111 if (yyextra->docBlockAutoBrief)
7113 yyextra->current->briefLine = yyextra->yyLineNr;
7114 yyextra->current->briefFile = yyextra->fileName;
7119<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7120 yyextra->lastDocContext = YY_START;
7121 if (yyextra->current_root->section.isScope())
7123 yyextra->current->inside = yyextra->current_root->name+
"::";
7125 yyextra->docBlockContext = YY_START;
7126 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7127 yyextra->docBlockAutoBrief =
FALSE;
7131 yyextra->docBlock.
str(indent.
str());
7136<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7137 yyextra->lastDocContext = YY_START;
7138 if (yyextra->current_root->section.isScope())
7140 yyextra->current->inside = yyextra->current_root->name+
"::";
7142 yyextra->docBlockContext = YY_START;
7143 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7144 yyextra->docBlockAutoBrief =
FALSE;
7147 yyextra->docBlock.
str(indent.
str());
7151<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7153 yyextra->externLinkage=
TRUE;
7156 if (yyextra->externLinkage)
7158 yyextra->externLinkage=
FALSE;
7160 else if (yyextra->insideCS &&
7161 !yyextra->current->name.isEmpty() &&
7162 !yyextra->current->type.isEmpty())
7164 if (yyextra->current->mtype == MethodTypes::Event)
7166 yyextra->mtype = MethodTypes::Event;
7170 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7174 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7176 yyextra->current->bodyLine = yyextra->yyLineNr;
7177 yyextra->current->bodyColumn = yyextra->yyColNr;
7178 yyextra->curlyCount=0;
7179 BEGIN( CSAccessorDecl );
7181 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7185 yyextra->current->exception =
" {";
7186 BEGIN(UNOIDLAttributeBlock);
7190 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7191 yyextra->current->name.isEmpty()
7195 yyextra->needsSemi =
FALSE;
7196 if (yyextra->current->isStatic)
7198 yyextra->current->name=
"[static initializer]";
7199 yyextra->current->type.clear();
7203 yyextra->current->name=
"[instance initializer]";
7220 yyextra->current->bodyLine = yyextra->yyLineNr;
7221 yyextra->current->bodyColumn = yyextra->yyColNr;
7222 yyextra->current->initializer.str(yytext);
7223 yyextra->lastInitializerContext = YY_START;
7224 yyextra->sharpCount=0;
7225 yyextra->initBracketCount=1;
7226 BEGIN(ReadInitializer);
7230<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7231<CSAccessorDecl>"}"{B}*"=" {
7233 if (yyextra->curlyCount != 0) REJECT;
7234 yyextra->current->initializer.str(
"=");
7235 yyextra->current->endBodyLine=yyextra->yyLineNr;
7236 yyextra->lastInitializerContext = FindMembers;
7237 BEGIN(ReadInitializer);
7239<CSAccessorDecl>"}" {
7240 if (yyextra->curlyCount)
7242 yyextra->curlyCount--;
7246 yyextra->mtype = MethodTypes::Method;
7247 yyextra->virt = Specifier::Normal;
7249 yyextra->current->endBodyLine=yyextra->yyLineNr;
7254<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7255<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7256<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7257<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7258<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7259<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7260<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7261<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7262<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7263<CSAccessorDecl>{CHARLIT} {}
7264<CSAccessorDecl>"\"" { BEGIN(CSString);}
7265<CSAccessorDecl>"." {}
7266<CSAccessorDecl>\n {
lineCount(yyscanner); }
7267<CSString>"\"" { BEGIN(CSAccessorDecl);}
7275<SliceSequence>{SCOPENAME} {
7276 if (yyextra->current->spec.isLocal())
7278 yyextra->current->type =
"local ";
7280 yyextra->current->type +=
"sequence<";
7281 yyextra->current->type += yytext;
7282 yyextra->current->type +=
">";
7285<SliceSequence>{BN}*">"{BN}* {
7287 BEGIN(SliceSequenceName);
7290<SliceSequenceName>{ID}{BN}* {
7292 yyextra->current->name = yytext ;
7293 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7296<SliceSequenceName>";" {
7297 yyextra->current->section = EntryType::makeVariable();
7298 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7303<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7305 if (yyextra->current->spec.isLocal())
7307 yyextra->current->type =
"local ";
7309 yyextra->current->type +=
"dictionary<";
7310 yyextra->current->type += yytext;
7311 yyextra->current->type +=
">";
7312 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7315<SliceDictionary>{BN}*">"{BN}* {
7317 BEGIN(SliceDictionaryName);
7320<SliceDictionaryName>{ID}{BN}* {
7322 yyextra->current->name = yytext ;
7323 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7326<SliceDictionaryName>";" {
7327 yyextra->current->section = EntryType::makeVariable();
7328 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7338<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7339 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7340 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7343<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7344 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7345 BEGIN( yyextra->docBlockContext );
7347<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7348 yyextra->docBlock << yytext;
7349 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7350 BEGIN( yyextra->docBlockContext );
7352<DocLine>{NONLopt}/"\n" {
7353 yyextra->docBlock << yytext;
7354 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7355 BEGIN( yyextra->docBlockContext );
7360<DocBlock>"*"*{CCE} {
7362 BEGIN(yyextra->docBlockContext);
7364<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7367 yyextra->docBlock <<
"\\ilinebr " << indent;
7369<DocBlock>^{B}*"*"+/[^/] {
7372 yyextra->docBlock << indent;
7374<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7377 yyextra->docBlock << indent;
7379<DocBlock>^{B}*({CPPC}){B}* {
7382 yyextra->docBlock << yytext;
7386 yyextra->docBlock << yytext;
7388<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7389 yyextra->docBlock << yytext;
7391<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7392 yyextra->docBlock << yytext;
7393 char blockName[] =
"f$";
7395 if (c==
'[') blockName[1]=
']';
7396 else if (c==
'{') blockName[1]=
'}';
7397 else if (c==
'(') blockName[1]=
')';
7399 BEGIN(DocCopyBlock);
7401<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7402 yyextra->fileName = &yytext[6];
7403 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7404 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7405 yyextra->docBlock << yytext;
7407<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7408 yyextra->fileName = &yytext[6];
7409 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7410 yyextra->docBlock << yytext;
7412<DocBlock>{CMD}"iline"{LINENR}{B} {
7417 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7421 yyextra->yyLineNr = nr;
7423 yyextra->docBlock << yytext;
7425<DocBlock>{B}*"<"{PRE}">" {
7426 yyextra->docBlock << yytext;
7428 BEGIN(DocCopyBlock);
7430<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7431 yyextra->docBlock << yytext;
7433 BEGIN(DocCopyBlock);
7435<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7436 yyextra->docBlock << yytext;
7438 BEGIN(DocCopyBlock);
7440<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7441 yyextra->docBlock << yytext;
7443 BEGIN(DocCopyBlock);
7445<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7447 yyextra->docBlock <<
"\\ilinebr ";
7448 yyextra->docBlock << pat;
7450 BEGIN(DocCopyBlock);
7452<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7454 yyextra->docBlock << pat;
7456 BEGIN(DocCopyBlock);
7458<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7459<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7460<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7462 yyextra->docBlock <<
"\\ilinebr ";
7463 yyextra->docBlock << pat;
7465 BEGIN(DocCopyBlock);
7467<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7468<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7469<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7471 yyextra->docBlock << pat;
7473 BEGIN(DocCopyBlock);
7476 yyextra->docBlock <<
"```";
7479 yyextra->docBlock << yytext;
7482 yyextra->docBlock << yytext;
7484 BEGIN(DocCopyBlock);
7486<DocBlock>{B}*"<"{CODE}">" {
7487 if (yyextra->insideCS)
7489 yyextra->docBlock << yytext;
7491 BEGIN(DocCopyBlock);
7498<DocBlock>[^@*~`'\/\\\n]+ {
7499 yyextra->docBlock << yytext;
7503 yyextra->docBlock << *yytext;
7506 yyextra->docBlock << *yytext;
7511<DocCopyBlock>"</"{PRE}">" {
7516 yyextra->docBlock << yytext;
7518<DocCopyBlock>"</"{CODE}">" {
7523 yyextra->docBlock << yytext;
7525<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7530 yyextra->docBlock << yytext;
7532<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7537 yyextra->docBlock << yytext;
7539<DocCopyBlock>^{B}*"*"+/{BN}+ {
7540 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7548 yyextra->docBlock << indent;
7551<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7552 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7556 yyextra->docBlock << indent;
7563<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7564 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7568 yyextra->docBlock << indent+
"*";
7575<DocCopyBlock>^{B}*"*"+/{BN}* {
7576 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7579 if (yyextra->nestedComment>0)
7582 yyextra->docBlock << indent+
"*";
7587 yyextra->docBlock << indent;
7595<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7601 yyextra->docBlock << pat;
7603<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7609 yyextra->docBlock << pat;
7611<DocCopyBlock>"```" {
7612 if (yyextra->docBlockName==
"``")
7614 yyextra->docBlock <<
"`";
7616 yyextra->docBlock <<
"``";
7621 yyextra->docBlock << yytext;
7624<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7629 yyextra->docBlock << yytext;
7631<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7636 yyextra->docBlock << yytext;
7638<DocCopyBlock>"`"{1,2} {
7643 yyextra->docBlock << yytext;
7645<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7646 yyextra->docBlock << yytext;
7649 yyextra->docBlock << yytext;
7650 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7654 yyextra->lastStringContext=YY_START;
7655 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7656 yyextra->stopAtInvalidString=
true;
7660<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7663 yyextra->nestedComment++;
7665 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7667 yyextra->nestedComment--;
7669 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7671 warn(yyextra->fileName,yyextra->yyLineNr,
7672 "Found end of C comment inside a '{}' block without matching start of the comment!"
7673 " Maybe the end marker for the block is missing?",
7674 yyextra->docBlockName);
7677 yyextra->docBlock << yytext;
7680 yyextra->docBlock << *yytext;
7684 yyextra->docBlock << *yytext;
7686<DocCopyBlock><<EOF>> {
7687 warn(yyextra->fileName,yyextra->yyLineNr,
7688 "reached end of file while inside a '{}' block!"
7689 " The command that should end the block seems to be missing!",
7690 yyextra->docBlockName);
7697<Prototype>"operator"{B}*"("{B}*")" {
7698 yyextra->current->name+=yytext;
7701 yyextra->current->args+=*yytext;
7702 yyextra->currentArgumentContext = PrototypeQual;
7703 yyextra->fullArgString = yyextra->current->args;
7704 yyextra->copyArgString = &yyextra->current->args;
7705 BEGIN( ReadFuncArgType ) ;
7707<Prototype>"("({ID}"::")*({B}*[&*])+ {
7708 if (yyextra->insidePHP)
7714 yyextra->current->type+=yyextra->current->name+yytext;
7715 yyextra->current->name.clear();
7716 BEGIN( PrototypePtr );
7719<PrototypePtr>{SCOPENAME} {
7720 yyextra->current->name+=yytext;
7723 yyextra->current->args+=*yytext;
7724 yyextra->currentArgumentContext = PrototypeQual;
7725 yyextra->fullArgString = yyextra->current->args;
7726 yyextra->copyArgString = &yyextra->current->args;
7727 BEGIN( ReadFuncArgType ) ;
7730 yyextra->current->type+=
')';
7734 yyextra->current->name+=yytext;
7737 BEGIN( PrototypeSkipLine);
7739<PrototypeQual>{B}*"const"{B}* {
7740 yyextra->current->args +=
" const ";
7741 yyextra->current->argList.setConstSpecifier(
TRUE);
7743<PrototypeQual>{B}*"volatile"{B}* {
7744 yyextra->current->args +=
" volatile ";
7745 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7747<PrototypeQual>{B}*"="{B}*"0"{B}* {
7748 yyextra->current->args +=
" = 0";
7749 yyextra->current->virt = Specifier::Pure;
7750 yyextra->current->argList.setPureSpecifier(
TRUE);
7752<PrototypeQual>"throw"{B}*"(" {
7753 yyextra->current->exception =
"throw(";
7754 BEGIN(PrototypeExc);
7757 yyextra->current->exception +=
')';
7758 BEGIN(PrototypeQual);
7761 yyextra->current->exception += *yytext;
7764 yyextra->current->args += *yytext;
7767 yyextra->current->name += *yytext;
7769<PrototypeSkipLine>. {
7775<SkipCxxComment>.*"\\\n" {
7776 if (yyextra->insideCS)
7785<SkipCxxComment>{ANYopt}/\n {
7786 BEGIN( yyextra->lastCContext ) ;
7788<SkipComment>[^\*\n]+
7793 if (!yyextra->insideCpp) REJECT;
7794 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7795 yyextra->lastC11AttributeContext = YY_START;
7796 BEGIN( SkipC11Attribute );
7801 if (yyextra->insideIDL && yyextra->insideCppQuote)
7805 else if (yyextra->insidePHP)
7807 yyextra->lastStringContext=YY_START;
7812 if (!yyextra->insidePHP)
7814 yyextra->lastCPPContext = YY_START;
7819 yyextra->lastCContext = YY_START ;
7820 BEGIN( SkipCxxComment ) ;
7824 if (!yyextra->insidePHP)
7826 yyextra->lastCContext = YY_START ;
7827 BEGIN( SkipCxxComment ) ;
7830 if (yyextra->insidePHP)
7832 yyextra->lastStringContext=YY_START;
7833 BEGIN(SkipPHPString);
7837 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7839 if (yyextra->current->type.isEmpty())
7841 if (yyextra->current->name.isEmpty())
7842 yyextra->current->name=
"?";
7844 yyextra->current->name+=
"?";
7848 yyextra->current->type+=
"?";
7852<*>"}" { yyextra->exported=
false; }
7854<SkipComment>{CPPC}|{CCS}
7855<*>{CCS} { yyextra->lastCContext = YY_START ;
7856 BEGIN( SkipComment ) ;
7858<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7860 yyextra->lastCContext = YY_START ;
7861 BEGIN( SkipCxxComment ) ;
7864 if (yyextra->insideCS && yyextra->fakeNS)
7868 BEGIN ( ReadNSBody);
7880 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7882 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7884 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7894 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7895 yyextra->outerScopeEntries.clear();
7896 yyextra->baseName.clear();
7897 yyextra->protection = Protection::Public;
7898 yyextra->baseProt = Protection::Public;
7899 yyextra->sharpCount = 0;
7900 yyextra->roundCount = 0;
7901 yyextra->curlyCount = 0;
7902 yyextra->mtype = MethodTypes::Method;
7903 yyextra->isStatic =
FALSE;
7904 yyextra->virt = Specifier::Normal;
7905 yyextra->baseVirt = Specifier::Normal;
7906 yyextra->isTypedef =
FALSE;
7907 yyextra->insideTryBlock =
FALSE;
7908 yyextra->insideFormula =
FALSE;
7909 yyextra->insideCode=
FALSE;
7911 yyextra->previous = 0;
7912 yyextra->firstTypedefEntry.reset();
7913 yyextra->memspecEntry.reset();
7918 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7919 if (yyextra->insideJava)
7921 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7923 yyextra->current->protection = yyextra->protection;
7924 yyextra->current->exported = yyextra->exported ;
7925 yyextra->current->mtype = yyextra->mtype;
7926 yyextra->current->virt = yyextra->virt;
7927 yyextra->current->isStatic = yyextra->isStatic;
7928 yyextra->current->lang = yyextra->language;
7930 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7931 yyextra->isTypedef=
FALSE;
7939 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7940 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7942 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7948 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7951 for (p = yytext ; *p ; ++p )
7955 yyextra->yyLineNr++;
7961 yyextra->column+=tabSize - (yyextra->column%tabSize);
7972static inline int computeIndent(
const char *s,
int startIndent)
7974 int col=startIndent;
7980 if (c==
'\t') col+=tabSize-(col%tabSize);
7981 else if (c==
'\n') col=0;
7989 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7990 yyextra->current->protection = yyextra->protection = prot;
7991 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
7992 yyextra->current->type.clear();
7993 yyextra->current->name.clear();
7994 yyextra->current->args.clear();
7995 yyextra->current->argList.clear();
8001 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8002 size_t tl=yyextra->current->type.length();
8003 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8005 yyextra->current->type +=
' ' ;
8007 yyextra->current->type += yyextra->current->name;
8008 yyextra->current->name.clear() ;
8009 tl=yyextra->current->type.length();
8010 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8012 yyextra->current->type +=
' ' ;
8014 yyextra->current->type += yyextra->current->args ;
8015 yyextra->current->args.clear() ;
8016 yyextra->current->argList.clear();
8023 if (s==
nullptr || *s==0)
return name;
8025 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8037 bool funcPtr = i>0 && type[i-1]==
')';
8039 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8040 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8041 return type.
left(i);
8047 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8050 yyextra->docBlock <<
"\\iskip";
8052 yyextra->docBlockName=blockName;
8053 yyextra->fencedSize=fencedSize;
8054 yyextra->isCodeBlock=codeBlock;
8055 yyextra->nestedComment=0;
8061 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8062 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8066 yyextra->docBlock <<
"\\endiskip";
8068 yyextra->docBlockName=
"";
8089 if (i==-1)
return FALSE;
8099 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8101 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8102 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8103 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8104 yyextra->insideD = yyextra->language==SrcLangExt::D;
8105 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8106 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8107 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8108 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8109 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8110 yyextra->language==SrcLangExt::Lex);
8121 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8122 if (yyextra->current_root->section.isScope())
8125 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8127 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8129 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8139 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8140 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8141 if (yyextra->current->argList.empty())
return FALSE;
8142 for (
const Argument &a : yyextra->current->argList)
8153 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8154 if (yyextra->insideJava)
8157 yyextra->current->protection = Protection::Public;
8158 if (text.
find(
"protected")!=-1)
8159 yyextra->current->protection = Protection::Protected;
8160 else if (text.
find(
"private")!=-1)
8161 yyextra->current->protection = Protection::Private;
8162 else if (text.
find(
"package")!=-1)
8163 yyextra->current->protection = Protection::Package;
8170 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8171 int si =
static_cast<int>(yyextra->current->args.length());
8172 if (yyextra->oldStyleArgType.isEmpty())
8174 std::string args = yyextra->current->args.str();
8175 static const reg::Ex re(R
"(\([^)]*\).*)");
8181 bi1=(int)match.position();
8182 size_t secondMatchStart = match.position()+match.length();
8185 bi2=(int)match.position();
8189 if (bi1!=-1 && bi2!=-1)
8192 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8194 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8195 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8197 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8198 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8199 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8204 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8207 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8208 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8210 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8211 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8217 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8220 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8224 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8225 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8238 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8241 oldStyleArgPtr=yyextra->current->args.
left(j);
8260 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8261 for (
Argument &a : yyextra->current->argList)
8270 a.
docs=brief+
"\n\n"+docs;
8302 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8305 yyextra->current->briefFile = yyextra->fileName;
8306 yyextra->current->briefLine = yyextra->yyLineNr;
8310 yyextra->current->docFile = yyextra->fileName;
8311 yyextra->current->docLine = yyextra->yyLineNr;
8319 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8320 if (yyextra->tempEntry==0)
8325 yyextra->previous = yyextra->current;
8326 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8330 yyextra->previous = yyextra->current;
8331 yyextra->current = yyextra->tempEntry;
8332 yyextra->tempEntry.reset();
8339 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8342 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8343 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8346 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8347 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8349 docEntry->inbodyFile = yyextra->fileName;
8350 docEntry->inbodyLine = lineNr;
8354 bool needsEntry=
FALSE;
8356 Markdown markdown(yyextra->fileName,lineNr);
8358 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8359 while (yyextra->commentScanner.parseCommentBlock(
8360 yyextra->thisParser,
8361 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8365 yyextra->docBlockInBody ?
FALSE : brief,
8366 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8367 yyextra->docBlockInBody,
8368 yyextra->protection,
8379 QCString docFile = yyextra->current->docFile;
8381 yyextra->current->docFile = docFile;
8382 yyextra->current->docLine = lineNr;
8390 if (yyextra->docBlockTerm)
8392 unput(yyextra->docBlockTerm);
8393 yyextra->docBlockTerm=0;
8400 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8411 QCString orgDoc = yyextra->current->doc;
8412 QCString orgBrief = yyextra->current->brief;
8413 int orgDocLine = yyextra->current->docLine;
8414 int orgBriefLine = yyextra->current->briefLine;
8416 yyextra->current->doc.
clear();
8417 yyextra->current->brief.clear();
8420 int lineNr = orgDocLine;
8422 Markdown markdown(yyextra->fileName,lineNr);
8424 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8425 while (yyextra->commentScanner.parseCommentBlock(
8426 yyextra->thisParser,
8427 yyextra->current.get(),
8434 yyextra->protection,
8443 if (needsEntry)
newEntry(yyscanner);
8449 a.
docs = yyextra->current->doc;
8452 yyextra->current->doc = orgDoc;
8453 yyextra->current->brief = orgBrief;
8454 yyextra->current->docLine = orgDocLine;
8455 yyextra->current->briefLine = orgBriefLine;
8466 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8467 for (
const auto &ce : rt->children())
8469 if (!ce->program.empty())
8473 yyextra->padCount=0;
8475 yyextra->programStr = ce->program.str();
8476 yyextra->inputString = yyextra->programStr.data();
8477 yyextra->inputPosition = 0;
8478 if (ce->section.isEnum() || ce->spec.isEnum())
8479 BEGIN( FindFields ) ;
8481 BEGIN( FindMembers ) ;
8482 yyextra->current_root = ce;
8483 yyextra->fileName = ce->fileName;
8485 yyextra->yyLineNr = ce->bodyLine;
8486 yyextra->yyColNr = ce->bodyColumn;
8487 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8489 yyextra->current = std::make_shared<Entry>();
8490 yyextra->isStatic =
FALSE;
8495 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8497 ce->groups = rt->groups;
8500 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8502 if ( ce->section.isClass() )
8504 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8506 yyextra->current->protection = yyextra->protection = Protection::Public ;
8508 else if (yyextra->insideJava)
8510 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8512 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8514 if (ce->lang==SrcLangExt::ObjC)
8516 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8520 yyextra->current->protection = yyextra->protection = Protection::Public ;
8525 yyextra->current->protection = yyextra->protection = Protection::Private ;
8528 else if (ce->section.isEnum() )
8530 yyextra->current->protection = yyextra->protection = ce->protection;
8532 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8534 if (ce->section.isNamespace() )
8536 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8538 yyextra->current->protection = yyextra->protection = ce->protection;
8539 yyextra->current->exported = yyextra->exported =
false;
8541 else if (ce->section.isNamespace() )
8543 yyextra->current->protection = yyextra->protection = Protection::Public ;
8544 yyextra->current->exported = yyextra->exported = ce->exported;
8548 yyextra->current->protection = yyextra->protection = Protection::Public ;
8549 yyextra->current->exported = yyextra->exported =
false;
8551 yyextra->mtype = MethodTypes::Method;
8552 yyextra->virt = Specifier::Normal;
8559 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8561 scannerYYlex(yyscanner);
8564 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8566 yyextra->programStr.clear();
8567 ce->program.str(std::string());
8581 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8582 for (
const auto &ce : rt->children())
8584 if (ce->section.isConcept())
8588 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8590 yyextra->padCount =0;
8592 yyextra->programStr = ce->initializer.str();
8593 yyextra->inputString = yyextra->programStr.data();
8594 yyextra->inputPosition = 0;
8595 yyextra->current_root = ce;
8596 yyextra->fileName = ce->fileName;
8597 yyextra->yyLineNr = ce->bodyLine;
8598 yyextra->yyColNr = ce->bodyColumn;
8599 yyextra->insideObjC =
false;
8600 yyextra->current = std::make_shared<Entry>();
8604 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8606 if (!ce->args.isEmpty())
8608 templArgs=indent+
"template"+ce->args+
"\n";
8610 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8612 yyextra->isStatic =
FALSE;
8614 yyextra->current->section = EntryType::makeConceptCodePart();
8615 yyextra->current->startLine = yyextra->yyLineNr;
8616 BEGIN( FindConceptParts );
8617 scannerYYlex(yyscanner);
8618 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8629 const char *fileBuf,
8630 const std::shared_ptr<Entry> &rt,
8634 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8637 yyextra->inputString = fileBuf;
8638 yyextra->inputPosition = 0;
8639 yyextra->column = 0;
8640 scannerYYrestart(
nullptr,yyscanner);
8643 yyextra->protection = Protection::Public;
8644 yyextra->mtype = MethodTypes::Method;
8645 yyextra->isStatic =
FALSE;
8646 yyextra->exported =
false;
8647 yyextra->virt = Specifier::Normal;
8648 yyextra->current_root = rt;
8649 yyextra->yyLineNr = 1 ;
8650 yyextra->yyBegLineNr = 1;
8651 yyextra->yyBegColNr = 0;
8652 yyextra->anonCount = 0;
8653 yyextra->anonNSCount = 0;
8654 yyextra->fileName = fileName;
8655 yyextra->clangParser = clangParser;
8657 rt->lang = yyextra->language;
8658 msg(
"Parsing file {}...\n",yyextra->fileName);
8660 yyextra->current_root = rt;
8662 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8663 yyextra->current = std::make_shared<Entry>();
8668 yyextra->current->name = yyextra->fileName;
8669 yyextra->current->section = sec;
8670 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8672 yyextra->current->reset();
8674 if ( yyextra->insidePHP )
8676 BEGIN( FindMembersPHP );
8678 else if ( yyextra->insideJava )
8680 yyextra->current->name=
"java::lang";
8681 yyextra->current->fileName = yyextra->fileName;
8682 yyextra->current->section = EntryType::makeUsingDir();
8683 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8685 BEGIN( FindMembers );
8689 BEGIN( FindMembers );
8692 scannerYYlex(yyscanner);
8694 if (YY_START==Comment)
8696 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8700 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8702 yyextra->programStr.clear();
8703 rt->program.str(std::string());
8708 yyextra->anonNSCount++;
8711 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8714 parent->moveToSubEntryAndKeep(child);
8716 yyextra->outerScopeEntries.clear();
8725 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8728 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8731 if (!yyextra->current)
8736 const char *orgInputString;
8737 int orgInputPosition;
8738 YY_BUFFER_STATE orgState;
8741 orgState = YY_CURRENT_BUFFER;
8742 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8743 orgInputString = yyextra->inputString;
8744 orgInputPosition = yyextra->inputPosition;
8747 yyextra->inputString = text.
data();
8748 yyextra->inputPosition = 0;
8749 yyextra->column = 0;
8750 scannerYYrestart(
nullptr, yyscanner);
8752 scannerYYlex(yyscanner);
8754 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8755 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8757 yyextra->current->section = EntryType::makeVariableDoc();
8761 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8762 yy_switch_to_buffer(orgState, yyscanner);
8763 yyextra->inputString = orgInputString;
8764 yyextra->inputPosition = orgInputPosition;
8780 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8788 scannerYYlex_destroy(
p->yyscanner);
8792 const char *fileBuf,
8793 const std::shared_ptr<Entry> &root,
8797 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8798 yyextra->thisParser =
this;
8802 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8810 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8811 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8812 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8823#include "scanner.l.h"
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
std::unique_ptr< Private > p
~COutlineParser() override
bool needsPreprocessing(const QCString &extension) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
static bool isFlagSet(const DebugMask mask)
Helper class to process markdown formatted text.
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
QCString trunc(const QCString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
const char * qPrint(const char *s)
static void parseConcepts(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
EntryType guessSection(const QCString &name)