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;
4641 auto groups = yyextra->current->groups;
4642 auto anchors = yyextra->current->anchors;
4643 auto sli = yyextra->current->sli;
4644 auto rqli = yyextra->current->rqli;
4646 yyextra->current->doc =
"";
4647 yyextra->current->docLine = 0;
4648 yyextra->current->docFile =
"";
4649 yyextra->current->brief =
"";
4650 yyextra->current->briefLine = 0;
4651 yyextra->current->briefFile =
"";
4652 yyextra->current->groups.
clear();
4653 yyextra->current->anchors.clear();
4654 yyextra->current->sli.clear();
4655 yyextra->current->rqli.clear();
4656 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4658 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4659 yyextra->current->program.str(std::string());
4660 new_current->name = yyextra->current->name.mid(split_point + 2);
4661 yyextra->current->name = yyextra->current->name.left(split_point);
4662 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4664 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4665 yyextra->current_root = yyextra->current;
4666 yyextra->current = new_current;
4669 yyextra->current->doc = doc;
4670 yyextra->current->docLine = docLine;
4671 yyextra->current->docFile = docFile;
4672 yyextra->current->brief = brief;
4673 yyextra->current->briefLine = briefLine;
4674 yyextra->current->briefFile = briefFile;
4675 yyextra->current->groups = groups;
4676 yyextra->current->anchors = anchors;
4677 yyextra->current->sli = sli;
4678 yyextra->current->rqli = rqli;
4680 QCString &cn = yyextra->current->name;
4681 QCString rn = yyextra->current_root->name;
4687 if (yyextra->isTypedef && cn.
isEmpty())
4690 BEGIN( TypedefName );
4694 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4696 yyextra->current->program <<
',';
4701 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4702 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4704 if (yyextra->insideObjC &&
4705 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4708 BEGIN( ReadBodyIntf ) ;
4712 yyextra->memspecEntry = yyextra->current;
4713 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4714 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4715 if (yyextra->current->section.isNamespace() ||
4716 yyextra->current->spec.isInterface() ||
4717 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4718 yyextra->insideSlice
4721 yyextra->current->reset();
4722 yyextra->current_root = std::move(original_root);
4724 yyextra->memspecEntry.reset();
4725 BEGIN( FindMembers ) ;
4729 static const reg::Ex re(R
"(@\d+$)");
4730 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4731 !
reg::search(yyextra->memspecEntry->name.str(),re))
4734 yyextra->current->doc.clear();
4735 yyextra->current->brief.clear();
4737 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.
4743<ReadBody>"}"{BN}+"typedef"{BN}+ {
4745 if ( yyextra->curlyCount>0 )
4747 yyextra->current->program << yytext ;
4748 --yyextra->curlyCount ;
4752 yyextra->isTypedef =
TRUE;
4753 yyextra->current->endBodyLine = yyextra->yyLineNr;
4754 QCString &cn = yyextra->current->name;
4755 QCString rn = yyextra->current_root->name;
4760 BEGIN( TypedefName );
4763<TypedefName>("const"|"volatile"){BN} {
4765 yyextra->current->type.prepend(yytext);
4768 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4770 yyextra->current->program <<
",";
4772 yyextra->current->name=yytext;
4774 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4775 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4777 if (!yyextra->firstTypedefEntry)
4779 yyextra->firstTypedefEntry = yyextra->current;
4781 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4783 yyextra->isTypedef=
TRUE;
4784 BEGIN(MemberSpecSkip);
4788 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4790 yyextra->current->program <<
',';
4793 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4794 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4795 yyextra->memspecEntry = yyextra->current;
4796 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4799 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4801<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4803 int i=0,l=(int)yyleng,j;
4804 while (i<l && (!
isId(yytext[i]))) i++;
4806 j=yyextra->msName.
find(
"[");
4809 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4810 yyextra->msName=yyextra->msName.left(j);
4815 if (yyextra->firstTypedefEntry)
4817 if (yyextra->firstTypedefEntry->spec.isStruct())
4819 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4821 else if (yyextra->firstTypedefEntry->spec.isUnion())
4823 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4825 else if (yyextra->firstTypedefEntry->section.isEnum())
4827 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4831 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4837 yyextra->current->name = yyextra->msName;
4843 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4849 const Entry *p=yyextra->current.get();
4857 int pi = (i==-1) ? 0 : i+2;
4867 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4871 if (!yyextra->msName.isEmpty()
4877 if (typedefHidesStruct &&
4878 yyextra->isTypedef &&
4879 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4880 yyextra->msType.stripWhiteSpace().isEmpty() &&
4881 yyextra->memspecEntry)
4883 yyextra->memspecEntry->name=yyextra->msName;
4887 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4888 varEntry->lang = yyextra->language;
4889 varEntry->protection = yyextra->current->protection ;
4890 varEntry->mtype = yyextra->current->mtype;
4891 varEntry->virt = yyextra->current->virt;
4892 varEntry->isStatic = yyextra->current->isStatic;
4893 varEntry->section = EntryType::makeVariable();
4894 varEntry->name = yyextra->msName.stripWhiteSpace();
4895 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4896 varEntry->args = yyextra->msArgs;
4897 if (yyextra->isTypedef)
4899 varEntry->type.prepend(
"typedef ");
4902 if (typedefHidesStruct &&
4903 yyextra->isTypedef &&
4904 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4905 yyextra->memspecEntry
4908 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4912 varEntry->type+=yyextra->current->name+yyextra->msType;
4914 varEntry->fileName = yyextra->fileName;
4915 varEntry->startLine = yyextra->yyLineNr;
4916 varEntry->startColumn = yyextra->yyColNr;
4917 varEntry->doc = yyextra->current->doc;
4918 varEntry->brief = yyextra->current->brief;
4919 varEntry->mGrpId = yyextra->current->mGrpId;
4920 varEntry->initializer.str(yyextra->current->initializer.str());
4921 varEntry->groups = yyextra->current->groups;
4922 varEntry->sli = yyextra->current->sli;
4927 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4932 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4934 if (!yyextra->current->doc.isEmpty())
4936 yyextra->memspecEntry->doc += yyextra->current->doc;
4938 if (!yyextra->current->brief.isEmpty())
4940 yyextra->memspecEntry->brief += yyextra->current->brief;
4943 yyextra->msType.clear();
4944 yyextra->msName.clear();
4945 yyextra->msArgs.clear();
4946 yyextra->isTypedef=
FALSE;
4947 yyextra->firstTypedefEntry.reset();
4948 yyextra->memspecEntry.reset();
4949 yyextra->current->reset();
4951 BEGIN( FindMembers );
4955 yyextra->current->doc.clear();
4956 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
4961 yyextra->lastInitializerContext=YY_START;
4962 yyextra->sharpCount=0;
4963 yyextra->initBracketCount=0;
4964 yyextra->current->initializer.str(yytext);
4965 BEGIN(ReadInitializer);
4976<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4977<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4978<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4981<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4982 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4984 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4985 yyextra->insideObjC=
FALSE;
4986 BEGIN( FindMembers );
4988<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4989<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4991<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4992<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4993 if (yyextra->insidePHP)
4999 yyextra->current->bodyLine = yyextra->yyLineNr;
5000 yyextra->current->bodyColumn = yyextra->yyColNr;
5003 yyextra->funcPtrType=yytext;
5004 yyextra->roundCount=0;
5009<FuncPtr>{SCOPENAME} {
5010 yyextra->current->name = yytext;
5013 BEGIN( FuncPtrOperator );
5017 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5019 yyextra->funcPtrType += yyextra->current->name;
5023 BEGIN( EndFuncPtr );
5030<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5031 yyextra->current->name += yytext;
5032 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5035<FuncPtrOperator>\n {
5037 yyextra->current->name += *yytext;
5039<FuncPtrOperator>"(" {
5041 BEGIN( EndFuncPtr );
5044 yyextra->current->name += *yytext;
5046<EndFuncPtr>")"{BNopt}/";" {
5048 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5051<EndFuncPtr>")"{BNopt}/"(" {
5053 if (yyextra->funcPtrType!=
"(")
5055 yyextra->current->type+=yyextra->funcPtrType+
")";
5059<EndFuncPtr>")"{BNopt}/"[" {
5061 yyextra->current->type+=yyextra->funcPtrType;
5062 yyextra->current->args +=
")";
5067 yyextra->current->args += *yytext ;
5070 yyextra->current->bodyLine = yyextra->yyLineNr;
5071 yyextra->current->bodyColumn = yyextra->yyColNr;
5072 yyextra->currentArgumentContext = FuncFuncEnd;
5073 yyextra->fullArgString=yyextra->current->args;
5074 yyextra->copyArgString=&yyextra->current->args;
5075 BEGIN( ReadFuncArgType ) ;
5077<EndFuncPtr>"["[^\n\]]*"]" {
5078 yyextra->funcPtrType+=yytext;
5084 yyextra->current->args += *yytext ;
5085 ++yyextra->roundCount;
5088 yyextra->current->args += *yytext ;
5089 if ( yyextra->roundCount )
5090 --yyextra->roundCount;
5096<FuncFuncEnd>")"{BN}*"(" {
5098 yyextra->current->type+=yyextra->funcPtrType+
")(";
5099 BEGIN(FuncFuncType);
5101<FuncFuncEnd>")"{BNopt}/[;{] {
5103 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5106<FuncFuncEnd>")"{BNopt}/"[" {
5108 yyextra->current->type+=yyextra->funcPtrType;
5109 yyextra->current->args+=
")";
5110 BEGIN(FuncFuncArray);
5113 yyextra->current->args += *yytext;
5116 yyextra->current->type += *yytext;
5117 yyextra->roundCount++;
5120 yyextra->current->type += *yytext;
5121 if (yyextra->roundCount)
5122 --yyextra->roundCount;
5126<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5127<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5129 yyextra->current->type += *yytext;
5131<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5132 if (yyextra->current->type.startsWith(
"typedef") &&
5133 yyextra->current->bodyLine==-1)
5136 yyextra->current->bodyLine = yyextra->yyLineNr;
5137 yyextra->current->bodyColumn = yyextra->yyColNr;
5138 BEGIN( GetCallType );
5140 else if (!yyextra->current->name.isEmpty())
5142 yyextra->current->args = yytext;
5143 yyextra->current->bodyLine = yyextra->yyLineNr;
5144 yyextra->current->bodyColumn = yyextra->yyColNr;
5145 yyextra->currentArgumentContext = FuncQual;
5146 yyextra->fullArgString=yyextra->current->args;
5147 yyextra->copyArgString=&yyextra->current->args;
5148 BEGIN( ReadFuncArgType ) ;
5152<GetCallType>{BN}*{ID}{BN}*"*" {
5155 yyextra->funcPtrType=
"(";
5156 yyextra->funcPtrType+=yytext;
5157 yyextra->roundCount=0;
5161 if (!yyextra->current->name.isEmpty())
5163 yyextra->current->args = yytext;
5164 yyextra->current->bodyLine = yyextra->yyLineNr;
5165 yyextra->current->bodyColumn = yyextra->yyColNr;
5166 yyextra->currentArgumentContext = FuncQual;
5167 yyextra->fullArgString=yyextra->current->args;
5168 yyextra->copyArgString=&yyextra->current->args;
5169 BEGIN( ReadFuncArgType ) ;
5176<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5177 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5178 else yyextra->fullArgString+=yytext;
5180<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5181 yyextra->fullArgString+=yytext;
5183<CopyArgRound>[^\/\n\)\(\"\']+ {
5184 *yyextra->copyArgString+=yytext;
5185 yyextra->fullArgString+=yytext;
5187<CopyArgSquare>[^\/\n\]\[\"\']+ {
5188 *yyextra->copyArgString+=yytext;
5189 yyextra->fullArgString+=yytext;
5191<ReadFuncArgType,ReadTempArgs>{BN}* {
5192 *yyextra->copyArgString+=
" ";
5193 yyextra->fullArgString+=
" ";
5196<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5198 yyextra->lastRawStringContext = YY_START;
5199 yyextra->pCopyRawString = yyextra->copyArgString;
5200 *yyextra->pCopyRawString+=yytext;
5201 yyextra->fullArgString+=yytext;
5204<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5205 *yyextra->copyArgString+=*yytext;
5206 yyextra->fullArgString+=*yytext;
5207 yyextra->lastCopyArgStringContext = YY_START;
5208 BEGIN( CopyArgString );
5210<ReadFuncArgType>"[" {
5211 if (!yyextra->insidePHP) REJECT;
5212 *yyextra->copyArgString+=*yytext;
5213 yyextra->fullArgString+=*yytext;
5214 yyextra->argSquareCount=0;
5215 yyextra->lastCopyArgContext = YY_START;
5216 BEGIN( CopyArgSquare );
5218<ReadFuncArgType,ReadTempArgs>"(" {
5219 *yyextra->copyArgString+=*yytext;
5220 yyextra->fullArgString+=*yytext;
5221 yyextra->argRoundCount=0;
5222 yyextra->lastCopyArgContext = YY_START;
5223 BEGIN( CopyArgRound );
5225<ReadFuncArgType>")" {
5226 *yyextra->copyArgString+=*yytext;
5227 yyextra->fullArgString+=*yytext;
5229 if (yyextra->insideJS)
5240 yyextra->docBackup = yyextra->current->doc;
5241 yyextra->briefBackup = yyextra->current->brief;
5243 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5246<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5247 if (yyextra->currentArgumentContext==DefineEnd)
5251 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5257 BEGIN( yyextra->currentArgumentContext );
5263 yyextra->fullArgString+=yytext;
5264 yyextra->lastCopyArgChar=0;
5265 yyextra->lastCommentInArgContext=YY_START;
5267 BEGIN( CopyArgCommentLine );
5269 BEGIN( CopyArgComment );
5273<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5274<ReadFuncArgType,ReadTempArgs>{CCS} {
5275 yyextra->lastCContext = YY_START;
5276 BEGIN( SkipComment );
5278<ReadFuncArgType,ReadTempArgs>{CPPC} {
5279 yyextra->lastCContext = YY_START;
5280 BEGIN( SkipCxxComment );
5296<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5298 if (yyextra->currentArgumentContext==DefineEnd)
5302 int i;
for (i=(
int)yyleng-1;i>0;i--)
5306 *yyextra->copyArgString+=*yytext;
5307 yyextra->fullArgString+=*yytext;
5310 BEGIN( yyextra->currentArgumentContext );
5316 yyextra->lastCopyArgChar=*yytext;
5319 yyextra->lastCommentInArgContext=YY_START;
5320 yyextra->fullArgString+=text;
5321 if (text.
find(
"//")!=-1)
5322 BEGIN( CopyArgCommentLine );
5324 BEGIN( CopyArgComment );
5327<CopyArgComment>^{B}*"*"+/{BN}+
5328<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5329<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5330 if (yyextra->lastCopyArgChar!=0)
5331 unput(yyextra->lastCopyArgChar);
5332 BEGIN( yyextra->lastCommentInArgContext );
5334<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5336 if (yyextra->lastCopyArgChar!=0)
5337 unput(yyextra->lastCopyArgChar);
5338 BEGIN( yyextra->lastCommentInArgContext );
5340<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5341 yyextra->docBlockName=
"uml";
5342 yyextra->fullArgString+=yytext;
5343 BEGIN(CopyArgVerbatim);
5345<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5346 yyextra->docBlockName=&yytext[1];
5347 yyextra->fullArgString+=yytext;
5348 BEGIN(CopyArgVerbatim);
5350<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5351 yyextra->docBlockName=&yytext[1];
5352 if (yyextra->docBlockName.at(1)==
'[')
5354 yyextra->docBlockName.at(1)=
']';
5356 if (yyextra->docBlockName.at(1)==
'{')
5358 yyextra->docBlockName.at(1)=
'}';
5360 if (yyextra->docBlockName.at(1)==
'(')
5362 yyextra->docBlockName.at(1)=
')';
5364 yyextra->fullArgString+=yytext;
5365 BEGIN(CopyArgVerbatim);
5367<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5368 yyextra->fullArgString+=yytext;
5369 if (&yytext[4]==yyextra->docBlockName)
5371 yyextra->docBlockName=
"";
5372 BEGIN(CopyArgCommentLine);
5375<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5376 yyextra->fullArgString+=yytext;
5377 if (yyextra->docBlockName==&yytext[1])
5379 yyextra->docBlockName=
"";
5380 BEGIN(CopyArgCommentLine);
5383<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5384<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5385<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5386<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5387<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5388 warn(yyextra->fileName,yyextra->yyLineNr,
5389 "Ignoring {:c}brief command inside argument documentation",*yytext
5391 yyextra->fullArgString+=
' ';
5394 *yyextra->copyArgString+=*yytext;
5395 yyextra->fullArgString+=*yytext;
5396 yyextra->argSharpCount=1;
5397 BEGIN( CopyArgSharp );
5400 *yyextra->copyArgString+=*yytext;
5401 yyextra->fullArgString+=*yytext;
5403 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5405 BEGIN( yyextra->currentArgumentContext );
5408 yyextra->argRoundCount++;
5409 *yyextra->copyArgString+=*yytext;
5410 yyextra->fullArgString+=*yytext;
5413 *yyextra->copyArgString+=*yytext;
5414 yyextra->fullArgString+=*yytext;
5415 if (yyextra->argRoundCount>0)
5416 yyextra->argRoundCount--;
5418 BEGIN( yyextra->lastCopyArgContext );
5421 yyextra->argSquareCount++;
5422 *yyextra->copyArgString+=*yytext;
5423 yyextra->fullArgString+=*yytext;
5426 *yyextra->copyArgString+=*yytext;
5427 yyextra->fullArgString+=*yytext;
5428 if (yyextra->argSquareCount>0)
5429 yyextra->argSquareCount--;
5431 BEGIN( yyextra->lastCopyArgContext );
5434 *yyextra->copyArgString+=*yytext;
5435 yyextra->fullArgString+=*yytext;
5436 yyextra->argRoundCount=0;
5437 yyextra->lastCopyArgContext = YY_START;
5438 BEGIN( CopyArgRound );
5441 yyextra->argSharpCount++;
5443 *yyextra->copyArgString+=*yytext;
5444 yyextra->fullArgString+=*yytext;
5447 *yyextra->copyArgString+=*yytext;
5448 yyextra->fullArgString+=*yytext;
5449 yyextra->argSharpCount--;
5450 if (yyextra->argSharpCount>0)
5456 BEGIN( ReadTempArgs );
5460<CopyArgString,CopyArgPHPString>\\. {
5461 *yyextra->copyArgString+=yytext;
5462 yyextra->fullArgString+=yytext;
5465 *yyextra->copyArgString+=*yytext;
5466 yyextra->fullArgString+=*yytext;
5467 BEGIN( yyextra->lastCopyArgStringContext );
5469<CopyArgPHPString>\' {
5470 *yyextra->copyArgString+=*yytext;
5471 yyextra->fullArgString+=*yytext;
5472 BEGIN( yyextra->lastCopyArgStringContext );
5474<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5475 if (yyextra->insidePHP)
5481 *yyextra->copyArgString+=yytext;
5482 yyextra->fullArgString+=yytext;
5485<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5486 *yyextra->copyArgString+=yytext;
5487 yyextra->fullArgString+=yytext;
5488 if (yyextra->insidePHP)
5490 yyextra->lastCopyArgStringContext=YY_START;
5491 BEGIN(CopyArgPHPString);
5494<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5495 *yyextra->copyArgString+=yytext;
5496 yyextra->fullArgString+=yytext;
5498<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5500 *yyextra->copyArgString+=*yytext;
5501 yyextra->fullArgString+=*yytext;
5503<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5504 *yyextra->copyArgString+=yytext;
5505 yyextra->fullArgString+=yytext;
5507<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5508 *yyextra->copyArgString+=*yytext;
5509 yyextra->fullArgString+=*yytext;
5517<FuncRound>"(" { yyextra->current->args += *yytext ;
5518 ++yyextra->roundCount ;
5520<FuncRound>")" { yyextra->current->args += *yytext ;
5521 if ( yyextra->roundCount )
5522 --yyextra->roundCount ;
5534 if (
qstrcmp(yytext,
";")==0 &&
5535 ((yyextra->insideJS || yyextra->insidePHP) &&
5538 yyextra->current->reset();
5540 BEGIN( FindMembers );
5544 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5547<FuncQual>{BN}*"abstract"{BN}* {
5549 yyextra->current->virt = Specifier::Pure;
5550 yyextra->current->args +=
" override ";
5552<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5554 yyextra->current->spec.setOverride(
true);
5555 yyextra->current->args +=
" override ";
5556 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5559<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5561 yyextra->current->spec.setFinal(
true);
5562 yyextra->current->args +=
" final ";
5563 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5566<FuncQual>{BN}*"sealed"{BN}* {
5568 yyextra->current->spec.setSealed(
true);
5569 yyextra->current->args +=
" sealed ";
5571<FuncQual>{BN}*"new"{BN}* {
5573 yyextra->current->spec.setNew(
true);
5574 yyextra->current->args +=
" new ";
5576<FuncQual>{BN}*"const"{BN}* {
5578 yyextra->current->args +=
" const ";
5579 yyextra->current->argList.setConstSpecifier(
TRUE);
5581<FuncQual>{BN}*"volatile"{BN}* {
5583 yyextra->current->args +=
" volatile ";
5584 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5586<FuncQual>{BN}*"noexcept"{BN}* {
5588 yyextra->current->args +=
" noexcept ";
5589 yyextra->current->spec.setNoExcept(
true);
5591<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5593 yyextra->current->args +=
" noexcept(false)";
5595<FuncQual>{BN}*"noexcept"{BN}*"(" {
5597 yyextra->current->args +=
" noexcept(";
5598 yyextra->current->spec.setNoExcept(
true);
5599 yyextra->lastRoundContext=FuncQual;
5600 yyextra->pCopyRoundString=&yyextra->current->args;
5601 yyextra->roundCount=0;
5605 yyextra->current->args +=
" &";
5608<FuncQual>{BN}*"&&" {
5609 yyextra->current->args +=
" &&";
5613<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5615 yyextra->current->args +=
" = 0";
5616 yyextra->current->virt = Specifier::Pure;
5617 yyextra->current->argList.setPureSpecifier(
TRUE);
5618 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5621<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5623 yyextra->current->args +=
" = delete";
5624 yyextra->current->spec.setDelete(
true);
5625 yyextra->current->argList.setIsDeleted(
TRUE);
5626 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5629<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5631 yyextra->current->args +=
" = default";
5632 yyextra->current->spec.setDefault(
true);
5633 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5636<FuncQual>{BN}*"->"{BN}* {
5638 yyextra->current->argList.setTrailingReturnType(
" -> ");
5639 yyextra->current->args +=
" -> ";
5640 yyextra->roundCount=0;
5641 BEGIN(TrailingReturn);
5643<TrailingReturn>[{;] {
5644 if (yyextra->roundCount>0) REJECT;
5646 yyextra->current->argList.finishTrailingReturnType();
5649<TrailingReturn>"requires"{BN}+ {
5650 if (yyextra->insideJava) REJECT;
5651 yyextra->requiresContext = FuncQual;
5652 yyextra->current->req+=
' ';
5653 yyextra->current->argList.finishTrailingReturnType();
5654 BEGIN(RequiresClause);
5656<TrailingReturn>"(" {
5657 yyextra->roundCount++;
5658 yyextra->current->argList.appendTrailingReturnType(yytext);
5659 yyextra->current->args+=yytext;
5661<TrailingReturn>")" {
5662 if (yyextra->roundCount>0)
5664 yyextra->roundCount--;
5668 warn(yyextra->fileName,yyextra->yyLineNr,
5669 "Found ')' without opening '(' for trailing return type '{})...'",
5670 yyextra->current->argList.trailingReturnType());
5672 yyextra->current->argList.appendTrailingReturnType(yytext);
5673 yyextra->current->args+=yytext;
5676 yyextra->current->argList.appendTrailingReturnType(yytext);
5677 yyextra->current->args+=yytext;
5681 yyextra->current->argList.appendTrailingReturnType(yytext);
5682 yyextra->current->args+=
' ';
5684<FuncRound,FuncFunc>{BN}*","{BN}* {
5686 yyextra->current->args +=
", " ;
5688<FuncQual,FuncRound,FuncFunc>{BN}+ {
5690 yyextra->current->args +=
' ' ;
5692<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5694 yyextra->lastCPPContext = YY_START;
5698 if (!yyextra->insideCS)
5705 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5712 yyextra->lastInitializerContext=YY_START;
5713 yyextra->sharpCount=0;
5714 yyextra->initBracketCount=0;
5715 yyextra->current->initializer.str(yytext);
5716 BEGIN(ReadInitializer);
5719<ReadExpressionBody>";" {
5720 if (!yyextra->current->sli.empty() && yyextra->previous)
5722 yyextra->previous->sli = yyextra->current->sli;
5723 yyextra->current->sli.clear();
5725 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5740 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5743 yyextra->requiresContext = YY_START;
5744 if (!yyextra->current->req.isEmpty())
5746 yyextra->current->req+=
" && ";
5748 BEGIN(RequiresClause);
5750 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5753 yyextra->current->typeConstr.clear();
5754 yyextra->current->typeConstr.push_back(
Argument());
5755 yyextra->lastCSConstraint = YY_START;
5756 BEGIN( CSConstraintName );
5760 yyextra->current->args = yytext;
5761 yyextra->oldStyleArgType.clear();
5762 BEGIN(OldStyleArgs);
5766 yyextra->current->args += yytext;
5772 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5774 if (yyextra->current->doc!=yyextra->docBackup)
5776 doc=yyextra->current->doc;
5777 yyextra->current->doc=yyextra->docBackup;
5779 if (yyextra->current->brief!=yyextra->briefBackup)
5781 brief=yyextra->current->brief;
5782 yyextra->current->brief=yyextra->briefBackup;
5784 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5785 oldStyleArgName,brief,doc);
5786 yyextra->current->args.clear();
5787 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5789<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5791 if (yyextra->current->argList.empty())
5793 yyextra->current->argList.setNoParameters(
TRUE);
5799<OldStyleArgs>. { yyextra->current->args += *yytext; }
5800<FuncQual,FuncRound,FuncFunc>\" {
5801 if (yyextra->insideIDL && yyextra->insideCppQuote)
5807 yyextra->current->args += *yytext;
5810<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5811<FuncQual>{BN}*"try:" |
5812<FuncQual>{BN}*"try"{BN}+ {
5813 yyextra->insideTryBlock=
TRUE;
5815 if (yytext[yyleng-1]==
':')
5821<FuncQual>{BN}*"throw"{BN}*"(" {
5822 yyextra->current->exception =
" throw (" ;
5823 yyextra->roundCount=0;
5825 BEGIN( ExcpRound ) ;
5827<FuncQual>{BN}*"raises"{BN}*"(" {
5828 yyextra->current->exception =
" raises (" ;
5830 yyextra->roundCount=0;
5831 BEGIN( ExcpRound ) ;
5833<FuncQual>{BN}*"throws"{BN}+ {
5834 yyextra->current->exception =
" throws " ;
5838<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5839 ++yyextra->roundCount ;
5841<ExcpRound>")" { yyextra->current->exception += *yytext ;
5842 if ( yyextra->roundCount )
5843 --yyextra->roundCount ;
5848 yyextra->current->exception += *yytext;
5851 unput(
'{'); BEGIN( FuncQual );
5854 unput(
';'); BEGIN( FuncQual );
5857 yyextra->current->exception +=
' ';
5861 yyextra->current->exception += *yytext;
5863<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5864 yyextra->current->name = yyextra->current->args ;
5865 yyextra->current->args = yytext ;
5866 yyextra->roundCount=0;
5867 BEGIN( FuncRound ) ;
5870 if (!yyextra->insidePHP) BEGIN(SkipInits);
5876 yyextra->current->fileName = yyextra->fileName;
5877 yyextra->current->startLine = yyextra->yyBegLineNr;
5878 yyextra->current->startColumn = yyextra->yyBegColNr;
5879 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5881 std::string type = yyextra->current->type.str();
5885 ti = (int)
match.position();
5889 int di = yyextra->current->type.find(
"decltype(");
5890 if (di!=-1 && di<ti)
5895 int ts=yyextra->current->type.find(
'<');
5896 int te=yyextra->current->type.findRev(
'>');
5899 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5900 bool isFunction = ti==-1 ||
5901 (ts!=-1 && ts<te && ts<ti && ti<te);
5902 bool isVariable = !yyextra->current->type.isEmpty() &&
5903 (!isFunction || startsWithTypedef);
5908 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5913 if (yyextra->isTypedef && !startsWithTypedef)
5915 yyextra->current->type.prepend(
"typedef ");
5917 yyextra->current->section = EntryType::makeVariable() ;
5922 yyextra->current->section = EntryType::makeFunction() ;
5923 yyextra->current->proto = *yytext==
';';
5931 if (yyextra->isTypedef && !startsWithTypedef)
5933 yyextra->current->type.prepend(
"typedef ");
5936 yyextra->current->section = EntryType::makeVariable();
5941 yyextra->current->section = EntryType::makeFunction();
5942 yyextra->current->proto =
TRUE;
5946 if ( yyextra->insidePHP)
5950 yyextra->current->spec.setFinal(
true);
5954 yyextra->current->spec.setAbstract(
true);
5957 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5960 if ( *yytext ==
'{' )
5962 yyextra->lastCurlyContext = FindMembers;
5963 yyextra->curlyCount=0;
5968 BEGIN( FindMembers );
5973 if ( yyextra->insidePHP)
5977 yyextra->previous = yyextra->current;
5978 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5981 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5983 yyextra->current->spec.setOptional(
true).setRequired(
true);
5985 yyextra->lastCurlyContext = FindMembers;
5986 if ( *yytext ==
',' )
5988 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5990 if ( *yytext ==
'{' )
5992 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5994 yyextra->previous->spec.setInline(
true);
5996 yyextra->curlyCount=0;
5997 BEGIN( SkipCurly ) ;
5999 else if ( *yytext ==
'=' )
6001 yyextra->previous->spec.setInline(
true);
6002 yyextra->curlyCount=0;
6003 BEGIN( ReadExpressionBody );
6007 if (!yyextra->previous->section.isVariable())
6008 yyextra->previous->bodyLine=-1;
6009 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...
6013<SkipInits>">"{BN}*"{" {
6015 yyextra->curlyCount=1;
6016 BEGIN(SkipC11Inits);
6018<SkipInits>{ID}{BN}*"{" {
6020 yyextra->curlyCount=1;
6021 BEGIN(SkipC11Inits);
6024 ++yyextra->curlyCount;
6027 if ( --yyextra->curlyCount<=0 )
6032<SkipC11Attribute>"]]" {
6033 BEGIN(yyextra->lastC11AttributeContext);
6041 ++yyextra->curlyCount ;
6043<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6046 if( yyextra->curlyCount )
6048 --yyextra->curlyCount ;
6052 if (!yyextra->current->sli.empty() && yyextra->previous)
6054 yyextra->previous->sli = yyextra->current->sli;
6055 yyextra->current->sli.clear();
6057 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6058 BEGIN( yyextra->lastCurlyContext ) ;
6061<SkipCurly>"}"{BN}*{DCOMM}"<" {
6063 if ( yyextra->curlyCount )
6066 --yyextra->curlyCount ;
6070 yyextra->current->endBodyLine=yyextra->yyLineNr;
6071 yyextra->tempEntry = yyextra->current;
6072 yyextra->current = yyextra->previous;
6074 yyextra->docBlockContext = SkipCurlyEndDoc;
6075 yyextra->docBlockInBody =
FALSE;
6076 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6078 yyextra->docBlock.str(std::string());
6079 yyextra->docBlockTerm =
'}';
6080 if (yytext[yyleng-3]==
'/')
6092<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6093 yyextra->docBlockContext = SkipCurlyEndDoc;
6094 yyextra->docBlockInBody =
FALSE;
6095 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6097 yyextra->docBlock.str(std::string());
6098 yyextra->docBlockTerm =
'}';
6099 if (yytext[yyleng-3]==
'/')
6110<SkipCurlyEndDoc>"}" {
6112 if (yyextra->tempEntry)
6114 yyextra->current = yyextra->tempEntry;
6115 yyextra->tempEntry.reset();
6117 BEGIN( yyextra->lastCurlyContext );
6119<SkipCurly,ReadExpressionBody>\" {
6121 yyextra->lastStringContext=YY_START;
6122 BEGIN( SkipString );
6124<SkipCurly>^{B}*"#" {
6125 if (yyextra->insidePHP)
6128 BEGIN( SkipCurlyCpp );
6130<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6134<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6135 if (!yyextra->insidePHP)
6141 yyextra->lastHereDocContext = YY_START;
6145<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6147 yyextra->lastRawStringContext = YY_START;
6148 yyextra->dummyRawString.clear();
6149 yyextra->pCopyRawString = &yyextra->dummyRawString;
6150 *yyextra->pCopyRawString += yytext;
6153<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6157<SkipCurly,SkipCurlyCpp>"\$" {}
6161 yyextra->lastCurlyContext = FindMembers;
6164<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6168<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6170 yyextra->lastCContext = YY_START;
6173<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6175 yyextra->lastCContext = YY_START;
6176 BEGIN(SkipCxxComment);
6178<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6179 yyextra->roundCount=0;
6180 yyextra->lastSkipRoundContext=YY_START;
6183<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6184 yyextra->lastStringContext=YY_START;
6185 BEGIN( SkipString );
6188 warn(yyextra->fileName,yyextra->yyLineNr,
6189 "Found ';' while parsing initializer list! "
6190 "(doxygen could be confused by a macro call without semicolon)"
6192 BEGIN( FindMembers );
6194<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6195 if (!yyextra->insidePHP)
6198 yyextra->lastCContext = YY_START;
6199 BEGIN(SkipCxxComment);
6201<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6202 if (!yyextra->insideCS) REJECT;
6205 yyextra->lastSkipVerbStringContext=YY_START;
6206 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6207 yyextra->dummyTextStream.clear();
6208 BEGIN(SkipVerbString);
6210<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6211 if (yyextra->insidePHP) REJECT;
6213<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6214 if (yyextra->insidePHP)
6216 yyextra->lastStringContext=YY_START;
6217 BEGIN(SkipPHPString);
6220<SkipC11Attribute>{ID} {
6223 yyextra->current->spec.setNoDiscard(
true);
6226<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6227<SkipString,SkipPHPString>\\. { }
6229 BEGIN( yyextra->lastStringContext );
6232 BEGIN( yyextra->lastStringContext );
6234<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6235<SkipString,SkipPHPString>\n {
6239<SkipString,SkipPHPString>. { }
6245 yyextra->current->section = EntryType::makeEmpty() ;
6246 yyextra->current->type.clear() ;
6247 yyextra->current->name.clear() ;
6248 yyextra->current->args.clear() ;
6249 yyextra->current->argList.clear();
6250 BEGIN( FindMembers ) ;
6253 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6257 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6261 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6263 if (!yyextra->baseName.isEmpty())
6265 yyextra->current->extends.emplace_back(
6266 yyextra->baseName,Protection::Public,Specifier::Normal);
6267 yyextra->baseName.clear();
6269 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6274 yyextra->current->section = EntryType::makeEmpty() ;
6275 yyextra->current->type.clear() ;
6276 yyextra->current->name.clear() ;
6277 yyextra->current->args.clear() ;
6278 yyextra->current->argList.clear();
6280 BEGIN( FindMembers ) ;
6282<CompoundName>{SCOPENAME}/{BN}*"<" {
6283 yyextra->sharpCount = 0;
6284 yyextra->current->name = yytext ;
6286 if (yyextra->current->spec.isProtocol())
6288 yyextra->current->name+=
"-p";
6291 yyextra->lastClassTemplSpecContext = ClassVar;
6292 if (yyextra->insideObjC)
6294 BEGIN( ObjCProtocolList );
6296 else if (yyextra->insideCS)
6303 yyextra->roundCount=0;
6304 BEGIN( ClassTemplSpec );
6311 yyextra->current->tArgLists.
push_back(al);
6312 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6313 yyextra->templateStr=
"<";
6314 yyextra->current->name +=
"<";
6315 yyextra->fullArgString = yyextra->templateStr;
6316 yyextra->copyArgString = &yyextra->current->name;
6318 yyextra->currentArgumentContext = ClassVar;
6319 BEGIN( ReadTempArgs );
6321<ObjCProtocolList>"<" {
6322 yyextra->insideProtocolList=
TRUE;
6325<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6326 yyextra->current->name += yytext;
6328 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6331 if (yyextra->current->spec.isProtocol())
6338 BEGIN( yyextra->lastClassTemplSpecContext );
6342<ClassTemplSpec>"<" {
6343 yyextra->current->name += yytext;
6344 if (yyextra->roundCount==0) yyextra->sharpCount++;
6347 yyextra->current->name += yytext;
6349<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6350 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6354 yyextra->current->name =
substitute(yytext,
".",
"::");
6355 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6360 else if (!yyextra->current->tArgLists.empty())
6364 yyextra->current->name = yytext;
6365 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6368 QCString rn = yyextra->current_root->name;
6370 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6374 yyextra->current->spec.setForwardDecl(
true);
6375 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6377 else if (yyextra->insideIDL &&
6378 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6379 yyextra->current->spec.isInterface()) ||
6380 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6381 yyextra->current->spec.isService())
6389 yyextra->current->name = yytext;
6390 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6391 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6394 yyextra->current->spec.setInterface(
false).setService(
false);
6398 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6401 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6404 yyextra->current->reset();
6406 if (yyextra->insideObjC)
6408 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6409 yyextra->insideObjC =
FALSE;
6411 if (yyextra->isTypedef)
6413 yyextra->current->type.prepend(
"typedef");
6415 BEGIN( FindMembers );
Wrapper class for the Entry type.
6418<CompoundName>{SCOPENAME}/{BN}*"(" {
6419 yyextra->current->name = yytext ;
6422 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6424 yyextra->lastAlignAsContext = YY_START;
6429 if (yyextra->current->spec.isProtocol())
6431 yyextra->current->name +=
"-p";
6436<AlignAs>"(" { yyextra->roundCount=0;
6437 BEGIN( AlignAsEnd );
6441<AlignAsEnd>"(" { yyextra->roundCount++; }
6442<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6444 BEGIN( yyextra->lastAlignAsContext );
6450 yyextra->current->name = yytext ;
6454 yyextra->current->bodyLine = yyextra->yyLineNr;
6455 yyextra->current->bodyColumn = yyextra->yyColNr;
6456 yyextra->current->initializer.str(std::string());
6457 yyextra->lastInitializerContext = FindMembers;
6458 yyextra->sharpCount=0;
6459 yyextra->initBracketCount=0;
6460 BEGIN(ReadInitializer);
6462<CompoundName>{SCOPENAME}/{BN}*"," {
6464 yyextra->current->reset();
6467<CompoundName>{SCOPENAME} {
6468 yyextra->current->name = yytext ;
6471 if (yyextra->current->spec.isProtocol())
6473 yyextra->current->name +=
"-p";
6475 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6481<CompoundName>{CSSCOPENAME} {
6482 yyextra->current->name =
substitute(yytext,
".",
"::");
6486<ClassVar>{SCOPENAME}{BNopt}/"(" {
6487 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6490 yyextra->roundCount=0;
6491 BEGIN(SkipUnionSwitch);
6496 yyextra->yyBegColNr=yyextra->yyColNr;
6497 yyextra->yyBegLineNr=yyextra->yyLineNr;
6498 yyextra->current->name = yytext;
6499 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6502 BEGIN( FindMembers );
6506 if (yyextra->isTypedef)
6510 yyextra->current->type.prepend(
"typedef ");
6518<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6519 if (yyextra->insideCli)
6522 yyextra->current->spec.setSealedClass(
true);
6524 yyextra->current->spec.setAbstractClass(
true);
6532<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6533 yyextra->yyBegColNr=yyextra->yyColNr;
6534 yyextra->yyBegLineNr=yyextra->yyLineNr;
6537 if (yyextra->current->section.isEnum())
6539 yyextra->current->section = EntryType::makeVariable() ;
6541 yyextra->current->type +=
' ' ;
6542 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...
6551 yyextra->yyBegColNr=yyextra->yyColNr;
6552 yyextra->yyBegLineNr=yyextra->yyLineNr;
6554 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6557 yyextra->roundCount=0;
6558 BEGIN(SkipUnionSwitch);
6560 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6562 yyextra->current->type.clear();
6563 yyextra->baseProt = Protection::Public;
6564 yyextra->baseVirt = Specifier::Normal;
6565 yyextra->baseName.clear();
6566 BEGIN( BasesProt ) ;
6568 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6570 yyextra->current->typeConstr.clear();
6571 yyextra->current->typeConstr.push_back(
Argument());
6572 yyextra->lastCSConstraint = YY_START;
6573 BEGIN( CSConstraintName );
6575 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6577 yyextra->current->spec.setAbstract(
true);
6579 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6581 yyextra->current->spec.setSealed(
true);
6583 else if (
qstrcmp(yytext,
"final")==0)
6585 yyextra->current->spec.setFinal(
true);
6589 if (yyextra->current->section.isEnum())
6591 yyextra->current->section = EntryType::makeVariable() ;
6593 yyextra->current->type +=
' ' ;
6594 yyextra->current->type += yyextra->current->name ;
6595 yyextra->current->name = yytext ;
6604 if (yyextra->insideObjC && *yytext==
'(')
6606 yyextra->current->name+=
'(';
6607 yyextra->current->spec.setCategory(
true);
6608 BEGIN( ClassCategory );
6610 else if (yyextra->insideCS && *yytext==
'(')
6612 yyextra->current->args=yytext;
6613 yyextra->currentArgumentContext = ClassVar;
6614 yyextra->fullArgString = yyextra->current->args;
6615 yyextra->copyArgString = &yyextra->current->args;
6616 BEGIN( ReadFuncArgType ) ;
6622 BEGIN( FindMembers );
6625<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6626<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6627 yyextra->fullArgString.clear();
6628 yyextra->lastCopyArgChar=
'#';
6629 yyextra->lastCommentInArgContext=YY_START;
6631 BEGIN( CopyArgCommentLine );
6633 BEGIN( CopyArgComment );
6635<CSConstraintType,CSConstraintName>"#" {
6636 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6638<CSConstraintType>"=>" {
6643 BEGIN( yyextra->lastCSConstraint );
6645<CSConstraintType>"{" {
6649 BEGIN( yyextra->lastCSConstraint );
6651<CSConstraintType,CSConstraintName>";" {
6654 BEGIN( yyextra->lastCSConstraint );
6656<CSConstraintName>":" {
6657 BEGIN( CSConstraintType );
6659<CSConstraintName>{ID} {
6661 yyextra->current->typeConstr.back().name=yytext;
6663<CSConstraintType>"where" {
6664 yyextra->current->typeConstr.push_back(
Argument());
6665 BEGIN( CSConstraintName );
6667<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6668 if (yyextra->current->typeConstr.back().type.isEmpty())
6671 yyextra->current->typeConstr.back().type=yytext;
6675 QCString name = yyextra->current->typeConstr.back().name;
6676 yyextra->current->typeConstr.push_back(
Argument());
6677 yyextra->current->typeConstr.back().name=name;
6678 yyextra->current->typeConstr.back().type=yytext;
6681<CSConstraintName,CSConstraintType>\n {
6684<CSConstraintName,CSConstraintType>. {
6686<ClassCategory>{ID} {
6687 yyextra->current->name+=yytext;
6689<ClassCategory>")"/{BN}*"{" {
6690 yyextra->current->name+=
')';
6693<ClassCategory>")"/{BN}*"<" {
6694 yyextra->current->name+=
')';
6695 BEGIN( ObjCProtocolList );
6698 yyextra->current->name+=
')';
6699 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6711 if (yyextra->current->section.isVariable())
6713 yyextra->current->bitfields+=
":";
6714 yyextra->current->args.clear();
6717 else if (yyextra->current->section.isEnum())
6720 yyextra->current->args.clear();
6721 BEGIN(EnumBaseType);
6725 yyextra->current->type.clear();
6726 if (yyextra->current->spec.isInterface() ||
6727 yyextra->current->spec.isStruct() ||
6728 yyextra->current->spec.isRef() ||
6729 yyextra->current->spec.isValue() ||
6730 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6733 yyextra->baseProt = Protection::Public;
6737 yyextra->baseProt = Protection::Private;
6739 yyextra->baseVirt = Specifier::Normal;
6740 yyextra->baseName.clear();
6741 BEGIN( BasesProt ) ;
6745 if (yyextra->isTypedef)
6747 yyextra->current->type.prepend(
"typedef");
6749 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6751 yyextra->current->section = EntryType::makeVariable() ;
6753 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6755 yyextra->current->reset();
6762 BEGIN( FindMembers );
6764<Bases,ClassVar>{CPPC}"/"/[^/] {
6765 if (!yyextra->insideObjC)
6772 yyextra->current->program << yytext;
6773 yyextra->current->fileName = yyextra->fileName ;
6774 yyextra->current->startLine = yyextra->yyLineNr ;
6775 yyextra->current->startColumn = yyextra->yyColNr;
6776 yyextra->curlyCount=0;
6777 BEGIN( ReadBodyIntf );
6780<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6781<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6782<Bases,ClassVar>{CPPC}"!" |
6783<Bases,ClassVar>[\-+]{BN}* {
6784 if (!yyextra->insideObjC)
6791 yyextra->current->program << yytext;
6792 yyextra->current->fileName = yyextra->fileName ;
6793 yyextra->current->startLine = yyextra->yyLineNr ;
6794 yyextra->current->startColumn = yyextra->yyColNr;
6795 yyextra->curlyCount=0;
6796 BEGIN( ReadBodyIntf );
6799<CompoundName,ClassVar>{B}*"{"{B}* {
6800 yyextra->current->program.str(std::string());
6801 yyextra->current->fileName = yyextra->fileName ;
6802 yyextra->current->bodyLine = yyextra->yyLineNr;
6803 yyextra->current->bodyColumn = yyextra->yyColNr;
6805 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6807 if (yyextra->current->section.isNamespace())
6811 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6823 yyextra->curlyCount=0;
6824 if (yyextra->current_root &&
6825 !yyextra->current_root->spec.isInterface() &&
6826 (yyextra->current->spec.isInterface() ||
6827 yyextra->current->spec.isProtocol() ||
6828 yyextra->current->spec.isCategory() ||
6829 yyextra->current->section.isObjcImpl()
6834 BEGIN( ReadBodyIntf );
6836 else if (yyextra->current->section.isNamespace())
6838 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6845<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6846<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6847<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6848<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6849<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6850<BasesProt>{BN} {
lineCount(yyscanner); }
6851<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6852<Bases>"decltype"{BN}*"(" {
6854 yyextra->roundCount=0;
6855 yyextra->lastSkipRoundContext=YY_START;
6858<Bases>("\\")?({ID}"\\")*{ID} {
6859 if (!yyextra->insidePHP)
6868 yyextra->baseName += bn;
6869 yyextra->current->args +=
' ';
6870 yyextra->current->args += yytext;
6873<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6879 yyextra->current->typeConstr.clear();
6880 yyextra->current->typeConstr.push_back(
Argument());
6881 yyextra->lastCSConstraint = YY_START;
6882 BEGIN( CSConstraintName );
6886 yyextra->baseName+=yytext;
6887 yyextra->current->args +=
' ';
6888 yyextra->current->args += yytext;
6891<Bases>{BN}*{ID}("."{ID})* {
6893 yyextra->baseName += name;
6894 yyextra->current->args +=
' ';
6895 yyextra->current->args += name;
6897<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6898 if (!yyextra->insideObjC)
6908<ClassVar,Bases>"@end" {
6916<ClassVar>"<" { yyextra->current->name += *yytext;
6917 yyextra->sharpCount=1;
6918 yyextra->roundCount=0;
6919 yyextra->lastSkipSharpContext = YY_START;
6920 yyextra->specName = &yyextra->current->name;
6921 BEGIN ( Specialization );
6925 yyextra->sharpCount=1;
6926 yyextra->roundCount=0;
6927 yyextra->lastSkipSharpContext = YY_START;
6928 if (yyextra->insideObjC)
6938 yyextra->templateStr = yytext;
6939 yyextra->specName = &yyextra->templateStr;
6940 BEGIN ( Specialization );
6943<Specialization>"<" { *yyextra->specName += *yytext;
6944 if (yyextra->roundCount==0) yyextra->sharpCount++;
6946<Specialization>">" {
6947 *yyextra->specName += *yytext;
6948 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6951 BEGIN(yyextra->lastSkipSharpContext);
6954<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6955<Specialization>"<<" { *yyextra->specName += yytext; }
6956<Specialization>">>"/{B}*"::" {
6961<Specialization>">>" {
6962 if (yyextra->insideCS)
6972 if (yyextra->roundCount>0)
6974 *yyextra->specName += yytext;
6984<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6985<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6986<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6988<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6989<Specialization>"\\'" { *yyextra->specName += *yytext;}
6990<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6991<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6992<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6993<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6994<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6995<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6996<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6997<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6998<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7001 *yyextra->specName += *yytext;
7003<SkipRound>"(" { ++yyextra->roundCount; }
7004<SkipRound>")" {
if (--yyextra->roundCount<0)
7005 BEGIN ( yyextra->lastSkipRoundContext );
7008 yyextra->lastStringContext=SkipRound;
7011<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7012 if (yyextra->insideProtocolList)
7014 yyextra->baseName+=
"-p";
7018 yyextra->current->args +=
',' ;
7021 if (!yyextra->baseName.isEmpty())
7023 yyextra->current->extends.emplace_back(
7024 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7027 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7028 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7029 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7031 yyextra->baseProt=Protection::Public;
7035 yyextra->baseProt=Protection::Private;
7037 yyextra->baseVirt=Specifier::Normal;
7038 yyextra->baseName.clear();
7041 yyextra->insideProtocolList=
FALSE;
7044 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7060 if (*yytext==
',' && yyextra->insideObjC)
7062 yyextra->insideProtocolList=
TRUE;
7068 yyextra->current->program.str(std::string());
7069 yyextra->current->fileName = yyextra->fileName ;
7070 yyextra->current->bodyLine = yyextra->yyLineNr;
7071 yyextra->current->bodyColumn = yyextra->yyColNr;
7073 if (!yyextra->baseName.isEmpty())
7075 yyextra->current->extends.emplace_back(
7076 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7078 yyextra->baseName.clear();
7080 yyextra->curlyCount=0;
7081 if (yyextra->insideObjC)
7083 BEGIN( ReadBodyIntf );
7090<SkipUnionSwitch>{B}*"(" {
7091 yyextra->roundCount++;
7093<SkipUnionSwitch>")" {
7094 if (--yyextra->roundCount==0)
7099<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7101<Comment>{BN}+ { yyextra->current->program << yytext ;
7104<Comment>{CCS} { yyextra->current->program << yytext ; }
7105<Comment>{CPPC} { yyextra->current->program << yytext ; }
7106<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7107 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7108 yyextra->current->program << yytext ;
7110<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7111 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7112 yyextra->current->program << yytext ;
7114<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7115<Comment>{CCE} { yyextra->current->program << yytext ;
7116 if (!yyextra->insideCode)
7118 yyextra->doxygenComment=
false;
7119 BEGIN( yyextra->lastContext );
7122<Comment>. { yyextra->current->program << *yytext ; }
7124<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7126 if (!yyextra->current->doc.isEmpty())
7128 yyextra->current->doc+=
"\n\n";
7132 yyextra->current->docLine = yyextra->yyLineNr;
7133 yyextra->current->docFile = yyextra->fileName;
7136 yyextra->lastDocContext = YY_START;
7137 if (yyextra->current_root->section.isScope())
7139 yyextra->current->inside = yyextra->current_root->name+
"::";
7141 yyextra->docBlockContext = YY_START;
7142 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7147 yyextra->docBlock.
str(indent.
str());
7149 if (yyextra->docBlockAutoBrief)
7151 yyextra->current->briefLine = yyextra->yyLineNr;
7152 yyextra->current->briefFile = yyextra->fileName;
7157<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7163 yyextra->lastDocContext = YY_START;
7166 if (yyextra->current_root->section.isScope())
7168 yyextra->current->inside = yyextra->current_root->name+
"::";
7170 yyextra->current->docLine = yyextra->yyLineNr;
7171 yyextra->current->docFile = yyextra->fileName;
7172 yyextra->docBlockContext = YY_START;
7173 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7175 yyextra->docBlockAutoBrief = javadocAutoBrief;
7179 yyextra->docBlock.
str(indent.
str());
7181 if (yyextra->docBlockAutoBrief)
7183 yyextra->current->briefLine = yyextra->yyLineNr;
7184 yyextra->current->briefFile = yyextra->fileName;
7191 yyextra->current->program << yytext ;
7192 yyextra->lastContext = YY_START ;
7193 yyextra->doxygenComment=
true;
7197<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7202<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7203 yyextra->lastDocContext = YY_START;
7206 if (yyextra->current_root->section.isScope())
7208 yyextra->current->inside = yyextra->current_root->name+
"::";
7210 yyextra->current->docLine = yyextra->yyLineNr;
7211 yyextra->current->docFile = yyextra->fileName;
7212 yyextra->docBlockContext = YY_START;
7213 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7215 yyextra->docBlockAutoBrief = javadocAutoBrief;
7219 yyextra->docBlock.
str(indent.
str());
7221 if (yyextra->docBlockAutoBrief)
7223 yyextra->current->briefLine = yyextra->yyLineNr;
7224 yyextra->current->briefFile = yyextra->fileName;
7229<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7230 yyextra->lastDocContext = YY_START;
7231 if (yyextra->current_root->section.isScope())
7233 yyextra->current->inside = yyextra->current_root->name+
"::";
7235 yyextra->docBlockContext = YY_START;
7236 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7237 yyextra->docBlockAutoBrief =
FALSE;
7241 yyextra->docBlock.
str(indent.
str());
7246<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7247 yyextra->lastDocContext = YY_START;
7248 if (yyextra->current_root->section.isScope())
7250 yyextra->current->inside = yyextra->current_root->name+
"::";
7252 yyextra->docBlockContext = YY_START;
7253 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7254 yyextra->docBlockAutoBrief =
FALSE;
7257 yyextra->docBlock.
str(indent.
str());
7261<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7263 yyextra->externLinkage=
TRUE;
7266 if (yyextra->externLinkage)
7268 yyextra->externLinkage=
FALSE;
7270 else if (yyextra->insideCS &&
7271 !yyextra->current->name.isEmpty() &&
7272 !yyextra->current->type.isEmpty())
7274 if (yyextra->current->mtype == MethodTypes::Event)
7276 yyextra->mtype = MethodTypes::Event;
7280 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7284 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7286 yyextra->current->bodyLine = yyextra->yyLineNr;
7287 yyextra->current->bodyColumn = yyextra->yyColNr;
7288 yyextra->curlyCount=0;
7289 BEGIN( CSAccessorDecl );
7291 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7295 yyextra->current->exception =
" {";
7296 BEGIN(UNOIDLAttributeBlock);
7300 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7301 yyextra->current->name.isEmpty()
7305 yyextra->needsSemi =
FALSE;
7306 if (yyextra->current->isStatic)
7308 yyextra->current->name=
"[static initializer]";
7309 yyextra->current->type.clear();
7313 yyextra->current->name=
"[instance initializer]";
7330 yyextra->current->bodyLine = yyextra->yyLineNr;
7331 yyextra->current->bodyColumn = yyextra->yyColNr;
7332 yyextra->current->initializer.str(yytext);
7333 yyextra->lastInitializerContext = YY_START;
7334 yyextra->sharpCount=0;
7335 yyextra->initBracketCount=1;
7336 BEGIN(ReadInitializer);
7340<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7341<CSAccessorDecl>"}"{B}*"=" {
7343 if (yyextra->curlyCount != 0) REJECT;
7344 yyextra->current->initializer.str(
"=");
7345 yyextra->current->endBodyLine=yyextra->yyLineNr;
7346 yyextra->lastInitializerContext = FindMembers;
7347 BEGIN(ReadInitializer);
7349<CSAccessorDecl>"}" {
7350 if (yyextra->curlyCount)
7352 yyextra->curlyCount--;
7356 yyextra->mtype = MethodTypes::Method;
7357 yyextra->virt = Specifier::Normal;
7359 yyextra->current->endBodyLine=yyextra->yyLineNr;
7364<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7365<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7366<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7367<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7368<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7369<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7370<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7371<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7372<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7373<CSAccessorDecl>{CHARLIT} {}
7374<CSAccessorDecl>"\"" { BEGIN(CSString);}
7375<CSAccessorDecl>"." {}
7376<CSAccessorDecl>\n {
lineCount(yyscanner); }
7377<CSString>"\"" { BEGIN(CSAccessorDecl);}
7385<SliceSequence>{SCOPENAME} {
7386 if (yyextra->current->spec.isLocal())
7388 yyextra->current->type =
"local ";
7390 yyextra->current->type +=
"sequence<";
7391 yyextra->current->type += yytext;
7392 yyextra->current->type +=
">";
7395<SliceSequence>{BN}*">"{BN}* {
7397 BEGIN(SliceSequenceName);
7400<SliceSequenceName>{ID}{BN}* {
7402 yyextra->current->name = yytext ;
7403 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7406<SliceSequenceName>";" {
7407 yyextra->current->section = EntryType::makeVariable();
7408 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7413<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7415 if (yyextra->current->spec.isLocal())
7417 yyextra->current->type =
"local ";
7419 yyextra->current->type +=
"dictionary<";
7420 yyextra->current->type += yytext;
7421 yyextra->current->type +=
">";
7422 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7425<SliceDictionary>{BN}*">"{BN}* {
7427 BEGIN(SliceDictionaryName);
7430<SliceDictionaryName>{ID}{BN}* {
7432 yyextra->current->name = yytext ;
7433 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7436<SliceDictionaryName>";" {
7437 yyextra->current->section = EntryType::makeVariable();
7438 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7448<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7449 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7450 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7453<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7454 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7455 BEGIN( yyextra->docBlockContext );
7457<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7458 yyextra->docBlock << yytext;
7459 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7460 BEGIN( yyextra->docBlockContext );
7462<DocLine>{NONLopt}/"\n" {
7463 yyextra->docBlock << yytext;
7464 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7465 BEGIN( yyextra->docBlockContext );
7470<DocBlock>"*"*{CCE} {
7472 BEGIN(yyextra->docBlockContext);
7474<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7477 yyextra->docBlock <<
"\\ilinebr " << indent;
7479<DocBlock>^{B}*"*"+/[^/] {
7482 yyextra->docBlock << indent;
7484<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7487 yyextra->docBlock << indent;
7489<DocBlock>^{B}*({CPPC}){B}* {
7492 yyextra->docBlock << yytext;
7496 yyextra->docBlock << yytext;
7498<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7499 yyextra->docBlock << yytext;
7501<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7502 yyextra->docBlock << yytext;
7503 char blockName[] =
"f$";
7505 if (c==
'[') blockName[1]=
']';
7506 else if (c==
'{') blockName[1]=
'}';
7507 else if (c==
'(') blockName[1]=
')';
7509 BEGIN(DocCopyBlock);
7511<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7512 yyextra->fileName = &yytext[6];
7513 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7514 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7515 yyextra->docBlock << yytext;
7517<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7518 yyextra->fileName = &yytext[6];
7519 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7520 yyextra->docBlock << yytext;
7522<DocBlock>{CMD}"iline"{LINENR}{B} {
7527 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7531 yyextra->yyLineNr = nr;
7533 yyextra->docBlock << yytext;
7535<DocBlock>{B}*"<"{PRE}">" {
7536 yyextra->docBlock << yytext;
7538 BEGIN(DocCopyBlock);
7540<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7541 yyextra->docBlock << yytext;
7543 BEGIN(DocCopyBlock);
7545<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7546 yyextra->docBlock << yytext;
7548 BEGIN(DocCopyBlock);
7550<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7551 yyextra->docBlock << yytext;
7553 BEGIN(DocCopyBlock);
7555<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7557 yyextra->docBlock <<
"\\ilinebr ";
7558 yyextra->docBlock << pat;
7560 BEGIN(DocCopyBlock);
7562<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7564 yyextra->docBlock << pat;
7566 BEGIN(DocCopyBlock);
7568<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7569<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7570<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7572 yyextra->docBlock <<
"\\ilinebr ";
7573 yyextra->docBlock << pat;
7575 BEGIN(DocCopyBlock);
7577<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7578<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7579<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7581 yyextra->docBlock << pat;
7583 BEGIN(DocCopyBlock);
7586 yyextra->docBlock <<
"```";
7589 yyextra->docBlock << yytext;
7592 yyextra->docBlock << yytext;
7594 BEGIN(DocCopyBlock);
7596<DocBlock>{B}*"<"{CODE}">" {
7597 if (yyextra->insideCS)
7599 yyextra->docBlock << yytext;
7601 BEGIN(DocCopyBlock);
7608<DocBlock>[^@*~`'\/\\\n]+ {
7609 yyextra->docBlock << yytext;
7613 yyextra->docBlock << *yytext;
7616 yyextra->docBlock << *yytext;
7621<DocCopyBlock>"</"{PRE}">" {
7626 yyextra->docBlock << yytext;
7628<DocCopyBlock>"</"{CODE}">" {
7633 yyextra->docBlock << yytext;
7635<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7640 yyextra->docBlock << yytext;
7642<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7647 yyextra->docBlock << yytext;
7649<DocCopyBlock>^{B}*"*"+/{BN}+ {
7650 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7658 yyextra->docBlock << indent;
7661<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7662 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7666 yyextra->docBlock << indent;
7673<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7674 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7678 yyextra->docBlock << indent+
"*";
7685<DocCopyBlock>^{B}*"*"+/{BN}* {
7686 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7689 if (yyextra->nestedComment>0)
7692 yyextra->docBlock << indent+
"*";
7697 yyextra->docBlock << indent;
7705<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7711 yyextra->docBlock << pat;
7713<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7719 yyextra->docBlock << pat;
7721<DocCopyBlock>"```" {
7722 if (yyextra->docBlockName==
"``")
7724 yyextra->docBlock <<
"`";
7726 yyextra->docBlock <<
"``";
7731 yyextra->docBlock << yytext;
7734<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7739 yyextra->docBlock << yytext;
7741<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7746 yyextra->docBlock << yytext;
7748<DocCopyBlock>"`"{1,2} {
7753 yyextra->docBlock << yytext;
7755<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7756 yyextra->docBlock << yytext;
7759 yyextra->docBlock << yytext;
7760 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7764 yyextra->lastStringContext=YY_START;
7765 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7766 yyextra->stopAtInvalidString=
true;
7770<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7773 yyextra->nestedComment++;
7775 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7777 yyextra->nestedComment--;
7779 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7781 warn(yyextra->fileName,yyextra->yyLineNr,
7782 "Found end of C comment inside a '{}' block without matching start of the comment!"
7783 " Maybe the end marker for the block is missing?",
7784 yyextra->docBlockName);
7787 yyextra->docBlock << yytext;
7790 yyextra->docBlock << *yytext;
7794 yyextra->docBlock << *yytext;
7796<DocCopyBlock><<EOF>> {
7797 warn(yyextra->fileName,yyextra->yyLineNr,
7798 "reached end of file while inside a '{}' block!"
7799 " The command that should end the block seems to be missing!",
7800 yyextra->docBlockName);
7807<Prototype>"operator"{B}*"("{B}*")" {
7808 yyextra->current->name+=yytext;
7811 yyextra->current->args+=*yytext;
7812 yyextra->currentArgumentContext = PrototypeQual;
7813 yyextra->fullArgString = yyextra->current->args;
7814 yyextra->copyArgString = &yyextra->current->args;
7815 BEGIN( ReadFuncArgType ) ;
7817<Prototype>"("({ID}"::")*({B}*[&*])+ {
7818 if (yyextra->insidePHP)
7824 yyextra->current->type+=yyextra->current->name+yytext;
7825 yyextra->current->name.clear();
7826 BEGIN( PrototypePtr );
7829<PrototypePtr>{SCOPENAME} {
7830 yyextra->current->name+=yytext;
7833 yyextra->current->args+=*yytext;
7834 yyextra->currentArgumentContext = PrototypeQual;
7835 yyextra->fullArgString = yyextra->current->args;
7836 yyextra->copyArgString = &yyextra->current->args;
7837 BEGIN( ReadFuncArgType ) ;
7840 yyextra->current->type+=
')';
7844 yyextra->current->name+=yytext;
7847 BEGIN( PrototypeSkipLine);
7849<PrototypeQual>{B}*"const"{B}* {
7850 yyextra->current->args +=
" const ";
7851 yyextra->current->argList.setConstSpecifier(
TRUE);
7853<PrototypeQual>{B}*"volatile"{B}* {
7854 yyextra->current->args +=
" volatile ";
7855 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7857<PrototypeQual>{B}*"="{B}*"0"{B}* {
7858 yyextra->current->args +=
" = 0";
7859 yyextra->current->virt = Specifier::Pure;
7860 yyextra->current->argList.setPureSpecifier(
TRUE);
7862<PrototypeQual>"throw"{B}*"(" {
7863 yyextra->current->exception =
"throw(";
7864 BEGIN(PrototypeExc);
7867 yyextra->current->exception +=
')';
7868 BEGIN(PrototypeQual);
7871 yyextra->current->exception += *yytext;
7874 yyextra->current->args += *yytext;
7877 yyextra->current->name += *yytext;
7879<PrototypeSkipLine>. {
7885<SkipCxxComment>.*"\\\n" {
7886 if (yyextra->insideCS)
7895<SkipCxxComment>{ANYopt}/\n {
7896 BEGIN( yyextra->lastCContext ) ;
7898<SkipComment>[^\*\n]+
7903 if (!yyextra->insideCpp) REJECT;
7904 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7905 yyextra->lastC11AttributeContext = YY_START;
7906 BEGIN( SkipC11Attribute );
7911 if (yyextra->insideIDL && yyextra->insideCppQuote)
7915 else if (yyextra->insidePHP)
7917 yyextra->lastStringContext=YY_START;
7922 if (!yyextra->insidePHP)
7924 yyextra->lastCPPContext = YY_START;
7929 yyextra->lastCContext = YY_START ;
7930 BEGIN( SkipCxxComment ) ;
7934 if (!yyextra->insidePHP)
7936 yyextra->lastCContext = YY_START ;
7937 BEGIN( SkipCxxComment ) ;
7940 if (yyextra->insidePHP)
7942 yyextra->lastStringContext=YY_START;
7943 BEGIN(SkipPHPString);
7947 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7949 if (yyextra->current->type.isEmpty())
7951 if (yyextra->current->name.isEmpty())
7952 yyextra->current->name=
"?";
7954 yyextra->current->name+=
"?";
7958 yyextra->current->type+=
"?";
7962<*>"}" { yyextra->exported=
false; }
7964<SkipComment>{CPPC}|{CCS}
7965<*>{CCS} { yyextra->lastCContext = YY_START ;
7966 BEGIN( SkipComment ) ;
7968<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7970 yyextra->lastCContext = YY_START ;
7971 BEGIN( SkipCxxComment ) ;
7974 if (yyextra->insideCS && yyextra->fakeNS)
7978 BEGIN ( ReadNSBody);
7990 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7992 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7994 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8004 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8005 yyextra->outerScopeEntries.clear();
8006 yyextra->baseName.clear();
8007 yyextra->protection = Protection::Public;
8008 yyextra->baseProt = Protection::Public;
8009 yyextra->sharpCount = 0;
8010 yyextra->roundCount = 0;
8011 yyextra->curlyCount = 0;
8012 yyextra->mtype = MethodTypes::Method;
8013 yyextra->isStatic =
FALSE;
8014 yyextra->virt = Specifier::Normal;
8015 yyextra->baseVirt = Specifier::Normal;
8016 yyextra->isTypedef =
FALSE;
8017 yyextra->insideTryBlock =
FALSE;
8018 yyextra->insideFormula =
FALSE;
8019 yyextra->insideCode=
FALSE;
8021 yyextra->previous = 0;
8022 yyextra->firstTypedefEntry.reset();
8023 yyextra->memspecEntry.reset();
8028 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8029 if (yyextra->insideJava)
8031 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8033 yyextra->current->protection = yyextra->protection;
8034 yyextra->current->exported = yyextra->exported ;
8035 yyextra->current->mtype = yyextra->mtype;
8036 yyextra->current->virt = yyextra->virt;
8037 yyextra->current->isStatic = yyextra->isStatic;
8038 yyextra->current->lang = yyextra->language;
8040 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8041 yyextra->isTypedef=
FALSE;
8049 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8050 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8052 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8058 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8061 for (p = yytext ; *p ; ++p )
8065 yyextra->yyLineNr++;
8071 yyextra->column+=tabSize - (yyextra->column%tabSize);
8084 int col=startIndent;
8090 if (c==
'\t') col+=tabSize-(col%tabSize);
8091 else if (c==
'\n') col=0;
8099 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8100 yyextra->current->
protection = yyextra->protection = prot;
8101 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8102 yyextra->current->type.clear();
8103 yyextra->current->name.clear();
8104 yyextra->current->args.clear();
8105 yyextra->current->argList.clear();
8111 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8112 size_t tl=yyextra->current->type.length();
8113 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8115 yyextra->current->type +=
' ' ;
8117 yyextra->current->type += yyextra->current->name;
8118 yyextra->current->name.clear() ;
8119 tl=yyextra->current->type.length();
8120 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8122 yyextra->current->type +=
' ' ;
8124 yyextra->current->type += yyextra->current->args ;
8125 yyextra->current->args.clear() ;
8126 yyextra->current->argList.clear();
8133 if (s==
nullptr || *s==0)
return name;
8135 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8147 bool funcPtr = i>0 && type[i-1]==
')';
8149 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8150 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8151 return type.
left(i);
8157 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8160 yyextra->docBlock <<
"\\iskip";
8162 yyextra->docBlockName=blockName;
8163 yyextra->fencedSize=fencedSize;
8164 yyextra->isCodeBlock=codeBlock;
8165 yyextra->nestedComment=0;
8171 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8172 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8176 yyextra->docBlock <<
"\\endiskip";
8178 yyextra->docBlockName=
"";
8198 int i=name.
find(
"operator");
8199 if (i==-1)
return FALSE;
8209 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8211 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8212 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8213 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8214 yyextra->insideD = yyextra->language==SrcLangExt::D;
8215 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8216 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8217 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8218 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8219 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8220 yyextra->language==SrcLangExt::Lex);
8231 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8232 if (yyextra->current_root->section.isScope())
8235 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8237 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8239 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8249 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8250 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8251 if (yyextra->current->argList.empty())
return FALSE;
8252 for (
const Argument &a : yyextra->current->argList)
8263 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8264 if (yyextra->insideJava)
8267 yyextra->current->protection = Protection::Public;
8268 if (text.
find(
"protected")!=-1)
8269 yyextra->current->protection = Protection::Protected;
8270 else if (text.
find(
"private")!=-1)
8271 yyextra->current->protection = Protection::Private;
8272 else if (text.
find(
"package")!=-1)
8273 yyextra->current->protection = Protection::Package;
8280 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8281 int si =
static_cast<int>(yyextra->current->args.length());
8282 if (yyextra->oldStyleArgType.isEmpty())
8284 std::string args = yyextra->current->args.str();
8285 static const reg::Ex re(R
"(\([^)]*\).*)");
8291 bi1=(int)match.position();
8292 size_t secondMatchStart = match.position()+match.length();
8295 bi2=(int)match.position();
8299 if (bi1!=-1 && bi2!=-1)
8302 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8304 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8305 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8307 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8308 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8309 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8314 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8317 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8318 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8320 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8321 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8327 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8330 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8334 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8335 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8348 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8351 oldStyleArgPtr=yyextra->current->args.
left(j);
8370 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8371 for (
Argument &a : yyextra->current->argList)
8380 a.
docs=brief+
"\n\n"+docs;
8412 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8415 yyextra->current->briefFile = yyextra->fileName;
8416 yyextra->current->briefLine = yyextra->yyLineNr;
8420 yyextra->current->docFile = yyextra->fileName;
8421 yyextra->current->docLine = yyextra->yyLineNr;
8429 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8430 if (yyextra->tempEntry==0)
8435 yyextra->previous = yyextra->current;
8436 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8440 yyextra->previous = yyextra->current;
8441 yyextra->current = yyextra->tempEntry;
8442 yyextra->tempEntry.reset();
8449 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8452 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8453 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8456 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8457 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8459 docEntry->inbodyFile = yyextra->fileName;
8460 docEntry->inbodyLine = lineNr;
8464 bool needsEntry=
FALSE;
8466 Markdown markdown(yyextra->fileName,lineNr);
8469 while (yyextra->commentScanner.parseCommentBlock(
8470 yyextra->thisParser,
8471 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8475 yyextra->docBlockInBody ?
FALSE : brief,
8476 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8477 yyextra->docBlockInBody,
8478 yyextra->protection,
8489 QCString docFile = yyextra->current->docFile;
8491 yyextra->current->docFile = docFile;
8492 yyextra->current->docLine = lineNr;
8500 if (yyextra->docBlockTerm)
8502 unput(yyextra->docBlockTerm);
8503 yyextra->docBlockTerm=0;
8510 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8521 QCString orgDoc = yyextra->current->doc;
8522 QCString orgBrief = yyextra->current->brief;
8523 int orgDocLine = yyextra->current->docLine;
8524 int orgBriefLine = yyextra->current->briefLine;
8526 yyextra->current->doc.
clear();
8527 yyextra->current->brief.clear();
8530 int lineNr = orgDocLine;
8532 Markdown markdown(yyextra->fileName,lineNr);
8535 while (yyextra->commentScanner.parseCommentBlock(
8536 yyextra->thisParser,
8537 yyextra->current.get(),
8544 yyextra->protection,
8553 if (needsEntry)
newEntry(yyscanner);
8559 a.
docs = yyextra->current->doc;
8562 yyextra->current->doc = orgDoc;
8563 yyextra->current->brief = orgBrief;
8564 yyextra->current->docLine = orgDocLine;
8565 yyextra->current->briefLine = orgBriefLine;
8576 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8577 for (
const auto &ce : rt->children())
8579 if (!ce->program.empty())
8583 yyextra->padCount=0;
8585 yyextra->programStr = ce->program.str();
8586 yyextra->inputString = yyextra->programStr.data();
8587 yyextra->inputPosition = 0;
8588 if (ce->section.isEnum() || ce->spec.isEnum())
8589 BEGIN( FindFields ) ;
8591 BEGIN( FindMembers ) ;
8592 yyextra->current_root = ce;
8593 yyextra->fileName = ce->fileName;
8595 yyextra->yyLineNr = ce->bodyLine;
8596 yyextra->yyColNr = ce->bodyColumn;
8597 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8599 yyextra->current = std::make_shared<Entry>();
8600 yyextra->isStatic =
FALSE;
8605 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8607 ce->groups = rt->groups;
8610 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8612 if ( ce->section.isClass() )
8614 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8616 yyextra->current->protection = yyextra->protection = Protection::Public ;
8618 else if (yyextra->insideJava)
8620 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8622 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8624 if (ce->lang==SrcLangExt::ObjC)
8626 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8630 yyextra->current->protection = yyextra->protection = Protection::Public ;
8635 yyextra->current->protection = yyextra->protection = Protection::Private ;
8638 else if (ce->section.isEnum() )
8640 yyextra->current->protection = yyextra->protection = ce->protection;
8642 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8644 if (ce->section.isNamespace() )
8646 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8648 yyextra->current->protection = yyextra->protection = ce->protection;
8649 yyextra->current->exported = yyextra->exported =
false;
8651 else if (ce->section.isNamespace() )
8653 yyextra->current->protection = yyextra->protection = Protection::Public ;
8654 yyextra->current->exported = yyextra->exported = ce->exported;
8658 yyextra->current->protection = yyextra->protection = Protection::Public ;
8659 yyextra->current->exported = yyextra->exported =
false;
8661 yyextra->mtype = MethodTypes::Method;
8662 yyextra->virt = Specifier::Normal;
8669 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8671 scannerYYlex(yyscanner);
8674 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8676 yyextra->programStr.clear();
8677 ce->program.str(std::string());
8691 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8692 for (
const auto &ce : rt->children())
8694 if (ce->section.isConcept())
8698 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8700 yyextra->padCount =0;
8702 yyextra->programStr = ce->initializer.str();
8703 yyextra->inputString = yyextra->programStr.data();
8704 yyextra->inputPosition = 0;
8705 yyextra->current_root = ce;
8706 yyextra->fileName = ce->fileName;
8707 yyextra->yyLineNr = ce->bodyLine;
8708 yyextra->yyColNr = ce->bodyColumn;
8709 yyextra->insideObjC =
false;
8710 yyextra->current = std::make_shared<Entry>();
8714 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8716 if (!ce->args.isEmpty())
8718 templArgs=indent+
"template"+ce->args+
"\n";
8720 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8722 yyextra->isStatic =
FALSE;
8724 yyextra->current->section = EntryType::makeConceptCodePart();
8725 yyextra->current->startLine = yyextra->yyLineNr;
8726 BEGIN( FindConceptParts );
8727 scannerYYlex(yyscanner);
8728 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8739 const char *fileBuf,
8740 const std::shared_ptr<Entry> &rt,
8744 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8747 yyextra->inputString = fileBuf;
8748 yyextra->inputPosition = 0;
8749 yyextra->column = 0;
8750 scannerYYrestart(
nullptr,yyscanner);
8753 yyextra->protection = Protection::Public;
8754 yyextra->mtype = MethodTypes::Method;
8755 yyextra->isStatic =
FALSE;
8756 yyextra->exported =
false;
8757 yyextra->virt = Specifier::Normal;
8758 yyextra->current_root = rt;
8759 yyextra->yyLineNr = 1 ;
8760 yyextra->yyBegLineNr = 1;
8761 yyextra->yyBegColNr = 0;
8762 yyextra->anonCount = 0;
8763 yyextra->anonNSCount = 0;
8764 yyextra->fileName = fileName;
8765 yyextra->clangParser = clangParser;
8767 rt->lang = yyextra->language;
8768 msg(
"Parsing file {}...\n",yyextra->fileName);
8770 yyextra->current_root = rt;
8772 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8773 yyextra->current = std::make_shared<Entry>();
8778 yyextra->current->name = yyextra->fileName;
8779 yyextra->current->section = sec;
8780 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8782 yyextra->current->reset();
8784 if ( yyextra->insidePHP )
8786 BEGIN( FindMembersPHP );
8788 else if ( yyextra->insideJava )
8790 yyextra->current->name=
"java::lang";
8791 yyextra->current->fileName = yyextra->fileName;
8792 yyextra->current->section = EntryType::makeUsingDir();
8793 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8795 BEGIN( FindMembers );
8799 BEGIN( FindMembers );
8802 scannerYYlex(yyscanner);
8804 if (YY_START==Comment)
8806 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8810 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8812 yyextra->programStr.clear();
8813 rt->program.str(std::string());
8818 yyextra->anonNSCount++;
8821 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8824 parent->moveToSubEntryAndKeep(child);
8826 yyextra->outerScopeEntries.clear();
8835 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8838 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8841 if (!yyextra->current)
8846 const char *orgInputString;
8847 int orgInputPosition;
8848 YY_BUFFER_STATE orgState;
8851 orgState = YY_CURRENT_BUFFER;
8852 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8853 orgInputString = yyextra->inputString;
8854 orgInputPosition = yyextra->inputPosition;
8857 yyextra->inputString = text.
data();
8858 yyextra->inputPosition = 0;
8859 yyextra->column = 0;
8860 scannerYYrestart(
nullptr, yyscanner);
8862 scannerYYlex(yyscanner);
8864 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8865 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8867 yyextra->current->section = EntryType::makeVariableDoc();
8871 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8872 yy_switch_to_buffer(orgState, yyscanner);
8873 yyextra->inputString = orgInputString;
8874 yyextra->inputPosition = orgInputPosition;
8890 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8898 scannerYYlex_destroy(
p->yyscanner);
8902 const char *fileBuf,
8903 const std::shared_ptr<Entry> &root,
8907 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8908 yyextra->thisParser =
this;
8912 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8920 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8921 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8922 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8933#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)