15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
62#define YY_NO_UNISTD_H 1
229static inline int computeIndent(
const char *s,
int startIndent);
260#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
#define lineCount(s, len)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void setContext(yyscan_t yyscanner)
static QCString stripQuotes(const char *s)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static void initParser(yyscan_t yyscanner)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static const char * stateToString(int state)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
void fixArgumentListForJavaScript(ArgumentList &al)
static int computeIndent(const char *s, int startIndent)
static bool startOfRequiresExpression(const QCString &req)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static const char * getLexerFILE()
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
static void addType(yyscan_t yyscanner)
static void initEntry(yyscan_t yyscanner)
Some helper functions for std::string.
TextStream * pSkipInterpString
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.
275NOTopt (("!"{BNopt})|("not"{BN}+))?
277HEXDIGIT ({DIGIT}|[a-f]|[A-F])
278ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
279SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
280TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
281CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
284CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
285PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
286PHPUSEKW ("public"|"private"|"protected")
287IDLATTR ("["[^\]]*"]"){BN}*
288TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
289RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
290RAWEND ")"[^ \t\(\)\\]{0,16}\"
291ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
292ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
293LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
294BITOP "&"|"|"|"^"|"<<"|">>"|"~"
295OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
296FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
297MODULE_ID ({ID}".")*{ID}
298LINENR {B}*[1-9][0-9]*
299FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
300FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
301FILECHARS {FILEICHAR}*{FILEECHAR}+
302HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
303VFILEMASK {FILECHARS}("."{FILECHARS})*
304FILEMASK {VFILEMASK}|{HFILEMASK}
315DCOMMC ("/\*!"|"/\**")
317DCOMMCPP ("/\/!"|"/\/\/")
319DCOMM {DCOMMC}|{DCOMMCPP}
391%x TryFunctionBlockEnd
406%x SkipInterpVerbString
421%x UNOIDLAttributeBlock
450%x SpecializationSingleQuote
451%x SpecializationDoubleQuote
484%x SliceDictionaryName
515<*>"DEPRECATED_ATTRIBUTE" {
516 if (!yyextra->insideObjC) REJECT;
518<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
519 if (!yyextra->insideObjC) REJECT;
520 yyextra->lastDeprecatedContext=YY_START;
521 yyextra->lastStringContext=Deprecated_round;
524<Deprecated_round>")" {
525 BEGIN(yyextra->lastDeprecatedContext);
527<Deprecated_round>{BNopt} {
530<Deprecated_round>. { }
532 yyextra->curlyCount=0;
533 yyextra->needsSemi =
TRUE;
534 BEGIN(SkipCurlyBlock);
537 yyextra->roundCount=0;
538 BEGIN(SkipRoundBlock);
541 ++yyextra->roundCount;
544 if (yyextra->roundCount )
545 --yyextra->roundCount ;
550 ++yyextra->curlyCount ;
553 if( yyextra->curlyCount )
555 --yyextra->curlyCount ;
557 else if (yyextra->needsSemi)
563 BEGIN( FindMembers );
567 if (yyextra->insidePHP)
569 yyextra->lastStringContext=NextSemi;
570 BEGIN(SkipPHPString);
573<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
575 yyextra->lastStringContext=NextSemi;
580 BEGIN( FindMembers );
584 BEGIN( FindMembers );
587 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
591<FindMembers>"<?php" {
592 yyextra->insidePHP =
TRUE;
594<FindMembersPHP>"<?"("php"?) {
595 BEGIN( FindMembers );
597<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
599 BEGIN( FindMembers );
601<FindMembers>"?>"|"</script>" {
602 if (yyextra->insidePHP)
603 BEGIN( FindMembersPHP );
607<FindMembersPHP>[^\n<]+ {
614<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
619<FindMembers>"%{"[^\n]* {
620 if (!yyextra->insideIDL)
624 if (!yyextra->insideIDL)
627<FindMembers>{B}*("properties"){BN}*":"{BN}* {
629 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
632<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
634 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
637<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
639 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
642<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
644 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
647<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
649 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
652<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
654 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
656<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
659<FindMembers>{B}*"internal"{BN}*":"{BN}* {
660 if (yyextra->insideCli)
669<FindMembers>{B}*"protected"{BN}*":"{BN}* {
672<FindMembers>{B}*"private"{BN}*":"{BN}* {
675<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
676 if (!yyextra->insideCpp) REJECT;
680<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
681 if (!yyextra->insideCpp) REJECT;
685<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
686 if (!yyextra->insideCpp) REJECT;
698<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
699<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
700 BEGIN( SkipComment ) ;
702<CppProt>("slots"|"Q_SLOTS") {
703 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
705<FindMembers>{B}*"event"{BN}+ {
706 if (yyextra->insideCli)
710 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
711 yyextra->current->bodyLine = yyextra->yyLineNr;
712 yyextra->current->bodyColumn = yyextra->yyColNr;
713 yyextra->curlyCount=0;
714 BEGIN( CliPropertyType );
716 else if (yyextra->insideCS)
719 yyextra->current->mtype = MethodTypes::Event;
720 yyextra->current->bodyLine = yyextra->yyLineNr;
721 yyextra->current->bodyColumn = yyextra->yyColNr;
728<FindMembers>{B}*"property"{BN}+ {
729 if (yyextra->insideCli)
733 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
734 yyextra->current->bodyLine = yyextra->yyLineNr;
735 yyextra->current->bodyColumn = yyextra->yyColNr;
736 yyextra->curlyCount=0;
737 BEGIN( CliPropertyType );
744<CliPropertyType>{ID} {
746 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
748<CliPropertyType>"[" {
749 yyextra->current->args =
"[";
750 BEGIN( CliPropertyIndex );
752<CliPropertyType>"{" {
753 yyextra->curlyCount=0;
755 BEGIN( CSAccessorDecl );
757<CliPropertyType>";" {
759 BEGIN( FindMembers );
764<CliPropertyType>{B}* {
768 yyextra->current->type += yytext;
770<CliPropertyIndex>"]" {
771 BEGIN( CliPropertyType );
772 yyextra->current->args+=yytext;
775 yyextra->current->args+=yytext;
790<FindMembers>{B}*"@private"{BN}+ {
793<FindMembers>{B}*"@protected"{BN}+ {
796<FindMembers>{B}*"@public"{BN}+ {
799<FindMembers>[\-+]{BN}* {
800 if (!yyextra->insideObjC)
806 yyextra->current->fileName = yyextra->fileName;
807 yyextra->current->startLine = yyextra->yyLineNr;
808 yyextra->current->startColumn = yyextra->yyColNr;
809 yyextra->current->bodyLine = yyextra->yyLineNr;
810 yyextra->current->bodyColumn = yyextra->yyColNr;
811 yyextra->current->section = EntryType::makeFunction();
812 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
813 yyextra->insideObjC =
TRUE;
814 yyextra->yyBegColNr = yyextra->yyColNr;
815 yyextra->yyBegLineNr = yyextra->yyLineNr;
816 yyextra->current->virt = Specifier::Virtual;
818 yyextra->current->isStatic=yytext[0]==
'+';
824 BEGIN( ObjCReturnType );
825 yyextra->current->type.clear();
826 yyextra->roundCount=0;
829 if (yyextra->current->type.isEmpty())
831 yyextra->current->type +=
"id";
833 yyextra->current->name = yytext;
837 yyextra->current->name +=
':';
839 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
842<ObjCReturnType>[^()]* {
843 yyextra->current->type += yytext;
845<ObjCReturnType>"(^)(" {
846 yyextra->current->type += yytext;
847 yyextra->roundCount++;
850 yyextra->current->type += yytext;
851 yyextra->roundCount++;
854 if (yyextra->roundCount<=0)
860 yyextra->current->type += yytext;
861 yyextra->roundCount--;
864<ObjCParams>({ID})?{BN}*":" {
869 yyextra->current->name +=
" :";
873 yyextra->current->name += keyw+
":";
875 if (yyextra->current->argList.back().type.isEmpty())
877 yyextra->current->argList.back().type=
"id";
881 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
883<ObjCParams>{ID}{BN}* {
887<ObjCParams>","{BN}*"..." {
894 yyextra->current->argList.push_back(a);
902 yyextra->roundCount=0;
903 yyextra->current->argList.back().type.clear();
904 BEGIN( ObjCParamType );
907 yyextra->roundCount++;
908 yyextra->current->argList.back().type+=yytext;
910<ObjCParamType>")"/{B}* {
911 if (yyextra->roundCount<=0)
917 yyextra->current->argList.back().type+=yytext;
918 yyextra->roundCount--;
921<ObjCParamType>[^()]* {
924<ObjCMethod,ObjCParams>";" {
925 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
927 yyextra->current->argList.back().type=
"id";
929 if (yyextra->current->argList.empty())
931 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
938<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
943 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
945 yyextra->current->argList.back().type=
"id";
947 if (yyextra->current->argList.empty())
949 yyextra->current->argList.setNoParameters(
TRUE);
955<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
956 if (yyextra->insideSlice)
959 yyextra->current->bodyLine = yyextra->yyLineNr;
960 yyextra->current->bodyColumn = yyextra->yyColNr;
961 yyextra->current->fileName = yyextra->fileName ;
962 yyextra->current->startLine = yyextra->yyLineNr ;
963 yyextra->current->startColumn = yyextra->yyColNr;
964 yyextra->current->args.clear();
965 yyextra->current->section = EntryType::makeTypedef();
966 yyextra->isTypedef =
TRUE;
967 BEGIN( SliceSequence );
972<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
973 if (yyextra->insideSlice)
976 yyextra->current->bodyLine = yyextra->yyLineNr;
977 yyextra->current->bodyColumn = yyextra->yyColNr;
978 yyextra->current->fileName = yyextra->fileName ;
979 yyextra->current->startLine = yyextra->yyLineNr ;
980 yyextra->current->startColumn = yyextra->yyColNr;
981 yyextra->current->args.clear();
982 yyextra->current->section = EntryType::makeTypedef() ;
983 yyextra->isTypedef =
TRUE;
984 BEGIN( SliceDictionary );
989<FindMembers>{BN}{1,80} {
992<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
993 if (yyextra->insideJava)
996 yyextra->lastSkipRoundContext = YY_START;
997 yyextra->roundCount=0;
1002 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1003 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1004 yyextra->current->protection = Protection::Public ;
1006 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
1013<ObjCPropAttr>"getter="{ID} {
1014 yyextra->current->read = yytext+7;
1016<ObjCPropAttr>"setter="{ID} {
1017 yyextra->current->write = yytext+7;
1019<ObjCPropAttr>"readonly" {
1020 yyextra->current->spec.setWritable(
false);
1022<ObjCPropAttr>"readwrite" {
1024<ObjCPropAttr>"assign" {
1026<ObjCPropAttr>"unsafe_unretained" {
1027 yyextra->current->spec.setAssign(
false);
1028 yyextra->current->spec.setUnretained(
true);
1030<ObjCPropAttr>"retain" {
1031 yyextra->current->spec.setAssign(
false);
1032 yyextra->current->spec.setRetain(
true);
1034<ObjCPropAttr>"copy" {
1035 yyextra->current->spec.setAssign(
false);
1036 yyextra->current->spec.setCopy(
true);
1038<ObjCPropAttr>"weak" {
1039 yyextra->current->spec.setAssign(
false);
1040 yyextra->current->spec.setWeak(
true);
1042<ObjCPropAttr>"strong" {
1043 yyextra->current->spec.setAssign(
false);
1044 yyextra->current->spec.setStrong(
true);
1046<ObjCPropAttr>"nonatomic" {
1047 yyextra->current->spec.setNonAtomic(
true);
1052<FindMembers>"@"{ID}("."{ID})+ {
1053 if (yyextra->insideJava)
1062<FindMembers>"@"{ID} {
1063 if (yyextra->insideJava)
1067 else if (
qstrcmp(yytext,
"@property")==0)
1069 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1070 yyextra->current->spec.setWritable(
true).setReadable(
true);
1071 yyextra->current->protection = Protection::Public ;
1073 else if (
qstrcmp(yytext,
"@synthesize")==0)
1075 BEGIN( ObjCSkipStatement );
1077 else if (
qstrcmp(yytext,
"@dynamic")==0)
1079 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1086<ObjCSkipStatement>";" {
1089<PackageName>{ID}(("."|"\\"){ID})* {
1090 yyextra->isTypedef=
FALSE;
1092 yyextra->current->name = yytext;
1093 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1094 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1095 yyextra->current->section = EntryType::makeNamespace();
1096 yyextra->current->type =
"namespace" ;
1097 yyextra->current->fileName = yyextra->fileName;
1098 yyextra->current->startLine = yyextra->yyLineNr;
1099 yyextra->current->startColumn = yyextra->yyColNr;
1100 yyextra->current->bodyLine = yyextra->yyLineNr;
1101 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
1105 std::shared_ptr<Entry> tmp = yyextra->current;
1106 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1107 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1112 yyextra->curlyCount=0;
1113 BEGIN( ReadNSBody );
1115<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1116 if (!yyextra->insideCpp) REJECT;
1118 yyextra->current->exported =
true;
1120 BEGIN( ModuleName );
1122<FindMembers>{B}*"module"{BN}*";" {
1123 if (!yyextra->insideCpp) REJECT;
1124 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1127 BEGIN( FindMembers );
1129<FindMembers>{B}*"module"{BN}+ {
1130 if (!yyextra->insideCpp) REJECT;
1132 yyextra->current->exported =
false;
1134 BEGIN( ModuleName );
1136<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1137 if (!yyextra->insideCpp) REJECT;
1138 yyextra->current->exported =
true;
1140 BEGIN( ModuleImport );
1142<FindMembers>{B}*"import"{BN}+ {
1143 if (!yyextra->insideCpp) REJECT;
1145 BEGIN( ModuleImport );
1147<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1149 int i = name.
find(
':');
1155 yyextra->current->exported,
1158 yyextra->current->section = EntryType::makeModuleDoc();
1159 yyextra->isTypedef=
FALSE;
1161 yyextra->current->type +=
" module";
1162 yyextra->current->fileName = yyextra->fileName;
1163 yyextra->current->startLine = yyextra->yyLineNr;
1164 yyextra->current->startColumn = yyextra->yyColNr;
1165 yyextra->current->bodyLine = yyextra->yyLineNr;
1166 yyextra->current->bodyColumn = yyextra->yyColNr;
1167 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
1170<ModuleName>{MODULE_ID} {
1174 yyextra->current->exported,
1176 yyextra->current->section = EntryType::makeModuleDoc();
1177 yyextra->isTypedef=
FALSE;
1179 yyextra->current->type +=
" module";
1180 yyextra->current->fileName = yyextra->fileName;
1181 yyextra->current->startLine = yyextra->yyLineNr;
1182 yyextra->current->startColumn = yyextra->yyColNr;
1183 yyextra->current->bodyLine = yyextra->yyLineNr;
1184 yyextra->current->bodyColumn = yyextra->yyColNr;
1185 yyextra->current->name = yytext;
1188<ModuleName>":"{BN}+"private" {
1189 yyextra->current->exported = yyextra->exported =
false;
1192<ModuleName>";" { unput(
';');
1197<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1203<ModuleImport>"<"[^>\n]*">" {
1209<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1211 int i = name.
find(
':');
1217 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1221<ModuleImport>{MODULE_ID} {
1225 yyextra->current->exported);
1228<ModuleImport>";" { BEGIN(FindMembers); }
1229<ModuleImport>\n {
lineCount(yyscanner); }
1231<FindMembers>{B}*"export"{BN}+"{" {
1232 yyextra->current->exported = yyextra->exported =
true;
1234<FindMembers>{B}*"export"{BN}+ {
1235 if (!yyextra->insideCpp) REJECT;
1236 yyextra->current->exported=
true;
1238<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1239 yyextra->current->type +=
" initonly ";
1240 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1243<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1244 yyextra->current->isStatic =
TRUE;
1247<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1248 yyextra->current->isStatic =
TRUE;
1251<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1252 yyextra->current->isStatic =
FALSE;
1253 yyextra->current->explicitExternal =
TRUE;
1256<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1258 yyextra->current->type +=
" const ";
1259 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1267<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1268 yyextra->current->type +=
" virtual ";
1269 yyextra->current->virt = Specifier::Virtual;
1272<FindMembers>{B}*"constexpr"{BN}+ {
1273 if (yyextra->insideCpp)
1275 yyextra->current->spec.setConstExpr(
true);
1279<FindMembers>{B}*"consteval"{BN}+ {
1280 if (yyextra->insideCpp)
1282 yyextra->current->spec.setConstEval(
true);
1286<FindMembers>{B}*"constinit"{BN}+ {
1287 if (yyextra->insideCpp)
1289 yyextra->current->spec.setConstInit(
true);
1293<FindMembers>{B}*"published"{BN}+ {
1294 if (yyextra->insideIDL)
1297 yyextra->current->spec.setPublished(
true);
1304<FindMembers>{B}*"sealed"{BN}+ {
1305 if (yyextra->insideCS)
1307 yyextra->current->spec.setSealed(
true);
1314<FindMembers>{B}*"abstract"{BN}+ {
1315 if (yyextra->insidePHP || yyextra->insideCS)
1317 yyextra->current->spec.setAbstract(
true);
1321 if (yyextra->insideCpp) REJECT;
1322 yyextra->current->type +=
" abstract ";
1323 if (!yyextra->insideJava)
1325 yyextra->current->virt = Specifier::Pure;
1329 yyextra->current->spec.setAbstract(
true);
1334<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1335 yyextra->current->spec.setInline(
true);
1338<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1339 yyextra->current->spec.setMutable(
true);
1342<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1343 yyextra->current->spec.setThreadLocal(
true);
1346<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1347 yyextra->current->spec.setExplicit(
true);
1350<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1351 yyextra->current->spec.setLocal(
true);
1354<FindMembers>{B}*"@required"{BN}+ {
1355 yyextra->current->spec.setOptional(
false).setRequired(
true);
1358<FindMembers>{B}*"@optional"{BN}+ {
1359 yyextra->current->spec.setRequired(
false).setOptional(
true);
1367<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1368<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1369 yyextra->isTypedef=
FALSE;
1370 yyextra->current->section = EntryType::makeNamespace();
1371 yyextra->current->type =
"namespace" ;
1372 yyextra->current->fileName = yyextra->fileName;
1373 yyextra->current->startLine = yyextra->yyLineNr;
1374 yyextra->current->startColumn = yyextra->yyColNr;
1375 yyextra->current->bodyLine = yyextra->yyLineNr;
1376 yyextra->current->bodyColumn = yyextra->yyColNr;
1378 if (yyextra->insidePHP)
1380 BEGIN( PackageName );
1384 BEGIN( CompoundName );
1387<FindMembers>{B}*"module"{BN}+ {
1389 if (yyextra->insideIDL || yyextra->insideSlice)
1391 yyextra->isTypedef=
FALSE;
1392 yyextra->current->section = EntryType::makeNamespace();
1393 yyextra->current->type =
"module" ;
1394 yyextra->current->fileName = yyextra->fileName;
1395 yyextra->current->startLine = yyextra->yyLineNr;
1396 yyextra->current->startColumn = yyextra->yyColNr;
1397 yyextra->current->bodyLine = yyextra->yyLineNr;
1398 yyextra->current->bodyColumn = yyextra->yyColNr;
1399 BEGIN( CompoundName );
1401 else if (yyextra->insideD)
1412<FindMembers>{B}*"library"{BN}+ {
1414 if (yyextra->insideIDL)
1416 yyextra->isTypedef=
FALSE;
1417 yyextra->current->section = EntryType::makeNamespace();
1418 yyextra->current->type =
"library" ;
1419 yyextra->current->fileName = yyextra->fileName;
1420 yyextra->current->startLine = yyextra->yyLineNr;
1421 yyextra->current->startColumn = yyextra->yyColNr;
1422 yyextra->current->bodyLine = yyextra->yyLineNr;
1423 yyextra->current->bodyColumn = yyextra->yyColNr;
1424 BEGIN( CompoundName );
1432<FindMembers>{B}*"constants"{BN}+ {
1434 if (yyextra->insideIDL)
1436 yyextra->isTypedef=
FALSE;
1437 yyextra->current->section = EntryType::makeNamespace();
1438 yyextra->current->type =
"constants";
1439 yyextra->current->fileName = yyextra->fileName;
1440 yyextra->current->startLine = yyextra->yyLineNr;
1441 yyextra->current->startColumn = yyextra->yyColNr;
1442 yyextra->current->bodyLine = yyextra->yyLineNr;
1443 yyextra->current->bodyColumn = yyextra->yyColNr;
1444 BEGIN( CompoundName );
1452<FindMembers>{BN}*("service"){BN}+ {
1454 if (yyextra->insideIDL)
1456 yyextra->isTypedef=
FALSE;
1457 yyextra->current->section = EntryType::makeClass();
1461 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1463 yyextra->current->type +=
" service " ;
1464 yyextra->current->fileName = yyextra->fileName;
1465 yyextra->current->startLine = yyextra->yyLineNr;
1466 yyextra->current->bodyLine = yyextra->yyLineNr;
1467 yyextra->current->bodyColumn = yyextra->yyColNr;
1468 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1476<FindMembers>{BN}*("singleton"){BN}+ {
1478 if (yyextra->insideIDL)
1480 yyextra->isTypedef=
FALSE;
1481 yyextra->current->section = EntryType::makeClass();
1483 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1484 setPublished(spec.isPublished());
1486 yyextra->current->type +=
" singleton " ;
1487 yyextra->current->fileName = yyextra->fileName;
1488 yyextra->current->startLine = yyextra->yyLineNr;
1489 yyextra->current->bodyLine = yyextra->yyLineNr;
1490 yyextra->current->bodyColumn = yyextra->yyColNr;
1491 BEGIN( CompoundName );
1499<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1501 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1503 yyextra->isTypedef=
FALSE;
1504 yyextra->current->section = EntryType::makeClass();
1506 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1508 setOptional(spec.isOptional()).
1509 setPublished(spec.isPublished()).
1510 setLocal(spec.isLocal());
1512 yyextra->current->type +=
" interface" ;
1513 yyextra->current->fileName = yyextra->fileName;
1514 yyextra->current->startLine = yyextra->yyLineNr;
1515 yyextra->current->startColumn = yyextra->yyColNr;
1516 yyextra->current->bodyLine = yyextra->yyLineNr;
1517 yyextra->current->bodyColumn = yyextra->yyColNr;
1519 BEGIN( CompoundName );
1527<FindMembers>{B}*"@implementation"{BN}+ {
1529 yyextra->isTypedef=
FALSE;
1530 yyextra->current->section = EntryType::makeObjcImpl();
1531 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1532 yyextra->insideObjC =
TRUE;
1533 yyextra->current->protection = yyextra->protection = Protection::Public ;
1535 yyextra->current->type +=
" implementation" ;
1536 yyextra->current->fileName = yyextra->fileName;
1537 yyextra->current->startLine = yyextra->yyLineNr;
1538 yyextra->current->bodyLine = yyextra->yyLineNr;
1539 yyextra->current->bodyColumn = yyextra->yyColNr;
1540 BEGIN( CompoundName );
1542<FindMembers>{B}*"@interface"{BN}+ {
1544 yyextra->isTypedef=
FALSE;
1545 yyextra->current->section = EntryType::makeClass();
1546 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1547 if (!yyextra->insideJava)
1549 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1550 yyextra->insideObjC =
TRUE;
1552 yyextra->current->protection = yyextra->protection = Protection::Public ;
1554 yyextra->current->type +=
" interface" ;
1555 yyextra->current->fileName = yyextra->fileName;
1556 yyextra->current->startLine = yyextra->yyLineNr;
1557 yyextra->current->startColumn = yyextra->yyColNr;
1558 yyextra->current->bodyLine = yyextra->yyLineNr;
1559 yyextra->current->bodyColumn = yyextra->yyColNr;
1560 BEGIN( CompoundName );
1562<FindMembers>{B}*"@protocol"{BN}+ {
1564 yyextra->isTypedef=
FALSE;
1565 yyextra->current->section = EntryType::makeClass();
1567 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1568 yyextra->insideObjC =
TRUE;
1569 yyextra->current->protection = yyextra->protection = Protection::Public ;
1571 yyextra->current->type +=
" protocol" ;
1572 yyextra->current->fileName = yyextra->fileName;
1573 yyextra->current->startLine = yyextra->yyLineNr;
1574 yyextra->current->startColumn = yyextra->yyColNr;
1575 yyextra->current->bodyLine = yyextra->yyLineNr;
1576 yyextra->current->bodyColumn = yyextra->yyColNr;
1577 BEGIN( CompoundName );
1579<FindMembers>{B}*"exception"{BN}+ {
1580 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1581 yyextra->isTypedef=
FALSE;
1582 yyextra->current->section = EntryType::makeClass();
1585 yyextra->current->spec =
TypeSpecifier().setException(
true).
1586 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1588 yyextra->current->type +=
" exception" ;
1589 yyextra->current->fileName = yyextra->fileName;
1590 yyextra->current->startLine = yyextra->yyLineNr;
1591 yyextra->current->startColumn = yyextra->yyColNr;
1592 yyextra->current->bodyLine = yyextra->yyLineNr;
1593 yyextra->current->bodyColumn = yyextra->yyColNr;
1595 BEGIN( CompoundName );
1597<FindMembers>"@class" |
1598<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1599<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1601 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1602 bool isConst=decl.
find(
"const")!=-1;
1603 bool isVolatile=decl.
find(
"volatile")!=-1;
1604 yyextra->current->section = EntryType::makeClass();
1606 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1609 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1611 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1613 yyextra->current->spec.setLocal(
true);
1617 yyextra->current->type +=
" const";
1619 else if (isVolatile)
1621 yyextra->current->type +=
" volatile";
1623 yyextra->current->type +=
" class" ;
1624 yyextra->current->fileName = yyextra->fileName;
1625 yyextra->current->startLine = yyextra->yyLineNr;
1626 yyextra->current->startColumn = yyextra->yyColNr;
1627 yyextra->current->bodyLine = yyextra->yyLineNr;
1628 yyextra->current->bodyColumn = yyextra->yyColNr;
1631 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1632 yyextra->insideObjC =
TRUE;
1635 if (yytext[yyleng-1]==
'{') unput(
'{');
1636 BEGIN( CompoundName ) ;
1638<FindMembers>{B}*"value class{" |
1639<FindMembers>{B}*"value class"{BN}+ {
1640 yyextra->isTypedef=
FALSE;
1641 yyextra->current->section = EntryType::makeClass();
1644 yyextra->current->type +=
" value class" ;
1645 yyextra->current->fileName = yyextra->fileName;
1646 yyextra->current->startLine = yyextra->yyLineNr;
1647 yyextra->current->startColumn = yyextra->yyColNr;
1648 yyextra->current->bodyLine = yyextra->yyLineNr;
1649 yyextra->current->bodyColumn = yyextra->yyColNr;
1651 if (yytext[yyleng-1]==
'{') unput(
'{');
1652 BEGIN( CompoundName ) ;
1654<FindMembers>{B}*"ref class{" |
1655<FindMembers>{B}*"ref class"{BN}+ {
1656 yyextra->isTypedef=
FALSE;
1657 yyextra->current->section = EntryType::makeClass();
1660 yyextra->current->type +=
" ref class" ;
1661 yyextra->current->fileName = yyextra->fileName;
1662 yyextra->current->startLine = yyextra->yyLineNr;
1663 yyextra->current->startColumn = yyextra->yyColNr;
1664 yyextra->current->bodyLine = yyextra->yyLineNr;
1665 yyextra->current->bodyColumn = yyextra->yyColNr;
1667 if (yytext[yyleng-1]==
'{') unput(
'{');
1668 BEGIN( CompoundName ) ;
1670<FindMembers>{B}*"interface class{" |
1671<FindMembers>{B}*"interface class"{BN}+ {
1672 yyextra->isTypedef=
FALSE;
1673 yyextra->current->section = EntryType::makeClass();
1674 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1676 yyextra->current->type +=
" interface class" ;
1677 yyextra->current->fileName = yyextra->fileName;
1678 yyextra->current->startLine = yyextra->yyLineNr;
1679 yyextra->current->startColumn = yyextra->yyColNr;
1680 yyextra->current->bodyLine = yyextra->yyLineNr;
1681 yyextra->current->bodyColumn = yyextra->yyColNr;
1683 if (yytext[yyleng-1]==
'{') unput(
'{');
1684 BEGIN( CompoundName ) ;
1686<FindMembers>{B}*"coclass"{BN}+ {
1687 if (yyextra->insideIDL)
1689 yyextra->isTypedef=
FALSE;
1690 yyextra->current->section = EntryType::makeClass();
1692 yyextra->current->type +=
" coclass" ;
1693 yyextra->current->fileName = yyextra->fileName;
1694 yyextra->current->startLine = yyextra->yyLineNr;
1695 yyextra->current->startColumn = yyextra->yyColNr;
1696 yyextra->current->bodyLine = yyextra->yyLineNr;
1697 yyextra->current->bodyColumn = yyextra->yyColNr;
1699 BEGIN( CompoundName ) ;
1704 yyextra->current->name = yytext;
1705 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1709<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1710<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1711 if (yyextra->insideJava) REJECT;
1713 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1714 bool isConst=decl.
find(
"const")!=-1;
1715 bool isVolatile=decl.
find(
"volatile")!=-1;
1716 yyextra->current->section = EntryType::makeClass() ;
1720 setPublished(spec.isPublished()).
1721 setInline(spec.isInline()).
1722 setLocal(spec.isLocal());
1728 yyextra->current->type +=
" const";
1730 else if (isVolatile)
1732 yyextra->current->type +=
" volatile";
1734 yyextra->current->type +=
" struct" ;
1735 yyextra->current->fileName = yyextra->fileName;
1736 yyextra->current->startLine = yyextra->yyLineNr;
1737 yyextra->current->startColumn = yyextra->yyColNr;
1738 yyextra->current->bodyLine = yyextra->yyLineNr;
1739 yyextra->current->bodyColumn = yyextra->yyColNr;
1741 if (yytext[yyleng-1]==
'{') unput(
'{');
1742 BEGIN( CompoundName ) ;
1744<FindMembers>{B}*"value struct{" |
1745<FindMembers>{B}*"value struct"{BN}+ {
1746 yyextra->isTypedef=
FALSE;
1747 yyextra->current->section = EntryType::makeClass();
1748 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1750 yyextra->current->type +=
" value struct" ;
1751 yyextra->current->fileName = yyextra->fileName;
1752 yyextra->current->startLine = yyextra->yyLineNr;
1753 yyextra->current->startColumn = yyextra->yyColNr;
1754 yyextra->current->bodyLine = yyextra->yyLineNr;
1755 yyextra->current->bodyColumn = yyextra->yyColNr;
1757 if (yytext[yyleng-1]==
'{') unput(
'{');
1758 BEGIN( CompoundName ) ;
1760<FindMembers>{B}*"ref struct{" |
1761<FindMembers>{B}*"ref struct"{BN}+ {
1762 yyextra->isTypedef=
FALSE;
1763 yyextra->current->section = EntryType::makeClass();
1764 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1766 yyextra->current->type +=
" ref struct" ;
1767 yyextra->current->fileName = yyextra->fileName;
1768 yyextra->current->startLine = yyextra->yyLineNr;
1769 yyextra->current->startColumn = yyextra->yyColNr;
1770 yyextra->current->bodyLine = yyextra->yyLineNr;
1771 yyextra->current->bodyColumn = yyextra->yyColNr;
1773 if (yytext[yyleng-1]==
'{') unput(
'{');
1774 BEGIN( CompoundName ) ;
1776<FindMembers>{B}*"interface struct{" |
1777<FindMembers>{B}*"interface struct"{BN}+ {
1778 yyextra->isTypedef=
FALSE;
1779 yyextra->current->section = EntryType::makeClass();
1780 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1782 yyextra->current->type +=
" interface struct";
1783 yyextra->current->fileName = yyextra->fileName;
1784 yyextra->current->startLine = yyextra->yyLineNr;
1785 yyextra->current->startColumn = yyextra->yyColNr;
1786 yyextra->current->bodyLine = yyextra->yyLineNr;
1787 yyextra->current->bodyColumn = yyextra->yyColNr;
1789 if (yytext[yyleng-1]==
'{') unput(
'{');
1790 BEGIN( CompoundName ) ;
1792<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1793<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1794 if (yyextra->insideJava) REJECT;
1796 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1797 bool isConst=decl.
find(
"const")!=-1;
1798 bool isVolatile=decl.
find(
"volatile")!=-1;
1799 yyextra->current->section = EntryType::makeClass();
1806 yyextra->current->type +=
" const";
1808 else if (isVolatile)
1810 yyextra->current->type +=
" volatile";
1812 yyextra->current->type +=
" union" ;
1813 yyextra->current->fileName = yyextra->fileName;
1814 yyextra->current->startLine = yyextra->yyLineNr;
1815 yyextra->current->startColumn = yyextra->yyColNr;
1816 yyextra->current->bodyLine = yyextra->yyLineNr;
1817 yyextra->current->bodyColumn = yyextra->yyColNr;
1819 if (yytext[yyleng-1]==
'{') unput(
'{');
1820 BEGIN( CompoundName ) ;
1822<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1823<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1825 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1826 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1827 bool isEnumSytruct = text.
find(
"struct")!=-1;
1828 if (yyextra->insideJava)
1830 yyextra->current->section = EntryType::makeClass();
1836 yyextra->current->section = EntryType::makeEnum() ;
1839 yyextra->current->type +=
" enum";
1842 yyextra->current->spec.setStrong(
true);
1846 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1848 yyextra->current->fileName = yyextra->fileName;
1849 yyextra->current->startLine = yyextra->yyLineNr;
1850 yyextra->current->startColumn = yyextra->yyColNr;
1851 yyextra->current->bodyLine = yyextra->yyLineNr;
1852 yyextra->current->bodyColumn = yyextra->yyColNr;
1854 if (yytext[yyleng-1]==
'{') unput(
'{');
1855 BEGIN( CompoundName ) ;
1857<FindMembers>{B}*"concept"{BN}+ {
1858 if (yyextra->insideJava) REJECT;
1859 yyextra->isTypedef=
FALSE;
1860 yyextra->current->section = EntryType::makeConcept();
1862 yyextra->current->type +=
" concept";
1863 yyextra->current->fileName = yyextra->fileName;
1864 yyextra->current->startLine = yyextra->yyLineNr;
1865 yyextra->current->startColumn = yyextra->yyColNr;
1866 yyextra->current->bodyLine = yyextra->yyLineNr;
1867 yyextra->current->bodyColumn = yyextra->yyColNr;
1868 yyextra->current->args = yyextra->fullArgString;
1869 yyextra->keepComment =
true;
1871 BEGIN( ConceptName ) ;
1873<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1875 yyextra->current->name +=
"()";
1876 BEGIN( FindMembers );
1878<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1880 yyextra->current->name += yytext ;
1881 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1882 BEGIN( FindMembers ) ;
1884<Operator>"("{BN}*")"{BNopt}/"(" {
1886 yyextra->current->name += yytext ;
1887 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1888 BEGIN( FindMembers ) ;
1892 BEGIN( FindMembers ) ;
1896 yyextra->current->name += *yytext ;
1898<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1899 if (!yyextra->current->type.startsWith(
"friend "))
1901 yyextra->current->name += yytext;
1905 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1907 BEGIN( FindMembers ) ;
1909<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1912 yyextra->current->tArgLists.
push_back(al);
1913 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1914 yyextra->templateStr=
"<";
1915 yyextra->fullArgString = yyextra->templateStr;
1916 yyextra->copyArgString = &yyextra->templateStr;
1917 yyextra->currentArgumentContext = FindMembers;
1918 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1920<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1921 if (yyextra->insideJava) REJECT;
1923 BEGIN( NSAliasName );
1926 yyextra->aliasName = yytext;
1927 BEGIN( NSAliasArg );
1929<NSAliasArg>({ID}"::")*{ID} {
1931 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1942 BEGIN( FindMembers );
1944<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1946 yyextra->aliasName=yytext;
1949<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1953 yyextra->current->fileName = yyextra->fileName;
1955 yyextra->current->section = EntryType::makeUsingDecl();
1956 yyextra->current_root->copyToSubEntry(yyextra->current);
1958 yyextra->current->section = EntryType::makeUsingDir();
1959 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1961 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1963<PHPUseAs>{BN}+"as"{BN}+ {
1966<PHPUseAs>{PHPUSEKW} {
1970 if (!yyextra->aliasName.isEmpty())
1975 yyextra->aliasName.clear();
const std::string & str() const
1977<PHPUse,PHPUseAs>[,;] {
1987<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1991 yyextra->current->fileName = yyextra->fileName;
1998 yyextra->current->section = EntryType::makeUsingDir();
1999 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)
2003<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2007 yyextra->current->fileName = yyextra->fileName;
2019 if (yyextra->insideD)
2021 yyextra->current->section = EntryType::makeUsingDir();
2026 yyextra->current->section = EntryType::makeUsingDecl();
2028 yyextra->previous = yyextra->current;
2029 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2033<IDLImport>"\""[^"]*"\"" {
2034 QCString fileName(&yytext[1],yyleng-2);
2050<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2051 if (yyextra->insideJava) REJECT;
2052 yyextra->current->startLine=yyextra->yyLineNr;
2053 yyextra->current->startColumn = yyextra->yyColNr;
2057<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2058<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2060 yyextra->current->name=yytext;
2061 yyextra->current->fileName = yyextra->fileName;
2062 yyextra->current->section = EntryType::makeUsingDecl();
2063 yyextra->current->startLine = yyextra->yyLineNr;
2064 yyextra->usingNewVarNeeded =
true;
2065 if (yyextra->insideCS)
2070 yyextra->current->name=yytext;
2071 yyextra->current->fileName = yyextra->fileName;
2072 yyextra->current->startLine = yyextra->yyLineNr;
2073 yyextra->current->startColumn = yyextra->yyColNr;
2074 yyextra->current->section = EntryType::makeUsingDir();
2075 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2080<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2082 yyextra->current->fileName = yyextra->fileName;
2083 yyextra->current->section = EntryType::makeUsingDecl();
2084 yyextra->current->startLine = yyextra->yyLineNr;
2085 yyextra->current->bodyLine = yyextra->yyLineNr;
2086 yyextra->current->bodyColumn = yyextra->yyColNr;
2087 yyextra->lastInitializerContext = UsingAlias;
2088 yyextra->sharpCount=0;
2089 yyextra->initBracketCount=0;
2091 BEGIN(ReadInitializer);
2094 if (yyextra->usingNewVarNeeded)
2096 yyextra->previous = yyextra->current;
2097 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2099 yyextra->usingNewVarNeeded =
false;
2104 yyextra->lastInitializerContext = UsingAlias;
2105 yyextra->sharpCount=0;
2106 yyextra->initBracketCount=0;
2108 yyextra->usingNewVarNeeded =
false;
2109 BEGIN(ReadInitializer);
2112 yyextra->lastCContext = YY_START ;
2113 BEGIN( SkipComment ) ;
2116 yyextra->lastCContext = YY_START ;
2117 BEGIN( SkipCxxComment ) ;
2121 if (yyextra->usingNewVarNeeded)
2123 yyextra->previous = yyextra->current;
2124 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2126 yyextra->usingNewVarNeeded =
false;
2130 yyextra->current->section = EntryType::makeVariable();
2132 init.stripPrefix(
"class ");
2133 init.stripPrefix(
"struct ");
2135 yyextra->current->type =
"typedef "+
init;
2136 yyextra->current->args.clear();
2137 yyextra->current->spec.setAlias(
true);
2138 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2143 yyextra->current->initializer << yytext;
2146 yyextra->current->initializer << yytext;
2150 yyextra->current->fileName = yyextra->fileName;
2151 yyextra->current->section = EntryType::makeUsingDir();
2152 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2154 yyextra->usingNewVarNeeded =
false;
2157<FindMembers>{SCOPENAME}{BN}*"<>" {
2162<FindMembers>{SCOPENAME}{BNopt}/"<" {
2164 if (yyextra->insideCpp && name==
"import") REJECT;
2165 yyextra->roundCount=0;
2166 yyextra->sharpCount=0;
2169 yyextra->current->name=name;
2175 BEGIN( EndTemplate );
2177<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2178 yyextra->sharpCount=0;
2179 yyextra->roundCount=0;
2187 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...
2190 if (!yyextra->insidePHP)
2196 yyextra->lastHereDocContext = YY_START;
2200<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2201 yyextra->current->name+=yytext;
2205 if (yyextra->roundCount==0)
2208 yyextra->sharpCount++;
2210 yyextra->current->name+=yytext;
2212<ClassTemplSpec,EndTemplate>">=" {
2213 yyextra->current->name+=yytext;
2215<ClassTemplSpec,EndTemplate>(">>") {
2216 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2224 yyextra->current->name+=yytext;
2229 yyextra->current->name+=
'>';
2231 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2233 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2238<EndTemplate>">"{BN}*"(" {
2240 yyextra->current->name+=
'>';
2242 if (yyextra->roundCount==0)
2244 --yyextra->sharpCount;
2246 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2248 yyextra->current->bodyLine = yyextra->yyLineNr;
2249 yyextra->current->bodyColumn = yyextra->yyColNr;
2250 yyextra->current->args =
"(";
2251 yyextra->currentArgumentContext = FuncQual;
2252 yyextra->fullArgString = yyextra->current->args;
2253 yyextra->copyArgString = &yyextra->current->args;
2255 BEGIN( ReadFuncArgType ) ;
2259 yyextra->current->name+=
"(";
2260 yyextra->roundCount++;
2263<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2265 yyextra->current->name+=
'>';
2266 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2271<EndTemplate>">"{BNopt}/"::" {
2273 yyextra->current->name+=
'>';
2275 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2277 BEGIN(FindMemberName);
2280<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2281 yyextra->roundCount++;
2283<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2284 if (yyextra->roundCount>0) yyextra->roundCount--;
2287 yyextra->current->name+=*yytext;
2290<FindMembers>"define"{BN}*"("{BN}*["'] {
2291 if (yyextra->insidePHP)
2293 yyextra->current->bodyLine = yyextra->yyLineNr;
2294 yyextra->current->bodyColumn = yyextra->yyColNr;
2301 yyextra->delimiter = yytext;
2302 *yyextra->pCopyHereDocGString << yytext;
2303 BEGIN(CopyHereDocEnd);
2305<CopyHereDoc>"\""{ID}/"\"" {
2306 yyextra->delimiter = &yytext[1];
2307 *yyextra->pCopyHereDocGString << yytext;
2308 BEGIN(CopyHereDocEnd);
2310<CopyHereDoc>"'"{ID}/"'" {
2311 yyextra->delimiter = &yytext[1];
2312 *yyextra->pCopyHereDocGString << yytext;
2313 BEGIN(CopyHereDocEnd);
2316 yyextra->delimiter = yytext;
2319<HereDoc>"\""{ID}/"\"" {
2320 yyextra->delimiter = &yytext[1];
2323<HereDoc>"'"{ID}/"'" {
2324 yyextra->delimiter = &yytext[1];
2327<HereDocEnd>^{Bopt}{ID} {
2330 BEGIN(yyextra->lastHereDocContext);
2334<CopyHereDocEnd>^{Bopt}{ID} {
2335 *yyextra->pCopyHereDocGString << yytext;
2338 BEGIN(yyextra->lastHereDocContext);
2343 *yyextra->pCopyHereDocGString << yytext;
2345<CopyHereDocEnd>{ID} {
2346 *yyextra->pCopyHereDocGString << yytext;
2349 *yyextra->pCopyHereDocGString << yytext;
2351<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2353<FindMembers>"Q_PROPERTY" {
2354 yyextra->yyBegLineNr = yyextra->yyLineNr;
2355 yyextra->yyBegColNr = yyextra->yyColNr;
2356 yyextra->current->protection = Protection::Public ;
2357 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2358 yyextra->current->type.clear();
2368 yyextra->current->name+=yytext;
2371 yyextra->current->type+= yyextra->current->name;
2372 yyextra->current->type+= yytext;
2373 yyextra->current->name=
"";
2375<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2376 yyextra->current->type+= yyextra->current->name;
2377 yyextra->current->name=yytext;
2379<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2380 yyextra->current->spec.setReadable(
true);
2383<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2384 yyextra->current->spec.setWritable(
true);
2387<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2388<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2389<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2390<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2391<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2392<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2393<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2394<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2395<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2396<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2400 yyextra->current->read = yytext;
2404 yyextra->current->write = yytext;
2407<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2408 yyextra->current->name=yytext;
2412<FindMembers>"requires" {
2413 if (yyextra->insideJava) REJECT;
2414 yyextra->current->req.clear();
2415 yyextra->requiresContext = YY_START;
2416 BEGIN(RequiresClause);
2418<RequiresClause>"requires"{BN}*/"{" {
2419 if (yyextra->insideJava) REJECT;
2421 yyextra->current->req+=yytext;
2422 BEGIN( RequiresExpression ) ;
2424<RequiresClause>"requires"{BN}*"(" {
2425 if (yyextra->insideJava) REJECT;
2427 yyextra->current->req+=yytext;
2428 yyextra->lastRoundContext=RequiresExpression;
2429 yyextra->pCopyRoundString=&yyextra->current->req;
2430 yyextra->roundCount=0;
2431 BEGIN( CopyRound ) ;
2433<RequiresExpression>"{" {
2434 yyextra->current->req+=yytext;
2435 yyextra->lastCurlyContext=RequiresClause;
2436 yyextra->pCopyCurlyString=&yyextra->current->req;
2437 yyextra->curlyCount=0;
2438 BEGIN( CopyCurly ) ;
2440<RequiresExpression>\n {
2441 yyextra->current->req+=
' ';
2444<RequiresExpression>. {
2445 yyextra->current->req+=yytext;
2447<RequiresClause>"(" {
2448 yyextra->current->req+=yytext;
2449 yyextra->lastRoundContext=RequiresClause;
2450 yyextra->pCopyRoundString=&yyextra->current->req;
2451 yyextra->roundCount=0;
2452 BEGIN( CopyRound ) ;
2454<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2458 yyextra->current->req+=yytext;
2459 yyextra->lastRoundContext=RequiresClause;
2460 yyextra->pCopyRoundString=&yyextra->current->req;
2461 yyextra->roundCount=0;
2469<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2473 yyextra->current->req+=yytext;
2474 yyextra->lastSharpContext=RequiresClause;
2475 yyextra->pCopySharpString=&yyextra->current->req;
2476 yyextra->sharpCount=0;
2484<RequiresClause>{NOTopt}{SCOPENAME} {
2488 yyextra->current->req=yytext;
2489 BEGIN(yyextra->requiresContext);
2496<RequiresClause>{NOTopt}"::"{ID} {
2498 yyextra->current->req+=yytext;
2500<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2502 yyextra->current->req+=yytext;
2504<RequiresClause>{BN}+ {
2505 yyextra->current->req+=
' ';
2510 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2511 BEGIN(yyextra->requiresContext);
2513<FindMembers,FindMemberName>{SCOPENAME} {
2515 yyextra->yyBegColNr=yyextra->yyColNr;
2516 yyextra->yyBegLineNr=yyextra->yyLineNr;
2518 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2522 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2524 if (yyextra->insideIDL)
2529 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2533 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2538 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2540 BEGIN(IDLUnionCase);
2542 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2544 yyextra->insideTryBlock=
FALSE;
2545 BEGIN(TryFunctionBlock);
2547 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2549 yyextra->lastAlignAsContext = YY_START;
2552 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2554 yyextra->current->type=
"var";
2556 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2558 yyextra->current->type=
"function";
2560 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2564 yyextra->current->name=
"this";
2567 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2570 BEGIN(StaticAssert);
2572 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2576 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2577 yyextra->current->type+=yytext;
2580 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2582 if (yyextra->current->type.isEmpty())
2584 yyextra->current->type =
"optional";
2588 yyextra->current->type +=
" optional";
2590 yyextra->lastModifierContext = YY_START;
2591 BEGIN(SliceOptional);
2595 if (YY_START==FindMembers)
2599 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2600 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2602 yyextra->current->protection = Protection::Public;
2604 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2606 yyextra->current->protection = Protection::Protected;
2608 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2610 yyextra->current->protection = Protection::Package;
2612 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2614 yyextra->current->protection = Protection::Private;
2616 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2618 if (YY_START==FindMembers)
2619 yyextra->current->name = yytext;
2621 yyextra->current->name += yytext;
2622 yyextra->current->isStatic =
TRUE;
2626 if (YY_START==FindMembers)
2627 yyextra->current->name = yytext;
2629 yyextra->current->name += yytext;
2630 if (yyextra->current->name.startsWith(
"static "))
2632 yyextra->current->isStatic =
TRUE;
2633 yyextra->current->name= yyextra->current->name.mid(7);
2635 else if (yyextra->current->name.startsWith(
"inline "))
2637 if (yyextra->current->type.isEmpty())
2639 yyextra->current->type=
"inline";
2643 yyextra->current->type+=
"inline ";
2645 yyextra->current->name= yyextra->current->name.mid(7);
2647 else if (yyextra->current->name.startsWith(
"constexpr "))
2649 if (yyextra->current->type.isEmpty())
2651 yyextra->current->type=
"constexpr";
2655 yyextra->current->type+=
"constexpr ";
2657 yyextra->current->name=yyextra->current->name.mid(10);
2659 else if (yyextra->current->name.startsWith(
"consteval "))
2661 if (yyextra->current->type.isEmpty())
2663 yyextra->current->type=
"consteval";
2667 yyextra->current->type+=
"consteval ";
2669 yyextra->current->name=yyextra->current->name.mid(10);
2671 else if (yyextra->current->name.startsWith(
"constinit "))
2673 if (yyextra->current->type.isEmpty())
2675 yyextra->current->type=
"constinit";
2679 yyextra->current->type+=
"constinit ";
2681 yyextra->current->name=yyextra->current->name.mid(10);
2683 else if (yyextra->current->name.startsWith(
"const "))
2685 if (yyextra->current->type.isEmpty())
2687 yyextra->current->type=
"const";
2691 yyextra->current->type+=
"const ";
2693 yyextra->current->name=yyextra->current->name.mid(6);
2695 else if (yyextra->current->name.startsWith(
"volatile "))
2697 if (yyextra->current->type.isEmpty())
2699 yyextra->current->type=
"volatile";
2703 yyextra->current->type+=
"volatile ";
2705 yyextra->current->name=yyextra->current->name.mid(9);
2707 else if (yyextra->current->name.startsWith(
"typedef "))
2709 if (yyextra->current->type.isEmpty())
2711 yyextra->current->type=
"typedef";
2715 yyextra->current->type+=
"typedef ";
2717 yyextra->current->name=yyextra->current->name.mid(8);
2727 yyextra->externLinkage=
FALSE;
2731 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2734 yyextra->lastSkipRoundContext = FindMembers;
2735 yyextra->roundCount=0;
2738<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2744 yyextra->current->type+=yytext;
2745 yyextra->lastRoundContext=FindMembers;
2746 yyextra->pCopyRoundString=&yyextra->current->type;
2747 yyextra->roundCount=0;
2750<DeclType>{BN}+ {
lineCount(yyscanner); }
2755<CSIndexer>"["[^\n\]]*"]" {
2759<FindMembers>[0-9]{ID} {
2762 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2764 yyextra->current->name+=
".";
2768 yyextra->current->name+=yytext;
2770<CppQuote>"("{B}*"\"" {
2771 yyextra->insideCppQuote=
TRUE;
2775<IDLUnionCase>":" { BEGIN(FindMembers); }
2776<IDLUnionCase>\n {
lineCount(yyscanner); }
2778<TryFunctionBlock>\n {
lineCount(yyscanner); }
2779<TryFunctionBlock>"{" {
2780 yyextra->curlyCount=0;
2781 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2785<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2787<TryFunctionBlockEnd>\n { unput(*yytext);
2788 BEGIN( FindMembers );
2790<TryFunctionBlockEnd>. { unput(*yytext);
2791 BEGIN( FindMembers );
2794 yyextra->insideCppQuote=
FALSE;
2797<FindConceptParts>[^\/\n]* {
2798 yyextra->current->initializer << yytext;
2800<FindConceptParts>. {
2801 yyextra->current->initializer << yytext;
2803<FindConceptParts>\n {
2804 yyextra->current->initializer << yytext;
2805 yyextra->yyLineNr++;
2807<FindConceptParts>{CCS} {
2808 yyextra->current->initializer << yytext;
2810<FindConceptParts>{CPPC} {
2811 yyextra->current->initializer << yytext;
2813<FindConceptParts>^[ \t]*{CCS}[!*] {
2815 int indent = text.
find(
'/');
2817 if (!yyextra->current->initializer.empty())
2819 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2822 yyextra->current->section = EntryType::makeConceptDocPart();
2823 yyextra->current->startLine = yyextra->yyLineNr;
2824 yyextra->current->startColumn = indent;
2825 yyextra->current->initializer.clear();
2826 BEGIN(FindConceptDocs);
2828<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2829 if (!yyextra->current->initializer.empty())
2831 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2835 int indent = line.find(
'/');
2836 yyextra->current->section = EntryType::makeConceptDocPart();
2837 yyextra->current->startLine = yyextra->yyLineNr;
2838 yyextra->current->startColumn = indent;
2839 yyextra->current->initializer.clear();
2840 yyextra->current->initializer << line.mid(indent+3);
2841 yyextra->yyLineNr++;
2842 BEGIN(FindConceptCxxDocs);
2844<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2846 int p = line.find(
'/');
2847 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2848 yyextra->current->initializer << line.mid(p+2);
2849 yyextra->yyLineNr++;
2851<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2852 yyextra->current->initializer << yytext;
2854<FindConceptCxxDocs>. {
2855 if (!yyextra->current->initializer.empty())
2859 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2863 yyextra->current->section = EntryType::makeConceptCodePart();
2864 yyextra->current->startLine = yyextra->yyLineNr;
2865 BEGIN(FindConceptParts);
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
2867<FindConceptDocs>^[ \t]*"*"+/[^/] {
2869<FindConceptDocs>[^\*\n]+ {
2870 yyextra->current->initializer << yytext;
2872<FindConceptDocs>\n {
2873 yyextra->current->initializer << yytext;
2874 yyextra->yyLineNr++;
2876<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2877 if (!yyextra->current->initializer.empty())
2881 yyextra->current->section = EntryType::makeConceptDocPart();
2882 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2886 yyextra->current->section = EntryType::makeConceptCodePart();
2887 yyextra->current->startLine = yyextra->yyLineNr;
2888 BEGIN(FindConceptParts);
2890<FindConceptDocs>"*"*{CCE} {
2891 if (!yyextra->current->initializer.empty())
2895 yyextra->current->section = EntryType::makeConceptDocPart();
2896 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2899 yyextra->current->section = EntryType::makeConceptCodePart();
2900 yyextra->current->startLine = yyextra->yyLineNr;
2901 BEGIN(FindConceptParts);
2903<FindConceptParts><<EOF>> {
2904 if (!yyextra->current->initializer.empty())
2906 if (!yyextra->current->section.isConceptCodePart())
2908 yyextra->current->section = EntryType::makeConceptDocPart();
2910 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2915<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2917 yyextra->lastCPPContext = YY_START;
2920<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2921<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2922 if (yyextra->insidePHP)
2924 yyextra->current->bodyLine = yyextra->yyLineNr;
2925 yyextra->current->bodyColumn = yyextra->yyColNr;
2926 yyextra->current->fileName = yyextra->fileName;
2927 yyextra->current->startLine = yyextra->yyLineNr;
2928 yyextra->current->startColumn = yyextra->yyColNr;
2929 yyextra->current->type.clear();
2930 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2931 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2932 yyextra->current->section = EntryType::makeDefine();
2933 yyextra->lastDefineContext = YY_START;
2936<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2937 yyextra->yyLineNr = atoi(&yytext[1]);
2939 yyextra->lastPreLineCtrlContext = YY_START;
2940 if (YY_START==ReadBody ||
2941 YY_START==ReadNSBody ||
2942 YY_START==ReadBodyIntf)
2944 yyextra->current->program << yytext;
2946 BEGIN( PreLineCtrl );
2948<PreLineCtrl>"\""[^\n\"]*"\"" {
2950 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2951 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2952 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2954 yyextra->current->program << yytext;
2958 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2959 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2960 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2962 yyextra->current->program << yytext;
2966 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2967 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2968 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2970 yyextra->current->program << yytext;
2973 BEGIN( yyextra->lastPreLineCtrlContext );
2976<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2977<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2978 BEGIN( yyextra->lastCPPContext) ;
2980<SDefine>{ID}{B}*"(" {
2981 yyextra->current->name = yytext;
2982 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2983 yyextra->current->args =
"(";
2984 yyextra->current->bodyLine = yyextra->yyLineNr;
2985 yyextra->current->bodyColumn = yyextra->yyColNr;
2986 yyextra->currentArgumentContext = DefineEnd;
2987 yyextra->fullArgString=yyextra->current->args;
2988 yyextra->copyArgString=&yyextra->current->args;
2989 BEGIN( ReadFuncArgType ) ;
3004 yyextra->current->bodyLine = yyextra->yyLineNr;
3005 yyextra->current->bodyColumn = yyextra->yyColNr;
3006 yyextra->current->name = yytext;
3013 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3015 BEGIN(yyextra->lastDefineContext);
3019 yyextra->current->fileName = yyextra->fileName;
3020 yyextra->current->startLine = yyextra->yyLineNr;
3021 yyextra->current->startColumn = yyextra->yyColNr;
3022 yyextra->current->type.clear();
3023 yyextra->current->type =
"const";
3027 yyextra->current->initializer.str(
init.str());
3028 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3029 yyextra->current->section = EntryType::makeVariable();
3030 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3035<DefineEnd>\\[\r]?\n {
3037 yyextra->current->endBodyLine = yyextra->yyLineNr;
3040 if (yyextra->insideIDL && yyextra->insideCppQuote)
3046 yyextra->lastStringContext=DefineEnd;
3051<DefinePHP>{ID}["']{BN}*","{BN}* {
3052 yyextra->current->name = yytext;
3053 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3054 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3055 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3056 yyextra->current->bodyLine = yyextra->yyLineNr;
3057 yyextra->current->bodyColumn = yyextra->yyColNr;
3058 yyextra->lastRoundContext = DefinePHPEnd;
3059 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3060 yyextra->roundCount = 0;
3061 BEGIN( GCopyRound );
3065 if (yyextra->insideCli)
3068 yyextra->current->name = yytext ;
3076 yyextra->current->name += yytext ;
3079<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3080 if (YY_START==ReadInitializer && yyextra->keepComment)
3086 if (yyextra->current->bodyLine==-1)
3088 yyextra->current->bodyLine=yyextra->yyLineNr;
3089 yyextra->current->bodyColumn = yyextra->yyColNr;
3091 yyextra->docBlockContext = YY_START;
3092 yyextra->docBlockInBody =
FALSE;
3093 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3095 if (YY_START==MemberSpec && yyextra->memspecEntry && yyextra->memspecEntry->briefFile.isEmpty())
3097 if (yytext[yyleng-3]==
'/')
3099 yyextra->memspecEntry->briefFile = yyextra->fileName;
3100 yyextra->memspecEntry->briefLine = yyextra->yyLineNr;
3104 yyextra->memspecEntry->docFile = yyextra->fileName;
3105 yyextra->memspecEntry->docLine = yyextra->yyLineNr;
3111 yyextra->docBlock.
str(indent.
str());
3115 yyextra->docBlockTerm =
';';
3116 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3118 yyextra->current->bitfields =
":"+yyextra->current->args;
3119 yyextra->current->args.clear();
3120 yyextra->current->section = EntryType::makeVariable();
3122 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
3134<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3135 if (YY_START==ReadInitializer && yyextra->keepComment)
3141 yyextra->docBlockContext = YY_START;
3142 yyextra->docBlockInBody =
FALSE;
3143 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3148 yyextra->docBlock.
str(indent.
str());
3151 yyextra->docBlockTerm =
',';
3152 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3154 yyextra->current->bitfields =
":"+yyextra->current->args;
3155 yyextra->current->args.clear();
3156 yyextra->current->section = EntryType::makeVariable();
3158 if (yytext[yyleng-3]==
'/')
3170<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3171 if (YY_START==ReadInitializer && yyextra->keepComment)
3177 if (yyextra->current->bodyLine==-1)
3179 yyextra->current->bodyLine=yyextra->yyLineNr;
3180 yyextra->current->bodyColumn = yyextra->yyColNr;
3182 yyextra->docBlockContext = YY_START;
3183 yyextra->docBlockInBody =
FALSE;
3184 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3188 yyextra->docBlock.
str(indent.
str());
3191 yyextra->docBlockTerm = 0;
3192 if (yytext[yyleng-3]==
'/')
3205<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3207 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3210 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3215 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3221 if (yytext[2]==
'!' || yytext[2]==
'/')
3223 yyextra->docBlockContext = YY_START;
3224 yyextra->docBlockInBody =
FALSE;
3225 yyextra->docBlockAutoBrief =
FALSE;
3226 yyextra->docBlock.str(std::string());
3227 yyextra->docBlockTerm = 0;
3233 yyextra->lastCContext=YY_START;
3234 BEGIN(SkipCxxComment);
3239 if (yytext[2]==
'!' || yytext[2]==
'*')
3241 yyextra->docBlockContext = YY_START;
3242 yyextra->docBlockInBody =
FALSE;
3243 yyextra->docBlock.str(std::string());
3244 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3246 yyextra->docBlockTerm = 0;
3252 yyextra->lastCContext=YY_START;
3257<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3258 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3259 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3263 if (!yyextra->insideCS) REJECT;
3264 yyextra->current->bodyLine = yyextra->yyLineNr;
3265 yyextra->current->bodyColumn = yyextra->yyColNr;
3266 yyextra->current->initializer.str(yytext);
3267 yyextra->lastInitializerContext = YY_START;
3268 yyextra->sharpCount=0;
3269 yyextra->initBracketCount=0;
3270 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3271 yyextra->current->spec.setGettable(
true);
3272 BEGIN(ReadInitializerPtr);
3275 yyextra->current->bodyLine = yyextra->yyLineNr;
3276 yyextra->current->bodyColumn = yyextra->yyColNr;
3277 yyextra->current->initializer.str(
" ");
3278 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3279 yyextra->current->initializer <<
" ";
3280 yyextra->current->initializer <<
"=";
3281 yyextra->lastInitializerContext = YY_START;
3282 yyextra->sharpCount=0;
3283 yyextra->initBracketCount=0;
3284 BEGIN(ReadInitializer);
3286<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3288 yyextra->current->exception +=
" ";
3291<UNOIDLAttributeBlock>"}" {
3292 yyextra->current->exception +=
" }";
3296<ReadInitializer,ReadInitializerPtr>"(" {
3297 yyextra->lastRoundContext=YY_START;
3298 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3299 yyextra->roundCount=0;
3300 yyextra->current->initializer << *yytext;
3303<ReadInitializer,ReadInitializerPtr>"[" {
3304 if (!yyextra->insidePHP) REJECT;
3305 yyextra->lastSquareContext=YY_START;
3306 yyextra->pCopySquareGString=&yyextra->current->initializer;
3307 yyextra->squareCount=0;
3308 yyextra->current->initializer << *yytext;
3311<ReadInitializer,ReadInitializerPtr>"{" {
3312 yyextra->lastCurlyContext=YY_START;
3313 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3314 yyextra->curlyCount=0;
3315 yyextra->current->initializer << *yytext;
3318<ReadInitializer,ReadInitializerPtr>[;,] {
3320 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3322 yyextra->current->fileName = yyextra->fileName;
3323 yyextra->current->startLine = yyextra->yyLineNr;
3324 yyextra->current->startColumn = yyextra->yyColNr;
3325 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3326 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3327 yyextra->current->section = EntryType::makeVariable();
3328 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3332 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3335 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3336 BEGIN(yyextra->lastInitializerContext);
3338 else if (*yytext==
',' && yyextra->initBracketCount==0)
3341 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3342 BEGIN(yyextra->lastInitializerContext);
3346 yyextra->current->initializer << *yytext;
3349<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3350 if (!yyextra->insideCpp)
3356 yyextra->current->initializer << yytext;
3358 yyextra->lastRawStringContext = YY_START;
3359 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3364<ReadInitializer>{CPPC}.* {
3365 if (yyextra->keepComment)
3367 yyextra->current->initializer << yytext;
3374<ReadInitializer>{CCS} {
3375 if (yyextra->keepComment)
3377 yyextra->current->initializer << yytext;
3378 BEGIN(InitCopyComment);
3385<InitCopyComment>{CCE} {
3386 yyextra->current->initializer << yytext;
3387 BEGIN(ReadInitializer);
3389<InitCopyComment>\n {
3391 yyextra->current->initializer << yytext;
3394 yyextra->current->initializer << yytext;
3396<InitCopyComment><<EOF>> {
3397 warn(yyextra->fileName,yyextra->yyLineNr,
3398 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3401<RawGString>{RAWEND} {
3404 *yyextra->pCopyRawGString << yytext;
3405 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3412<RawGString>[^)\n]+ {
3413 *yyextra->pCopyRawGString << yytext;
3416 *yyextra->pCopyRawGString << yytext;
3419 *yyextra->pCopyRawGString << yytext;
3422<RawString>{RAWEND} {
3423 *yyextra->pCopyRawString+=yytext;
3424 yyextra->fullArgString+=yytext;
3427 BEGIN(yyextra->lastRawStringContext);
3431 *yyextra->pCopyRawString += yytext;
3432 yyextra->fullArgString+=yytext;
3435 *yyextra->pCopyRawString += yytext;
3436 yyextra->fullArgString+=yytext;
3439 *yyextra->pCopyRawString += yytext;
3440 yyextra->fullArgString+=yytext;
3443<ReadInitializer,ReadInitializerPtr>\" {
3444 if (yyextra->insideIDL && yyextra->insideCppQuote)
3450 yyextra->lastStringContext=YY_START;
3451 yyextra->current->initializer << yytext;
3452 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3453 yyextra->stopAtInvalidString=
false;
3457<ReadInitializer,ReadInitializerPtr>"->" {
3458 yyextra->current->initializer << yytext;
3460<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3461 yyextra->current->initializer << yytext;
3463<ReadInitializer,ReadInitializerPtr>(">>") {
3464 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3467 yyextra->initBracketCount-=2;
3468 yyextra->sharpCount-=2;
3470 yyextra->current->initializer << yytext;
3472<ReadInitializer,ReadInitializerPtr>(">=") {
3473 yyextra->current->initializer << yytext;
3475<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3476 yyextra->initBracketCount++;
3477 yyextra->sharpCount++;
3478 yyextra->current->initializer << *yytext;
3480<ReadInitializer,ReadInitializerPtr>[>\]})] {
3481 yyextra->initBracketCount--;
3482 yyextra->sharpCount--;
3485 yyextra->current->endBodyLine=yyextra->yyLineNr;
3487 yyextra->current->initializer << *yytext;
3489<ReadInitializer,ReadInitializerPtr>\' {
3490 if (yyextra->insidePHP)
3492 yyextra->current->initializer << yytext;
3493 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3494 yyextra->lastStringContext=YY_START;
3495 BEGIN(CopyPHPGString);
3499 yyextra->current->initializer << yytext;
3502<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3503 if (yyextra->insidePHP)
3509 yyextra->current->initializer << yytext;
3512<ReadInitializer,ReadInitializerPtr>\n {
3513 yyextra->current->initializer << *yytext;
3516<ReadInitializer,ReadInitializerPtr>"@\"" {
3518 yyextra->current->initializer << yytext;
3519 if (!yyextra->insideCS && !yyextra->insideObjC)
3526 yyextra->lastSkipVerbStringContext=YY_START;
3527 yyextra->pSkipVerbString=&yyextra->current->initializer;
3528 BEGIN(SkipVerbString);
3531<SkipVerbString>[^\n"\\]+ {
3532 *yyextra->pSkipVerbString << yytext;
3534<SkipVerbString>"\\\\" {
3535 if (yyextra->insideCS) REJECT
3536 *yyextra->pSkipVerbString << yytext;
3538<SkipVerbString>"\\\"" {
3539 if (yyextra->insideCS) REJECT
3540 *yyextra->pSkipVerbString << yytext;
3542<SkipVerbString>"\"\"" {
3543 *yyextra->pSkipVerbString << yytext;
3545<SkipVerbString>"\"" {
3546 *yyextra->pSkipVerbString << *yytext;
3547 BEGIN(yyextra->lastSkipVerbStringContext);
3550 *yyextra->pSkipVerbString << *yytext;
3554 *yyextra->pSkipVerbString << *yytext;
3556<ReadInitializer,ReadInitializerPtr>"?>" {
3557 if (yyextra->insidePHP)
3558 BEGIN( FindMembersPHP );
3560 yyextra->current->initializer << yytext;
3562<ReadInitializer,ReadInitializerPtr>. {
3563 yyextra->current->initializer << *yytext;
3567<CopyString,CopyPHPString>\\. {
3568 *yyextra->pCopyQuotedString+=yytext;
3571 *yyextra->pCopyQuotedString+=*yytext;
3572 BEGIN( yyextra->lastStringContext );
3575 *yyextra->pCopyQuotedString+=*yytext;
3576 BEGIN( yyextra->lastStringContext );
3578<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3579 *yyextra->pCopyQuotedString+=yytext;
3581<CopyString,CopyPHPString>\n {
3582 *yyextra->pCopyQuotedString+=*yytext;
3585<CopyString,CopyPHPString>. {
3586 *yyextra->pCopyQuotedString+=*yytext;
3590<CopyGString,CopyPHPGString>\\. {
3591 *yyextra->pCopyQuotedGString << yytext;
3594 *yyextra->pCopyQuotedGString << *yytext;
3595 BEGIN( yyextra->lastStringContext );
3598 *yyextra->pCopyQuotedGString << *yytext;
3599 BEGIN( yyextra->lastStringContext );
3601<CopyGString,CopyPHPGString>"<?php" {
3602 *yyextra->pCopyQuotedGString << yytext;
3603 BEGIN( yyextra->lastStringContext );
3605<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3606 *yyextra->pCopyQuotedGString << yytext;
3608<CopyGString,CopyPHPGString>\n {
3609 *yyextra->pCopyQuotedGString << *yytext;
3610 if (yyextra->stopAtInvalidString)
3612 BEGIN( yyextra->lastStringContext );
3619<CopyGString,CopyPHPGString>. {
3620 *yyextra->pCopyQuotedGString << *yytext;
3625 *yyextra->pCopyRoundString += *yytext;
3626 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3627 yyextra->lastStringContext=YY_START;
3631 *yyextra->pCopyRoundString += *yytext;
3632 yyextra->roundCount++;
3635 *yyextra->pCopyRoundString += *yytext;
3636 if (--yyextra->roundCount<0)
3637 BEGIN(yyextra->lastRoundContext);
3641 *yyextra->pCopyRoundString += *yytext;
3644 if (yyextra->insidePHP)
3646 yyextra->current->initializer << yytext;
3647 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3648 yyextra->lastStringContext=YY_START;
3649 BEGIN(CopyPHPString);
3653 *yyextra->pCopyRoundString += yytext;
3656<CopyRound>{CHARLIT} {
3657 if (yyextra->insidePHP)
3663 *yyextra->pCopyRoundString+=yytext;
3666<CopyRound>[^"'()\n,]+ {
3667 *yyextra->pCopyRoundString+=yytext;
3670 *yyextra->pCopyRoundString+=*yytext;
3675 *yyextra->pCopySharpString += *yytext;
3676 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3677 yyextra->lastStringContext=YY_START;
3681 *yyextra->pCopySharpString += *yytext;
3682 yyextra->sharpCount++;
3685 *yyextra->pCopySharpString += *yytext;
3686 if (--yyextra->sharpCount<0)
3688 BEGIN(yyextra->lastSharpContext);
3693 *yyextra->pCopySharpString += *yytext;
3696 if (yyextra->insidePHP)
3698 yyextra->current->initializer << yytext;
3699 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3700 yyextra->lastStringContext=YY_START;
3701 BEGIN(CopyPHPString);
3705 *yyextra->pCopySharpString += yytext;
3708<CopySharp>{CHARLIT} {
3709 if (yyextra->insidePHP)
3715 *yyextra->pCopySharpString+=yytext;
3718<CopySharp>[^"'<>\n,]+ {
3719 *yyextra->pCopySharpString+=yytext;
3722 *yyextra->pCopySharpString+=*yytext;
3728 *yyextra->pCopyRoundGString << *yytext;
3729 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3730 yyextra->lastStringContext=YY_START;
3734 *yyextra->pCopyRoundGString << *yytext;
3735 yyextra->roundCount++;
3738 *yyextra->pCopyRoundGString << *yytext;
3739 if (--yyextra->roundCount<0)
3740 BEGIN(yyextra->lastRoundContext);
3744 *yyextra->pCopyRoundGString << *yytext;
3747 if (yyextra->insidePHP)
3749 yyextra->current->initializer << yytext;
3750 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3751 yyextra->lastStringContext=YY_START;
3752 BEGIN(CopyPHPGString);
3756 *yyextra->pCopyRoundGString << yytext;
3759<GCopyRound>{CHARLIT} {
3760 if (yyextra->insidePHP)
3766 *yyextra->pCopyRoundGString << yytext;
3770 if (!yyextra->insideCS) REJECT;
3771 *yyextra->pCopyRoundGString << yytext;
3772 yyextra->lastSkipVerbStringContext=YY_START;
3773 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3774 BEGIN(SkipVerbString);
3776<GCopyRound>[^"'()\n\/,R]+ {
3777 *yyextra->pCopyRoundGString << yytext;
3779<GCopyRound>{RAWBEGIN} {
3780 *yyextra->pCopyRoundGString << yytext;
3782 yyextra->lastRawStringContext = YY_START;
3783 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3787 *yyextra->pCopyRoundGString << *yytext;
3792 *yyextra->pCopySquareGString << *yytext;
3793 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3794 yyextra->lastStringContext=YY_START;
3798 *yyextra->pCopySquareGString << *yytext;
3799 if (yyextra->insidePHP)
3801 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3802 yyextra->lastStringContext=YY_START;
3803 BEGIN(CopyPHPGString);
3807 *yyextra->pCopySquareGString << *yytext;
3808 yyextra->squareCount++;
3811 *yyextra->pCopySquareGString << *yytext;
3812 if (--yyextra->squareCount<0)
3813 BEGIN(yyextra->lastSquareContext);
3817 *yyextra->pCopySquareGString << *yytext;
3820 if (yyextra->insidePHP)
3822 yyextra->current->initializer << yytext;
3823 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3824 yyextra->lastStringContext=YY_START;
3825 BEGIN(CopyPHPGString);
3829 *yyextra->pCopySquareGString << yytext;
3832<GCopySquare>{CHARLIT} {
3833 if (yyextra->insidePHP)
3839 *yyextra->pCopySquareGString << yytext;
3842<GCopySquare>[^"'\[\]\n\/,]+ {
3843 *yyextra->pCopySquareGString << yytext;
3846 *yyextra->pCopySquareGString << *yytext;
3851 *yyextra->pCopyCurlyString += *yytext;
3852 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3853 yyextra->lastStringContext=YY_START;
3854 yyextra->keepComment=
false;
3858 *yyextra->pCopyCurlyString += *yytext;
3859 if (yyextra->insidePHP)
3861 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3862 yyextra->lastStringContext=YY_START;
3863 yyextra->keepComment=
false;
3864 BEGIN(CopyPHPString);
3868 *yyextra->pCopyCurlyString += *yytext;
3869 yyextra->curlyCount++;
3872 *yyextra->pCopyCurlyString += *yytext;
3873 if (--yyextra->curlyCount<0)
3875 yyextra->keepComment=
false;
3876 BEGIN(yyextra->lastCurlyContext);
3879<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3885 *yyextra->pCopyCurlyString += yytext;
3888<CopyCurly>[^"'{}\/\n,]+ {
3889 *yyextra->pCopyCurlyString += yytext;
3891<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3894 *yyextra->pCopyCurlyString += *yytext;
3897 *yyextra->pCopyCurlyString += *yytext;
3899<CopyCurly>{CPPC}[^\n]* {
3900 if (yyextra->keepComment)
3902 *yyextra->pCopyCurlyString += yytext;
3910 if (yyextra->keepComment)
3912 *yyextra->pCopyCurlyString += yytext;
3921 *yyextra->pCopyCurlyString += yytext;
3926 *yyextra->pCopyCurlyString += *yytext;
3929 *yyextra->pCopyCurlyString += *yytext;
3931<CopyComment><<EOF>> {
3932 warn(yyextra->fileName,yyextra->yyLineNr,
3933 "reached end of file while inside a C style comment block!");
3938<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3940<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3942 int s = line.
find(
' ');
3943 int e = line.
find(
'"',s);
3944 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3945 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3952 *yyextra->pCopyCurlyGString << *yytext;
3953 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3954 yyextra->lastStringContext=YY_START;
3955 yyextra->keepComment =
false;
3959 *yyextra->pCopyCurlyGString << *yytext;
3960 if (yyextra->insidePHP)
3962 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3963 yyextra->lastStringContext=YY_START;
3964 yyextra->keepComment =
false;
3965 BEGIN(CopyPHPGString);
3969 *yyextra->pCopyCurlyGString << *yytext;
3970 yyextra->curlyCount++;
3973 *yyextra->pCopyCurlyGString << *yytext;
3974 if (--yyextra->curlyCount<0)
3976 yyextra->current->endBodyLine = yyextra->yyLineNr;
3977 yyextra->keepComment =
false;
3978 BEGIN(yyextra->lastCurlyContext);
3981<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3987 *yyextra->pCopyCurlyGString << yytext;
3990<GCopyCurly>[^"'{}\/\n,]+ {
3991 *yyextra->pCopyCurlyGString << yytext;
3994 *yyextra->pCopyCurlyGString << yytext;
3996<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3999 *yyextra->pCopyCurlyGString << *yytext;
4002 *yyextra->pCopyCurlyGString << *yytext;
4004<GCopyCurly>{CPPC}[^\n]* {
4005 if (yyextra->keepComment)
4007 *yyextra->pCopyCurlyGString << yytext;
4015 if (yyextra->keepComment)
4017 *yyextra->pCopyCurlyGString << yytext;
4018 BEGIN(GCopyComment);
4025<GCopyComment>{CCE} {
4026 *yyextra->pCopyCurlyGString << yytext;
4031 *yyextra->pCopyCurlyGString << *yytext;
4034 *yyextra->pCopyCurlyGString << *yytext;
4036<GCopyComment><<EOF>> {
4037 warn(yyextra->fileName,yyextra->yyLineNr,
4038 "reached end of file while inside a C style comment block!");
4046 if (yyextra->current->type.isEmpty() &&
4047 yyextra->current->name==
"enum")
4049 yyextra->current->section = EntryType::makeEnum();
4050 yyextra->current->name.clear();
4051 yyextra->current->args.clear();
4052 BEGIN(EnumBaseType);
4056 if (yyextra->current->type.isEmpty())
4059 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4062 yyextra->current->bitfields+=
":";
4066 yyextra->current->bitfields+=*yytext;
4069 yyextra->current->args+=*yytext;
4073 yyextra->current->args+=
' ';
4076 QCString oldType = yyextra->current->type;
4077 if (yyextra->current->bodyLine==-1)
4079 yyextra->current->bodyLine = yyextra->yyLineNr;
4080 yyextra->current->bodyColumn = yyextra->yyColNr;
4082 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4084 yyextra->current->type = yyextra->current->type.mid(3);
4086 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4088 yyextra->current->type.prepend(
"typedef ");
4090 bool isStatic = yyextra->current->isStatic;
4091 Protection prot = yyextra->current->protection;
4092 bool isConcept = yyextra->current->section.isConcept();
4093 bool isModule = yyextra->current->section.isModuleDoc();
4096 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4101 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4104 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4106 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4108 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4109 if (yyextra->current->section.isClass())
4113 yyextra->current->section = EntryType::makeVariable() ;
4114 yyextra->current->fileName = yyextra->fileName;
4115 yyextra->current->startLine = yyextra->yyBegLineNr;
4116 yyextra->current->startColumn = yyextra->yyBegColNr;
4117 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4120 if ( *yytext ==
',')
4122 yyextra->current->isStatic = isStatic;
4123 yyextra->current->protection = prot;
4124 yyextra->current->name.clear();
4125 yyextra->current->args.clear();
4126 yyextra->current->brief.clear();
4127 yyextra->current->doc.clear();
4128 yyextra->current->initializer.str(std::string());
4129 yyextra->current->bitfields.clear();
4134 yyextra->mtype = MethodTypes::Method;
4135 yyextra->virt = Specifier::Normal;
4136 yyextra->current->bodyLine = -1;
4137 yyextra->current->bodyColumn = 1;
4138 yyextra->current->groups.clear();
4144 if (yyextra->insideSlice)
4146 yyextra->squareCount=1;
4147 yyextra->lastSquareContext = YY_START;
4148 yyextra->current->metaData +=
"[";
4149 BEGIN( SliceMetadata );
4151 else if (!yyextra->insideCS &&
4152 (yyextra->current->name.isEmpty() ||
4153 yyextra->current->name==
"typedef"
4157 yyextra->squareCount=1;
4158 yyextra->lastSquareContext = YY_START;
4159 yyextra->idlAttr.clear();
4160 yyextra->idlProp.clear();
4161 yyextra->current->mtype = yyextra->mtype;
4164 yyextra->current->mtype == MethodTypes::Property)
4166 yyextra->odlProp =
true;
4167 yyextra->current->spec.setGettable(
true).setSettable(
true);
4170 BEGIN( IDLAttribute );
4172 else if (yyextra->insideCS &&
4173 yyextra->current->name.isEmpty())
4175 yyextra->squareCount=1;
4176 yyextra->lastSquareContext = YY_START;
4179 yyextra->current->args.clear();
4180 BEGIN( SkipSquare );
4184 yyextra->current->args += yytext ;
4185 yyextra->squareCount=1;
4186 yyextra->externLinkage=
FALSE;
4191 yyextra->squareCount++;
4192 yyextra->current->metaData +=
"[";
4194<SliceMetadata>{BN}* {
4197<SliceMetadata>\"[^\"]*\" {
4198 yyextra->current->metaData += yytext;
4201 yyextra->current->metaData += yytext;
4204 yyextra->current->metaData += yytext;
4205 if (--yyextra->squareCount<=0)
4207 BEGIN (yyextra->lastSquareContext);
4211 yyextra->current->type +=
"(";
4212 yyextra->roundCount++;
4214<SliceOptional>[0-9]+ {
4215 yyextra->current->type += yytext;
4218 yyextra->current->type +=
")";
4219 if(--yyextra->roundCount<=0)
4221 BEGIN (yyextra->lastModifierContext);
4226 if (--yyextra->squareCount<=0)
4229 if (yyextra->current->mtype == MethodTypes::Property)
4230 BEGIN( IDLPropName );
4232 BEGIN( yyextra->lastSquareContext );
4235<IDLAttribute>"propput" {
4238 yyextra->current->mtype = MethodTypes::Property;
4240 yyextra->current->spec.setSettable(
true);
4242<IDLAttribute>"propget" {
4245 yyextra->current->mtype = MethodTypes::Property;
4247 yyextra->current->spec.setGettable(
true);
4249<IDLAttribute>"property" {
4250 yyextra->current->spec.setProperty(
true);
4252<IDLAttribute>"attribute" {
4253 yyextra->current->spec.setAttribute(
true);
4255<IDLAttribute>"optional" {
4256 yyextra->current->spec.setOptional(
true);
4258<IDLAttribute>"readonly" {
4261 yyextra->current->spec.setSettable(
false);
4265 yyextra->current->spec.setReadonly(
true);
4268<IDLAttribute>"bound" {
4269 yyextra->current->spec.setBound(
true);
4271<IDLAttribute>"removable" {
4272 yyextra->current->spec.setRemovable(
true);
4274<IDLAttribute>"constrained" {
4275 yyextra->current->spec.setConstrained(
true);
4277<IDLAttribute>"transient" {
4278 yyextra->current->spec.setTransient(
true);
4280<IDLAttribute>"maybevoid" {
4281 yyextra->current->spec.setMaybeVoid(
true);
4283<IDLAttribute>"maybedefault" {
4284 yyextra->current->spec.setMaybeDefault(
true);
4286<IDLAttribute>"maybeambiguous" {
4287 yyextra->current->spec.setMaybeAmbiguous(
true);
4291<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4294 if (yyextra->odlProp)
4296 yyextra->idlProp = yytext;
4299<IDLPropName>{ID}{BN}*"(" {
4300 yyextra->current->name = yytext;
4301 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4302 yyextra->current->startLine = yyextra->yyLineNr;
4303 yyextra->current->startColumn = yyextra->yyColNr;
4306<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4307 if (yyextra->odlProp)
4309 yyextra->idlProp += yytext;
4312<IDLPropName>{ID}{BNopt}/";" {
4313 if (yyextra->odlProp)
4315 yyextra->current->name = yytext;
4316 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4317 yyextra->odlProp =
false;
4322<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4323 yyextra->idlAttr = yytext;
4324 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4327 yyextra->idlProp = yytext;
4329<IDLProp>{BN}*{ID}{BN}*"," {
4330 if (yyextra->current->args.isEmpty())
4331 yyextra->current->args =
"(";
4333 yyextra->current->args +=
", ";
4334 yyextra->current->args += yyextra->idlAttr;
4335 yyextra->current->args +=
" ";
4336 yyextra->current->args += yyextra->idlProp;
4337 yyextra->current->args +=
" ";
4338 yyextra->current->args += yytext;
4339 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4340 yyextra->idlProp.clear();
4341 yyextra->idlAttr.clear();
4344<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4348 yyextra->current->fileName = yyextra->fileName;
4349 yyextra->current->type = yyextra->idlProp;
4350 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4351 if (!yyextra->current->args.isEmpty())
4352 yyextra->current->args +=
")";
4353 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4354 yyextra->current->section = EntryType::makeVariable();
4355 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4357 BEGIN( FindMembers );
4362<Array>"]" { yyextra->current->args += *yytext ;
4363 if (--yyextra->squareCount<=0)
4364 BEGIN( FindMembers ) ;
4366<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4367 if (--yyextra->squareCount<=0)
4368 BEGIN( SFunction ) ;
4370<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4371 yyextra->squareCount++;
4373<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4374<SkipSquare>"[" { yyextra->squareCount++; }
4376 if (--yyextra->squareCount<=0)
4377 BEGIN( yyextra->lastSquareContext );
4380 yyextra->lastStringContext=YY_START;
4381 BEGIN( SkipString );
4383<SkipSquare>[^\n\[\]\"]+
4384<FindMembers>"<" {
addType(yyscanner);
4385 yyextra->current->type += yytext ;
4388<Sharp>">" { yyextra->current->type += *yytext ;
4389 if (--yyextra->sharpCount<=0)
4390 BEGIN( FindMembers ) ;
4392<Sharp>"<" { yyextra->current->type += *yytext ;
4393 yyextra->sharpCount++;
4396 yyextra->current->type +=
' ';
4399<Sharp>. { yyextra->current->type += *yytext ; }
4402 yyextra->current->bodyLine = yyextra->yyLineNr;
4403 yyextra->current->bodyColumn = yyextra->yyColNr;
4404 yyextra->current->name = yytext;
4409 yyextra->lastInitializerContext = YY_START;
4410 yyextra->sharpCount=0;
4411 yyextra->initBracketCount=0;
4412 yyextra->current->initializer.str(
"=");
4413 BEGIN(ReadInitializer);
4416 yyextra->lastInitializerContext = YY_START;
4417 yyextra->sharpCount=0;
4418 yyextra->initBracketCount=0;
4419 yyextra->current->initializer.str(yytext);
4420 BEGIN(ReadInitializer);
4423 if (yyextra->insideJava)
4425 if (!yyextra->current->name.isEmpty())
4427 yyextra->current->fileName = yyextra->fileName;
4428 yyextra->current->startLine = yyextra->yyLineNr;
4429 yyextra->current->startColumn = yyextra->yyColNr;
4430 if (!yyextra->current_root->spec.isEnum())
4432 yyextra->current->type =
"@";
4434 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4435 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4436 yyextra->current->section = EntryType::makeVariable();
4437 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4441 BEGIN( FindMembers );
4452 if (!yyextra->current->name.isEmpty())
4454 yyextra->current->fileName = yyextra->fileName;
4455 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4457 yyextra->current->startLine = yyextra->current->bodyLine;
4458 yyextra->current->startColumn = yyextra->current->bodyColumn;
4462 yyextra->current->startLine = yyextra->yyLineNr;
4463 yyextra->current->startColumn = yyextra->yyColNr;
4465 if (!yyextra->current_root->spec.isEnum())
4467 yyextra->current->type =
"@";
4469 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4470 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4471 yyextra->current->section = EntryType::makeVariable();
4473 if (!yyextra->insideCS && !yyextra->insideJava &&
4474 !yyextra->current_root->spec.isStrong())
4481 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4483 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4488 yyextra->current->reset();
4493 yyextra->squareCount=1;
4494 yyextra->lastSquareContext = YY_START;
4497<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4498<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4499<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4502 yyextra->current->program << yytext ;
4505<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4506 yyextra->current->program << yytext ;
4507 yyextra->pSkipInterpString = &yyextra->current->program;
4508 yyextra->lastSkipInterpStringContext=YY_START;
4509 yyextra->strCurlyCount = 0;
4510 BEGIN( SkipInterpString );
4512<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})* {
4513 *yyextra->pSkipInterpString << yytext;
4515<SkipInterpString>"{" {
4516 *yyextra->pSkipInterpString << *yytext;
4517 yyextra->strCurlyCount++;
4519<SkipInterpString>"}" {
4520 *yyextra->pSkipInterpString << *yytext;
4521 yyextra->strCurlyCount--;
4523<SkipInterpString>\" {
4524 *yyextra->pSkipInterpString << *yytext;
4525 if (yyextra->strCurlyCount==0)
4527 BEGIN( yyextra->lastSkipInterpStringContext );
4530<SkipInterpString>. {
4531 *yyextra->pSkipInterpString << *yytext;
4534<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4535 yyextra->current->program << yytext ;
4536 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4537 yyextra->lastSkipInterpVerbStringContext=YY_START;
4538 yyextra->strCurlyCount = 0;
4539 BEGIN( SkipInterpVerbString );
4541<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4542 *yyextra->pSkipInterpVerbString << yytext;
4544<SkipInterpVerbString>"{" {
4545 *yyextra->pSkipInterpVerbString << *yytext;
4546 yyextra->strCurlyCount++;
4548<SkipInterpVerbString>"}" {
4549 *yyextra->pSkipInterpVerbString << *yytext;
4550 yyextra->strCurlyCount--;
4552<SkipInterpVerbString>\" {
4553 *yyextra->pSkipInterpVerbString << *yytext;
4554 if (yyextra->strCurlyCount==0)
4556 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4559<SkipInterpVerbString>. {
4560 *yyextra->pSkipInterpVerbString << *yytext;
4562<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4563<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4564 yyextra->pSkipVerbString = &yyextra->current->program;
4565 yyextra->lastSkipVerbStringContext=YY_START;
4566 BEGIN( SkipVerbString );
4568<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4570 yyextra->current->program << yytext ;
4571 yyextra->pCopyHereDocGString = &yyextra->current->program;
4572 yyextra->lastHereDocContext=YY_START;
4573 BEGIN( CopyHereDoc );
4580<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4581 yyextra->current->program << yytext;
4583 yyextra->lastRawStringContext = YY_START;
4584 yyextra->pCopyRawGString = &yyextra->current->program;
4587<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4588 yyextra->pCopyQuotedGString = &yyextra->current->program;
4589 yyextra->lastStringContext=YY_START;
4590 yyextra->stopAtInvalidString=
false;
4591 BEGIN( CopyGString );
4593<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4594<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4595 yyextra->lastContext = YY_START ;
4598<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4599 ++yyextra->yyLineNr ;
4600 yyextra->lastContext = YY_START ;
4603<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4604 if (!yyextra->insidePHP)
4606 yyextra->current->program << yytext;
4610 yyextra->current->program << yytext;
4611 yyextra->pCopyQuotedGString = &yyextra->current->program;
4612 yyextra->lastStringContext=YY_START;
4613 BEGIN(CopyPHPGString);
4616<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4617 if (yyextra->insidePHP)
4624 yyextra->current->program << yytext;
4627<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4628 ++yyextra->curlyCount ;
4631 yyextra->current->program << yytext ;
4632 --yyextra->curlyCount ;
4634<ReadBody,ReadNSBody>"}" {
4635 if ( yyextra->curlyCount>0 )
4637 yyextra->current->program << yytext ;
4638 --yyextra->curlyCount ;
4642 yyextra->current->endBodyLine = yyextra->yyLineNr;
4643 std::shared_ptr<Entry> original_root = yyextra->current_root;
4644 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4649 QCString doc = yyextra->current->doc;
4650 int docLine = yyextra->current->docLine;
4651 QCString docFile = yyextra->current->docFile;
4652 QCString brief = yyextra->current->brief;
4653 int briefLine = yyextra->current->briefLine;
4654 QCString briefFile = yyextra->current->briefFile;
4655 auto groups = yyextra->current->groups;
4656 auto anchors = yyextra->current->anchors;
4657 auto sli = yyextra->current->sli;
4658 auto rqli = yyextra->current->rqli;
4660 yyextra->current->doc =
"";
4661 yyextra->current->docLine = 0;
4662 yyextra->current->docFile =
"";
4663 yyextra->current->brief =
"";
4664 yyextra->current->briefLine = 0;
4665 yyextra->current->briefFile =
"";
4666 yyextra->current->groups.
clear();
4667 yyextra->current->anchors.clear();
4668 yyextra->current->sli.clear();
4669 yyextra->current->rqli.clear();
4670 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4672 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4673 yyextra->current->program.str(std::string());
4674 new_current->name = yyextra->current->name.mid(split_point + 2);
4675 yyextra->current->name = yyextra->current->name.left(split_point);
4676 if (yyextra->current->name.startsWith(
"inline "))
4678 yyextra->current->name = yyextra->current->name.mid(7);
4679 yyextra->current->spec.setInline(
true);
4681 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4683 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4684 yyextra->current_root = yyextra->current;
4685 yyextra->current = new_current;
4688 yyextra->current->doc = doc;
4689 yyextra->current->docLine = docLine;
4690 yyextra->current->docFile = docFile;
4691 yyextra->current->brief = brief;
4692 yyextra->current->briefLine = briefLine;
4693 yyextra->current->briefFile = briefFile;
4694 yyextra->current->groups = groups;
4695 yyextra->current->anchors = anchors;
4696 yyextra->current->sli = sli;
4697 yyextra->current->rqli = rqli;
4699 QCString &cn = yyextra->current->name;
4703 yyextra->current->spec.setInline(
true);
4705 QCString rn = yyextra->current_root->name;
4711 if (yyextra->isTypedef && cn.
isEmpty())
4714 BEGIN( TypedefName );
4718 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4720 yyextra->current->program <<
',';
4725 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4726 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4728 if (yyextra->insideObjC &&
4729 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4732 BEGIN( ReadBodyIntf ) ;
4736 yyextra->memspecEntry = yyextra->current;
4737 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4738 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4739 if (yyextra->current->section.isNamespace() ||
4740 yyextra->current->spec.isInterface() ||
4741 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4742 yyextra->insideSlice
4745 yyextra->current->reset();
4746 yyextra->current_root = std::move(original_root);
4748 yyextra->memspecEntry.reset();
4749 BEGIN( FindMembers ) ;
4754 yyextra->current->doc.clear();
4755 yyextra->current->brief.clear();
4756 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4762<ReadBody>"}"{BN}+"typedef"{BN}+ {
4764 if ( yyextra->curlyCount>0 )
4766 yyextra->current->program << yytext ;
4767 --yyextra->curlyCount ;
4771 yyextra->isTypedef =
TRUE;
4772 yyextra->current->endBodyLine = yyextra->yyLineNr;
4773 QCString &cn = yyextra->current->name;
4774 QCString rn = yyextra->current_root->name;
4779 BEGIN( TypedefName );
4782<TypedefName>("const"|"volatile"){BN} {
4784 yyextra->current->type.prepend(yytext);
4787 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4789 yyextra->current->program <<
",";
4791 yyextra->current->name=yytext;
4793 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4794 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4796 if (!yyextra->firstTypedefEntry)
4798 yyextra->firstTypedefEntry = yyextra->current;
4800 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4802 yyextra->isTypedef=
TRUE;
4803 BEGIN(MemberSpecSkip);
4807 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4809 yyextra->current->program <<
',';
4812 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4813 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4814 yyextra->memspecEntry = yyextra->current;
4815 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4818 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4820<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4822 int i=0,l=(int)yyleng,j;
4823 while (i<l && (!
isId(yytext[i]))) i++;
4825 j=yyextra->msName.
find(
"[");
4828 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4829 yyextra->msName=yyextra->msName.left(j);
4834 if (yyextra->firstTypedefEntry)
4836 if (yyextra->firstTypedefEntry->spec.isStruct())
4838 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4840 else if (yyextra->firstTypedefEntry->spec.isUnion())
4842 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4844 else if (yyextra->firstTypedefEntry->section.isEnum())
4846 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4850 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4856 yyextra->current->name = yyextra->msName;
4863 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4869 const Entry *p=yyextra->current.get();
4877 int pi = (i==-1) ? 0 : i+2;
4887 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4891 if (!yyextra->msName.isEmpty()
4897 if (typedefHidesStruct &&
4898 yyextra->isTypedef &&
4899 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4900 yyextra->msType.stripWhiteSpace().isEmpty() &&
4901 yyextra->memspecEntry)
4903 yyextra->memspecEntry->name=yyextra->msName;
4907 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4908 varEntry->lang = yyextra->language;
4909 varEntry->protection = yyextra->current->protection ;
4910 varEntry->mtype = yyextra->current->mtype;
4911 varEntry->virt = yyextra->current->virt;
4912 varEntry->isStatic = yyextra->current->isStatic;
4913 varEntry->section = EntryType::makeVariable();
4914 varEntry->name = yyextra->msName.stripWhiteSpace();
4915 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4916 varEntry->args = yyextra->msArgs;
4917 if (yyextra->isTypedef)
4919 varEntry->type.prepend(
"typedef ");
4922 if (typedefHidesStruct &&
4923 yyextra->isTypedef &&
4924 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4925 yyextra->memspecEntry
4928 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4932 varEntry->type+=yyextra->current->name+yyextra->msType;
4934 varEntry->fileName = yyextra->fileName;
4935 varEntry->startLine = yyextra->yyLineNr;
4936 varEntry->startColumn = yyextra->yyColNr;
4937 varEntry->doc = yyextra->current->doc;
4938 varEntry->brief = yyextra->current->brief;
4939 varEntry->mGrpId = yyextra->current->mGrpId;
4940 varEntry->initializer.str(yyextra->current->initializer.str());
4941 varEntry->groups = yyextra->current->groups;
4942 varEntry->sli = yyextra->current->sli;
4947 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4952 if (!yyextra->isTypedef && yyextra->msName.isEmpty() &&
4953 yyextra->memspecEntry && yyextra->current->section.isCompound())
4955 if (!yyextra->current->doc.isEmpty())
4957 yyextra->memspecEntry->doc += yyextra->current->doc;
4959 if (!yyextra->current->brief.isEmpty())
4961 yyextra->memspecEntry->brief += yyextra->current->brief;
4964 yyextra->msType.clear();
4965 yyextra->msName.clear();
4966 yyextra->msArgs.clear();
4967 yyextra->isTypedef=
FALSE;
4968 yyextra->firstTypedefEntry.reset();
4969 yyextra->memspecEntry.reset();
4970 yyextra->current->reset();
4972 BEGIN( FindMembers );
4976 yyextra->current->doc.clear();
4977 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
4982 yyextra->lastInitializerContext=YY_START;
4983 yyextra->sharpCount=0;
4984 yyextra->initBracketCount=0;
4985 yyextra->current->initializer.str(yytext);
4986 BEGIN(ReadInitializer);
4997<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4998<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4999<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5002<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5003 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5005 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5006 yyextra->insideObjC=
FALSE;
5007 BEGIN( FindMembers );
5009<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5010<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5012<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5013<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5014 if (yyextra->insidePHP)
5020 yyextra->current->bodyLine = yyextra->yyLineNr;
5021 yyextra->current->bodyColumn = yyextra->yyColNr;
5024 yyextra->funcPtrType=yytext;
5025 yyextra->roundCount=0;
5030<FuncPtr>{SCOPENAME} {
5031 yyextra->current->name = yytext;
5034 BEGIN( FuncPtrOperator );
5038 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5040 yyextra->funcPtrType += yyextra->current->name;
5044 BEGIN( EndFuncPtr );
5051<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5052 yyextra->current->name += yytext;
5053 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5056<FuncPtrOperator>\n {
5058 yyextra->current->name += *yytext;
5060<FuncPtrOperator>"(" {
5062 BEGIN( EndFuncPtr );
5065 yyextra->current->name += *yytext;
5067<EndFuncPtr>")"{BNopt}/";" {
5069 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5072<EndFuncPtr>")"{BNopt}/"(" {
5074 if (yyextra->funcPtrType!=
"(")
5076 yyextra->current->type+=yyextra->funcPtrType+
")";
5080<EndFuncPtr>")"{BNopt}/"[" {
5082 yyextra->current->type+=yyextra->funcPtrType;
5083 yyextra->current->args +=
")";
5088 yyextra->current->args += *yytext ;
5091 yyextra->current->bodyLine = yyextra->yyLineNr;
5092 yyextra->current->bodyColumn = yyextra->yyColNr;
5093 yyextra->currentArgumentContext = FuncFuncEnd;
5094 yyextra->fullArgString=yyextra->current->args;
5095 yyextra->copyArgString=&yyextra->current->args;
5096 BEGIN( ReadFuncArgType ) ;
5098<EndFuncPtr>"["[^\n\]]*"]" {
5099 yyextra->funcPtrType+=yytext;
5105 yyextra->current->args += *yytext ;
5106 ++yyextra->roundCount;
5109 yyextra->current->args += *yytext ;
5110 if ( yyextra->roundCount )
5111 --yyextra->roundCount;
5117<FuncFuncEnd>")"{BN}*"(" {
5119 yyextra->current->type+=yyextra->funcPtrType+
")(";
5120 BEGIN(FuncFuncType);
5122<FuncFuncEnd>")"{BNopt}/[;{] {
5124 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5127<FuncFuncEnd>")"{BNopt}/"[" {
5129 yyextra->current->type+=yyextra->funcPtrType;
5130 yyextra->current->args+=
")";
5131 BEGIN(FuncFuncArray);
5134 yyextra->current->args += *yytext;
5137 yyextra->current->type += *yytext;
5138 yyextra->roundCount++;
5141 yyextra->current->type += *yytext;
5142 if (yyextra->roundCount)
5143 --yyextra->roundCount;
5147<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5148<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5150 yyextra->current->type += *yytext;
5152<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5153 if (yyextra->current->type.startsWith(
"typedef") &&
5154 yyextra->current->bodyLine==-1)
5157 yyextra->current->bodyLine = yyextra->yyLineNr;
5158 yyextra->current->bodyColumn = yyextra->yyColNr;
5159 BEGIN( GetCallType );
5161 else if (!yyextra->current->name.isEmpty())
5163 yyextra->current->args = yytext;
5164 yyextra->current->bodyLine = yyextra->yyLineNr;
5165 yyextra->current->bodyColumn = yyextra->yyColNr;
5166 yyextra->currentArgumentContext = FuncQual;
5167 yyextra->fullArgString=yyextra->current->args;
5168 yyextra->copyArgString=&yyextra->current->args;
5169 BEGIN( ReadFuncArgType ) ;
5173<GetCallType>{BN}*{ID}{BN}*"*" {
5176 yyextra->funcPtrType=
"(";
5177 yyextra->funcPtrType+=yytext;
5178 yyextra->roundCount=0;
5182 if (!yyextra->current->name.isEmpty())
5184 yyextra->current->args = yytext;
5185 yyextra->current->bodyLine = yyextra->yyLineNr;
5186 yyextra->current->bodyColumn = yyextra->yyColNr;
5187 yyextra->currentArgumentContext = FuncQual;
5188 yyextra->fullArgString=yyextra->current->args;
5189 yyextra->copyArgString=&yyextra->current->args;
5190 BEGIN( ReadFuncArgType ) ;
5197<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5198 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5199 else yyextra->fullArgString+=yytext;
5201<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5202 yyextra->fullArgString+=yytext;
5204<CopyArgRound>[^\/\n\)\(\"\']+ {
5205 *yyextra->copyArgString+=yytext;
5206 yyextra->fullArgString+=yytext;
5208<CopyArgSquare>[^\/\n\]\[\"\']+ {
5209 *yyextra->copyArgString+=yytext;
5210 yyextra->fullArgString+=yytext;
5212<ReadFuncArgType,ReadTempArgs>{BN}* {
5213 *yyextra->copyArgString+=
" ";
5214 yyextra->fullArgString+=
" ";
5217<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5219 yyextra->lastRawStringContext = YY_START;
5220 yyextra->pCopyRawString = yyextra->copyArgString;
5221 *yyextra->pCopyRawString+=yytext;
5222 yyextra->fullArgString+=yytext;
5225<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5226 *yyextra->copyArgString+=*yytext;
5227 yyextra->fullArgString+=*yytext;
5228 yyextra->lastCopyArgStringContext = YY_START;
5229 BEGIN( CopyArgString );
5231<ReadFuncArgType>"[" {
5232 if (!yyextra->insidePHP) REJECT;
5233 *yyextra->copyArgString+=*yytext;
5234 yyextra->fullArgString+=*yytext;
5235 yyextra->argSquareCount=0;
5236 yyextra->lastCopyArgContext = YY_START;
5237 BEGIN( CopyArgSquare );
5239<ReadFuncArgType,ReadTempArgs>"(" {
5240 *yyextra->copyArgString+=*yytext;
5241 yyextra->fullArgString+=*yytext;
5242 yyextra->argRoundCount=0;
5243 yyextra->lastCopyArgContext = YY_START;
5244 BEGIN( CopyArgRound );
5246<ReadFuncArgType>")" {
5247 *yyextra->copyArgString+=*yytext;
5248 yyextra->fullArgString+=*yytext;
5250 if (yyextra->insideJS)
5261 yyextra->docBackup = yyextra->current->doc;
5262 yyextra->briefBackup = yyextra->current->brief;
5264 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5267<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5268 if (yyextra->currentArgumentContext==DefineEnd)
5272 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5278 BEGIN( yyextra->currentArgumentContext );
5284 yyextra->fullArgString+=yytext;
5285 yyextra->lastCopyArgChar=0;
5286 yyextra->lastCommentInArgContext=YY_START;
5288 BEGIN( CopyArgCommentLine );
5290 BEGIN( CopyArgComment );
5294<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5295<ReadFuncArgType,ReadTempArgs>{CCS} {
5296 yyextra->lastCContext = YY_START;
5297 BEGIN( SkipComment );
5299<ReadFuncArgType,ReadTempArgs>{CPPC} {
5300 yyextra->lastCContext = YY_START;
5301 BEGIN( SkipCxxComment );
5317<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5319 if (yyextra->currentArgumentContext==DefineEnd)
5323 int i;
for (i=(
int)yyleng-1;i>0;i--)
5327 *yyextra->copyArgString+=*yytext;
5328 yyextra->fullArgString+=*yytext;
5331 BEGIN( yyextra->currentArgumentContext );
5337 yyextra->lastCopyArgChar=*yytext;
5340 yyextra->lastCommentInArgContext=YY_START;
5341 yyextra->fullArgString+=text;
5342 if (text.
find(
"//")!=-1)
5343 BEGIN( CopyArgCommentLine );
5345 BEGIN( CopyArgComment );
5348<CopyArgComment>^{B}*"*"+/{BN}+
5349<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5350<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5351 if (yyextra->lastCopyArgChar!=0)
5352 unput(yyextra->lastCopyArgChar);
5353 BEGIN( yyextra->lastCommentInArgContext );
5355<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5357 if (yyextra->lastCopyArgChar!=0)
5358 unput(yyextra->lastCopyArgChar);
5359 BEGIN( yyextra->lastCommentInArgContext );
5361<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5362 yyextra->docBlockName=
"uml";
5363 yyextra->fullArgString+=yytext;
5364 BEGIN(CopyArgVerbatim);
5366<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5367 yyextra->docBlockName=&yytext[1];
5368 yyextra->fullArgString+=yytext;
5369 BEGIN(CopyArgVerbatim);
5371<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5372 yyextra->docBlockName=&yytext[1];
5373 if (yyextra->docBlockName.at(1)==
'[')
5375 yyextra->docBlockName.at(1)=
']';
5377 if (yyextra->docBlockName.at(1)==
'{')
5379 yyextra->docBlockName.at(1)=
'}';
5381 if (yyextra->docBlockName.at(1)==
'(')
5383 yyextra->docBlockName.at(1)=
')';
5385 yyextra->fullArgString+=yytext;
5386 BEGIN(CopyArgVerbatim);
5388<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5389 yyextra->fullArgString+=yytext;
5390 if (&yytext[4]==yyextra->docBlockName)
5392 yyextra->docBlockName=
"";
5393 BEGIN(CopyArgCommentLine);
5396<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5397 yyextra->fullArgString+=yytext;
5398 if (yyextra->docBlockName==&yytext[1])
5400 yyextra->docBlockName=
"";
5401 BEGIN(CopyArgCommentLine);
5404<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5405<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5406<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5407<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5408<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5409 warn(yyextra->fileName,yyextra->yyLineNr,
5410 "Ignoring {:c}brief command inside argument documentation",*yytext
5412 yyextra->fullArgString+=
' ';
5415 *yyextra->copyArgString+=*yytext;
5416 yyextra->fullArgString+=*yytext;
5417 yyextra->argSharpCount=1;
5418 BEGIN( CopyArgSharp );
5421 *yyextra->copyArgString+=*yytext;
5422 yyextra->fullArgString+=*yytext;
5424 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5426 BEGIN( yyextra->currentArgumentContext );
5429 yyextra->argRoundCount++;
5430 *yyextra->copyArgString+=*yytext;
5431 yyextra->fullArgString+=*yytext;
5434 *yyextra->copyArgString+=*yytext;
5435 yyextra->fullArgString+=*yytext;
5436 if (yyextra->argRoundCount>0)
5437 yyextra->argRoundCount--;
5439 BEGIN( yyextra->lastCopyArgContext );
5442 yyextra->argSquareCount++;
5443 *yyextra->copyArgString+=*yytext;
5444 yyextra->fullArgString+=*yytext;
5447 *yyextra->copyArgString+=*yytext;
5448 yyextra->fullArgString+=*yytext;
5449 if (yyextra->argSquareCount>0)
5450 yyextra->argSquareCount--;
5452 BEGIN( yyextra->lastCopyArgContext );
5455 *yyextra->copyArgString+=*yytext;
5456 yyextra->fullArgString+=*yytext;
5457 yyextra->argRoundCount=0;
5458 yyextra->lastCopyArgContext = YY_START;
5459 BEGIN( CopyArgRound );
5462 yyextra->argSharpCount++;
5464 *yyextra->copyArgString+=*yytext;
5465 yyextra->fullArgString+=*yytext;
5468 *yyextra->copyArgString+=*yytext;
5469 yyextra->fullArgString+=*yytext;
5470 yyextra->argSharpCount--;
5471 if (yyextra->argSharpCount>0)
5477 BEGIN( ReadTempArgs );
5481<CopyArgString,CopyArgPHPString>\\. {
5482 *yyextra->copyArgString+=yytext;
5483 yyextra->fullArgString+=yytext;
5486 *yyextra->copyArgString+=*yytext;
5487 yyextra->fullArgString+=*yytext;
5488 BEGIN( yyextra->lastCopyArgStringContext );
5490<CopyArgPHPString>\' {
5491 *yyextra->copyArgString+=*yytext;
5492 yyextra->fullArgString+=*yytext;
5493 BEGIN( yyextra->lastCopyArgStringContext );
5495<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5496 if (yyextra->insidePHP)
5502 *yyextra->copyArgString+=yytext;
5503 yyextra->fullArgString+=yytext;
5506<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5507 *yyextra->copyArgString+=yytext;
5508 yyextra->fullArgString+=yytext;
5509 if (yyextra->insidePHP)
5511 yyextra->lastCopyArgStringContext=YY_START;
5512 BEGIN(CopyArgPHPString);
5515<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5516 *yyextra->copyArgString+=yytext;
5517 yyextra->fullArgString+=yytext;
5519<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5521 *yyextra->copyArgString+=*yytext;
5522 yyextra->fullArgString+=*yytext;
5524<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5525 *yyextra->copyArgString+=yytext;
5526 yyextra->fullArgString+=yytext;
5528<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5529 *yyextra->copyArgString+=*yytext;
5530 yyextra->fullArgString+=*yytext;
5538<FuncRound>"(" { yyextra->current->args += *yytext ;
5539 ++yyextra->roundCount ;
5541<FuncRound>")" { yyextra->current->args += *yytext ;
5542 if ( yyextra->roundCount )
5543 --yyextra->roundCount ;
5555 if (
qstrcmp(yytext,
";")==0 &&
5556 ((yyextra->insideJS || yyextra->insidePHP) &&
5559 yyextra->current->reset();
5561 BEGIN( FindMembers );
5565 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5568<FuncQual>{BN}*"abstract"{BN}* {
5570 yyextra->current->virt = Specifier::Pure;
5571 yyextra->current->args +=
" override ";
5573<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5575 yyextra->current->spec.setOverride(
true);
5576 yyextra->current->args +=
" override ";
5577 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5580<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5582 yyextra->current->spec.setFinal(
true);
5583 yyextra->current->args +=
" final ";
5584 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5587<FuncQual>{BN}*"sealed"{BN}* {
5589 yyextra->current->spec.setSealed(
true);
5590 yyextra->current->args +=
" sealed ";
5592<FuncQual>{BN}*"new"{BN}* {
5594 yyextra->current->spec.setNew(
true);
5595 yyextra->current->args +=
" new ";
5597<FuncQual>{BN}*"const"{BN}* {
5599 yyextra->current->args +=
" const ";
5600 yyextra->current->argList.setConstSpecifier(
TRUE);
5602<FuncQual>{BN}*"volatile"{BN}* {
5604 yyextra->current->args +=
" volatile ";
5605 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5607<FuncQual>{BN}*"noexcept"{BN}* {
5609 yyextra->current->args +=
" noexcept ";
5610 yyextra->current->spec.setNoExcept(
true);
5612<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5614 yyextra->current->args +=
" noexcept(false)";
5616<FuncQual>{BN}*"noexcept"{BN}*"(" {
5618 yyextra->current->args +=
" noexcept(";
5619 yyextra->current->spec.setNoExcept(
true);
5620 yyextra->lastRoundContext=FuncQual;
5621 yyextra->pCopyRoundString=&yyextra->current->args;
5622 yyextra->roundCount=0;
5626 yyextra->current->args +=
" &";
5629<FuncQual>{BN}*"&&" {
5630 yyextra->current->args +=
" &&";
5634<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5636 yyextra->current->args +=
" = 0";
5637 yyextra->current->virt = Specifier::Pure;
5638 yyextra->current->argList.setPureSpecifier(
TRUE);
5639 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5642<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5644 yyextra->current->args +=
" = delete";
5645 yyextra->current->spec.setDelete(
true);
5646 yyextra->current->argList.setIsDeleted(
TRUE);
5647 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5650<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5652 yyextra->current->args +=
" = default";
5653 yyextra->current->spec.setDefault(
true);
5654 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5657<FuncQual>{BN}*"->"{BN}* {
5659 yyextra->current->argList.setTrailingReturnType(
" -> ");
5660 yyextra->current->args +=
" -> ";
5661 yyextra->roundCount=0;
5662 BEGIN(TrailingReturn);
5664<TrailingReturn>[{;] {
5665 if (yyextra->roundCount>0) REJECT;
5667 yyextra->current->argList.finishTrailingReturnType();
5670<TrailingReturn>"requires"{BN}+ {
5671 if (yyextra->insideJava) REJECT;
5672 yyextra->requiresContext = FuncQual;
5673 yyextra->current->req+=
' ';
5674 yyextra->current->argList.finishTrailingReturnType();
5675 BEGIN(RequiresClause);
5677<TrailingReturn>"(" {
5678 yyextra->roundCount++;
5679 yyextra->current->argList.appendTrailingReturnType(yytext);
5680 yyextra->current->args+=yytext;
5682<TrailingReturn>")" {
5683 if (yyextra->roundCount>0)
5685 yyextra->roundCount--;
5689 warn(yyextra->fileName,yyextra->yyLineNr,
5690 "Found ')' without opening '(' for trailing return type '{})...'",
5691 yyextra->current->argList.trailingReturnType());
5693 yyextra->current->argList.appendTrailingReturnType(yytext);
5694 yyextra->current->args+=yytext;
5697 yyextra->current->argList.appendTrailingReturnType(yytext);
5698 yyextra->current->args+=yytext;
5702 yyextra->current->argList.appendTrailingReturnType(yytext);
5703 yyextra->current->args+=
' ';
5705<FuncRound,FuncFunc>{BN}*","{BN}* {
5707 yyextra->current->args +=
", " ;
5709<FuncQual,FuncRound,FuncFunc>{BN}+ {
5711 yyextra->current->args +=
' ' ;
5713<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5715 yyextra->lastCPPContext = YY_START;
5719 if (!yyextra->insideCS)
5726 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5733 yyextra->lastInitializerContext=YY_START;
5734 yyextra->sharpCount=0;
5735 yyextra->initBracketCount=0;
5736 yyextra->current->initializer.str(yytext);
5737 BEGIN(ReadInitializer);
5740<ReadExpressionBody>";" {
5741 if (!yyextra->current->sli.empty() && yyextra->previous)
5743 yyextra->previous->sli = yyextra->current->sli;
5744 yyextra->current->sli.clear();
5746 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5761 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5764 yyextra->requiresContext = YY_START;
5765 if (!yyextra->current->req.isEmpty())
5767 yyextra->current->req+=
" && ";
5769 BEGIN(RequiresClause);
5771 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5774 yyextra->current->typeConstr.clear();
5775 yyextra->current->typeConstr.push_back(
Argument());
5776 yyextra->lastCSConstraint = YY_START;
5777 BEGIN( CSConstraintName );
5781 yyextra->current->args = yytext;
5782 yyextra->oldStyleArgType.clear();
5783 BEGIN(OldStyleArgs);
5787 yyextra->current->args += yytext;
5793 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5795 if (yyextra->current->doc!=yyextra->docBackup)
5797 doc=yyextra->current->doc;
5798 yyextra->current->doc=yyextra->docBackup;
5800 if (yyextra->current->brief!=yyextra->briefBackup)
5802 brief=yyextra->current->brief;
5803 yyextra->current->brief=yyextra->briefBackup;
5805 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5806 oldStyleArgName,brief,doc);
5807 yyextra->current->args.clear();
5808 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5810<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5812 if (yyextra->current->argList.empty())
5814 yyextra->current->argList.setNoParameters(
TRUE);
5820<OldStyleArgs>. { yyextra->current->args += *yytext; }
5821<FuncQual,FuncRound,FuncFunc>\" {
5822 if (yyextra->insideIDL && yyextra->insideCppQuote)
5828 yyextra->current->args += *yytext;
5831<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5832<FuncQual>{BN}*"try:" |
5833<FuncQual>{BN}*"try"{BN}+ {
5834 yyextra->insideTryBlock=
TRUE;
5836 if (yytext[yyleng-1]==
':')
5842<FuncQual>{BN}*"throw"{BN}*"(" {
5843 yyextra->current->exception =
" throw (" ;
5844 yyextra->roundCount=0;
5846 BEGIN( ExcpRound ) ;
5848<FuncQual>{BN}*"raises"{BN}*"(" {
5849 yyextra->current->exception =
" raises (" ;
5851 yyextra->roundCount=0;
5852 BEGIN( ExcpRound ) ;
5854<FuncQual>{BN}*"throws"{BN}+ {
5855 yyextra->current->exception =
" throws " ;
5859<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5860 ++yyextra->roundCount ;
5862<ExcpRound>")" { yyextra->current->exception += *yytext ;
5863 if ( yyextra->roundCount )
5864 --yyextra->roundCount ;
5869 yyextra->current->exception += *yytext;
5872 unput(
'{'); BEGIN( FuncQual );
5875 unput(
';'); BEGIN( FuncQual );
5878 yyextra->current->exception +=
' ';
5882 yyextra->current->exception += *yytext;
5884<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5885 yyextra->current->name = yyextra->current->args ;
5886 yyextra->current->args = yytext ;
5887 yyextra->roundCount=0;
5888 BEGIN( FuncRound ) ;
5891 if (!yyextra->insidePHP) BEGIN(SkipInits);
5897 yyextra->current->fileName = yyextra->fileName;
5898 yyextra->current->startLine = yyextra->yyBegLineNr;
5899 yyextra->current->startColumn = yyextra->yyBegColNr;
5900 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5902 std::string type = yyextra->current->type.str();
5906 ti = (int)
match.position();
5910 int di = yyextra->current->type.find(
"decltype(");
5911 if (di!=-1 && di<ti)
5916 int ts=yyextra->current->type.find(
'<');
5917 int te=yyextra->current->type.findRev(
'>');
5920 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5921 bool isFunction = ti==-1 ||
5922 (ts!=-1 && ts<te && ts<ti && ti<te);
5923 bool isVariable = !yyextra->current->type.isEmpty() &&
5924 (!isFunction || startsWithTypedef);
5929 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5934 if (yyextra->isTypedef && !startsWithTypedef)
5936 yyextra->current->type.prepend(
"typedef ");
5938 yyextra->current->section = EntryType::makeVariable() ;
5943 yyextra->current->section = EntryType::makeFunction() ;
5944 yyextra->current->proto = *yytext==
';';
5952 if (yyextra->isTypedef && !startsWithTypedef)
5954 yyextra->current->type.prepend(
"typedef ");
5957 yyextra->current->section = EntryType::makeVariable();
5962 yyextra->current->section = EntryType::makeFunction();
5963 yyextra->current->proto =
TRUE;
5967 if ( yyextra->insidePHP)
5971 yyextra->current->spec.setFinal(
true);
5975 yyextra->current->spec.setAbstract(
true);
5978 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5981 if ( *yytext ==
'{' )
5983 yyextra->lastCurlyContext = FindMembers;
5984 yyextra->curlyCount=0;
5989 BEGIN( FindMembers );
5994 if ( yyextra->insidePHP)
5998 yyextra->previous = yyextra->current;
5999 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6002 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6004 yyextra->current->spec.setOptional(
true).setRequired(
true);
6006 yyextra->lastCurlyContext = FindMembers;
6007 if ( *yytext ==
',' )
6009 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6011 if ( *yytext ==
'{' )
6013 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6015 yyextra->previous->spec.setInline(
true);
6017 yyextra->curlyCount=0;
6018 BEGIN( SkipCurly ) ;
6020 else if ( *yytext ==
'=' )
6022 yyextra->previous->spec.setInline(
true);
6023 yyextra->curlyCount=0;
6024 BEGIN( ReadExpressionBody );
6028 if (!yyextra->previous->section.isVariable())
6029 yyextra->previous->bodyLine=-1;
6030 BEGIN( FindMembers ) ;
Class representing a regular expression.
Object representing the matching results.
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.
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...
6034<SkipInits>">"{BN}*"{" {
6036 yyextra->curlyCount=1;
6037 BEGIN(SkipC11Inits);
6039<SkipInits>{ID}{BN}*"{" {
6041 yyextra->curlyCount=1;
6042 BEGIN(SkipC11Inits);
6045 ++yyextra->curlyCount;
6048 if ( --yyextra->curlyCount<=0 )
6053<SkipC11Attribute>"]]" {
6054 BEGIN(yyextra->lastC11AttributeContext);
6062 ++yyextra->curlyCount ;
6064<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6067 if( yyextra->curlyCount )
6069 --yyextra->curlyCount ;
6073 if (!yyextra->current->sli.empty() && yyextra->previous)
6075 yyextra->previous->sli = yyextra->current->sli;
6076 yyextra->current->sli.clear();
6078 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6079 BEGIN( yyextra->lastCurlyContext ) ;
6082<SkipCurly>"}"{BN}*{DCOMM}"<" {
6084 if ( yyextra->curlyCount )
6087 --yyextra->curlyCount ;
6091 yyextra->current->endBodyLine=yyextra->yyLineNr;
6092 yyextra->tempEntry = yyextra->current;
6093 yyextra->current = yyextra->previous;
6095 yyextra->docBlockContext = SkipCurlyEndDoc;
6096 yyextra->docBlockInBody =
FALSE;
6097 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6099 yyextra->docBlock.str(std::string());
6100 yyextra->docBlockTerm =
'}';
6101 if (yytext[yyleng-3]==
'/')
6113<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6114 yyextra->docBlockContext = SkipCurlyEndDoc;
6115 yyextra->docBlockInBody =
FALSE;
6116 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6118 yyextra->docBlock.str(std::string());
6119 yyextra->docBlockTerm =
'}';
6120 if (yytext[yyleng-3]==
'/')
6131<SkipCurlyEndDoc>"}" {
6133 if (yyextra->tempEntry)
6135 yyextra->current = yyextra->tempEntry;
6136 yyextra->tempEntry.reset();
6138 BEGIN( yyextra->lastCurlyContext );
6140<SkipCurly,ReadExpressionBody>\" {
6142 yyextra->lastStringContext=YY_START;
6143 BEGIN( SkipString );
6145<SkipCurly>^{B}*"#" {
6146 if (yyextra->insidePHP)
6149 BEGIN( SkipCurlyCpp );
6151<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6155<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6156 if (!yyextra->insidePHP)
6162 yyextra->lastHereDocContext = YY_START;
6166<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6168 yyextra->lastRawStringContext = YY_START;
6169 yyextra->dummyRawString.clear();
6170 yyextra->pCopyRawString = &yyextra->dummyRawString;
6171 *yyextra->pCopyRawString += yytext;
6174<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6178<SkipCurly,SkipCurlyCpp>"\$" {}
6182 yyextra->lastCurlyContext = FindMembers;
6185<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6189<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6191 yyextra->lastCContext = YY_START;
6194<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6196 yyextra->lastCContext = YY_START;
6197 BEGIN(SkipCxxComment);
6199<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6200 yyextra->roundCount=0;
6201 yyextra->lastSkipRoundContext=YY_START;
6204<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6205 yyextra->lastStringContext=YY_START;
6206 BEGIN( SkipString );
6209 warn(yyextra->fileName,yyextra->yyLineNr,
6210 "Found ';' while parsing initializer list! "
6211 "(doxygen could be confused by a macro call without semicolon)"
6213 BEGIN( FindMembers );
6215<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6216 if (!yyextra->insidePHP)
6219 yyextra->lastCContext = YY_START;
6220 BEGIN(SkipCxxComment);
6222<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6223 if (!yyextra->insideCS) REJECT;
6226 yyextra->lastSkipVerbStringContext=YY_START;
6227 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6228 yyextra->dummyTextStream.clear();
6229 BEGIN(SkipVerbString);
6231<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6232 if (yyextra->insidePHP) REJECT;
6234<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6235 if (yyextra->insidePHP)
6237 yyextra->lastStringContext=YY_START;
6238 BEGIN(SkipPHPString);
6241<SkipC11Attribute>{ID} {
6244 yyextra->current->spec.setNoDiscard(
true);
6247<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6248<SkipString,SkipPHPString>\\. { }
6250 BEGIN( yyextra->lastStringContext );
6253 BEGIN( yyextra->lastStringContext );
6255<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6256<SkipString,SkipPHPString>\n {
6260<SkipString,SkipPHPString>. { }
6266 yyextra->current->section = EntryType::makeEmpty() ;
6267 yyextra->current->type.clear() ;
6268 yyextra->current->name.clear() ;
6269 yyextra->current->args.clear() ;
6270 yyextra->current->argList.clear();
6271 BEGIN( FindMembers ) ;
6274 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6278 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6282 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6284 if (!yyextra->baseName.isEmpty())
6286 yyextra->current->extends.emplace_back(
6287 yyextra->baseName,Protection::Public,Specifier::Normal);
6288 yyextra->baseName.clear();
6290 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6295 yyextra->current->section = EntryType::makeEmpty() ;
6296 yyextra->current->type.clear() ;
6297 yyextra->current->name.clear() ;
6298 yyextra->current->args.clear() ;
6299 yyextra->current->argList.clear();
6301 BEGIN( FindMembers ) ;
6303<CompoundName>{SCOPENAME}/{BN}*"<" {
6304 yyextra->sharpCount = 0;
6305 yyextra->current->name = yytext ;
6307 if (yyextra->current->spec.isProtocol())
6309 yyextra->current->name+=
"-p";
6312 yyextra->lastClassTemplSpecContext = ClassVar;
6313 if (yyextra->insideObjC)
6315 BEGIN( ObjCProtocolList );
6317 else if (yyextra->insideCS)
6324 yyextra->roundCount=0;
6325 BEGIN( ClassTemplSpec );
6332 yyextra->current->tArgLists.
push_back(al);
6333 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6334 yyextra->templateStr=
"<";
6335 yyextra->current->name +=
"<";
6336 yyextra->fullArgString = yyextra->templateStr;
6337 yyextra->copyArgString = &yyextra->current->name;
6339 yyextra->currentArgumentContext = ClassVar;
6340 BEGIN( ReadTempArgs );
6342<ObjCProtocolList>"<" {
6343 yyextra->insideProtocolList=
TRUE;
6346<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6347 yyextra->current->name += yytext;
6349 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6352 if (yyextra->current->spec.isProtocol())
6359 BEGIN( yyextra->lastClassTemplSpecContext );
6363<ClassTemplSpec>"<" {
6364 yyextra->current->name += yytext;
6365 if (yyextra->roundCount==0) yyextra->sharpCount++;
6368 yyextra->current->name += yytext;
6370<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6371 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6375 yyextra->current->name =
substitute(yytext,
".",
"::");
6376 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6381 else if (!yyextra->current->tArgLists.empty())
6385 yyextra->current->name = yytext;
6386 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6389 QCString rn = yyextra->current_root->name;
6391 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6395 yyextra->current->spec.setForwardDecl(
true);
6396 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6398 else if (yyextra->insideIDL &&
6399 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6400 yyextra->current->spec.isInterface()) ||
6401 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6402 yyextra->current->spec.isService())
6410 yyextra->current->name = yytext;
6411 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6412 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6415 yyextra->current->spec.setInterface(
false).setService(
false);
6419 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6422 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6425 yyextra->current->reset();
6427 if (yyextra->insideObjC)
6429 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6430 yyextra->insideObjC =
FALSE;
6432 if (yyextra->isTypedef)
6434 yyextra->current->type.prepend(
"typedef");
6436 BEGIN( FindMembers );
Wrapper class for the Entry type.
6439<CompoundName>{SCOPENAME}/{BN}*"(" {
6440 yyextra->current->name = yytext ;
6443 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6445 yyextra->lastAlignAsContext = YY_START;
6450 if (yyextra->current->spec.isProtocol())
6452 yyextra->current->name +=
"-p";
6457<AlignAs>"(" { yyextra->roundCount=0;
6458 BEGIN( AlignAsEnd );
6462<AlignAsEnd>"(" { yyextra->roundCount++; }
6463<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6465 BEGIN( yyextra->lastAlignAsContext );
6471 yyextra->current->name = yytext ;
6475 yyextra->current->bodyLine = yyextra->yyLineNr;
6476 yyextra->current->bodyColumn = yyextra->yyColNr;
6477 yyextra->current->initializer.str(std::string());
6478 yyextra->lastInitializerContext = FindMembers;
6479 yyextra->sharpCount=0;
6480 yyextra->initBracketCount=0;
6481 BEGIN(ReadInitializer);
6483<CompoundName>{SCOPENAME}/{BN}*"," {
6485 yyextra->current->reset();
6488<CompoundName>{SCOPENAME} {
6489 yyextra->current->name = yytext ;
6492 if (yyextra->current->spec.isProtocol())
6494 yyextra->current->name +=
"-p";
6496 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6502<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6503 if (yyextra->current->section.isNamespace())
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6515<CompoundName>{CSSCOPENAME} {
6516 yyextra->current->name =
substitute(yytext,
".",
"::");
6520<ClassVar>{SCOPENAME}{BNopt}/"(" {
6521 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6524 yyextra->roundCount=0;
6525 BEGIN(SkipUnionSwitch);
6530 yyextra->yyBegColNr=yyextra->yyColNr;
6531 yyextra->yyBegLineNr=yyextra->yyLineNr;
6532 yyextra->current->name = yytext;
6533 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6536 BEGIN( FindMembers );
6540 if (yyextra->isTypedef)
6544 yyextra->current->type.prepend(
"typedef ");
6552<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6553 if (yyextra->insideCli)
6556 yyextra->current->spec.setSealedClass(
true);
6558 yyextra->current->spec.setAbstractClass(
true);
6566<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6567 yyextra->yyBegColNr=yyextra->yyColNr;
6568 yyextra->yyBegLineNr=yyextra->yyLineNr;
6571 if (yyextra->current->section.isEnum())
6573 yyextra->current->section = EntryType::makeVariable() ;
6575 yyextra->current->type +=
' ' ;
6576 yyextra->current->type += yyextra->current->name ;
6585 yyextra->yyBegColNr=yyextra->yyColNr;
6586 yyextra->yyBegLineNr=yyextra->yyLineNr;
6588 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6591 yyextra->roundCount=0;
6592 BEGIN(SkipUnionSwitch);
6594 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6596 yyextra->current->type.clear();
6597 yyextra->baseProt = Protection::Public;
6598 yyextra->baseVirt = Specifier::Normal;
6599 yyextra->baseName.clear();
6600 BEGIN( BasesProt ) ;
6602 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6604 yyextra->current->typeConstr.clear();
6605 yyextra->current->typeConstr.push_back(
Argument());
6606 yyextra->lastCSConstraint = YY_START;
6607 BEGIN( CSConstraintName );
6609 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6611 yyextra->current->spec.setAbstract(
true);
6613 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6615 yyextra->current->spec.setSealed(
true);
6617 else if (
qstrcmp(yytext,
"final")==0)
6619 yyextra->current->spec.setFinal(
true);
6623 if (yyextra->current->section.isEnum())
6625 yyextra->current->section = EntryType::makeVariable() ;
6627 yyextra->current->type +=
' ' ;
6628 yyextra->current->type += yyextra->current->name ;
6629 yyextra->current->name = yytext ;
6638 if (yyextra->insideObjC && *yytext==
'(')
6640 yyextra->current->name+=
'(';
6641 yyextra->current->spec.setCategory(
true);
6642 BEGIN( ClassCategory );
6644 else if (yyextra->insideCS && *yytext==
'(')
6646 yyextra->current->args=yytext;
6647 yyextra->currentArgumentContext = ClassVar;
6648 yyextra->fullArgString = yyextra->current->args;
6649 yyextra->copyArgString = &yyextra->current->args;
6650 BEGIN( ReadFuncArgType ) ;
6656 BEGIN( FindMembers );
6659<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6660<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6661 yyextra->fullArgString.clear();
6662 yyextra->lastCopyArgChar=
'#';
6663 yyextra->lastCommentInArgContext=YY_START;
6665 BEGIN( CopyArgCommentLine );
6667 BEGIN( CopyArgComment );
6669<CSConstraintType,CSConstraintName>"#" {
6670 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6672<CSConstraintType>"=>" {
6677 BEGIN( yyextra->lastCSConstraint );
6679<CSConstraintType>"{" {
6683 BEGIN( yyextra->lastCSConstraint );
6685<CSConstraintType,CSConstraintName>";" {
6688 BEGIN( yyextra->lastCSConstraint );
6690<CSConstraintName>":" {
6691 BEGIN( CSConstraintType );
6693<CSConstraintName>{ID} {
6695 yyextra->current->typeConstr.back().name=yytext;
6697<CSConstraintType>"where" {
6698 yyextra->current->typeConstr.push_back(
Argument());
6699 BEGIN( CSConstraintName );
6701<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6702 if (yyextra->current->typeConstr.back().type.isEmpty())
6705 yyextra->current->typeConstr.back().type=yytext;
6709 QCString name = yyextra->current->typeConstr.back().name;
6710 yyextra->current->typeConstr.push_back(
Argument());
6711 yyextra->current->typeConstr.back().name=name;
6712 yyextra->current->typeConstr.back().type=yytext;
6715<CSConstraintName,CSConstraintType>\n {
6718<CSConstraintName,CSConstraintType>. {
6720<ClassCategory>{ID} {
6721 yyextra->current->name+=yytext;
6723<ClassCategory>")"/{BN}*"{" {
6724 yyextra->current->name+=
')';
6727<ClassCategory>")"/{BN}*"<" {
6728 yyextra->current->name+=
')';
6729 BEGIN( ObjCProtocolList );
6732 yyextra->current->name+=
')';
6733 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6745 if (yyextra->current->section.isVariable())
6747 yyextra->current->bitfields+=
":";
6748 yyextra->current->args.clear();
6751 else if (yyextra->current->section.isEnum())
6754 yyextra->current->args.clear();
6755 BEGIN(EnumBaseType);
6759 yyextra->current->type.clear();
6760 if (yyextra->current->spec.isInterface() ||
6761 yyextra->current->spec.isStruct() ||
6762 yyextra->current->spec.isRef() ||
6763 yyextra->current->spec.isValue() ||
6764 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6767 yyextra->baseProt = Protection::Public;
6771 yyextra->baseProt = Protection::Private;
6773 yyextra->baseVirt = Specifier::Normal;
6774 yyextra->baseName.clear();
6775 BEGIN( BasesProt ) ;
6779 if (yyextra->isTypedef)
6781 yyextra->current->type.prepend(
"typedef");
6783 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6785 yyextra->current->section = EntryType::makeVariable() ;
6787 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6789 yyextra->current->reset();
6796 BEGIN( FindMembers );
6798<Bases,ClassVar>{CPPC}"/"/[^/] {
6799 if (!yyextra->insideObjC)
6806 yyextra->current->program << yytext;
6807 yyextra->current->fileName = yyextra->fileName ;
6808 yyextra->current->startLine = yyextra->yyLineNr ;
6809 yyextra->current->startColumn = yyextra->yyColNr;
6810 yyextra->curlyCount=0;
6811 BEGIN( ReadBodyIntf );
6814<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6815<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6816<Bases,ClassVar>{CPPC}"!" |
6817<Bases,ClassVar>[\-+]{BN}* {
6818 if (!yyextra->insideObjC)
6825 yyextra->current->program << yytext;
6826 yyextra->current->fileName = yyextra->fileName ;
6827 yyextra->current->startLine = yyextra->yyLineNr ;
6828 yyextra->current->startColumn = yyextra->yyColNr;
6829 yyextra->curlyCount=0;
6830 BEGIN( ReadBodyIntf );
6833<CompoundName,ClassVar>{B}*"{"{B}* {
6834 yyextra->current->program.str(std::string());
6835 yyextra->current->fileName = yyextra->fileName ;
6836 yyextra->current->bodyLine = yyextra->yyLineNr;
6837 yyextra->current->bodyColumn = yyextra->yyColNr;
6839 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6841 if (yyextra->current->section.isNamespace())
6845 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6857 yyextra->curlyCount=0;
6858 if (yyextra->current_root &&
6859 !yyextra->current_root->spec.isInterface() &&
6860 (yyextra->current->spec.isInterface() ||
6861 yyextra->current->spec.isProtocol() ||
6862 yyextra->current->spec.isCategory() ||
6863 yyextra->current->section.isObjcImpl()
6868 BEGIN( ReadBodyIntf );
6870 else if (yyextra->current->section.isNamespace())
6872 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6879<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6880<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6881<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6882<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6883<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6884<BasesProt>{BN} {
lineCount(yyscanner); }
6885<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6886<Bases>"decltype"{BN}*"(" {
6888 yyextra->roundCount=0;
6889 yyextra->lastSkipRoundContext=YY_START;
6892<Bases>("\\")?({ID}"\\")*{ID} {
6893 if (!yyextra->insidePHP)
6902 yyextra->baseName += bn;
6903 yyextra->current->args +=
' ';
6904 yyextra->current->args += yytext;
6907<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6913 yyextra->current->typeConstr.clear();
6914 yyextra->current->typeConstr.push_back(
Argument());
6915 yyextra->lastCSConstraint = YY_START;
6916 BEGIN( CSConstraintName );
6920 yyextra->baseName+=yytext;
6921 yyextra->current->args +=
' ';
6922 yyextra->current->args += yytext;
6925<Bases>{BN}*{ID}("."{ID})* {
6927 yyextra->baseName += name;
6928 yyextra->current->args +=
' ';
6929 yyextra->current->args += name;
6931<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6932 if (!yyextra->insideObjC)
6942<ClassVar,Bases>"@end" {
6950<ClassVar>"<" { yyextra->current->name += *yytext;
6951 yyextra->sharpCount=1;
6952 yyextra->roundCount=0;
6953 yyextra->lastSkipSharpContext = YY_START;
6954 yyextra->specName = &yyextra->current->name;
6955 BEGIN ( Specialization );
6959 yyextra->sharpCount=1;
6960 yyextra->roundCount=0;
6961 yyextra->lastSkipSharpContext = YY_START;
6962 if (yyextra->insideObjC)
6972 yyextra->templateStr = yytext;
6973 yyextra->specName = &yyextra->templateStr;
6974 BEGIN ( Specialization );
6977<Specialization>"<" { *yyextra->specName += *yytext;
6978 if (yyextra->roundCount==0) yyextra->sharpCount++;
6980<Specialization>">" {
6981 *yyextra->specName += *yytext;
6982 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6985 BEGIN(yyextra->lastSkipSharpContext);
6988<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6989<Specialization>"<<" { *yyextra->specName += yytext; }
6990<Specialization>">>"/{B}*"::" {
6995<Specialization>">>" {
6996 if (yyextra->insideCS)
7006 if (yyextra->roundCount>0)
7008 *yyextra->specName += yytext;
7018<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7019<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7020<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7022<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7023<Specialization>"\\'" { *yyextra->specName += *yytext;}
7024<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7025<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7026<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7027<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7028<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7029<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7030<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7031<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7032<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7035 *yyextra->specName += *yytext;
7037<SkipRound>"(" { ++yyextra->roundCount; }
7038<SkipRound>")" {
if (--yyextra->roundCount<0)
7039 BEGIN ( yyextra->lastSkipRoundContext );
7042 yyextra->lastStringContext=SkipRound;
7045<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7046 if (yyextra->insideProtocolList)
7048 yyextra->baseName+=
"-p";
7052 yyextra->current->args +=
',' ;
7055 if (!yyextra->baseName.isEmpty())
7057 yyextra->current->extends.emplace_back(
7058 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7061 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7062 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7063 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7065 yyextra->baseProt=Protection::Public;
7069 yyextra->baseProt=Protection::Private;
7071 yyextra->baseVirt=Specifier::Normal;
7072 yyextra->baseName.clear();
7075 yyextra->insideProtocolList=
FALSE;
7078 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7094 if (*yytext==
',' && yyextra->insideObjC)
7096 yyextra->insideProtocolList=
TRUE;
7102 yyextra->current->program.str(std::string());
7103 yyextra->current->fileName = yyextra->fileName ;
7104 yyextra->current->bodyLine = yyextra->yyLineNr;
7105 yyextra->current->bodyColumn = yyextra->yyColNr;
7107 if (!yyextra->baseName.isEmpty())
7109 yyextra->current->extends.emplace_back(
7110 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7112 yyextra->baseName.clear();
7114 yyextra->curlyCount=0;
7115 if (yyextra->insideObjC)
7117 BEGIN( ReadBodyIntf );
7124<SkipUnionSwitch>{B}*"(" {
7125 yyextra->roundCount++;
7127<SkipUnionSwitch>")" {
7128 if (--yyextra->roundCount==0)
7133<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7135<Comment>{BN}+ { yyextra->current->program << yytext ;
7138<Comment>{CCS} { yyextra->current->program << yytext ; }
7139<Comment>{CPPC} { yyextra->current->program << yytext ; }
7140<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7141 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7142 yyextra->current->program << yytext ;
7144<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7145 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7146 yyextra->current->program << yytext ;
7148<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7149<Comment>{CCE} { yyextra->current->program << yytext ;
7150 if (!yyextra->insideCode)
7152 yyextra->doxygenComment=
false;
7153 BEGIN( yyextra->lastContext );
7156<Comment>. { yyextra->current->program << *yytext ; }
7158<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7160 if (!yyextra->current->doc.isEmpty())
7162 yyextra->current->doc+=
"\n\n";
7166 yyextra->current->docLine = yyextra->yyLineNr;
7167 yyextra->current->docFile = yyextra->fileName;
7170 yyextra->lastDocContext = YY_START;
7171 if (yyextra->current_root->section.isScope())
7173 yyextra->current->inside = yyextra->current_root->name+
"::";
7175 yyextra->docBlockContext = YY_START;
7176 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7181 yyextra->docBlock.
str(indent.
str());
7183 if (yyextra->docBlockAutoBrief)
7185 yyextra->current->briefLine = yyextra->yyLineNr;
7186 yyextra->current->briefFile = yyextra->fileName;
7191<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7197 yyextra->lastDocContext = YY_START;
7200 if (yyextra->current_root->section.isScope())
7202 yyextra->current->inside = yyextra->current_root->name+
"::";
7204 yyextra->current->docLine = yyextra->yyLineNr;
7205 yyextra->current->docFile = yyextra->fileName;
7206 yyextra->docBlockContext = YY_START;
7207 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7209 yyextra->docBlockAutoBrief = javadocAutoBrief;
7213 yyextra->docBlock.
str(indent.
str());
7215 if (yyextra->docBlockAutoBrief)
7217 yyextra->current->briefLine = yyextra->yyLineNr;
7218 yyextra->current->briefFile = yyextra->fileName;
7225 yyextra->current->program << yytext ;
7226 yyextra->lastContext = YY_START ;
7227 yyextra->doxygenComment=
true;
7231<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7236<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7237 yyextra->lastDocContext = YY_START;
7240 if (yyextra->current_root->section.isScope())
7242 yyextra->current->inside = yyextra->current_root->name+
"::";
7244 yyextra->current->docLine = yyextra->yyLineNr;
7245 yyextra->current->docFile = yyextra->fileName;
7246 yyextra->docBlockContext = YY_START;
7247 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7249 yyextra->docBlockAutoBrief = javadocAutoBrief;
7253 yyextra->docBlock.
str(indent.
str());
7255 if (yyextra->docBlockAutoBrief)
7257 yyextra->current->briefLine = yyextra->yyLineNr;
7258 yyextra->current->briefFile = yyextra->fileName;
7263<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7264 yyextra->lastDocContext = YY_START;
7265 if (yyextra->current_root->section.isScope())
7267 yyextra->current->inside = yyextra->current_root->name+
"::";
7269 yyextra->docBlockContext = YY_START;
7270 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7271 yyextra->docBlockAutoBrief =
FALSE;
7275 yyextra->docBlock.
str(indent.
str());
7280<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7281 yyextra->lastDocContext = YY_START;
7282 if (yyextra->current_root->section.isScope())
7284 yyextra->current->inside = yyextra->current_root->name+
"::";
7286 yyextra->docBlockContext = YY_START;
7287 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7288 yyextra->docBlockAutoBrief =
FALSE;
7291 yyextra->docBlock.
str(indent.
str());
7295<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7297 yyextra->externLinkage=
TRUE;
7300 if (yyextra->externLinkage)
7302 yyextra->externLinkage=
FALSE;
7304 else if (yyextra->insideCS &&
7305 !yyextra->current->name.isEmpty() &&
7306 !yyextra->current->type.isEmpty())
7308 if (yyextra->current->mtype == MethodTypes::Event)
7310 yyextra->mtype = MethodTypes::Event;
7314 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7318 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7320 yyextra->current->bodyLine = yyextra->yyLineNr;
7321 yyextra->current->bodyColumn = yyextra->yyColNr;
7322 yyextra->curlyCount=0;
7323 BEGIN( CSAccessorDecl );
7325 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7329 yyextra->current->exception =
" {";
7330 BEGIN(UNOIDLAttributeBlock);
7334 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7335 yyextra->current->name.isEmpty()
7339 yyextra->needsSemi =
FALSE;
7340 if (yyextra->current->isStatic)
7342 yyextra->current->name=
"[static initializer]";
7343 yyextra->current->type.clear();
7347 yyextra->current->name=
"[instance initializer]";
7364 yyextra->current->bodyLine = yyextra->yyLineNr;
7365 yyextra->current->bodyColumn = yyextra->yyColNr;
7366 yyextra->current->initializer.str(yytext);
7367 yyextra->lastInitializerContext = YY_START;
7368 yyextra->sharpCount=0;
7369 yyextra->initBracketCount=1;
7370 BEGIN(ReadInitializer);
7374<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7375<CSAccessorDecl>"}"{B}*"=" {
7377 if (yyextra->curlyCount != 0) REJECT;
7378 yyextra->current->initializer.str(
"=");
7379 yyextra->current->endBodyLine=yyextra->yyLineNr;
7380 yyextra->lastInitializerContext = FindMembers;
7381 BEGIN(ReadInitializer);
7383<CSAccessorDecl>"}" {
7384 if (yyextra->curlyCount)
7386 yyextra->curlyCount--;
7390 yyextra->mtype = MethodTypes::Method;
7391 yyextra->virt = Specifier::Normal;
7393 yyextra->current->endBodyLine=yyextra->yyLineNr;
7398<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7399<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7400<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7401<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7402<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7403<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7404<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7405<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7406<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7407<CSAccessorDecl>{CHARLIT} {}
7408<CSAccessorDecl>"\"" { BEGIN(CSString);}
7409<CSAccessorDecl>"." {}
7410<CSAccessorDecl>\n {
lineCount(yyscanner); }
7411<CSString>"\"" { BEGIN(CSAccessorDecl);}
7419<SliceSequence>{SCOPENAME} {
7420 if (yyextra->current->spec.isLocal())
7422 yyextra->current->type =
"local ";
7424 yyextra->current->type +=
"sequence<";
7425 yyextra->current->type += yytext;
7426 yyextra->current->type +=
">";
7429<SliceSequence>{BN}*">"{BN}* {
7431 BEGIN(SliceSequenceName);
7434<SliceSequenceName>{ID}{BN}* {
7436 yyextra->current->name = yytext ;
7437 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7440<SliceSequenceName>";" {
7441 yyextra->current->section = EntryType::makeVariable();
7442 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7447<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7449 if (yyextra->current->spec.isLocal())
7451 yyextra->current->type =
"local ";
7453 yyextra->current->type +=
"dictionary<";
7454 yyextra->current->type += yytext;
7455 yyextra->current->type +=
">";
7456 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7459<SliceDictionary>{BN}*">"{BN}* {
7461 BEGIN(SliceDictionaryName);
7464<SliceDictionaryName>{ID}{BN}* {
7466 yyextra->current->name = yytext ;
7467 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7470<SliceDictionaryName>";" {
7471 yyextra->current->section = EntryType::makeVariable();
7472 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7482<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7483 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7484 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7487<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7488 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7489 BEGIN( yyextra->docBlockContext );
7491<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7492 yyextra->docBlock << yytext;
7493 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7494 BEGIN( yyextra->docBlockContext );
7496<DocLine>{NONLopt}/"\n" {
7497 yyextra->docBlock << yytext;
7498 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7499 BEGIN( yyextra->docBlockContext );
7504<DocBlock>"*"*{CCE} {
7506 BEGIN(yyextra->docBlockContext);
7508<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7511 yyextra->docBlock <<
"\\ilinebr " << indent;
7513<DocBlock>^{B}*"*"+/[^/] {
7516 yyextra->docBlock << indent;
7518<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7521 yyextra->docBlock << indent;
7523<DocBlock>^{B}*({CPPC}){B}* {
7526 yyextra->docBlock << yytext;
7530 yyextra->docBlock << yytext;
7532<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7533 yyextra->docBlock << yytext;
7535<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7536 yyextra->docBlock << yytext;
7537 char blockName[] =
"f$";
7539 if (c==
'[') blockName[1]=
']';
7540 else if (c==
'{') blockName[1]=
'}';
7541 else if (c==
'(') blockName[1]=
')';
7543 BEGIN(DocCopyBlock);
7545<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7546 yyextra->fileName = &yytext[6];
7547 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7548 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7549 yyextra->docBlock << yytext;
7551<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7552 yyextra->fileName = &yytext[6];
7553 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7554 yyextra->docBlock << yytext;
7556<DocBlock>{CMD}"iline"{LINENR}{B} {
7561 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7565 yyextra->yyLineNr = nr;
7567 yyextra->docBlock << yytext;
7569<DocBlock>{B}*"<"{PRE}">" {
7570 yyextra->docBlock << yytext;
7572 BEGIN(DocCopyBlock);
7574<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7575 yyextra->docBlock << yytext;
7577 BEGIN(DocCopyBlock);
7579<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7580 yyextra->docBlock << yytext;
7582 BEGIN(DocCopyBlock);
7584<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7585 yyextra->docBlock << yytext;
7587 BEGIN(DocCopyBlock);
7589<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7591 yyextra->docBlock <<
"\\ilinebr ";
7592 yyextra->docBlock << pat;
7594 BEGIN(DocCopyBlock);
7596<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7598 yyextra->docBlock << pat;
7600 BEGIN(DocCopyBlock);
7602<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7603<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7604<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7606 yyextra->docBlock <<
"\\ilinebr ";
7607 yyextra->docBlock << pat;
7609 BEGIN(DocCopyBlock);
7611<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7612<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7613<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7615 yyextra->docBlock << pat;
7617 BEGIN(DocCopyBlock);
7620 yyextra->docBlock <<
"```";
7623 yyextra->docBlock << yytext;
7626 yyextra->docBlock << yytext;
7628 BEGIN(DocCopyBlock);
7630<DocBlock>{B}*"<"{CODE}">" {
7631 if (yyextra->insideCS)
7633 yyextra->docBlock << yytext;
7635 BEGIN(DocCopyBlock);
7642<DocBlock>[^@*~`'\/\\\n]+ {
7643 yyextra->docBlock << yytext;
7647 yyextra->docBlock << *yytext;
7650 yyextra->docBlock << *yytext;
7655<DocCopyBlock>"</"{PRE}">" {
7660 yyextra->docBlock << yytext;
7662<DocCopyBlock>"</"{CODE}">" {
7667 yyextra->docBlock << yytext;
7669<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7674 yyextra->docBlock << yytext;
7676<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7681 yyextra->docBlock << yytext;
7683<DocCopyBlock>^{B}*"*"+/{BN}+ {
7684 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7692 yyextra->docBlock << indent;
7695<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7696 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7700 yyextra->docBlock << indent;
7707<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7708 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7712 yyextra->docBlock << indent+
"*";
7719<DocCopyBlock>^{B}*"*"+/{BN}* {
7720 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7723 if (yyextra->nestedComment>0)
7726 yyextra->docBlock << indent+
"*";
7731 yyextra->docBlock << indent;
7739<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7745 yyextra->docBlock << pat;
7747<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7753 yyextra->docBlock << pat;
7755<DocCopyBlock>"```" {
7756 if (yyextra->docBlockName==
"``")
7758 yyextra->docBlock <<
"`";
7760 yyextra->docBlock <<
"``";
7765 yyextra->docBlock << yytext;
7768<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7773 yyextra->docBlock << yytext;
7775<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7780 yyextra->docBlock << yytext;
7782<DocCopyBlock>"`"{1,2} {
7787 yyextra->docBlock << yytext;
7789<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7790 yyextra->docBlock << yytext;
7793 yyextra->docBlock << yytext;
7794 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7798 yyextra->lastStringContext=YY_START;
7799 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7800 yyextra->stopAtInvalidString=
true;
7804<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7807 yyextra->nestedComment++;
7809 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7811 yyextra->nestedComment--;
7813 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7815 warn(yyextra->fileName,yyextra->yyLineNr,
7816 "Found end of C comment inside a '{}' block without matching start of the comment!"
7817 " Maybe the end marker for the block is missing?",
7818 yyextra->docBlockName);
7821 yyextra->docBlock << yytext;
7824 yyextra->docBlock << *yytext;
7828 yyextra->docBlock << *yytext;
7830<DocCopyBlock><<EOF>> {
7831 warn(yyextra->fileName,yyextra->yyLineNr,
7832 "reached end of file while inside a '{}' block!"
7833 " The command that should end the block seems to be missing!",
7834 yyextra->docBlockName);
7841<Prototype>"operator"{B}*"("{B}*")" {
7842 yyextra->current->name+=yytext;
7845 yyextra->current->args+=*yytext;
7846 yyextra->currentArgumentContext = PrototypeQual;
7847 yyextra->fullArgString = yyextra->current->args;
7848 yyextra->copyArgString = &yyextra->current->args;
7849 BEGIN( ReadFuncArgType ) ;
7851<Prototype>"("({ID}"::")*({B}*[&*])+ {
7852 if (yyextra->insidePHP)
7858 yyextra->current->type+=yyextra->current->name+yytext;
7859 yyextra->current->name.clear();
7860 BEGIN( PrototypePtr );
7863<PrototypePtr>{SCOPENAME} {
7864 yyextra->current->name+=yytext;
7867 yyextra->current->args+=*yytext;
7868 yyextra->currentArgumentContext = PrototypeQual;
7869 yyextra->fullArgString = yyextra->current->args;
7870 yyextra->copyArgString = &yyextra->current->args;
7871 BEGIN( ReadFuncArgType ) ;
7874 yyextra->current->type+=
')';
7878 yyextra->current->name+=yytext;
7881 BEGIN( PrototypeSkipLine);
7883<PrototypeQual>{B}*"const"{B}* {
7884 yyextra->current->args +=
" const ";
7885 yyextra->current->argList.setConstSpecifier(
TRUE);
7887<PrototypeQual>{B}*"volatile"{B}* {
7888 yyextra->current->args +=
" volatile ";
7889 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7891<PrototypeQual>{B}*"="{B}*"0"{B}* {
7892 yyextra->current->args +=
" = 0";
7893 yyextra->current->virt = Specifier::Pure;
7894 yyextra->current->argList.setPureSpecifier(
TRUE);
7896<PrototypeQual>"throw"{B}*"(" {
7897 yyextra->current->exception =
"throw(";
7898 BEGIN(PrototypeExc);
7901 yyextra->current->exception +=
')';
7902 BEGIN(PrototypeQual);
7905 yyextra->current->exception += *yytext;
7908 yyextra->current->args += *yytext;
7911 yyextra->current->name += *yytext;
7913<PrototypeSkipLine>. {
7919<SkipCxxComment>.*"\\\n" {
7920 if (yyextra->insideCS)
7929<SkipCxxComment>{ANYopt}/\n {
7930 BEGIN( yyextra->lastCContext ) ;
7932<SkipComment>[^\*\n]+
7937 if (!yyextra->insideCpp) REJECT;
7938 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7939 yyextra->lastC11AttributeContext = YY_START;
7940 BEGIN( SkipC11Attribute );
7945 if (yyextra->insideIDL && yyextra->insideCppQuote)
7949 else if (yyextra->insidePHP)
7951 yyextra->lastStringContext=YY_START;
7956 if (!yyextra->insidePHP)
7958 yyextra->lastCPPContext = YY_START;
7963 yyextra->lastCContext = YY_START ;
7964 BEGIN( SkipCxxComment ) ;
7968 if (!yyextra->insidePHP)
7970 yyextra->lastCContext = YY_START ;
7971 BEGIN( SkipCxxComment ) ;
7974 if (yyextra->insidePHP)
7976 yyextra->lastStringContext=YY_START;
7977 BEGIN(SkipPHPString);
7981 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7983 if (yyextra->current->type.isEmpty())
7985 if (yyextra->current->name.isEmpty())
7986 yyextra->current->name=
"?";
7988 yyextra->current->name+=
"?";
7992 yyextra->current->type+=
"?";
7996<*>"}" { yyextra->exported=
false; }
7998<SkipComment>{CPPC}|{CCS}
7999<*>{CCS} { yyextra->lastCContext = YY_START ;
8000 BEGIN( SkipComment ) ;
8002<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8004 yyextra->lastCContext = YY_START ;
8005 BEGIN( SkipCxxComment ) ;
8008 if (yyextra->insideCS && yyextra->fakeNS)
8012 BEGIN ( ReadNSBody);
8024 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8026 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8028 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8038 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8039 yyextra->outerScopeEntries.clear();
8040 yyextra->baseName.clear();
8041 yyextra->protection = Protection::Public;
8042 yyextra->baseProt = Protection::Public;
8043 yyextra->sharpCount = 0;
8044 yyextra->roundCount = 0;
8045 yyextra->curlyCount = 0;
8046 yyextra->mtype = MethodTypes::Method;
8047 yyextra->isStatic =
FALSE;
8048 yyextra->virt = Specifier::Normal;
8049 yyextra->baseVirt = Specifier::Normal;
8050 yyextra->isTypedef =
FALSE;
8051 yyextra->insideTryBlock =
FALSE;
8052 yyextra->insideFormula =
FALSE;
8053 yyextra->insideCode=
FALSE;
8055 yyextra->previous = 0;
8056 yyextra->firstTypedefEntry.reset();
8057 yyextra->memspecEntry.reset();
8062 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8063 if (yyextra->insideJava)
8065 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8067 yyextra->current->protection = yyextra->protection;
8068 yyextra->current->exported = yyextra->exported ;
8069 yyextra->current->mtype = yyextra->mtype;
8070 yyextra->current->virt = yyextra->virt;
8071 yyextra->current->isStatic = yyextra->isStatic;
8072 yyextra->current->lang = yyextra->language;
8074 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8075 yyextra->isTypedef=
FALSE;
8083 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8084 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8086 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8092 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8095 for (p = yytext ; *p ; ++p )
8099 yyextra->yyLineNr++;
8105 yyextra->column+=tabSize - (yyextra->column%tabSize);
8118 int col=startIndent;
8124 if (c==
'\t') col+=tabSize-(col%tabSize);
8125 else if (c==
'\n') col=0;
8133 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8134 yyextra->current->
protection = yyextra->protection = prot;
8135 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8136 yyextra->current->type.clear();
8137 yyextra->current->name.clear();
8138 yyextra->current->args.clear();
8139 yyextra->current->argList.clear();
8145 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8146 size_t tl=yyextra->current->type.length();
8147 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8149 yyextra->current->type +=
' ' ;
8151 yyextra->current->type += yyextra->current->name;
8152 yyextra->current->name.clear() ;
8153 tl=yyextra->current->type.length();
8154 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8156 yyextra->current->type +=
' ' ;
8158 yyextra->current->type += yyextra->current->args ;
8159 yyextra->current->args.clear() ;
8160 yyextra->current->argList.clear();
8167 if (s==
nullptr || *s==0)
return name;
8169 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8181 bool funcPtr = i>0 && type[i-1]==
')';
8183 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8184 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8185 return type.
left(i);
8191 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8194 yyextra->docBlock <<
"\\iskip";
8196 yyextra->docBlockName=blockName;
8197 yyextra->fencedSize=fencedSize;
8198 yyextra->isCodeBlock=codeBlock;
8199 yyextra->nestedComment=0;
8205 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8206 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8210 yyextra->docBlock <<
"\\endiskip";
8212 yyextra->docBlockName=
"";
8232 int i=name.
find(
"operator");
8233 if (i==-1)
return FALSE;
8243 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8245 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8246 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8247 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8248 yyextra->insideD = yyextra->language==SrcLangExt::D;
8249 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8250 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8251 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8252 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8253 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8254 yyextra->language==SrcLangExt::Lex);
8265 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8266 if (yyextra->current_root->section.isScope())
8269 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8271 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8273 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8283 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8284 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8285 if (yyextra->current->argList.empty())
return FALSE;
8286 for (
const Argument &a : yyextra->current->argList)
8297 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8298 if (yyextra->insideJava)
8301 yyextra->current->protection = Protection::Public;
8302 if (text.
find(
"protected")!=-1)
8303 yyextra->current->protection = Protection::Protected;
8304 else if (text.
find(
"private")!=-1)
8305 yyextra->current->protection = Protection::Private;
8306 else if (text.
find(
"package")!=-1)
8307 yyextra->current->protection = Protection::Package;
8314 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8315 int si =
static_cast<int>(yyextra->current->args.length());
8316 if (yyextra->oldStyleArgType.isEmpty())
8318 std::string args = yyextra->current->args.str();
8319 static const reg::Ex re(R
"(\([^)]*\).*)");
8325 bi1=(int)match.position();
8326 size_t secondMatchStart = match.position()+match.length();
8329 bi2=(int)match.position();
8333 if (bi1!=-1 && bi2!=-1)
8336 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8338 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8339 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8341 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8342 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8343 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8348 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8351 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8352 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8354 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8355 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8361 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8364 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8368 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8369 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8382 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8385 oldStyleArgPtr=yyextra->current->args.
left(j);
8404 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8405 for (
Argument &a : yyextra->current->argList)
8414 a.
docs=brief+
"\n\n"+docs;
8446 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8449 yyextra->current->briefFile = yyextra->fileName;
8450 yyextra->current->briefLine = yyextra->yyLineNr;
8454 yyextra->current->docFile = yyextra->fileName;
8455 yyextra->current->docLine = yyextra->yyLineNr;
8463 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8464 if (yyextra->tempEntry==0)
8469 yyextra->previous = yyextra->current;
8470 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8474 yyextra->previous = yyextra->current;
8475 yyextra->current = yyextra->tempEntry;
8476 yyextra->tempEntry.reset();
8483 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8486 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8487 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8490 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8491 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8493 docEntry->inbodyFile = yyextra->fileName;
8494 docEntry->inbodyLine = lineNr;
8498 bool needsEntry=
FALSE;
8500 Markdown markdown(yyextra->fileName,lineNr);
8503 while (yyextra->commentScanner.parseCommentBlock(
8504 yyextra->thisParser,
8505 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8509 yyextra->docBlockInBody ?
FALSE : brief,
8510 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8511 yyextra->docBlockInBody,
8512 yyextra->protection,
8523 QCString docFile = yyextra->current->docFile;
8525 yyextra->current->docFile = docFile;
8526 yyextra->current->docLine = lineNr;
8534 if (yyextra->docBlockTerm)
8536 unput(yyextra->docBlockTerm);
8537 yyextra->docBlockTerm=0;
8544 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8555 QCString orgDoc = yyextra->current->doc;
8556 QCString orgBrief = yyextra->current->brief;
8557 int orgDocLine = yyextra->current->docLine;
8558 int orgBriefLine = yyextra->current->briefLine;
8560 yyextra->current->doc.
clear();
8561 yyextra->current->brief.clear();
8564 int lineNr = orgDocLine;
8566 Markdown markdown(yyextra->fileName,lineNr);
8569 while (yyextra->commentScanner.parseCommentBlock(
8570 yyextra->thisParser,
8571 yyextra->current.get(),
8578 yyextra->protection,
8587 if (needsEntry)
newEntry(yyscanner);
8593 a.
docs = yyextra->current->doc;
8596 yyextra->current->doc = orgDoc;
8597 yyextra->current->brief = orgBrief;
8598 yyextra->current->docLine = orgDocLine;
8599 yyextra->current->briefLine = orgBriefLine;
8610 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8611 for (
const auto &ce : rt->children())
8613 if (!ce->program.empty())
8617 yyextra->padCount=0;
8619 yyextra->programStr = ce->program.str();
8620 yyextra->inputString = yyextra->programStr.data();
8621 yyextra->inputPosition = 0;
8622 if (ce->section.isEnum() || ce->spec.isEnum())
8623 BEGIN( FindFields ) ;
8625 BEGIN( FindMembers ) ;
8626 yyextra->current_root = ce;
8627 yyextra->fileName = ce->fileName;
8629 yyextra->yyLineNr = ce->bodyLine;
8630 yyextra->yyColNr = ce->bodyColumn;
8631 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8633 yyextra->current = std::make_shared<Entry>();
8634 yyextra->isStatic =
FALSE;
8639 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8641 ce->groups = rt->groups;
8644 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8646 if ( ce->section.isClass() )
8648 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8650 yyextra->current->protection = yyextra->protection = Protection::Public ;
8652 else if (yyextra->insideJava)
8654 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8656 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8658 if (ce->lang==SrcLangExt::ObjC)
8660 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8664 yyextra->current->protection = yyextra->protection = Protection::Public ;
8669 yyextra->current->protection = yyextra->protection = Protection::Private ;
8672 else if (ce->section.isEnum() )
8674 yyextra->current->protection = yyextra->protection = ce->protection;
8676 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8678 if (ce->section.isNamespace() )
8680 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8682 yyextra->current->protection = yyextra->protection = ce->protection;
8683 yyextra->current->exported = yyextra->exported =
false;
8685 else if (ce->section.isNamespace() )
8687 yyextra->current->protection = yyextra->protection = Protection::Public ;
8688 yyextra->current->exported = yyextra->exported = ce->exported;
8692 yyextra->current->protection = yyextra->protection = Protection::Public ;
8693 yyextra->current->exported = yyextra->exported =
false;
8695 yyextra->mtype = MethodTypes::Method;
8696 yyextra->virt = Specifier::Normal;
8703 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8705 scannerYYlex(yyscanner);
8708 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8710 yyextra->programStr.clear();
8711 ce->program.str(std::string());
8725 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8726 for (
const auto &ce : rt->children())
8728 if (ce->section.isConcept())
8732 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8734 yyextra->padCount =0;
8736 yyextra->programStr = ce->initializer.str();
8737 yyextra->inputString = yyextra->programStr.data();
8738 yyextra->inputPosition = 0;
8739 yyextra->current_root = ce;
8740 yyextra->fileName = ce->fileName;
8741 yyextra->yyLineNr = ce->bodyLine;
8742 yyextra->yyColNr = ce->bodyColumn;
8743 yyextra->insideObjC =
false;
8744 yyextra->current = std::make_shared<Entry>();
8748 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8750 if (!ce->args.isEmpty())
8752 templArgs=indent+
"template"+ce->args+
"\n";
8754 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8756 yyextra->isStatic =
FALSE;
8758 yyextra->current->section = EntryType::makeConceptCodePart();
8759 yyextra->current->startLine = yyextra->yyLineNr;
8760 BEGIN( FindConceptParts );
8761 scannerYYlex(yyscanner);
8762 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8773 const char *fileBuf,
8774 const std::shared_ptr<Entry> &rt,
8778 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8781 yyextra->inputString = fileBuf;
8782 yyextra->inputPosition = 0;
8783 yyextra->column = 0;
8784 scannerYYrestart(
nullptr,yyscanner);
8787 yyextra->protection = Protection::Public;
8788 yyextra->mtype = MethodTypes::Method;
8789 yyextra->isStatic =
FALSE;
8790 yyextra->exported =
false;
8791 yyextra->virt = Specifier::Normal;
8792 yyextra->current_root = rt;
8793 yyextra->yyLineNr = 1 ;
8794 yyextra->yyBegLineNr = 1;
8795 yyextra->yyBegColNr = 0;
8796 yyextra->anonCount = 0;
8797 yyextra->anonNSCount = 0;
8798 yyextra->fileName = fileName;
8799 yyextra->clangParser = clangParser;
8801 rt->lang = yyextra->language;
8802 msg(
"Parsing file {}...\n",yyextra->fileName);
8804 yyextra->current_root = rt;
8806 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8807 yyextra->current = std::make_shared<Entry>();
8812 yyextra->current->name = yyextra->fileName;
8813 yyextra->current->section = sec;
8814 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8816 yyextra->current->reset();
8818 if ( yyextra->insidePHP )
8820 BEGIN( FindMembersPHP );
8822 else if ( yyextra->insideJava )
8824 yyextra->current->name=
"java::lang";
8825 yyextra->current->fileName = yyextra->fileName;
8826 yyextra->current->section = EntryType::makeUsingDir();
8827 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8829 BEGIN( FindMembers );
8833 BEGIN( FindMembers );
8836 scannerYYlex(yyscanner);
8838 if (YY_START==Comment)
8840 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8844 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8846 yyextra->programStr.clear();
8847 rt->program.str(std::string());
8852 yyextra->anonNSCount++;
8855 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8858 parent->moveToSubEntryAndKeep(child);
8860 yyextra->outerScopeEntries.clear();
8869 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8872 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8875 if (!yyextra->current)
8880 const char *orgInputString;
8881 int orgInputPosition;
8882 YY_BUFFER_STATE orgState;
8885 orgState = YY_CURRENT_BUFFER;
8886 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8887 orgInputString = yyextra->inputString;
8888 orgInputPosition = yyextra->inputPosition;
8891 yyextra->inputString = text.
data();
8892 yyextra->inputPosition = 0;
8893 yyextra->column = 0;
8894 scannerYYrestart(
nullptr, yyscanner);
8896 scannerYYlex(yyscanner);
8898 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8899 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8901 yyextra->current->section = EntryType::makeVariableDoc();
8905 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8906 yy_switch_to_buffer(orgState, yyscanner);
8907 yyextra->inputString = orgInputString;
8908 yyextra->inputPosition = orgInputPosition;
8924 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8932 scannerYYlex_destroy(
p->yyscanner);
8936 const char *fileBuf,
8937 const std::shared_ptr<Entry> &root,
8941 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8942 yyextra->thisParser =
this;
8946 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8954 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8955 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8956 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8967#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)
Protection protection
class protection
Helper class to process markdown formatted text.
QCString process(const QCString &input, int &startNewlines, bool fromParseInput=false)
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
QCString trunc(const QCString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
const char * qPrint(const char *s)
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)