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) ) ||
3098 yyextra->docBlock.
str(indent.
str());
3102 yyextra->docBlockTerm =
';';
3103 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3105 yyextra->current->bitfields =
":"+yyextra->current->args;
3106 yyextra->current->args.clear();
3107 yyextra->current->section = EntryType::makeVariable();
3109 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)
3121<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3122 if (YY_START==ReadInitializer && yyextra->keepComment)
3128 yyextra->docBlockContext = YY_START;
3129 yyextra->docBlockInBody =
FALSE;
3130 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3135 yyextra->docBlock.
str(indent.
str());
3138 yyextra->docBlockTerm =
',';
3139 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3141 yyextra->current->bitfields =
":"+yyextra->current->args;
3142 yyextra->current->args.clear();
3143 yyextra->current->section = EntryType::makeVariable();
3145 if (yytext[yyleng-3]==
'/')
3157<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3158 if (YY_START==ReadInitializer && yyextra->keepComment)
3164 if (yyextra->current->bodyLine==-1)
3166 yyextra->current->bodyLine=yyextra->yyLineNr;
3167 yyextra->current->bodyColumn = yyextra->yyColNr;
3169 yyextra->docBlockContext = YY_START;
3170 yyextra->docBlockInBody =
FALSE;
3171 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3175 yyextra->docBlock.
str(indent.
str());
3178 yyextra->docBlockTerm = 0;
3179 if (yytext[yyleng-3]==
'/')
3192<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3194 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3197 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3202 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3208 if (yytext[2]==
'!' || yytext[2]==
'/')
3210 yyextra->docBlockContext = YY_START;
3211 yyextra->docBlockInBody =
FALSE;
3212 yyextra->docBlockAutoBrief =
FALSE;
3213 yyextra->docBlock.str(std::string());
3214 yyextra->docBlockTerm = 0;
3220 yyextra->lastCContext=YY_START;
3221 BEGIN(SkipCxxComment);
3226 if (yytext[2]==
'!' || yytext[2]==
'*')
3228 yyextra->docBlockContext = YY_START;
3229 yyextra->docBlockInBody =
FALSE;
3230 yyextra->docBlock.str(std::string());
3231 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3233 yyextra->docBlockTerm = 0;
3239 yyextra->lastCContext=YY_START;
3244<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3245 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3246 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3250 if (!yyextra->insideCS) REJECT;
3251 yyextra->current->bodyLine = yyextra->yyLineNr;
3252 yyextra->current->bodyColumn = yyextra->yyColNr;
3253 yyextra->current->initializer.str(yytext);
3254 yyextra->lastInitializerContext = YY_START;
3255 yyextra->sharpCount=0;
3256 yyextra->initBracketCount=0;
3257 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3258 yyextra->current->spec.setGettable(
true);
3259 BEGIN(ReadInitializerPtr);
3262 yyextra->current->bodyLine = yyextra->yyLineNr;
3263 yyextra->current->bodyColumn = yyextra->yyColNr;
3264 yyextra->current->initializer.str(
" ");
3265 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3266 yyextra->current->initializer <<
" ";
3267 yyextra->current->initializer <<
"=";
3268 yyextra->lastInitializerContext = YY_START;
3269 yyextra->sharpCount=0;
3270 yyextra->initBracketCount=0;
3271 BEGIN(ReadInitializer);
3273<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3275 yyextra->current->exception +=
" ";
3278<UNOIDLAttributeBlock>"}" {
3279 yyextra->current->exception +=
" }";
3283<ReadInitializer,ReadInitializerPtr>"(" {
3284 yyextra->lastRoundContext=YY_START;
3285 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3286 yyextra->roundCount=0;
3287 yyextra->current->initializer << *yytext;
3290<ReadInitializer,ReadInitializerPtr>"[" {
3291 if (!yyextra->insidePHP) REJECT;
3292 yyextra->lastSquareContext=YY_START;
3293 yyextra->pCopySquareGString=&yyextra->current->initializer;
3294 yyextra->squareCount=0;
3295 yyextra->current->initializer << *yytext;
3298<ReadInitializer,ReadInitializerPtr>"{" {
3299 yyextra->lastCurlyContext=YY_START;
3300 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3301 yyextra->curlyCount=0;
3302 yyextra->current->initializer << *yytext;
3305<ReadInitializer,ReadInitializerPtr>[;,] {
3307 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3309 yyextra->current->fileName = yyextra->fileName;
3310 yyextra->current->startLine = yyextra->yyLineNr;
3311 yyextra->current->startColumn = yyextra->yyColNr;
3312 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3313 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3314 yyextra->current->section = EntryType::makeVariable();
3315 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3319 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3322 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3323 BEGIN(yyextra->lastInitializerContext);
3325 else if (*yytext==
',' && yyextra->initBracketCount==0)
3328 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3329 BEGIN(yyextra->lastInitializerContext);
3333 yyextra->current->initializer << *yytext;
3336<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3337 if (!yyextra->insideCpp)
3343 yyextra->current->initializer << yytext;
3345 yyextra->lastRawStringContext = YY_START;
3346 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3351<ReadInitializer>{CPPC}.* {
3352 if (yyextra->keepComment)
3354 yyextra->current->initializer << yytext;
3361<ReadInitializer>{CCS} {
3362 if (yyextra->keepComment)
3364 yyextra->current->initializer << yytext;
3365 BEGIN(InitCopyComment);
3372<InitCopyComment>{CCE} {
3373 yyextra->current->initializer << yytext;
3374 BEGIN(ReadInitializer);
3376<InitCopyComment>\n {
3378 yyextra->current->initializer << yytext;
3381 yyextra->current->initializer << yytext;
3383<InitCopyComment><<EOF>> {
3384 warn(yyextra->fileName,yyextra->yyLineNr,
3385 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3388<RawGString>{RAWEND} {
3391 *yyextra->pCopyRawGString << yytext;
3392 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3399<RawGString>[^)\n]+ {
3400 *yyextra->pCopyRawGString << yytext;
3403 *yyextra->pCopyRawGString << yytext;
3406 *yyextra->pCopyRawGString << yytext;
3409<RawString>{RAWEND} {
3410 *yyextra->pCopyRawString+=yytext;
3411 yyextra->fullArgString+=yytext;
3414 BEGIN(yyextra->lastRawStringContext);
3418 *yyextra->pCopyRawString += yytext;
3419 yyextra->fullArgString+=yytext;
3422 *yyextra->pCopyRawString += yytext;
3423 yyextra->fullArgString+=yytext;
3426 *yyextra->pCopyRawString += yytext;
3427 yyextra->fullArgString+=yytext;
3430<ReadInitializer,ReadInitializerPtr>\" {
3431 if (yyextra->insideIDL && yyextra->insideCppQuote)
3437 yyextra->lastStringContext=YY_START;
3438 yyextra->current->initializer << yytext;
3439 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3440 yyextra->stopAtInvalidString=
false;
3444<ReadInitializer,ReadInitializerPtr>"->" {
3445 yyextra->current->initializer << yytext;
3447<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3448 yyextra->current->initializer << yytext;
3450<ReadInitializer,ReadInitializerPtr>(">>") {
3451 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3454 yyextra->initBracketCount-=2;
3455 yyextra->sharpCount-=2;
3457 yyextra->current->initializer << yytext;
3459<ReadInitializer,ReadInitializerPtr>(">=") {
3460 yyextra->current->initializer << yytext;
3462<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3463 yyextra->initBracketCount++;
3464 yyextra->sharpCount++;
3465 yyextra->current->initializer << *yytext;
3467<ReadInitializer,ReadInitializerPtr>[>\]})] {
3468 yyextra->initBracketCount--;
3469 yyextra->sharpCount--;
3472 yyextra->current->endBodyLine=yyextra->yyLineNr;
3474 yyextra->current->initializer << *yytext;
3476<ReadInitializer,ReadInitializerPtr>\' {
3477 if (yyextra->insidePHP)
3479 yyextra->current->initializer << yytext;
3480 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3481 yyextra->lastStringContext=YY_START;
3482 BEGIN(CopyPHPGString);
3486 yyextra->current->initializer << yytext;
3489<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3490 if (yyextra->insidePHP)
3496 yyextra->current->initializer << yytext;
3499<ReadInitializer,ReadInitializerPtr>\n {
3500 yyextra->current->initializer << *yytext;
3503<ReadInitializer,ReadInitializerPtr>"@\"" {
3505 yyextra->current->initializer << yytext;
3506 if (!yyextra->insideCS && !yyextra->insideObjC)
3513 yyextra->lastSkipVerbStringContext=YY_START;
3514 yyextra->pSkipVerbString=&yyextra->current->initializer;
3515 BEGIN(SkipVerbString);
3518<SkipVerbString>[^\n"\\]+ {
3519 *yyextra->pSkipVerbString << yytext;
3521<SkipVerbString>"\\\\" {
3522 if (yyextra->insideCS) REJECT
3523 *yyextra->pSkipVerbString << yytext;
3525<SkipVerbString>"\\\"" {
3526 if (yyextra->insideCS) REJECT
3527 *yyextra->pSkipVerbString << yytext;
3529<SkipVerbString>"\"\"" {
3530 *yyextra->pSkipVerbString << yytext;
3532<SkipVerbString>"\"" {
3533 *yyextra->pSkipVerbString << *yytext;
3534 BEGIN(yyextra->lastSkipVerbStringContext);
3537 *yyextra->pSkipVerbString << *yytext;
3541 *yyextra->pSkipVerbString << *yytext;
3543<ReadInitializer,ReadInitializerPtr>"?>" {
3544 if (yyextra->insidePHP)
3545 BEGIN( FindMembersPHP );
3547 yyextra->current->initializer << yytext;
3549<ReadInitializer,ReadInitializerPtr>. {
3550 yyextra->current->initializer << *yytext;
3554<CopyString,CopyPHPString>\\. {
3555 *yyextra->pCopyQuotedString+=yytext;
3558 *yyextra->pCopyQuotedString+=*yytext;
3559 BEGIN( yyextra->lastStringContext );
3562 *yyextra->pCopyQuotedString+=*yytext;
3563 BEGIN( yyextra->lastStringContext );
3565<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3566 *yyextra->pCopyQuotedString+=yytext;
3568<CopyString,CopyPHPString>\n {
3569 *yyextra->pCopyQuotedString+=*yytext;
3572<CopyString,CopyPHPString>. {
3573 *yyextra->pCopyQuotedString+=*yytext;
3577<CopyGString,CopyPHPGString>\\. {
3578 *yyextra->pCopyQuotedGString << yytext;
3581 *yyextra->pCopyQuotedGString << *yytext;
3582 BEGIN( yyextra->lastStringContext );
3585 *yyextra->pCopyQuotedGString << *yytext;
3586 BEGIN( yyextra->lastStringContext );
3588<CopyGString,CopyPHPGString>"<?php" {
3589 *yyextra->pCopyQuotedGString << yytext;
3590 BEGIN( yyextra->lastStringContext );
3592<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3593 *yyextra->pCopyQuotedGString << yytext;
3595<CopyGString,CopyPHPGString>\n {
3596 *yyextra->pCopyQuotedGString << *yytext;
3597 if (yyextra->stopAtInvalidString)
3599 BEGIN( yyextra->lastStringContext );
3606<CopyGString,CopyPHPGString>. {
3607 *yyextra->pCopyQuotedGString << *yytext;
3612 *yyextra->pCopyRoundString += *yytext;
3613 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3614 yyextra->lastStringContext=YY_START;
3618 *yyextra->pCopyRoundString += *yytext;
3619 yyextra->roundCount++;
3622 *yyextra->pCopyRoundString += *yytext;
3623 if (--yyextra->roundCount<0)
3624 BEGIN(yyextra->lastRoundContext);
3628 *yyextra->pCopyRoundString += *yytext;
3631 if (yyextra->insidePHP)
3633 yyextra->current->initializer << yytext;
3634 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3635 yyextra->lastStringContext=YY_START;
3636 BEGIN(CopyPHPString);
3640 *yyextra->pCopyRoundString += yytext;
3643<CopyRound>{CHARLIT} {
3644 if (yyextra->insidePHP)
3650 *yyextra->pCopyRoundString+=yytext;
3653<CopyRound>[^"'()\n,]+ {
3654 *yyextra->pCopyRoundString+=yytext;
3657 *yyextra->pCopyRoundString+=*yytext;
3662 *yyextra->pCopySharpString += *yytext;
3663 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3664 yyextra->lastStringContext=YY_START;
3668 *yyextra->pCopySharpString += *yytext;
3669 yyextra->sharpCount++;
3672 *yyextra->pCopySharpString += *yytext;
3673 if (--yyextra->sharpCount<0)
3675 BEGIN(yyextra->lastSharpContext);
3680 *yyextra->pCopySharpString += *yytext;
3683 if (yyextra->insidePHP)
3685 yyextra->current->initializer << yytext;
3686 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3687 yyextra->lastStringContext=YY_START;
3688 BEGIN(CopyPHPString);
3692 *yyextra->pCopySharpString += yytext;
3695<CopySharp>{CHARLIT} {
3696 if (yyextra->insidePHP)
3702 *yyextra->pCopySharpString+=yytext;
3705<CopySharp>[^"'<>\n,]+ {
3706 *yyextra->pCopySharpString+=yytext;
3709 *yyextra->pCopySharpString+=*yytext;
3715 *yyextra->pCopyRoundGString << *yytext;
3716 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3717 yyextra->lastStringContext=YY_START;
3721 *yyextra->pCopyRoundGString << *yytext;
3722 yyextra->roundCount++;
3725 *yyextra->pCopyRoundGString << *yytext;
3726 if (--yyextra->roundCount<0)
3727 BEGIN(yyextra->lastRoundContext);
3731 *yyextra->pCopyRoundGString << *yytext;
3734 if (yyextra->insidePHP)
3736 yyextra->current->initializer << yytext;
3737 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3738 yyextra->lastStringContext=YY_START;
3739 BEGIN(CopyPHPGString);
3743 *yyextra->pCopyRoundGString << yytext;
3746<GCopyRound>{CHARLIT} {
3747 if (yyextra->insidePHP)
3753 *yyextra->pCopyRoundGString << yytext;
3757 if (!yyextra->insideCS) REJECT;
3758 *yyextra->pCopyRoundGString << yytext;
3759 yyextra->lastSkipVerbStringContext=YY_START;
3760 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3761 BEGIN(SkipVerbString);
3763<GCopyRound>[^"'()\n\/,R]+ {
3764 *yyextra->pCopyRoundGString << yytext;
3766<GCopyRound>{RAWBEGIN} {
3767 *yyextra->pCopyRoundGString << yytext;
3769 yyextra->lastRawStringContext = YY_START;
3770 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3774 *yyextra->pCopyRoundGString << *yytext;
3779 *yyextra->pCopySquareGString << *yytext;
3780 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3781 yyextra->lastStringContext=YY_START;
3785 *yyextra->pCopySquareGString << *yytext;
3786 if (yyextra->insidePHP)
3788 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3789 yyextra->lastStringContext=YY_START;
3790 BEGIN(CopyPHPGString);
3794 *yyextra->pCopySquareGString << *yytext;
3795 yyextra->squareCount++;
3798 *yyextra->pCopySquareGString << *yytext;
3799 if (--yyextra->squareCount<0)
3800 BEGIN(yyextra->lastSquareContext);
3804 *yyextra->pCopySquareGString << *yytext;
3807 if (yyextra->insidePHP)
3809 yyextra->current->initializer << yytext;
3810 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3811 yyextra->lastStringContext=YY_START;
3812 BEGIN(CopyPHPGString);
3816 *yyextra->pCopySquareGString << yytext;
3819<GCopySquare>{CHARLIT} {
3820 if (yyextra->insidePHP)
3826 *yyextra->pCopySquareGString << yytext;
3829<GCopySquare>[^"'\[\]\n\/,]+ {
3830 *yyextra->pCopySquareGString << yytext;
3833 *yyextra->pCopySquareGString << *yytext;
3838 *yyextra->pCopyCurlyString += *yytext;
3839 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3840 yyextra->lastStringContext=YY_START;
3841 yyextra->keepComment=
false;
3845 *yyextra->pCopyCurlyString += *yytext;
3846 if (yyextra->insidePHP)
3848 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3849 yyextra->lastStringContext=YY_START;
3850 yyextra->keepComment=
false;
3851 BEGIN(CopyPHPString);
3855 *yyextra->pCopyCurlyString += *yytext;
3856 yyextra->curlyCount++;
3859 *yyextra->pCopyCurlyString += *yytext;
3860 if (--yyextra->curlyCount<0)
3862 yyextra->keepComment=
false;
3863 BEGIN(yyextra->lastCurlyContext);
3866<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3872 *yyextra->pCopyCurlyString += yytext;
3875<CopyCurly>[^"'{}\/\n,]+ {
3876 *yyextra->pCopyCurlyString += yytext;
3878<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3881 *yyextra->pCopyCurlyString += *yytext;
3884 *yyextra->pCopyCurlyString += *yytext;
3886<CopyCurly>{CPPC}[^\n]* {
3887 if (yyextra->keepComment)
3889 *yyextra->pCopyCurlyString += yytext;
3897 if (yyextra->keepComment)
3899 *yyextra->pCopyCurlyString += yytext;
3908 *yyextra->pCopyCurlyString += yytext;
3913 *yyextra->pCopyCurlyString += *yytext;
3916 *yyextra->pCopyCurlyString += *yytext;
3918<CopyComment><<EOF>> {
3919 warn(yyextra->fileName,yyextra->yyLineNr,
3920 "reached end of file while inside a C style comment block!");
3925<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3927<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3929 int s = line.
find(
' ');
3930 int e = line.
find(
'"',s);
3931 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3932 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3939 *yyextra->pCopyCurlyGString << *yytext;
3940 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3941 yyextra->lastStringContext=YY_START;
3942 yyextra->keepComment =
false;
3946 *yyextra->pCopyCurlyGString << *yytext;
3947 if (yyextra->insidePHP)
3949 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3950 yyextra->lastStringContext=YY_START;
3951 yyextra->keepComment =
false;
3952 BEGIN(CopyPHPGString);
3956 *yyextra->pCopyCurlyGString << *yytext;
3957 yyextra->curlyCount++;
3960 *yyextra->pCopyCurlyGString << *yytext;
3961 if (--yyextra->curlyCount<0)
3963 yyextra->current->endBodyLine = yyextra->yyLineNr;
3964 yyextra->keepComment =
false;
3965 BEGIN(yyextra->lastCurlyContext);
3968<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3974 *yyextra->pCopyCurlyGString << yytext;
3977<GCopyCurly>[^"'{}\/\n,]+ {
3978 *yyextra->pCopyCurlyGString << yytext;
3981 *yyextra->pCopyCurlyGString << yytext;
3983<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3986 *yyextra->pCopyCurlyGString << *yytext;
3989 *yyextra->pCopyCurlyGString << *yytext;
3991<GCopyCurly>{CPPC}[^\n]* {
3992 if (yyextra->keepComment)
3994 *yyextra->pCopyCurlyGString << yytext;
4002 if (yyextra->keepComment)
4004 *yyextra->pCopyCurlyGString << yytext;
4005 BEGIN(GCopyComment);
4012<GCopyComment>{CCE} {
4013 *yyextra->pCopyCurlyGString << yytext;
4018 *yyextra->pCopyCurlyGString << *yytext;
4021 *yyextra->pCopyCurlyGString << *yytext;
4023<GCopyComment><<EOF>> {
4024 warn(yyextra->fileName,yyextra->yyLineNr,
4025 "reached end of file while inside a C style comment block!");
4033 if (yyextra->current->type.isEmpty() &&
4034 yyextra->current->name==
"enum")
4036 yyextra->current->section = EntryType::makeEnum();
4037 yyextra->current->name.clear();
4038 yyextra->current->args.clear();
4039 BEGIN(EnumBaseType);
4043 if (yyextra->current->type.isEmpty())
4046 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4049 yyextra->current->bitfields+=
":";
4053 yyextra->current->bitfields+=*yytext;
4056 yyextra->current->args+=*yytext;
4060 yyextra->current->args+=
' ';
4063 QCString oldType = yyextra->current->type;
4064 if (yyextra->current->bodyLine==-1)
4066 yyextra->current->bodyLine = yyextra->yyLineNr;
4067 yyextra->current->bodyColumn = yyextra->yyColNr;
4069 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4071 yyextra->current->type = yyextra->current->type.mid(3);
4073 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4075 yyextra->current->type.prepend(
"typedef ");
4077 bool isStatic = yyextra->current->isStatic;
4078 Protection prot = yyextra->current->protection;
4079 bool isConcept = yyextra->current->section.isConcept();
4080 bool isModule = yyextra->current->section.isModuleDoc();
4083 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4088 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4091 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4093 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4095 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4096 if (yyextra->current->section.isClass())
4100 yyextra->current->section = EntryType::makeVariable() ;
4101 yyextra->current->fileName = yyextra->fileName;
4102 yyextra->current->startLine = yyextra->yyBegLineNr;
4103 yyextra->current->startColumn = yyextra->yyBegColNr;
4104 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4107 if ( *yytext ==
',')
4109 yyextra->current->isStatic = isStatic;
4110 yyextra->current->protection = prot;
4111 yyextra->current->name.clear();
4112 yyextra->current->args.clear();
4113 yyextra->current->brief.clear();
4114 yyextra->current->doc.clear();
4115 yyextra->current->initializer.str(std::string());
4116 yyextra->current->bitfields.clear();
4121 yyextra->mtype = MethodTypes::Method;
4122 yyextra->virt = Specifier::Normal;
4123 yyextra->current->bodyLine = -1;
4124 yyextra->current->bodyColumn = 1;
4125 yyextra->current->groups.clear();
4131 if (yyextra->insideSlice)
4133 yyextra->squareCount=1;
4134 yyextra->lastSquareContext = YY_START;
4135 yyextra->current->metaData +=
"[";
4136 BEGIN( SliceMetadata );
4138 else if (!yyextra->insideCS &&
4139 (yyextra->current->name.isEmpty() ||
4140 yyextra->current->name==
"typedef"
4144 yyextra->squareCount=1;
4145 yyextra->lastSquareContext = YY_START;
4146 yyextra->idlAttr.clear();
4147 yyextra->idlProp.clear();
4148 yyextra->current->mtype = yyextra->mtype;
4151 yyextra->current->mtype == MethodTypes::Property)
4153 yyextra->odlProp =
true;
4154 yyextra->current->spec.setGettable(
true).setSettable(
true);
4157 BEGIN( IDLAttribute );
4159 else if (yyextra->insideCS &&
4160 yyextra->current->name.isEmpty())
4162 yyextra->squareCount=1;
4163 yyextra->lastSquareContext = YY_START;
4166 yyextra->current->args.clear();
4167 BEGIN( SkipSquare );
4171 yyextra->current->args += yytext ;
4172 yyextra->squareCount=1;
4173 yyextra->externLinkage=
FALSE;
4178 yyextra->squareCount++;
4179 yyextra->current->metaData +=
"[";
4181<SliceMetadata>{BN}* {
4184<SliceMetadata>\"[^\"]*\" {
4185 yyextra->current->metaData += yytext;
4188 yyextra->current->metaData += yytext;
4191 yyextra->current->metaData += yytext;
4192 if (--yyextra->squareCount<=0)
4194 BEGIN (yyextra->lastSquareContext);
4198 yyextra->current->type +=
"(";
4199 yyextra->roundCount++;
4201<SliceOptional>[0-9]+ {
4202 yyextra->current->type += yytext;
4205 yyextra->current->type +=
")";
4206 if(--yyextra->roundCount<=0)
4208 BEGIN (yyextra->lastModifierContext);
4213 if (--yyextra->squareCount<=0)
4216 if (yyextra->current->mtype == MethodTypes::Property)
4217 BEGIN( IDLPropName );
4219 BEGIN( yyextra->lastSquareContext );
4222<IDLAttribute>"propput" {
4225 yyextra->current->mtype = MethodTypes::Property;
4227 yyextra->current->spec.setSettable(
true);
4229<IDLAttribute>"propget" {
4232 yyextra->current->mtype = MethodTypes::Property;
4234 yyextra->current->spec.setGettable(
true);
4236<IDLAttribute>"property" {
4237 yyextra->current->spec.setProperty(
true);
4239<IDLAttribute>"attribute" {
4240 yyextra->current->spec.setAttribute(
true);
4242<IDLAttribute>"optional" {
4243 yyextra->current->spec.setOptional(
true);
4245<IDLAttribute>"readonly" {
4248 yyextra->current->spec.setSettable(
false);
4252 yyextra->current->spec.setReadonly(
true);
4255<IDLAttribute>"bound" {
4256 yyextra->current->spec.setBound(
true);
4258<IDLAttribute>"removable" {
4259 yyextra->current->spec.setRemovable(
true);
4261<IDLAttribute>"constrained" {
4262 yyextra->current->spec.setConstrained(
true);
4264<IDLAttribute>"transient" {
4265 yyextra->current->spec.setTransient(
true);
4267<IDLAttribute>"maybevoid" {
4268 yyextra->current->spec.setMaybeVoid(
true);
4270<IDLAttribute>"maybedefault" {
4271 yyextra->current->spec.setMaybeDefault(
true);
4273<IDLAttribute>"maybeambiguous" {
4274 yyextra->current->spec.setMaybeAmbiguous(
true);
4278<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4281 if (yyextra->odlProp)
4283 yyextra->idlProp = yytext;
4286<IDLPropName>{ID}{BN}*"(" {
4287 yyextra->current->name = yytext;
4288 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4289 yyextra->current->startLine = yyextra->yyLineNr;
4290 yyextra->current->startColumn = yyextra->yyColNr;
4293<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4294 if (yyextra->odlProp)
4296 yyextra->idlProp += yytext;
4299<IDLPropName>{ID}{BNopt}/";" {
4300 if (yyextra->odlProp)
4302 yyextra->current->name = yytext;
4303 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4304 yyextra->odlProp =
false;
4309<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4310 yyextra->idlAttr = yytext;
4311 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4314 yyextra->idlProp = yytext;
4316<IDLProp>{BN}*{ID}{BN}*"," {
4317 if (yyextra->current->args.isEmpty())
4318 yyextra->current->args =
"(";
4320 yyextra->current->args +=
", ";
4321 yyextra->current->args += yyextra->idlAttr;
4322 yyextra->current->args +=
" ";
4323 yyextra->current->args += yyextra->idlProp;
4324 yyextra->current->args +=
" ";
4325 yyextra->current->args += yytext;
4326 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4327 yyextra->idlProp.clear();
4328 yyextra->idlAttr.clear();
4331<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4335 yyextra->current->fileName = yyextra->fileName;
4336 yyextra->current->type = yyextra->idlProp;
4337 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4338 if (!yyextra->current->args.isEmpty())
4339 yyextra->current->args +=
")";
4340 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4341 yyextra->current->section = EntryType::makeVariable();
4342 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4344 BEGIN( FindMembers );
4349<Array>"]" { yyextra->current->args += *yytext ;
4350 if (--yyextra->squareCount<=0)
4351 BEGIN( FindMembers ) ;
4353<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4354 if (--yyextra->squareCount<=0)
4355 BEGIN( SFunction ) ;
4357<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4358 yyextra->squareCount++;
4360<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4361<SkipSquare>"[" { yyextra->squareCount++; }
4363 if (--yyextra->squareCount<=0)
4364 BEGIN( yyextra->lastSquareContext );
4367 yyextra->lastStringContext=YY_START;
4368 BEGIN( SkipString );
4370<SkipSquare>[^\n\[\]\"]+
4371<FindMembers>"<" {
addType(yyscanner);
4372 yyextra->current->type += yytext ;
4375<Sharp>">" { yyextra->current->type += *yytext ;
4376 if (--yyextra->sharpCount<=0)
4377 BEGIN( FindMembers ) ;
4379<Sharp>"<" { yyextra->current->type += *yytext ;
4380 yyextra->sharpCount++;
4383 yyextra->current->type +=
' ';
4386<Sharp>. { yyextra->current->type += *yytext ; }
4389 yyextra->current->bodyLine = yyextra->yyLineNr;
4390 yyextra->current->bodyColumn = yyextra->yyColNr;
4391 yyextra->current->name = yytext;
4396 yyextra->lastInitializerContext = YY_START;
4397 yyextra->sharpCount=0;
4398 yyextra->initBracketCount=0;
4399 yyextra->current->initializer.str(
"=");
4400 BEGIN(ReadInitializer);
4403 yyextra->lastInitializerContext = YY_START;
4404 yyextra->sharpCount=0;
4405 yyextra->initBracketCount=0;
4406 yyextra->current->initializer.str(yytext);
4407 BEGIN(ReadInitializer);
4410 if (yyextra->insideJava)
4412 if (!yyextra->current->name.isEmpty())
4414 yyextra->current->fileName = yyextra->fileName;
4415 yyextra->current->startLine = yyextra->yyLineNr;
4416 yyextra->current->startColumn = yyextra->yyColNr;
4417 if (!yyextra->current_root->spec.isEnum())
4419 yyextra->current->type =
"@";
4421 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4422 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4423 yyextra->current->section = EntryType::makeVariable();
4424 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4428 BEGIN( FindMembers );
4439 if (!yyextra->current->name.isEmpty())
4441 yyextra->current->fileName = yyextra->fileName;
4442 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4444 yyextra->current->startLine = yyextra->current->bodyLine;
4445 yyextra->current->startColumn = yyextra->current->bodyColumn;
4449 yyextra->current->startLine = yyextra->yyLineNr;
4450 yyextra->current->startColumn = yyextra->yyColNr;
4452 if (!yyextra->current_root->spec.isEnum())
4454 yyextra->current->type =
"@";
4456 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4457 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4458 yyextra->current->section = EntryType::makeVariable();
4460 if (!yyextra->insideCS && !yyextra->insideJava &&
4461 !yyextra->current_root->spec.isStrong())
4468 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4470 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4475 yyextra->current->reset();
4480 yyextra->squareCount=1;
4481 yyextra->lastSquareContext = YY_START;
4484<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4485<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4486<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4489 yyextra->current->program << yytext ;
4492<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4493 yyextra->current->program << yytext ;
4494 yyextra->pSkipInterpString = &yyextra->current->program;
4495 yyextra->lastSkipInterpStringContext=YY_START;
4496 yyextra->strCurlyCount = 0;
4497 BEGIN( SkipInterpString );
4499<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})* {
4500 *yyextra->pSkipInterpString << yytext;
4502<SkipInterpString>"{" {
4503 *yyextra->pSkipInterpString << *yytext;
4504 yyextra->strCurlyCount++;
4506<SkipInterpString>"}" {
4507 *yyextra->pSkipInterpString << *yytext;
4508 yyextra->strCurlyCount--;
4510<SkipInterpString>\" {
4511 *yyextra->pSkipInterpString << *yytext;
4512 if (yyextra->strCurlyCount==0)
4514 BEGIN( yyextra->lastSkipInterpStringContext );
4517<SkipInterpString>. {
4518 *yyextra->pSkipInterpString << *yytext;
4521<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4522 yyextra->current->program << yytext ;
4523 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4524 yyextra->lastSkipInterpVerbStringContext=YY_START;
4525 yyextra->strCurlyCount = 0;
4526 BEGIN( SkipInterpVerbString );
4528<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4529 *yyextra->pSkipInterpVerbString << yytext;
4531<SkipInterpVerbString>"{" {
4532 *yyextra->pSkipInterpVerbString << *yytext;
4533 yyextra->strCurlyCount++;
4535<SkipInterpVerbString>"}" {
4536 *yyextra->pSkipInterpVerbString << *yytext;
4537 yyextra->strCurlyCount--;
4539<SkipInterpVerbString>\" {
4540 *yyextra->pSkipInterpVerbString << *yytext;
4541 if (yyextra->strCurlyCount==0)
4543 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4546<SkipInterpVerbString>. {
4547 *yyextra->pSkipInterpVerbString << *yytext;
4549<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4550<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4551 yyextra->pSkipVerbString = &yyextra->current->program;
4552 yyextra->lastSkipVerbStringContext=YY_START;
4553 BEGIN( SkipVerbString );
4555<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4557 yyextra->current->program << yytext ;
4558 yyextra->pCopyHereDocGString = &yyextra->current->program;
4559 yyextra->lastHereDocContext=YY_START;
4560 BEGIN( CopyHereDoc );
4567<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4568 yyextra->current->program << yytext;
4570 yyextra->lastRawStringContext = YY_START;
4571 yyextra->pCopyRawGString = &yyextra->current->program;
4574<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4575 yyextra->pCopyQuotedGString = &yyextra->current->program;
4576 yyextra->lastStringContext=YY_START;
4577 yyextra->stopAtInvalidString=
false;
4578 BEGIN( CopyGString );
4580<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4581<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4582 yyextra->lastContext = YY_START ;
4585<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4586 ++yyextra->yyLineNr ;
4587 yyextra->lastContext = YY_START ;
4590<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4591 if (!yyextra->insidePHP)
4593 yyextra->current->program << yytext;
4597 yyextra->current->program << yytext;
4598 yyextra->pCopyQuotedGString = &yyextra->current->program;
4599 yyextra->lastStringContext=YY_START;
4600 BEGIN(CopyPHPGString);
4603<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4604 if (yyextra->insidePHP)
4611 yyextra->current->program << yytext;
4614<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4615 ++yyextra->curlyCount ;
4618 yyextra->current->program << yytext ;
4619 --yyextra->curlyCount ;
4621<ReadBody,ReadNSBody>"}" {
4622 if ( yyextra->curlyCount>0 )
4624 yyextra->current->program << yytext ;
4625 --yyextra->curlyCount ;
4629 yyextra->current->endBodyLine = yyextra->yyLineNr;
4630 std::shared_ptr<Entry> original_root = yyextra->current_root;
4631 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4635 QCString doc = yyextra->current->doc;
4636 int docLine = yyextra->current->docLine;
4637 QCString docFile = yyextra->current->docFile;
4638 QCString brief = yyextra->current->brief;
4639 int briefLine = yyextra->current->briefLine;
4640 QCString briefFile = yyextra->current->briefFile;
4642 yyextra->current->doc =
"";
4643 yyextra->current->docLine = 0;
4644 yyextra->current->docFile =
"";
4645 yyextra->current->brief =
"";
4646 yyextra->current->briefLine = 0;
4647 yyextra->current->briefFile =
"";
4648 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4650 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4651 yyextra->current->program.str(std::string());
4652 new_current->name = yyextra->current->name.mid(split_point + 2);
4653 yyextra->current->name = yyextra->current->name.left(split_point);
4654 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4656 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4657 yyextra->current_root = yyextra->current;
4658 yyextra->current = new_current;
4661 yyextra->current->doc = doc;
4662 yyextra->current->docLine = docLine;
4663 yyextra->current->docFile = docFile;
4664 yyextra->current->brief = brief;
4665 yyextra->current->briefLine = briefLine;
4666 yyextra->current->briefFile = briefFile;
4668 QCString &cn = yyextra->current->name;
4669 QCString rn = yyextra->current_root->name;
4675 if (yyextra->isTypedef && cn.
isEmpty())
4678 BEGIN( TypedefName );
4682 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4684 yyextra->current->program <<
',';
4689 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4690 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4692 if (yyextra->insideObjC &&
4693 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4696 BEGIN( ReadBodyIntf ) ;
4700 yyextra->memspecEntry = yyextra->current;
4701 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4702 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4703 if (yyextra->current->section.isNamespace() ||
4704 yyextra->current->spec.isInterface() ||
4705 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4706 yyextra->insideSlice
4709 yyextra->current->reset();
4710 yyextra->current_root = std::move(original_root);
4712 yyextra->memspecEntry.reset();
4713 BEGIN( FindMembers ) ;
4717 static const reg::Ex re(R
"(@\d+$)");
4718 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4719 !
reg::search(yyextra->memspecEntry->name.str(),re))
4722 yyextra->current->doc.clear();
4723 yyextra->current->brief.clear();
4725 BEGIN( MemberSpec ) ;
Class representing a regular expression.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
4731<ReadBody>"}"{BN}+"typedef"{BN}+ {
4733 if ( yyextra->curlyCount>0 )
4735 yyextra->current->program << yytext ;
4736 --yyextra->curlyCount ;
4740 yyextra->isTypedef =
TRUE;
4741 yyextra->current->endBodyLine = yyextra->yyLineNr;
4742 QCString &cn = yyextra->current->name;
4743 QCString rn = yyextra->current_root->name;
4748 BEGIN( TypedefName );
4751<TypedefName>("const"|"volatile"){BN} {
4753 yyextra->current->type.prepend(yytext);
4756 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4758 yyextra->current->program <<
",";
4760 yyextra->current->name=yytext;
4762 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4763 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4765 if (!yyextra->firstTypedefEntry)
4767 yyextra->firstTypedefEntry = yyextra->current;
4769 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4771 yyextra->isTypedef=
TRUE;
4772 BEGIN(MemberSpecSkip);
4776 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4778 yyextra->current->program <<
',';
4781 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4782 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4783 yyextra->memspecEntry = yyextra->current;
4784 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4787 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4789<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4791 int i=0,l=(int)yyleng,j;
4792 while (i<l && (!
isId(yytext[i]))) i++;
4794 j=yyextra->msName.
find(
"[");
4797 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4798 yyextra->msName=yyextra->msName.left(j);
4803 if (yyextra->firstTypedefEntry)
4805 if (yyextra->firstTypedefEntry->spec.isStruct())
4807 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4809 else if (yyextra->firstTypedefEntry->spec.isUnion())
4811 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4813 else if (yyextra->firstTypedefEntry->section.isEnum())
4815 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4819 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4825 yyextra->current->name = yyextra->msName;
4831 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4837 const Entry *p=yyextra->current.get();
4845 int pi = (i==-1) ? 0 : i+2;
4855 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4859 if (!yyextra->msName.isEmpty()
4865 if (typedefHidesStruct &&
4866 yyextra->isTypedef &&
4867 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4868 yyextra->msType.stripWhiteSpace().isEmpty() &&
4869 yyextra->memspecEntry)
4871 yyextra->memspecEntry->name=yyextra->msName;
4875 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4876 varEntry->lang = yyextra->language;
4877 varEntry->protection = yyextra->current->protection ;
4878 varEntry->mtype = yyextra->current->mtype;
4879 varEntry->virt = yyextra->current->virt;
4880 varEntry->isStatic = yyextra->current->isStatic;
4881 varEntry->section = EntryType::makeVariable();
4882 varEntry->name = yyextra->msName.stripWhiteSpace();
4883 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4884 varEntry->args = yyextra->msArgs;
4885 if (yyextra->isTypedef)
4887 varEntry->type.prepend(
"typedef ");
4890 if (typedefHidesStruct &&
4891 yyextra->isTypedef &&
4892 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4893 yyextra->memspecEntry
4896 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4900 varEntry->type+=yyextra->current->name+yyextra->msType;
4902 varEntry->fileName = yyextra->fileName;
4903 varEntry->startLine = yyextra->yyLineNr;
4904 varEntry->startColumn = yyextra->yyColNr;
4905 varEntry->doc = yyextra->current->doc;
4906 varEntry->brief = yyextra->current->brief;
4907 varEntry->mGrpId = yyextra->current->mGrpId;
4908 varEntry->initializer.str(yyextra->current->initializer.str());
4909 varEntry->groups = yyextra->current->groups;
4910 varEntry->sli = yyextra->current->sli;
4915 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4920 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4922 if (!yyextra->current->doc.isEmpty())
4924 yyextra->memspecEntry->doc += yyextra->current->doc;
4926 if (!yyextra->current->brief.isEmpty())
4928 yyextra->memspecEntry->brief += yyextra->current->brief;
4931 yyextra->msType.clear();
4932 yyextra->msName.clear();
4933 yyextra->msArgs.clear();
4934 yyextra->isTypedef=
FALSE;
4935 yyextra->firstTypedefEntry.reset();
4936 yyextra->memspecEntry.reset();
4937 yyextra->current->reset();
4939 BEGIN( FindMembers );
4943 yyextra->current->doc.clear();
4944 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
4949 yyextra->lastInitializerContext=YY_START;
4950 yyextra->sharpCount=0;
4951 yyextra->initBracketCount=0;
4952 yyextra->current->initializer.str(yytext);
4953 BEGIN(ReadInitializer);
4964<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4965<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4966<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4969<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4970 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4972 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4973 yyextra->insideObjC=
FALSE;
4974 BEGIN( FindMembers );
4976<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4977<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4979<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4980<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4981 if (yyextra->insidePHP)
4987 yyextra->current->bodyLine = yyextra->yyLineNr;
4988 yyextra->current->bodyColumn = yyextra->yyColNr;
4991 yyextra->funcPtrType=yytext;
4992 yyextra->roundCount=0;
4997<FuncPtr>{SCOPENAME} {
4998 yyextra->current->name = yytext;
5001 BEGIN( FuncPtrOperator );
5005 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5007 yyextra->funcPtrType += yyextra->current->name;
5011 BEGIN( EndFuncPtr );
5018<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5019 yyextra->current->name += yytext;
5020 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5023<FuncPtrOperator>\n {
5025 yyextra->current->name += *yytext;
5027<FuncPtrOperator>"(" {
5029 BEGIN( EndFuncPtr );
5032 yyextra->current->name += *yytext;
5034<EndFuncPtr>")"{BNopt}/";" {
5036 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5039<EndFuncPtr>")"{BNopt}/"(" {
5041 if (yyextra->funcPtrType!=
"(")
5043 yyextra->current->type+=yyextra->funcPtrType+
")";
5047<EndFuncPtr>")"{BNopt}/"[" {
5049 yyextra->current->type+=yyextra->funcPtrType;
5050 yyextra->current->args +=
")";
5055 yyextra->current->args += *yytext ;
5058 yyextra->current->bodyLine = yyextra->yyLineNr;
5059 yyextra->current->bodyColumn = yyextra->yyColNr;
5060 yyextra->currentArgumentContext = FuncFuncEnd;
5061 yyextra->fullArgString=yyextra->current->args;
5062 yyextra->copyArgString=&yyextra->current->args;
5063 BEGIN( ReadFuncArgType ) ;
5065<EndFuncPtr>"["[^\n\]]*"]" {
5066 yyextra->funcPtrType+=yytext;
5072 yyextra->current->args += *yytext ;
5073 ++yyextra->roundCount;
5076 yyextra->current->args += *yytext ;
5077 if ( yyextra->roundCount )
5078 --yyextra->roundCount;
5084<FuncFuncEnd>")"{BN}*"(" {
5086 yyextra->current->type+=yyextra->funcPtrType+
")(";
5087 BEGIN(FuncFuncType);
5089<FuncFuncEnd>")"{BNopt}/[;{] {
5091 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5094<FuncFuncEnd>")"{BNopt}/"[" {
5096 yyextra->current->type+=yyextra->funcPtrType;
5097 yyextra->current->args+=
")";
5098 BEGIN(FuncFuncArray);
5101 yyextra->current->args += *yytext;
5104 yyextra->current->type += *yytext;
5105 yyextra->roundCount++;
5108 yyextra->current->type += *yytext;
5109 if (yyextra->roundCount)
5110 --yyextra->roundCount;
5114<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5115<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5117 yyextra->current->type += *yytext;
5119<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5120 if (yyextra->current->type.startsWith(
"typedef") &&
5121 yyextra->current->bodyLine==-1)
5124 yyextra->current->bodyLine = yyextra->yyLineNr;
5125 yyextra->current->bodyColumn = yyextra->yyColNr;
5126 BEGIN( GetCallType );
5128 else if (!yyextra->current->name.isEmpty())
5130 yyextra->current->args = yytext;
5131 yyextra->current->bodyLine = yyextra->yyLineNr;
5132 yyextra->current->bodyColumn = yyextra->yyColNr;
5133 yyextra->currentArgumentContext = FuncQual;
5134 yyextra->fullArgString=yyextra->current->args;
5135 yyextra->copyArgString=&yyextra->current->args;
5136 BEGIN( ReadFuncArgType ) ;
5140<GetCallType>{BN}*{ID}{BN}*"*" {
5143 yyextra->funcPtrType=
"(";
5144 yyextra->funcPtrType+=yytext;
5145 yyextra->roundCount=0;
5149 if (!yyextra->current->name.isEmpty())
5151 yyextra->current->args = yytext;
5152 yyextra->current->bodyLine = yyextra->yyLineNr;
5153 yyextra->current->bodyColumn = yyextra->yyColNr;
5154 yyextra->currentArgumentContext = FuncQual;
5155 yyextra->fullArgString=yyextra->current->args;
5156 yyextra->copyArgString=&yyextra->current->args;
5157 BEGIN( ReadFuncArgType ) ;
5164<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5165 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5166 else yyextra->fullArgString+=yytext;
5168<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5169 yyextra->fullArgString+=yytext;
5171<CopyArgRound>[^\/\n\)\(\"\']+ {
5172 *yyextra->copyArgString+=yytext;
5173 yyextra->fullArgString+=yytext;
5175<CopyArgSquare>[^\/\n\]\[\"\']+ {
5176 *yyextra->copyArgString+=yytext;
5177 yyextra->fullArgString+=yytext;
5179<ReadFuncArgType,ReadTempArgs>{BN}* {
5180 *yyextra->copyArgString+=
" ";
5181 yyextra->fullArgString+=
" ";
5184<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5186 yyextra->lastRawStringContext = YY_START;
5187 yyextra->pCopyRawString = yyextra->copyArgString;
5188 *yyextra->pCopyRawString+=yytext;
5189 yyextra->fullArgString+=yytext;
5192<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5193 *yyextra->copyArgString+=*yytext;
5194 yyextra->fullArgString+=*yytext;
5195 yyextra->lastCopyArgStringContext = YY_START;
5196 BEGIN( CopyArgString );
5198<ReadFuncArgType>"[" {
5199 if (!yyextra->insidePHP) REJECT;
5200 *yyextra->copyArgString+=*yytext;
5201 yyextra->fullArgString+=*yytext;
5202 yyextra->argSquareCount=0;
5203 yyextra->lastCopyArgContext = YY_START;
5204 BEGIN( CopyArgSquare );
5206<ReadFuncArgType,ReadTempArgs>"(" {
5207 *yyextra->copyArgString+=*yytext;
5208 yyextra->fullArgString+=*yytext;
5209 yyextra->argRoundCount=0;
5210 yyextra->lastCopyArgContext = YY_START;
5211 BEGIN( CopyArgRound );
5213<ReadFuncArgType>")" {
5214 *yyextra->copyArgString+=*yytext;
5215 yyextra->fullArgString+=*yytext;
5217 if (yyextra->insideJS)
5228 yyextra->docBackup = yyextra->current->doc;
5229 yyextra->briefBackup = yyextra->current->brief;
5231 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5234<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5235 if (yyextra->currentArgumentContext==DefineEnd)
5239 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5245 BEGIN( yyextra->currentArgumentContext );
5251 yyextra->fullArgString+=yytext;
5252 yyextra->lastCopyArgChar=0;
5253 yyextra->lastCommentInArgContext=YY_START;
5255 BEGIN( CopyArgCommentLine );
5257 BEGIN( CopyArgComment );
5261<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5262<ReadFuncArgType,ReadTempArgs>{CCS} {
5263 yyextra->lastCContext = YY_START;
5264 BEGIN( SkipComment );
5266<ReadFuncArgType,ReadTempArgs>{CPPC} {
5267 yyextra->lastCContext = YY_START;
5268 BEGIN( SkipCxxComment );
5284<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5286 if (yyextra->currentArgumentContext==DefineEnd)
5290 int i;
for (i=(
int)yyleng-1;i>0;i--)
5294 *yyextra->copyArgString+=*yytext;
5295 yyextra->fullArgString+=*yytext;
5298 BEGIN( yyextra->currentArgumentContext );
5304 yyextra->lastCopyArgChar=*yytext;
5307 yyextra->lastCommentInArgContext=YY_START;
5308 yyextra->fullArgString+=text;
5309 if (text.
find(
"//")!=-1)
5310 BEGIN( CopyArgCommentLine );
5312 BEGIN( CopyArgComment );
5315<CopyArgComment>^{B}*"*"+/{BN}+
5316<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5317<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5318 if (yyextra->lastCopyArgChar!=0)
5319 unput(yyextra->lastCopyArgChar);
5320 BEGIN( yyextra->lastCommentInArgContext );
5322<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5324 if (yyextra->lastCopyArgChar!=0)
5325 unput(yyextra->lastCopyArgChar);
5326 BEGIN( yyextra->lastCommentInArgContext );
5328<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5329 yyextra->docBlockName=
"uml";
5330 yyextra->fullArgString+=yytext;
5331 BEGIN(CopyArgVerbatim);
5333<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5334 yyextra->docBlockName=&yytext[1];
5335 yyextra->fullArgString+=yytext;
5336 BEGIN(CopyArgVerbatim);
5338<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5339 yyextra->docBlockName=&yytext[1];
5340 if (yyextra->docBlockName.at(1)==
'[')
5342 yyextra->docBlockName.at(1)=
']';
5344 if (yyextra->docBlockName.at(1)==
'{')
5346 yyextra->docBlockName.at(1)=
'}';
5348 if (yyextra->docBlockName.at(1)==
'(')
5350 yyextra->docBlockName.at(1)=
')';
5352 yyextra->fullArgString+=yytext;
5353 BEGIN(CopyArgVerbatim);
5355<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5356 yyextra->fullArgString+=yytext;
5357 if (&yytext[4]==yyextra->docBlockName)
5359 yyextra->docBlockName=
"";
5360 BEGIN(CopyArgCommentLine);
5363<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5364 yyextra->fullArgString+=yytext;
5365 if (yyextra->docBlockName==&yytext[1])
5367 yyextra->docBlockName=
"";
5368 BEGIN(CopyArgCommentLine);
5371<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5372<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5373<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5374<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5375<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5376 warn(yyextra->fileName,yyextra->yyLineNr,
5377 "Ignoring {:c}brief command inside argument documentation",*yytext
5379 yyextra->fullArgString+=
' ';
5382 *yyextra->copyArgString+=*yytext;
5383 yyextra->fullArgString+=*yytext;
5384 yyextra->argSharpCount=1;
5385 BEGIN( CopyArgSharp );
5388 *yyextra->copyArgString+=*yytext;
5389 yyextra->fullArgString+=*yytext;
5391 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5393 BEGIN( yyextra->currentArgumentContext );
5396 yyextra->argRoundCount++;
5397 *yyextra->copyArgString+=*yytext;
5398 yyextra->fullArgString+=*yytext;
5401 *yyextra->copyArgString+=*yytext;
5402 yyextra->fullArgString+=*yytext;
5403 if (yyextra->argRoundCount>0)
5404 yyextra->argRoundCount--;
5406 BEGIN( yyextra->lastCopyArgContext );
5409 yyextra->argSquareCount++;
5410 *yyextra->copyArgString+=*yytext;
5411 yyextra->fullArgString+=*yytext;
5414 *yyextra->copyArgString+=*yytext;
5415 yyextra->fullArgString+=*yytext;
5416 if (yyextra->argSquareCount>0)
5417 yyextra->argSquareCount--;
5419 BEGIN( yyextra->lastCopyArgContext );
5422 *yyextra->copyArgString+=*yytext;
5423 yyextra->fullArgString+=*yytext;
5424 yyextra->argRoundCount=0;
5425 yyextra->lastCopyArgContext = YY_START;
5426 BEGIN( CopyArgRound );
5429 yyextra->argSharpCount++;
5431 *yyextra->copyArgString+=*yytext;
5432 yyextra->fullArgString+=*yytext;
5435 *yyextra->copyArgString+=*yytext;
5436 yyextra->fullArgString+=*yytext;
5437 yyextra->argSharpCount--;
5438 if (yyextra->argSharpCount>0)
5444 BEGIN( ReadTempArgs );
5448<CopyArgString,CopyArgPHPString>\\. {
5449 *yyextra->copyArgString+=yytext;
5450 yyextra->fullArgString+=yytext;
5453 *yyextra->copyArgString+=*yytext;
5454 yyextra->fullArgString+=*yytext;
5455 BEGIN( yyextra->lastCopyArgStringContext );
5457<CopyArgPHPString>\' {
5458 *yyextra->copyArgString+=*yytext;
5459 yyextra->fullArgString+=*yytext;
5460 BEGIN( yyextra->lastCopyArgStringContext );
5462<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5463 if (yyextra->insidePHP)
5469 *yyextra->copyArgString+=yytext;
5470 yyextra->fullArgString+=yytext;
5473<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5474 *yyextra->copyArgString+=yytext;
5475 yyextra->fullArgString+=yytext;
5476 if (yyextra->insidePHP)
5478 yyextra->lastCopyArgStringContext=YY_START;
5479 BEGIN(CopyArgPHPString);
5482<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5483 *yyextra->copyArgString+=yytext;
5484 yyextra->fullArgString+=yytext;
5486<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5488 *yyextra->copyArgString+=*yytext;
5489 yyextra->fullArgString+=*yytext;
5491<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5492 *yyextra->copyArgString+=yytext;
5493 yyextra->fullArgString+=yytext;
5495<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5496 *yyextra->copyArgString+=*yytext;
5497 yyextra->fullArgString+=*yytext;
5505<FuncRound>"(" { yyextra->current->args += *yytext ;
5506 ++yyextra->roundCount ;
5508<FuncRound>")" { yyextra->current->args += *yytext ;
5509 if ( yyextra->roundCount )
5510 --yyextra->roundCount ;
5522 if (
qstrcmp(yytext,
";")==0 &&
5523 ((yyextra->insideJS || yyextra->insidePHP) &&
5526 yyextra->current->reset();
5528 BEGIN( FindMembers );
5532 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5535<FuncQual>{BN}*"abstract"{BN}* {
5537 yyextra->current->virt = Specifier::Pure;
5538 yyextra->current->args +=
" override ";
5540<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5542 yyextra->current->spec.setOverride(
true);
5543 yyextra->current->args +=
" override ";
5544 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5547<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5549 yyextra->current->spec.setFinal(
true);
5550 yyextra->current->args +=
" final ";
5551 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5554<FuncQual>{BN}*"sealed"{BN}* {
5556 yyextra->current->spec.setSealed(
true);
5557 yyextra->current->args +=
" sealed ";
5559<FuncQual>{BN}*"new"{BN}* {
5561 yyextra->current->spec.setNew(
true);
5562 yyextra->current->args +=
" new ";
5564<FuncQual>{BN}*"const"{BN}* {
5566 yyextra->current->args +=
" const ";
5567 yyextra->current->argList.setConstSpecifier(
TRUE);
5569<FuncQual>{BN}*"volatile"{BN}* {
5571 yyextra->current->args +=
" volatile ";
5572 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5574<FuncQual>{BN}*"noexcept"{BN}* {
5576 yyextra->current->args +=
" noexcept ";
5577 yyextra->current->spec.setNoExcept(
true);
5579<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5581 yyextra->current->args +=
" noexcept(false)";
5583<FuncQual>{BN}*"noexcept"{BN}*"(" {
5585 yyextra->current->args +=
" noexcept(";
5586 yyextra->current->spec.setNoExcept(
true);
5587 yyextra->lastRoundContext=FuncQual;
5588 yyextra->pCopyRoundString=&yyextra->current->args;
5589 yyextra->roundCount=0;
5593 yyextra->current->args +=
" &";
5596<FuncQual>{BN}*"&&" {
5597 yyextra->current->args +=
" &&";
5601<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5603 yyextra->current->args +=
" = 0";
5604 yyextra->current->virt = Specifier::Pure;
5605 yyextra->current->argList.setPureSpecifier(
TRUE);
5606 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5609<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5611 yyextra->current->args +=
" = delete";
5612 yyextra->current->spec.setDelete(
true);
5613 yyextra->current->argList.setIsDeleted(
TRUE);
5614 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5617<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5619 yyextra->current->args +=
" = default";
5620 yyextra->current->spec.setDefault(
true);
5621 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5624<FuncQual>{BN}*"->"{BN}* {
5626 yyextra->current->argList.setTrailingReturnType(
" -> ");
5627 yyextra->current->args +=
" -> ";
5628 yyextra->roundCount=0;
5629 BEGIN(TrailingReturn);
5631<TrailingReturn>[{;] {
5632 if (yyextra->roundCount>0) REJECT;
5634 yyextra->current->argList.finishTrailingReturnType();
5637<TrailingReturn>"requires"{BN}+ {
5638 if (yyextra->insideJava) REJECT;
5639 yyextra->requiresContext = FuncQual;
5640 yyextra->current->req+=
' ';
5641 yyextra->current->argList.finishTrailingReturnType();
5642 BEGIN(RequiresClause);
5644<TrailingReturn>"(" {
5645 yyextra->roundCount++;
5646 yyextra->current->argList.appendTrailingReturnType(yytext);
5647 yyextra->current->args+=yytext;
5649<TrailingReturn>")" {
5650 if (yyextra->roundCount>0)
5652 yyextra->roundCount--;
5656 warn(yyextra->fileName,yyextra->yyLineNr,
5657 "Found ')' without opening '(' for trailing return type '{})...'",
5658 yyextra->current->argList.trailingReturnType());
5660 yyextra->current->argList.appendTrailingReturnType(yytext);
5661 yyextra->current->args+=yytext;
5664 yyextra->current->argList.appendTrailingReturnType(yytext);
5665 yyextra->current->args+=yytext;
5669 yyextra->current->argList.appendTrailingReturnType(yytext);
5670 yyextra->current->args+=
' ';
5672<FuncRound,FuncFunc>{BN}*","{BN}* {
5674 yyextra->current->args +=
", " ;
5676<FuncQual,FuncRound,FuncFunc>{BN}+ {
5678 yyextra->current->args +=
' ' ;
5680<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5682 yyextra->lastCPPContext = YY_START;
5686 if (!yyextra->insideCS)
5693 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5700 yyextra->lastInitializerContext=YY_START;
5701 yyextra->sharpCount=0;
5702 yyextra->initBracketCount=0;
5703 yyextra->current->initializer.str(yytext);
5704 BEGIN(ReadInitializer);
5707<ReadExpressionBody>";" {
5708 if (!yyextra->current->sli.empty() && yyextra->previous)
5710 yyextra->previous->sli = yyextra->current->sli;
5711 yyextra->current->sli.clear();
5713 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5728 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5731 yyextra->requiresContext = YY_START;
5732 if (!yyextra->current->req.isEmpty())
5734 yyextra->current->req+=
" && ";
5736 BEGIN(RequiresClause);
5738 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5741 yyextra->current->typeConstr.clear();
5742 yyextra->current->typeConstr.push_back(
Argument());
5743 yyextra->lastCSConstraint = YY_START;
5744 BEGIN( CSConstraintName );
5748 yyextra->current->args = yytext;
5749 yyextra->oldStyleArgType.clear();
5750 BEGIN(OldStyleArgs);
5754 yyextra->current->args += yytext;
5760 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5762 if (yyextra->current->doc!=yyextra->docBackup)
5764 doc=yyextra->current->doc;
5765 yyextra->current->doc=yyextra->docBackup;
5767 if (yyextra->current->brief!=yyextra->briefBackup)
5769 brief=yyextra->current->brief;
5770 yyextra->current->brief=yyextra->briefBackup;
5772 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5773 oldStyleArgName,brief,doc);
5774 yyextra->current->args.clear();
5775 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5777<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5779 if (yyextra->current->argList.empty())
5781 yyextra->current->argList.setNoParameters(
TRUE);
5787<OldStyleArgs>. { yyextra->current->args += *yytext; }
5788<FuncQual,FuncRound,FuncFunc>\" {
5789 if (yyextra->insideIDL && yyextra->insideCppQuote)
5795 yyextra->current->args += *yytext;
5798<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5799<FuncQual>{BN}*"try:" |
5800<FuncQual>{BN}*"try"{BN}+ {
5801 yyextra->insideTryBlock=
TRUE;
5803 if (yytext[yyleng-1]==
':')
5809<FuncQual>{BN}*"throw"{BN}*"(" {
5810 yyextra->current->exception =
" throw (" ;
5811 yyextra->roundCount=0;
5813 BEGIN( ExcpRound ) ;
5815<FuncQual>{BN}*"raises"{BN}*"(" {
5816 yyextra->current->exception =
" raises (" ;
5818 yyextra->roundCount=0;
5819 BEGIN( ExcpRound ) ;
5821<FuncQual>{BN}*"throws"{BN}+ {
5822 yyextra->current->exception =
" throws " ;
5826<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5827 ++yyextra->roundCount ;
5829<ExcpRound>")" { yyextra->current->exception += *yytext ;
5830 if ( yyextra->roundCount )
5831 --yyextra->roundCount ;
5836 yyextra->current->exception += *yytext;
5839 unput(
'{'); BEGIN( FuncQual );
5842 unput(
';'); BEGIN( FuncQual );
5845 yyextra->current->exception +=
' ';
5849 yyextra->current->exception += *yytext;
5851<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5852 yyextra->current->name = yyextra->current->args ;
5853 yyextra->current->args = yytext ;
5854 yyextra->roundCount=0;
5855 BEGIN( FuncRound ) ;
5858 if (!yyextra->insidePHP) BEGIN(SkipInits);
5864 yyextra->current->fileName = yyextra->fileName;
5865 yyextra->current->startLine = yyextra->yyBegLineNr;
5866 yyextra->current->startColumn = yyextra->yyBegColNr;
5867 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5869 std::string type = yyextra->current->type.str();
5873 ti = (int)
match.position();
5877 int di = yyextra->current->type.find(
"decltype(");
5878 if (di!=-1 && di<ti)
5883 int ts=yyextra->current->type.find(
'<');
5884 int te=yyextra->current->type.findRev(
'>');
5887 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5888 bool isFunction = ti==-1 ||
5889 (ts!=-1 && ts<te && ts<ti && ti<te);
5890 bool isVariable = !yyextra->current->type.isEmpty() &&
5891 (!isFunction || startsWithTypedef);
5896 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5901 if (yyextra->isTypedef && !startsWithTypedef)
5903 yyextra->current->type.prepend(
"typedef ");
5905 yyextra->current->section = EntryType::makeVariable() ;
5910 yyextra->current->section = EntryType::makeFunction() ;
5911 yyextra->current->proto = *yytext==
';';
5919 if (yyextra->isTypedef && !startsWithTypedef)
5921 yyextra->current->type.prepend(
"typedef ");
5924 yyextra->current->section = EntryType::makeVariable();
5929 yyextra->current->section = EntryType::makeFunction();
5930 yyextra->current->proto =
TRUE;
5934 if ( yyextra->insidePHP)
5938 yyextra->current->spec.setFinal(
true);
5942 yyextra->current->spec.setAbstract(
true);
5945 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5948 if ( *yytext ==
'{' )
5950 yyextra->lastCurlyContext = FindMembers;
5951 yyextra->curlyCount=0;
5956 BEGIN( FindMembers );
5961 if ( yyextra->insidePHP)
5965 yyextra->previous = yyextra->current;
5966 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5969 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5971 yyextra->current->spec.setOptional(
true).setRequired(
true);
5973 yyextra->lastCurlyContext = FindMembers;
5974 if ( *yytext ==
',' )
5976 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5978 if ( *yytext ==
'{' )
5980 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5982 yyextra->previous->spec.setInline(
true);
5984 yyextra->curlyCount=0;
5985 BEGIN( SkipCurly ) ;
5987 else if ( *yytext ==
'=' )
5989 yyextra->previous->spec.setInline(
true);
5990 yyextra->curlyCount=0;
5991 BEGIN( ReadExpressionBody );
5995 if (!yyextra->previous->section.isVariable())
5996 yyextra->previous->bodyLine=-1;
5997 BEGIN( FindMembers ) ;
Object representing the matching results.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
6001<SkipInits>">"{BN}*"{" {
6003 yyextra->curlyCount=1;
6004 BEGIN(SkipC11Inits);
6006<SkipInits>{ID}{BN}*"{" {
6008 yyextra->curlyCount=1;
6009 BEGIN(SkipC11Inits);
6012 ++yyextra->curlyCount;
6015 if ( --yyextra->curlyCount<=0 )
6020<SkipC11Attribute>"]]" {
6021 BEGIN(yyextra->lastC11AttributeContext);
6029 ++yyextra->curlyCount ;
6031<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6034 if( yyextra->curlyCount )
6036 --yyextra->curlyCount ;
6040 if (!yyextra->current->sli.empty() && yyextra->previous)
6042 yyextra->previous->sli = yyextra->current->sli;
6043 yyextra->current->sli.clear();
6045 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6046 BEGIN( yyextra->lastCurlyContext ) ;
6049<SkipCurly>"}"{BN}*{DCOMM}"<" {
6051 if ( yyextra->curlyCount )
6054 --yyextra->curlyCount ;
6058 yyextra->current->endBodyLine=yyextra->yyLineNr;
6059 yyextra->tempEntry = yyextra->current;
6060 yyextra->current = yyextra->previous;
6062 yyextra->docBlockContext = SkipCurlyEndDoc;
6063 yyextra->docBlockInBody =
FALSE;
6064 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6066 yyextra->docBlock.str(std::string());
6067 yyextra->docBlockTerm =
'}';
6068 if (yytext[yyleng-3]==
'/')
6080<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6081 yyextra->docBlockContext = SkipCurlyEndDoc;
6082 yyextra->docBlockInBody =
FALSE;
6083 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6085 yyextra->docBlock.str(std::string());
6086 yyextra->docBlockTerm =
'}';
6087 if (yytext[yyleng-3]==
'/')
6098<SkipCurlyEndDoc>"}" {
6100 if (yyextra->tempEntry)
6102 yyextra->current = yyextra->tempEntry;
6103 yyextra->tempEntry.reset();
6105 BEGIN( yyextra->lastCurlyContext );
6107<SkipCurly,ReadExpressionBody>\" {
6109 yyextra->lastStringContext=YY_START;
6110 BEGIN( SkipString );
6112<SkipCurly>^{B}*"#" {
6113 if (yyextra->insidePHP)
6116 BEGIN( SkipCurlyCpp );
6118<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6122<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6123 if (!yyextra->insidePHP)
6129 yyextra->lastHereDocContext = YY_START;
6133<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6135 yyextra->lastRawStringContext = YY_START;
6136 yyextra->dummyRawString.clear();
6137 yyextra->pCopyRawString = &yyextra->dummyRawString;
6138 *yyextra->pCopyRawString += yytext;
6141<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6145<SkipCurly,SkipCurlyCpp>"\$" {}
6149 yyextra->lastCurlyContext = FindMembers;
6152<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6156<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6158 yyextra->lastCContext = YY_START;
6161<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6163 yyextra->lastCContext = YY_START;
6164 BEGIN(SkipCxxComment);
6166<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6167 yyextra->roundCount=0;
6168 yyextra->lastSkipRoundContext=YY_START;
6171<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6172 yyextra->lastStringContext=YY_START;
6173 BEGIN( SkipString );
6176 warn(yyextra->fileName,yyextra->yyLineNr,
6177 "Found ';' while parsing initializer list! "
6178 "(doxygen could be confused by a macro call without semicolon)"
6180 BEGIN( FindMembers );
6182<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6183 if (!yyextra->insidePHP)
6186 yyextra->lastCContext = YY_START;
6187 BEGIN(SkipCxxComment);
6189<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6190 if (!yyextra->insideCS) REJECT;
6193 yyextra->lastSkipVerbStringContext=YY_START;
6194 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6195 yyextra->dummyTextStream.clear();
6196 BEGIN(SkipVerbString);
6198<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6199 if (yyextra->insidePHP) REJECT;
6201<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6202 if (yyextra->insidePHP)
6204 yyextra->lastStringContext=YY_START;
6205 BEGIN(SkipPHPString);
6208<SkipC11Attribute>{ID} {
6211 yyextra->current->spec.setNoDiscard(
true);
6214<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6215<SkipString,SkipPHPString>\\. { }
6217 BEGIN( yyextra->lastStringContext );
6220 BEGIN( yyextra->lastStringContext );
6222<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6223<SkipString,SkipPHPString>\n {
6227<SkipString,SkipPHPString>. { }
6233 yyextra->current->section = EntryType::makeEmpty() ;
6234 yyextra->current->type.clear() ;
6235 yyextra->current->name.clear() ;
6236 yyextra->current->args.clear() ;
6237 yyextra->current->argList.clear();
6238 BEGIN( FindMembers ) ;
6241 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6245 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6249 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6251 if (!yyextra->baseName.isEmpty())
6253 yyextra->current->extends.emplace_back(
6254 yyextra->baseName,Protection::Public,Specifier::Normal);
6255 yyextra->baseName.clear();
6257 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6262 yyextra->current->section = EntryType::makeEmpty() ;
6263 yyextra->current->type.clear() ;
6264 yyextra->current->name.clear() ;
6265 yyextra->current->args.clear() ;
6266 yyextra->current->argList.clear();
6268 BEGIN( FindMembers ) ;
6270<CompoundName>{SCOPENAME}/{BN}*"<" {
6271 yyextra->sharpCount = 0;
6272 yyextra->current->name = yytext ;
6274 if (yyextra->current->spec.isProtocol())
6276 yyextra->current->name+=
"-p";
6279 yyextra->lastClassTemplSpecContext = ClassVar;
6280 if (yyextra->insideObjC)
6282 BEGIN( ObjCProtocolList );
6284 else if (yyextra->insideCS)
6291 yyextra->roundCount=0;
6292 BEGIN( ClassTemplSpec );
6299 yyextra->current->tArgLists.
push_back(al);
6300 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6301 yyextra->templateStr=
"<";
6302 yyextra->current->name +=
"<";
6303 yyextra->fullArgString = yyextra->templateStr;
6304 yyextra->copyArgString = &yyextra->current->name;
6306 yyextra->currentArgumentContext = ClassVar;
6307 BEGIN( ReadTempArgs );
6309<ObjCProtocolList>"<" {
6310 yyextra->insideProtocolList=
TRUE;
6313<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6314 yyextra->current->name += yytext;
6316 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6319 if (yyextra->current->spec.isProtocol())
6326 BEGIN( yyextra->lastClassTemplSpecContext );
6330<ClassTemplSpec>"<" {
6331 yyextra->current->name += yytext;
6332 if (yyextra->roundCount==0) yyextra->sharpCount++;
6335 yyextra->current->name += yytext;
6337<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6338 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6342 yyextra->current->name =
substitute(yytext,
".",
"::");
6343 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6348 else if (!yyextra->current->tArgLists.empty())
6352 yyextra->current->name = yytext;
6353 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6356 QCString rn = yyextra->current_root->name;
6358 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6362 yyextra->current->spec.setForwardDecl(
true);
6363 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6365 else if (yyextra->insideIDL &&
6366 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6367 yyextra->current->spec.isInterface()) ||
6368 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6369 yyextra->current->spec.isService())
6377 yyextra->current->name = yytext;
6378 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6379 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6382 yyextra->current->spec.setInterface(
false).setService(
false);
6386 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6389 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6392 yyextra->current->reset();
6394 if (yyextra->insideObjC)
6396 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6397 yyextra->insideObjC =
FALSE;
6399 if (yyextra->isTypedef)
6401 yyextra->current->type.prepend(
"typedef");
6403 BEGIN( FindMembers );
Wrapper class for the Entry type.
6406<CompoundName>{SCOPENAME}/{BN}*"(" {
6407 yyextra->current->name = yytext ;
6410 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6412 yyextra->lastAlignAsContext = YY_START;
6417 if (yyextra->current->spec.isProtocol())
6419 yyextra->current->name +=
"-p";
6424<AlignAs>"(" { yyextra->roundCount=0;
6425 BEGIN( AlignAsEnd );
6429<AlignAsEnd>"(" { yyextra->roundCount++; }
6430<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6432 BEGIN( yyextra->lastAlignAsContext );
6438 yyextra->current->name = yytext ;
6442 yyextra->current->bodyLine = yyextra->yyLineNr;
6443 yyextra->current->bodyColumn = yyextra->yyColNr;
6444 yyextra->current->initializer.str(std::string());
6445 yyextra->lastInitializerContext = FindMembers;
6446 yyextra->sharpCount=0;
6447 yyextra->initBracketCount=0;
6448 BEGIN(ReadInitializer);
6450<CompoundName>{SCOPENAME}/{BN}*"," {
6452 yyextra->current->reset();
6455<CompoundName>{SCOPENAME} {
6456 yyextra->current->name = yytext ;
6459 if (yyextra->current->spec.isProtocol())
6461 yyextra->current->name +=
"-p";
6463 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6469<CompoundName>{CSSCOPENAME} {
6470 yyextra->current->name =
substitute(yytext,
".",
"::");
6474<ClassVar>{SCOPENAME}{BNopt}/"(" {
6475 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6478 yyextra->roundCount=0;
6479 BEGIN(SkipUnionSwitch);
6484 yyextra->yyBegColNr=yyextra->yyColNr;
6485 yyextra->yyBegLineNr=yyextra->yyLineNr;
6486 yyextra->current->name = yytext;
6487 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6490 BEGIN( FindMembers );
6494 if (yyextra->isTypedef)
6498 yyextra->current->type.prepend(
"typedef ");
6506<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6507 if (yyextra->insideCli)
6510 yyextra->current->spec.setSealedClass(
true);
6512 yyextra->current->spec.setAbstractClass(
true);
6520<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6521 yyextra->yyBegColNr=yyextra->yyColNr;
6522 yyextra->yyBegLineNr=yyextra->yyLineNr;
6525 if (yyextra->current->section.isEnum())
6527 yyextra->current->section = EntryType::makeVariable() ;
6529 yyextra->current->type +=
' ' ;
6530 yyextra->current->type += yyextra->current->name ;
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6539 yyextra->yyBegColNr=yyextra->yyColNr;
6540 yyextra->yyBegLineNr=yyextra->yyLineNr;
6542 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6545 yyextra->roundCount=0;
6546 BEGIN(SkipUnionSwitch);
6548 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6550 yyextra->current->type.clear();
6551 yyextra->baseProt = Protection::Public;
6552 yyextra->baseVirt = Specifier::Normal;
6553 yyextra->baseName.clear();
6554 BEGIN( BasesProt ) ;
6556 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6558 yyextra->current->typeConstr.clear();
6559 yyextra->current->typeConstr.push_back(
Argument());
6560 yyextra->lastCSConstraint = YY_START;
6561 BEGIN( CSConstraintName );
6563 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6565 yyextra->current->spec.setAbstract(
true);
6567 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6569 yyextra->current->spec.setSealed(
true);
6571 else if (
qstrcmp(yytext,
"final")==0)
6573 yyextra->current->spec.setFinal(
true);
6577 if (yyextra->current->section.isEnum())
6579 yyextra->current->section = EntryType::makeVariable() ;
6581 yyextra->current->type +=
' ' ;
6582 yyextra->current->type += yyextra->current->name ;
6583 yyextra->current->name = yytext ;
6592 if (yyextra->insideObjC && *yytext==
'(')
6594 yyextra->current->name+=
'(';
6595 yyextra->current->spec.setCategory(
true);
6596 BEGIN( ClassCategory );
6598 else if (yyextra->insideCS && *yytext==
'(')
6600 yyextra->current->args=yytext;
6601 yyextra->currentArgumentContext = ClassVar;
6602 yyextra->fullArgString = yyextra->current->args;
6603 yyextra->copyArgString = &yyextra->current->args;
6604 BEGIN( ReadFuncArgType ) ;
6610 BEGIN( FindMembers );
6613<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6614<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6615 yyextra->fullArgString.clear();
6616 yyextra->lastCopyArgChar=
'#';
6617 yyextra->lastCommentInArgContext=YY_START;
6619 BEGIN( CopyArgCommentLine );
6621 BEGIN( CopyArgComment );
6623<CSConstraintType,CSConstraintName>"#" {
6624 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6626<CSConstraintType>"=>" {
6631 BEGIN( yyextra->lastCSConstraint );
6633<CSConstraintType>"{" {
6637 BEGIN( yyextra->lastCSConstraint );
6639<CSConstraintType,CSConstraintName>";" {
6642 BEGIN( yyextra->lastCSConstraint );
6644<CSConstraintName>":" {
6645 BEGIN( CSConstraintType );
6647<CSConstraintName>{ID} {
6649 yyextra->current->typeConstr.back().name=yytext;
6651<CSConstraintType>"where" {
6652 yyextra->current->typeConstr.push_back(
Argument());
6653 BEGIN( CSConstraintName );
6655<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6656 if (yyextra->current->typeConstr.back().type.isEmpty())
6659 yyextra->current->typeConstr.back().type=yytext;
6663 QCString name = yyextra->current->typeConstr.back().name;
6664 yyextra->current->typeConstr.push_back(
Argument());
6665 yyextra->current->typeConstr.back().name=name;
6666 yyextra->current->typeConstr.back().type=yytext;
6669<CSConstraintName,CSConstraintType>\n {
6672<CSConstraintName,CSConstraintType>. {
6674<ClassCategory>{ID} {
6675 yyextra->current->name+=yytext;
6677<ClassCategory>")"/{BN}*"{" {
6678 yyextra->current->name+=
')';
6681<ClassCategory>")"/{BN}*"<" {
6682 yyextra->current->name+=
')';
6683 BEGIN( ObjCProtocolList );
6686 yyextra->current->name+=
')';
6687 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6699 if (yyextra->current->section.isVariable())
6701 yyextra->current->bitfields+=
":";
6702 yyextra->current->args.clear();
6705 else if (yyextra->current->section.isEnum())
6708 yyextra->current->args.clear();
6709 BEGIN(EnumBaseType);
6713 yyextra->current->type.clear();
6714 if (yyextra->current->spec.isInterface() ||
6715 yyextra->current->spec.isStruct() ||
6716 yyextra->current->spec.isRef() ||
6717 yyextra->current->spec.isValue() ||
6718 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6721 yyextra->baseProt = Protection::Public;
6725 yyextra->baseProt = Protection::Private;
6727 yyextra->baseVirt = Specifier::Normal;
6728 yyextra->baseName.clear();
6729 BEGIN( BasesProt ) ;
6733 if (yyextra->isTypedef)
6735 yyextra->current->type.prepend(
"typedef");
6737 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6739 yyextra->current->section = EntryType::makeVariable() ;
6741 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6743 yyextra->current->reset();
6750 BEGIN( FindMembers );
6752<Bases,ClassVar>{CPPC}"/"/[^/] {
6753 if (!yyextra->insideObjC)
6760 yyextra->current->program << yytext;
6761 yyextra->current->fileName = yyextra->fileName ;
6762 yyextra->current->startLine = yyextra->yyLineNr ;
6763 yyextra->current->startColumn = yyextra->yyColNr;
6764 yyextra->curlyCount=0;
6765 BEGIN( ReadBodyIntf );
6768<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6769<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6770<Bases,ClassVar>{CPPC}"!" |
6771<Bases,ClassVar>[\-+]{BN}* {
6772 if (!yyextra->insideObjC)
6779 yyextra->current->program << yytext;
6780 yyextra->current->fileName = yyextra->fileName ;
6781 yyextra->current->startLine = yyextra->yyLineNr ;
6782 yyextra->current->startColumn = yyextra->yyColNr;
6783 yyextra->curlyCount=0;
6784 BEGIN( ReadBodyIntf );
6787<CompoundName,ClassVar>{B}*"{"{B}* {
6788 yyextra->current->program.str(std::string());
6789 yyextra->current->fileName = yyextra->fileName ;
6790 yyextra->current->bodyLine = yyextra->yyLineNr;
6791 yyextra->current->bodyColumn = yyextra->yyColNr;
6793 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6795 if (yyextra->current->section.isNamespace())
6799 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6811 yyextra->curlyCount=0;
6812 if (yyextra->current_root &&
6813 !yyextra->current_root->spec.isInterface() &&
6814 (yyextra->current->spec.isInterface() ||
6815 yyextra->current->spec.isProtocol() ||
6816 yyextra->current->spec.isCategory() ||
6817 yyextra->current->section.isObjcImpl()
6822 BEGIN( ReadBodyIntf );
6824 else if (yyextra->current->section.isNamespace())
6826 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6833<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6834<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6835<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6836<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6837<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6838<BasesProt>{BN} {
lineCount(yyscanner); }
6839<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6840<Bases>"decltype"{BN}*"(" {
6842 yyextra->roundCount=0;
6843 yyextra->lastSkipRoundContext=YY_START;
6846<Bases>("\\")?({ID}"\\")*{ID} {
6847 if (!yyextra->insidePHP)
6856 yyextra->baseName += bn;
6857 yyextra->current->args +=
' ';
6858 yyextra->current->args += yytext;
6861<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6867 yyextra->current->typeConstr.clear();
6868 yyextra->current->typeConstr.push_back(
Argument());
6869 yyextra->lastCSConstraint = YY_START;
6870 BEGIN( CSConstraintName );
6874 yyextra->baseName+=yytext;
6875 yyextra->current->args +=
' ';
6876 yyextra->current->args += yytext;
6879<Bases>{BN}*{ID}("."{ID})* {
6881 yyextra->baseName += name;
6882 yyextra->current->args +=
' ';
6883 yyextra->current->args += name;
6885<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6886 if (!yyextra->insideObjC)
6896<ClassVar,Bases>"@end" {
6904<ClassVar>"<" { yyextra->current->name += *yytext;
6905 yyextra->sharpCount=1;
6906 yyextra->roundCount=0;
6907 yyextra->lastSkipSharpContext = YY_START;
6908 yyextra->specName = &yyextra->current->name;
6909 BEGIN ( Specialization );
6913 yyextra->sharpCount=1;
6914 yyextra->roundCount=0;
6915 yyextra->lastSkipSharpContext = YY_START;
6916 if (yyextra->insideObjC)
6926 yyextra->templateStr = yytext;
6927 yyextra->specName = &yyextra->templateStr;
6928 BEGIN ( Specialization );
6931<Specialization>"<" { *yyextra->specName += *yytext;
6932 if (yyextra->roundCount==0) yyextra->sharpCount++;
6934<Specialization>">" {
6935 *yyextra->specName += *yytext;
6936 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6939 BEGIN(yyextra->lastSkipSharpContext);
6942<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6943<Specialization>"<<" { *yyextra->specName += yytext; }
6944<Specialization>">>"/{B}*"::" {
6949<Specialization>">>" {
6950 if (yyextra->insideCS)
6960 if (yyextra->roundCount>0)
6962 *yyextra->specName += yytext;
6972<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6973<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6974<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6976<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6977<Specialization>"\\'" { *yyextra->specName += *yytext;}
6978<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6979<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6980<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6981<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6982<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6983<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6984<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6985<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6986<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6989 *yyextra->specName += *yytext;
6991<SkipRound>"(" { ++yyextra->roundCount; }
6992<SkipRound>")" {
if (--yyextra->roundCount<0)
6993 BEGIN ( yyextra->lastSkipRoundContext );
6996 yyextra->lastStringContext=SkipRound;
6999<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7000 if (yyextra->insideProtocolList)
7002 yyextra->baseName+=
"-p";
7006 yyextra->current->args +=
',' ;
7009 if (!yyextra->baseName.isEmpty())
7011 yyextra->current->extends.emplace_back(
7012 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7015 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7016 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7017 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7019 yyextra->baseProt=Protection::Public;
7023 yyextra->baseProt=Protection::Private;
7025 yyextra->baseVirt=Specifier::Normal;
7026 yyextra->baseName.clear();
7029 yyextra->insideProtocolList=
FALSE;
7032 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7048 if (*yytext==
',' && yyextra->insideObjC)
7050 yyextra->insideProtocolList=
TRUE;
7056 yyextra->current->program.str(std::string());
7057 yyextra->current->fileName = yyextra->fileName ;
7058 yyextra->current->bodyLine = yyextra->yyLineNr;
7059 yyextra->current->bodyColumn = yyextra->yyColNr;
7061 if (!yyextra->baseName.isEmpty())
7063 yyextra->current->extends.emplace_back(
7064 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7066 yyextra->baseName.clear();
7068 yyextra->curlyCount=0;
7069 if (yyextra->insideObjC)
7071 BEGIN( ReadBodyIntf );
7078<SkipUnionSwitch>{B}*"(" {
7079 yyextra->roundCount++;
7081<SkipUnionSwitch>")" {
7082 if (--yyextra->roundCount==0)
7087<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7089<Comment>{BN}+ { yyextra->current->program << yytext ;
7092<Comment>{CCS} { yyextra->current->program << yytext ; }
7093<Comment>{CPPC} { yyextra->current->program << yytext ; }
7094<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7095 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7096 yyextra->current->program << yytext ;
7098<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7099 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7100 yyextra->current->program << yytext ;
7102<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7103<Comment>{CCE} { yyextra->current->program << yytext ;
7104 if (!yyextra->insideCode)
7106 yyextra->doxygenComment=
false;
7107 BEGIN( yyextra->lastContext );
7110<Comment>. { yyextra->current->program << *yytext ; }
7112<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7114 if (!yyextra->current->doc.isEmpty())
7116 yyextra->current->doc+=
"\n\n";
7120 yyextra->current->docLine = yyextra->yyLineNr;
7121 yyextra->current->docFile = yyextra->fileName;
7124 yyextra->lastDocContext = YY_START;
7125 if (yyextra->current_root->section.isScope())
7127 yyextra->current->inside = yyextra->current_root->name+
"::";
7129 yyextra->docBlockContext = YY_START;
7130 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7135 yyextra->docBlock.
str(indent.
str());
7137 if (yyextra->docBlockAutoBrief)
7139 yyextra->current->briefLine = yyextra->yyLineNr;
7140 yyextra->current->briefFile = yyextra->fileName;
7145<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7151 yyextra->lastDocContext = YY_START;
7154 if (yyextra->current_root->section.isScope())
7156 yyextra->current->inside = yyextra->current_root->name+
"::";
7158 yyextra->current->docLine = yyextra->yyLineNr;
7159 yyextra->current->docFile = yyextra->fileName;
7160 yyextra->docBlockContext = YY_START;
7161 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7163 yyextra->docBlockAutoBrief = javadocAutoBrief;
7167 yyextra->docBlock.
str(indent.
str());
7169 if (yyextra->docBlockAutoBrief)
7171 yyextra->current->briefLine = yyextra->yyLineNr;
7172 yyextra->current->briefFile = yyextra->fileName;
7179 yyextra->current->program << yytext ;
7180 yyextra->lastContext = YY_START ;
7181 yyextra->doxygenComment=
true;
7185<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7190<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7191 yyextra->lastDocContext = YY_START;
7194 if (yyextra->current_root->section.isScope())
7196 yyextra->current->inside = yyextra->current_root->name+
"::";
7198 yyextra->current->docLine = yyextra->yyLineNr;
7199 yyextra->current->docFile = yyextra->fileName;
7200 yyextra->docBlockContext = YY_START;
7201 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7203 yyextra->docBlockAutoBrief = javadocAutoBrief;
7207 yyextra->docBlock.
str(indent.
str());
7209 if (yyextra->docBlockAutoBrief)
7211 yyextra->current->briefLine = yyextra->yyLineNr;
7212 yyextra->current->briefFile = yyextra->fileName;
7217<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7218 yyextra->lastDocContext = YY_START;
7219 if (yyextra->current_root->section.isScope())
7221 yyextra->current->inside = yyextra->current_root->name+
"::";
7223 yyextra->docBlockContext = YY_START;
7224 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7225 yyextra->docBlockAutoBrief =
FALSE;
7229 yyextra->docBlock.
str(indent.
str());
7234<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7235 yyextra->lastDocContext = YY_START;
7236 if (yyextra->current_root->section.isScope())
7238 yyextra->current->inside = yyextra->current_root->name+
"::";
7240 yyextra->docBlockContext = YY_START;
7241 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7242 yyextra->docBlockAutoBrief =
FALSE;
7245 yyextra->docBlock.
str(indent.
str());
7249<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7251 yyextra->externLinkage=
TRUE;
7254 if (yyextra->externLinkage)
7256 yyextra->externLinkage=
FALSE;
7258 else if (yyextra->insideCS &&
7259 !yyextra->current->name.isEmpty() &&
7260 !yyextra->current->type.isEmpty())
7262 if (yyextra->current->mtype == MethodTypes::Event)
7264 yyextra->mtype = MethodTypes::Event;
7268 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7272 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7274 yyextra->current->bodyLine = yyextra->yyLineNr;
7275 yyextra->current->bodyColumn = yyextra->yyColNr;
7276 yyextra->curlyCount=0;
7277 BEGIN( CSAccessorDecl );
7279 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7283 yyextra->current->exception =
" {";
7284 BEGIN(UNOIDLAttributeBlock);
7288 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7289 yyextra->current->name.isEmpty()
7293 yyextra->needsSemi =
FALSE;
7294 if (yyextra->current->isStatic)
7296 yyextra->current->name=
"[static initializer]";
7297 yyextra->current->type.clear();
7301 yyextra->current->name=
"[instance initializer]";
7318 yyextra->current->bodyLine = yyextra->yyLineNr;
7319 yyextra->current->bodyColumn = yyextra->yyColNr;
7320 yyextra->current->initializer.str(yytext);
7321 yyextra->lastInitializerContext = YY_START;
7322 yyextra->sharpCount=0;
7323 yyextra->initBracketCount=1;
7324 BEGIN(ReadInitializer);
7328<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7329<CSAccessorDecl>"}"{B}*"=" {
7331 if (yyextra->curlyCount != 0) REJECT;
7332 yyextra->current->initializer.str(
"=");
7333 yyextra->current->endBodyLine=yyextra->yyLineNr;
7334 yyextra->lastInitializerContext = FindMembers;
7335 BEGIN(ReadInitializer);
7337<CSAccessorDecl>"}" {
7338 if (yyextra->curlyCount)
7340 yyextra->curlyCount--;
7344 yyextra->mtype = MethodTypes::Method;
7345 yyextra->virt = Specifier::Normal;
7347 yyextra->current->endBodyLine=yyextra->yyLineNr;
7352<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7353<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7354<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7355<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7356<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7357<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7358<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7359<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7360<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7361<CSAccessorDecl>{CHARLIT} {}
7362<CSAccessorDecl>"\"" { BEGIN(CSString);}
7363<CSAccessorDecl>"." {}
7364<CSAccessorDecl>\n {
lineCount(yyscanner); }
7365<CSString>"\"" { BEGIN(CSAccessorDecl);}
7373<SliceSequence>{SCOPENAME} {
7374 if (yyextra->current->spec.isLocal())
7376 yyextra->current->type =
"local ";
7378 yyextra->current->type +=
"sequence<";
7379 yyextra->current->type += yytext;
7380 yyextra->current->type +=
">";
7383<SliceSequence>{BN}*">"{BN}* {
7385 BEGIN(SliceSequenceName);
7388<SliceSequenceName>{ID}{BN}* {
7390 yyextra->current->name = yytext ;
7391 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7394<SliceSequenceName>";" {
7395 yyextra->current->section = EntryType::makeVariable();
7396 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7401<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7403 if (yyextra->current->spec.isLocal())
7405 yyextra->current->type =
"local ";
7407 yyextra->current->type +=
"dictionary<";
7408 yyextra->current->type += yytext;
7409 yyextra->current->type +=
">";
7410 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7413<SliceDictionary>{BN}*">"{BN}* {
7415 BEGIN(SliceDictionaryName);
7418<SliceDictionaryName>{ID}{BN}* {
7420 yyextra->current->name = yytext ;
7421 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7424<SliceDictionaryName>";" {
7425 yyextra->current->section = EntryType::makeVariable();
7426 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7436<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7437 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7438 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7441<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7442 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7443 BEGIN( yyextra->docBlockContext );
7445<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7446 yyextra->docBlock << yytext;
7447 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7448 BEGIN( yyextra->docBlockContext );
7450<DocLine>{NONLopt}/"\n" {
7451 yyextra->docBlock << yytext;
7452 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7453 BEGIN( yyextra->docBlockContext );
7458<DocBlock>"*"*{CCE} {
7460 BEGIN(yyextra->docBlockContext);
7462<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7465 yyextra->docBlock <<
"\\ilinebr " << indent;
7467<DocBlock>^{B}*"*"+/[^/] {
7470 yyextra->docBlock << indent;
7472<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7475 yyextra->docBlock << indent;
7477<DocBlock>^{B}*({CPPC}){B}* {
7480 yyextra->docBlock << yytext;
7484 yyextra->docBlock << yytext;
7486<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7487 yyextra->docBlock << yytext;
7489<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7490 yyextra->docBlock << yytext;
7491 char blockName[] =
"f$";
7493 if (c==
'[') blockName[1]=
']';
7494 else if (c==
'{') blockName[1]=
'}';
7495 else if (c==
'(') blockName[1]=
')';
7497 BEGIN(DocCopyBlock);
7499<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7500 yyextra->fileName = &yytext[6];
7501 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7502 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7503 yyextra->docBlock << yytext;
7505<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7506 yyextra->fileName = &yytext[6];
7507 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7508 yyextra->docBlock << yytext;
7510<DocBlock>{CMD}"iline"{LINENR}{B} {
7515 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7519 yyextra->yyLineNr = nr;
7521 yyextra->docBlock << yytext;
7523<DocBlock>{B}*"<"{PRE}">" {
7524 yyextra->docBlock << yytext;
7526 BEGIN(DocCopyBlock);
7528<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7529 yyextra->docBlock << yytext;
7531 BEGIN(DocCopyBlock);
7533<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7534 yyextra->docBlock << yytext;
7536 BEGIN(DocCopyBlock);
7538<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7539 yyextra->docBlock << yytext;
7541 BEGIN(DocCopyBlock);
7543<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7545 yyextra->docBlock <<
"\\ilinebr ";
7546 yyextra->docBlock << pat;
7548 BEGIN(DocCopyBlock);
7550<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7552 yyextra->docBlock << pat;
7554 BEGIN(DocCopyBlock);
7556<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7557<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7558<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7560 yyextra->docBlock <<
"\\ilinebr ";
7561 yyextra->docBlock << pat;
7563 BEGIN(DocCopyBlock);
7565<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7566<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7567<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7569 yyextra->docBlock << pat;
7571 BEGIN(DocCopyBlock);
7574 yyextra->docBlock <<
"```";
7577 yyextra->docBlock << yytext;
7580 yyextra->docBlock << yytext;
7582 BEGIN(DocCopyBlock);
7584<DocBlock>{B}*"<"{CODE}">" {
7585 if (yyextra->insideCS)
7587 yyextra->docBlock << yytext;
7589 BEGIN(DocCopyBlock);
7596<DocBlock>[^@*~`'\/\\\n]+ {
7597 yyextra->docBlock << yytext;
7601 yyextra->docBlock << *yytext;
7604 yyextra->docBlock << *yytext;
7609<DocCopyBlock>"</"{PRE}">" {
7614 yyextra->docBlock << yytext;
7616<DocCopyBlock>"</"{CODE}">" {
7621 yyextra->docBlock << yytext;
7623<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7628 yyextra->docBlock << yytext;
7630<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7635 yyextra->docBlock << yytext;
7637<DocCopyBlock>^{B}*"*"+/{BN}+ {
7638 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7646 yyextra->docBlock << indent;
7649<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7650 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7654 yyextra->docBlock << indent;
7661<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7662 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7666 yyextra->docBlock << indent+
"*";
7673<DocCopyBlock>^{B}*"*"+/{BN}* {
7674 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7677 if (yyextra->nestedComment>0)
7680 yyextra->docBlock << indent+
"*";
7685 yyextra->docBlock << indent;
7693<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7699 yyextra->docBlock << pat;
7701<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7707 yyextra->docBlock << pat;
7709<DocCopyBlock>"```" {
7710 if (yyextra->docBlockName==
"``")
7712 yyextra->docBlock <<
"`";
7714 yyextra->docBlock <<
"``";
7719 yyextra->docBlock << yytext;
7722<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7727 yyextra->docBlock << yytext;
7729<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7734 yyextra->docBlock << yytext;
7736<DocCopyBlock>"`"{1,2} {
7741 yyextra->docBlock << yytext;
7743<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7744 yyextra->docBlock << yytext;
7747 yyextra->docBlock << yytext;
7748 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7752 yyextra->lastStringContext=YY_START;
7753 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7754 yyextra->stopAtInvalidString=
true;
7758<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7761 yyextra->nestedComment++;
7763 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7765 yyextra->nestedComment--;
7767 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7769 warn(yyextra->fileName,yyextra->yyLineNr,
7770 "Found end of C comment inside a '{}' block without matching start of the comment!"
7771 " Maybe the end marker for the block is missing?",
7772 yyextra->docBlockName);
7775 yyextra->docBlock << yytext;
7778 yyextra->docBlock << *yytext;
7782 yyextra->docBlock << *yytext;
7784<DocCopyBlock><<EOF>> {
7785 warn(yyextra->fileName,yyextra->yyLineNr,
7786 "reached end of file while inside a '{}' block!"
7787 " The command that should end the block seems to be missing!",
7788 yyextra->docBlockName);
7795<Prototype>"operator"{B}*"("{B}*")" {
7796 yyextra->current->name+=yytext;
7799 yyextra->current->args+=*yytext;
7800 yyextra->currentArgumentContext = PrototypeQual;
7801 yyextra->fullArgString = yyextra->current->args;
7802 yyextra->copyArgString = &yyextra->current->args;
7803 BEGIN( ReadFuncArgType ) ;
7805<Prototype>"("({ID}"::")*({B}*[&*])+ {
7806 if (yyextra->insidePHP)
7812 yyextra->current->type+=yyextra->current->name+yytext;
7813 yyextra->current->name.clear();
7814 BEGIN( PrototypePtr );
7817<PrototypePtr>{SCOPENAME} {
7818 yyextra->current->name+=yytext;
7821 yyextra->current->args+=*yytext;
7822 yyextra->currentArgumentContext = PrototypeQual;
7823 yyextra->fullArgString = yyextra->current->args;
7824 yyextra->copyArgString = &yyextra->current->args;
7825 BEGIN( ReadFuncArgType ) ;
7828 yyextra->current->type+=
')';
7832 yyextra->current->name+=yytext;
7835 BEGIN( PrototypeSkipLine);
7837<PrototypeQual>{B}*"const"{B}* {
7838 yyextra->current->args +=
" const ";
7839 yyextra->current->argList.setConstSpecifier(
TRUE);
7841<PrototypeQual>{B}*"volatile"{B}* {
7842 yyextra->current->args +=
" volatile ";
7843 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7845<PrototypeQual>{B}*"="{B}*"0"{B}* {
7846 yyextra->current->args +=
" = 0";
7847 yyextra->current->virt = Specifier::Pure;
7848 yyextra->current->argList.setPureSpecifier(
TRUE);
7850<PrototypeQual>"throw"{B}*"(" {
7851 yyextra->current->exception =
"throw(";
7852 BEGIN(PrototypeExc);
7855 yyextra->current->exception +=
')';
7856 BEGIN(PrototypeQual);
7859 yyextra->current->exception += *yytext;
7862 yyextra->current->args += *yytext;
7865 yyextra->current->name += *yytext;
7867<PrototypeSkipLine>. {
7873<SkipCxxComment>.*"\\\n" {
7874 if (yyextra->insideCS)
7883<SkipCxxComment>{ANYopt}/\n {
7884 BEGIN( yyextra->lastCContext ) ;
7886<SkipComment>[^\*\n]+
7891 if (!yyextra->insideCpp) REJECT;
7892 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7893 yyextra->lastC11AttributeContext = YY_START;
7894 BEGIN( SkipC11Attribute );
7899 if (yyextra->insideIDL && yyextra->insideCppQuote)
7903 else if (yyextra->insidePHP)
7905 yyextra->lastStringContext=YY_START;
7910 if (!yyextra->insidePHP)
7912 yyextra->lastCPPContext = YY_START;
7917 yyextra->lastCContext = YY_START ;
7918 BEGIN( SkipCxxComment ) ;
7922 if (!yyextra->insidePHP)
7924 yyextra->lastCContext = YY_START ;
7925 BEGIN( SkipCxxComment ) ;
7928 if (yyextra->insidePHP)
7930 yyextra->lastStringContext=YY_START;
7931 BEGIN(SkipPHPString);
7935 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7937 if (yyextra->current->type.isEmpty())
7939 if (yyextra->current->name.isEmpty())
7940 yyextra->current->name=
"?";
7942 yyextra->current->name+=
"?";
7946 yyextra->current->type+=
"?";
7950<*>"}" { yyextra->exported=
false; }
7952<SkipComment>{CPPC}|{CCS}
7953<*>{CCS} { yyextra->lastCContext = YY_START ;
7954 BEGIN( SkipComment ) ;
7956<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7958 yyextra->lastCContext = YY_START ;
7959 BEGIN( SkipCxxComment ) ;
7962 if (yyextra->insideCS && yyextra->fakeNS)
7966 BEGIN ( ReadNSBody);
7978 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7980 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7982 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7992 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7993 yyextra->outerScopeEntries.clear();
7994 yyextra->baseName.clear();
7995 yyextra->protection = Protection::Public;
7996 yyextra->baseProt = Protection::Public;
7997 yyextra->sharpCount = 0;
7998 yyextra->roundCount = 0;
7999 yyextra->curlyCount = 0;
8000 yyextra->mtype = MethodTypes::Method;
8001 yyextra->isStatic =
FALSE;
8002 yyextra->virt = Specifier::Normal;
8003 yyextra->baseVirt = Specifier::Normal;
8004 yyextra->isTypedef =
FALSE;
8005 yyextra->insideTryBlock =
FALSE;
8006 yyextra->insideFormula =
FALSE;
8007 yyextra->insideCode=
FALSE;
8009 yyextra->previous = 0;
8010 yyextra->firstTypedefEntry.reset();
8011 yyextra->memspecEntry.reset();
8016 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8017 if (yyextra->insideJava)
8019 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8021 yyextra->current->protection = yyextra->protection;
8022 yyextra->current->exported = yyextra->exported ;
8023 yyextra->current->mtype = yyextra->mtype;
8024 yyextra->current->virt = yyextra->virt;
8025 yyextra->current->isStatic = yyextra->isStatic;
8026 yyextra->current->lang = yyextra->language;
8028 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8029 yyextra->isTypedef=
FALSE;
8037 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8038 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8040 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8046 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8049 for (p = yytext ; *p ; ++p )
8053 yyextra->yyLineNr++;
8059 yyextra->column+=tabSize - (yyextra->column%tabSize);
8072 int col=startIndent;
8078 if (c==
'\t') col+=tabSize-(col%tabSize);
8079 else if (c==
'\n') col=0;
8087 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8088 yyextra->current->
protection = yyextra->protection = prot;
8089 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8090 yyextra->current->type.clear();
8091 yyextra->current->name.clear();
8092 yyextra->current->args.clear();
8093 yyextra->current->argList.clear();
8099 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8100 size_t tl=yyextra->current->type.length();
8101 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8103 yyextra->current->type +=
' ' ;
8105 yyextra->current->type += yyextra->current->name;
8106 yyextra->current->name.clear() ;
8107 tl=yyextra->current->type.length();
8108 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8110 yyextra->current->type +=
' ' ;
8112 yyextra->current->type += yyextra->current->args ;
8113 yyextra->current->args.clear() ;
8114 yyextra->current->argList.clear();
8121 if (s==
nullptr || *s==0)
return name;
8123 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8135 bool funcPtr = i>0 && type[i-1]==
')';
8137 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8138 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8139 return type.
left(i);
8145 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8148 yyextra->docBlock <<
"\\iskip";
8150 yyextra->docBlockName=blockName;
8151 yyextra->fencedSize=fencedSize;
8152 yyextra->isCodeBlock=codeBlock;
8153 yyextra->nestedComment=0;
8159 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8160 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8164 yyextra->docBlock <<
"\\endiskip";
8166 yyextra->docBlockName=
"";
8186 int i=name.
find(
"operator");
8187 if (i==-1)
return FALSE;
8197 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8199 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8200 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8201 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8202 yyextra->insideD = yyextra->language==SrcLangExt::D;
8203 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8204 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8205 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8206 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8207 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8208 yyextra->language==SrcLangExt::Lex);
8219 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8220 if (yyextra->current_root->section.isScope())
8223 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8225 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8227 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8237 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8238 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8239 if (yyextra->current->argList.empty())
return FALSE;
8240 for (
const Argument &a : yyextra->current->argList)
8251 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8252 if (yyextra->insideJava)
8255 yyextra->current->protection = Protection::Public;
8256 if (text.
find(
"protected")!=-1)
8257 yyextra->current->protection = Protection::Protected;
8258 else if (text.
find(
"private")!=-1)
8259 yyextra->current->protection = Protection::Private;
8260 else if (text.
find(
"package")!=-1)
8261 yyextra->current->protection = Protection::Package;
8268 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8269 int si =
static_cast<int>(yyextra->current->args.length());
8270 if (yyextra->oldStyleArgType.isEmpty())
8272 std::string args = yyextra->current->args.str();
8273 static const reg::Ex re(R
"(\([^)]*\).*)");
8279 bi1=(int)match.position();
8280 size_t secondMatchStart = match.position()+match.length();
8283 bi2=(int)match.position();
8287 if (bi1!=-1 && bi2!=-1)
8290 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8292 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8293 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8295 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8296 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8297 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8302 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8305 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8306 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8308 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8309 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8315 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8318 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8322 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8323 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8336 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8339 oldStyleArgPtr=yyextra->current->args.
left(j);
8358 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8359 for (
Argument &a : yyextra->current->argList)
8368 a.
docs=brief+
"\n\n"+docs;
8400 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8403 yyextra->current->briefFile = yyextra->fileName;
8404 yyextra->current->briefLine = yyextra->yyLineNr;
8408 yyextra->current->docFile = yyextra->fileName;
8409 yyextra->current->docLine = yyextra->yyLineNr;
8417 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8418 if (yyextra->tempEntry==0)
8423 yyextra->previous = yyextra->current;
8424 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8428 yyextra->previous = yyextra->current;
8429 yyextra->current = yyextra->tempEntry;
8430 yyextra->tempEntry.reset();
8437 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8440 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8441 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8444 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8445 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8447 docEntry->inbodyFile = yyextra->fileName;
8448 docEntry->inbodyLine = lineNr;
8452 bool needsEntry=
FALSE;
8454 Markdown markdown(yyextra->fileName,lineNr);
8457 while (yyextra->commentScanner.parseCommentBlock(
8458 yyextra->thisParser,
8459 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8463 yyextra->docBlockInBody ?
FALSE : brief,
8464 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8465 yyextra->docBlockInBody,
8466 yyextra->protection,
8477 QCString docFile = yyextra->current->docFile;
8479 yyextra->current->docFile = docFile;
8480 yyextra->current->docLine = lineNr;
8488 if (yyextra->docBlockTerm)
8490 unput(yyextra->docBlockTerm);
8491 yyextra->docBlockTerm=0;
8498 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8509 QCString orgDoc = yyextra->current->doc;
8510 QCString orgBrief = yyextra->current->brief;
8511 int orgDocLine = yyextra->current->docLine;
8512 int orgBriefLine = yyextra->current->briefLine;
8514 yyextra->current->doc.
clear();
8515 yyextra->current->brief.clear();
8518 int lineNr = orgDocLine;
8520 Markdown markdown(yyextra->fileName,lineNr);
8523 while (yyextra->commentScanner.parseCommentBlock(
8524 yyextra->thisParser,
8525 yyextra->current.get(),
8532 yyextra->protection,
8541 if (needsEntry)
newEntry(yyscanner);
8547 a.
docs = yyextra->current->doc;
8550 yyextra->current->doc = orgDoc;
8551 yyextra->current->brief = orgBrief;
8552 yyextra->current->docLine = orgDocLine;
8553 yyextra->current->briefLine = orgBriefLine;
8564 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8565 for (
const auto &ce : rt->children())
8567 if (!ce->program.empty())
8571 yyextra->padCount=0;
8573 yyextra->programStr = ce->program.str();
8574 yyextra->inputString = yyextra->programStr.data();
8575 yyextra->inputPosition = 0;
8576 if (ce->section.isEnum() || ce->spec.isEnum())
8577 BEGIN( FindFields ) ;
8579 BEGIN( FindMembers ) ;
8580 yyextra->current_root = ce;
8581 yyextra->fileName = ce->fileName;
8583 yyextra->yyLineNr = ce->bodyLine;
8584 yyextra->yyColNr = ce->bodyColumn;
8585 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8587 yyextra->current = std::make_shared<Entry>();
8588 yyextra->isStatic =
FALSE;
8593 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8595 ce->groups = rt->groups;
8598 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8600 if ( ce->section.isClass() )
8602 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8604 yyextra->current->protection = yyextra->protection = Protection::Public ;
8606 else if (yyextra->insideJava)
8608 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8610 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8612 if (ce->lang==SrcLangExt::ObjC)
8614 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8618 yyextra->current->protection = yyextra->protection = Protection::Public ;
8623 yyextra->current->protection = yyextra->protection = Protection::Private ;
8626 else if (ce->section.isEnum() )
8628 yyextra->current->protection = yyextra->protection = ce->protection;
8630 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8632 if (ce->section.isNamespace() )
8634 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8636 yyextra->current->protection = yyextra->protection = ce->protection;
8637 yyextra->current->exported = yyextra->exported =
false;
8639 else if (ce->section.isNamespace() )
8641 yyextra->current->protection = yyextra->protection = Protection::Public ;
8642 yyextra->current->exported = yyextra->exported = ce->exported;
8646 yyextra->current->protection = yyextra->protection = Protection::Public ;
8647 yyextra->current->exported = yyextra->exported =
false;
8649 yyextra->mtype = MethodTypes::Method;
8650 yyextra->virt = Specifier::Normal;
8657 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8659 scannerYYlex(yyscanner);
8662 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8664 yyextra->programStr.clear();
8665 ce->program.str(std::string());
8679 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8680 for (
const auto &ce : rt->children())
8682 if (ce->section.isConcept())
8686 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8688 yyextra->padCount =0;
8690 yyextra->programStr = ce->initializer.str();
8691 yyextra->inputString = yyextra->programStr.data();
8692 yyextra->inputPosition = 0;
8693 yyextra->current_root = ce;
8694 yyextra->fileName = ce->fileName;
8695 yyextra->yyLineNr = ce->bodyLine;
8696 yyextra->yyColNr = ce->bodyColumn;
8697 yyextra->insideObjC =
false;
8698 yyextra->current = std::make_shared<Entry>();
8702 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8704 if (!ce->args.isEmpty())
8706 templArgs=indent+
"template"+ce->args+
"\n";
8708 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8710 yyextra->isStatic =
FALSE;
8712 yyextra->current->section = EntryType::makeConceptCodePart();
8713 yyextra->current->startLine = yyextra->yyLineNr;
8714 BEGIN( FindConceptParts );
8715 scannerYYlex(yyscanner);
8716 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8727 const char *fileBuf,
8728 const std::shared_ptr<Entry> &rt,
8732 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8735 yyextra->inputString = fileBuf;
8736 yyextra->inputPosition = 0;
8737 yyextra->column = 0;
8738 scannerYYrestart(
nullptr,yyscanner);
8741 yyextra->protection = Protection::Public;
8742 yyextra->mtype = MethodTypes::Method;
8743 yyextra->isStatic =
FALSE;
8744 yyextra->exported =
false;
8745 yyextra->virt = Specifier::Normal;
8746 yyextra->current_root = rt;
8747 yyextra->yyLineNr = 1 ;
8748 yyextra->yyBegLineNr = 1;
8749 yyextra->yyBegColNr = 0;
8750 yyextra->anonCount = 0;
8751 yyextra->anonNSCount = 0;
8752 yyextra->fileName = fileName;
8753 yyextra->clangParser = clangParser;
8755 rt->lang = yyextra->language;
8756 msg(
"Parsing file {}...\n",yyextra->fileName);
8758 yyextra->current_root = rt;
8760 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8761 yyextra->current = std::make_shared<Entry>();
8766 yyextra->current->name = yyextra->fileName;
8767 yyextra->current->section = sec;
8768 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8770 yyextra->current->reset();
8772 if ( yyextra->insidePHP )
8774 BEGIN( FindMembersPHP );
8776 else if ( yyextra->insideJava )
8778 yyextra->current->name=
"java::lang";
8779 yyextra->current->fileName = yyextra->fileName;
8780 yyextra->current->section = EntryType::makeUsingDir();
8781 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8783 BEGIN( FindMembers );
8787 BEGIN( FindMembers );
8790 scannerYYlex(yyscanner);
8792 if (YY_START==Comment)
8794 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8798 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8800 yyextra->programStr.clear();
8801 rt->program.str(std::string());
8806 yyextra->anonNSCount++;
8809 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8812 parent->moveToSubEntryAndKeep(child);
8814 yyextra->outerScopeEntries.clear();
8823 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8826 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8829 if (!yyextra->current)
8834 const char *orgInputString;
8835 int orgInputPosition;
8836 YY_BUFFER_STATE orgState;
8839 orgState = YY_CURRENT_BUFFER;
8840 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8841 orgInputString = yyextra->inputString;
8842 orgInputPosition = yyextra->inputPosition;
8845 yyextra->inputString = text.
data();
8846 yyextra->inputPosition = 0;
8847 yyextra->column = 0;
8848 scannerYYrestart(
nullptr, yyscanner);
8850 scannerYYlex(yyscanner);
8852 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8853 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8855 yyextra->current->section = EntryType::makeVariableDoc();
8859 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8860 yy_switch_to_buffer(orgState, yyscanner);
8861 yyextra->inputString = orgInputString;
8862 yyextra->inputPosition = orgInputPosition;
8878 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8886 scannerYYlex_destroy(
p->yyscanner);
8890 const char *fileBuf,
8891 const std::shared_ptr<Entry> &root,
8895 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8896 yyextra->thisParser =
this;
8900 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8908 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8909 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8910 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8921#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)