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
230static inline int computeIndent(
const char *s,
int startIndent);
261#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.
QCString * pCopyC11AttributeString
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.
276NOTopt (("!"{BNopt})|("not"{BN}+))?
278HEXDIGIT ({DIGIT}|[a-f]|[A-F])
279ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
280SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
281TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
282CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
285CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
286PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
287PHPUSEKW ("public"|"private"|"protected")
288IDLATTR ("["[^\]]*"]"){BN}*
289TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
290RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
291RAWEND ")"[^ \t\(\)\\]{0,16}\"
292ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
293ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
294LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
295BITOP "&"|"|"|"^"|"<<"|">>"|"~"
296OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
297FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
298MODULE_ID ({ID}".")*{ID}
299LINENR {B}*[1-9][0-9]*
300FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
301FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
302FILECHARS {FILEICHAR}*{FILEECHAR}+
303HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
304VFILEMASK {FILECHARS}("."{FILECHARS})*
305FILEMASK {VFILEMASK}|{HFILEMASK}
316DCOMMC ("/\*!"|"/\**")
318DCOMMCPP ("/\/!"|"/\/\/")
320DCOMM {DCOMMC}|{DCOMMCPP}
391%x TryFunctionBlockEnd
406%x SkipInterpVerbString
421%x UNOIDLAttributeBlock
451%x SpecializationSingleQuote
452%x SpecializationDoubleQuote
485%x SliceDictionaryName
516<*>"DEPRECATED_ATTRIBUTE" {
517 if (!yyextra->insideObjC) REJECT;
519<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
520 if (!yyextra->insideObjC) REJECT;
521 yyextra->lastDeprecatedContext=YY_START;
522 yyextra->lastStringContext=Deprecated_round;
525<Deprecated_round>")" {
526 BEGIN(yyextra->lastDeprecatedContext);
528<Deprecated_round>{BNopt} {
531<Deprecated_round>. { }
533 yyextra->curlyCount=0;
534 yyextra->needsSemi =
true;
535 BEGIN(SkipCurlyBlock);
538 yyextra->roundCount=0;
539 BEGIN(SkipRoundBlock);
542 ++yyextra->roundCount;
545 if (yyextra->roundCount )
546 --yyextra->roundCount ;
551 ++yyextra->curlyCount ;
554 if( yyextra->curlyCount )
556 --yyextra->curlyCount ;
558 else if (yyextra->needsSemi)
564 BEGIN( FindMembers );
568 if (yyextra->insidePHP)
570 yyextra->lastStringContext=NextSemi;
571 BEGIN(SkipPHPString);
574<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
576 yyextra->lastStringContext=NextSemi;
581 BEGIN( FindMembers );
585 BEGIN( FindMembers );
588 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
592<FindMembers>"<?php" {
593 yyextra->insidePHP =
true;
595<FindMembersPHP>"<?"("php"?) {
596 BEGIN( FindMembers );
598<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
600 BEGIN( FindMembers );
602<FindMembers>"?>"|"</script>" {
603 if (yyextra->insidePHP)
604 BEGIN( FindMembersPHP );
608<FindMembersPHP>[^\n<]+ {
615<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
620<FindMembers>"%{"[^\n]* {
621 if (!yyextra->insideIDL)
625 if (!yyextra->insideIDL)
628<FindMembers>{B}*("properties"){BN}*":"{BN}* {
630 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
633<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
635 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
638<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
643<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
645 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
648<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
650 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
653<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
655 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
657<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
660<FindMembers>{B}*"internal"{BN}*":"{BN}* {
661 if (yyextra->insideCli)
670<FindMembers>{B}*"protected"{BN}*":"{BN}* {
673<FindMembers>{B}*"private"{BN}*":"{BN}* {
676<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
677 if (!yyextra->insideCpp) REJECT;
681<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
682 if (!yyextra->insideCpp) REJECT;
686<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
687 if (!yyextra->insideCpp) REJECT;
699<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
700<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
701 BEGIN( SkipComment ) ;
703<CppProt>("slots"|"Q_SLOTS") {
704 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
706<FindMembers>{B}*"event"{BN}+ {
707 if (yyextra->insideCli)
711 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
712 yyextra->current->bodyLine = yyextra->yyLineNr;
713 yyextra->current->bodyColumn = yyextra->yyColNr;
714 yyextra->curlyCount=0;
715 BEGIN( CliPropertyType );
717 else if (yyextra->insideCS)
720 yyextra->current->mtype = MethodTypes::Event;
721 yyextra->current->bodyLine = yyextra->yyLineNr;
722 yyextra->current->bodyColumn = yyextra->yyColNr;
729<FindMembers>{B}*"property"{BN}+ {
730 if (yyextra->insideCli)
734 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
735 yyextra->current->bodyLine = yyextra->yyLineNr;
736 yyextra->current->bodyColumn = yyextra->yyColNr;
737 yyextra->curlyCount=0;
738 BEGIN( CliPropertyType );
745<CliPropertyType>{ID} {
747 yyextra->current->name = yytext;
749<CliPropertyType>"[" {
750 yyextra->current->args =
"[";
751 BEGIN( CliPropertyIndex );
753<CliPropertyType>"{" {
754 yyextra->curlyCount=0;
756 BEGIN( CSAccessorDecl );
758<CliPropertyType>";" {
760 BEGIN( FindMembers );
765<CliPropertyType>{B}* {
769 yyextra->current->type += yytext;
771<CliPropertyIndex>"]" {
772 BEGIN( CliPropertyType );
773 yyextra->current->args+=yytext;
776 yyextra->current->args+=yytext;
791<FindMembers>{B}*"@private"{BN}+ {
794<FindMembers>{B}*"@protected"{BN}+ {
797<FindMembers>{B}*"@public"{BN}+ {
800<FindMembers>[\-+]{BN}* {
801 if (!yyextra->insideObjC)
807 yyextra->current->fileName = yyextra->fileName;
808 yyextra->current->startLine = yyextra->yyLineNr;
809 yyextra->current->startColumn = yyextra->yyColNr;
810 yyextra->current->bodyLine = yyextra->yyLineNr;
811 yyextra->current->bodyColumn = yyextra->yyColNr;
812 yyextra->current->section = EntryType::makeFunction();
813 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
814 yyextra->insideObjC =
true;
815 yyextra->yyBegColNr = yyextra->yyColNr;
816 yyextra->yyBegLineNr = yyextra->yyLineNr;
817 yyextra->current->virt = Specifier::Virtual;
819 yyextra->current->isStatic=yytext[0]==
'+';
825 BEGIN( ObjCReturnType );
826 yyextra->current->type.clear();
827 yyextra->roundCount=0;
830 if (yyextra->current->type.isEmpty())
832 yyextra->current->type +=
"id";
834 yyextra->current->name = yytext;
838 yyextra->current->name +=
':';
840 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
843<ObjCReturnType>[^()]* {
844 yyextra->current->type += yytext;
846<ObjCReturnType>"(^)(" {
847 yyextra->current->type += yytext;
848 yyextra->roundCount++;
851 yyextra->current->type += yytext;
852 yyextra->roundCount++;
855 if (yyextra->roundCount<=0)
861 yyextra->current->type += yytext;
862 yyextra->roundCount--;
865<ObjCParams>({ID})?{BN}*":" {
870 yyextra->current->name +=
" :";
874 yyextra->current->name += keyw+
":";
876 if (yyextra->current->argList.back().type.isEmpty())
878 yyextra->current->argList.back().type=
"id";
882 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
884<ObjCParams>{ID}{BN}* {
888<ObjCParams>","{BN}*"..." {
895 yyextra->current->argList.push_back(a);
903 yyextra->roundCount=0;
904 yyextra->current->argList.back().type.clear();
905 BEGIN( ObjCParamType );
908 yyextra->roundCount++;
909 yyextra->current->argList.back().type+=yytext;
911<ObjCParamType>")"/{B}* {
912 if (yyextra->roundCount<=0)
918 yyextra->current->argList.back().type+=yytext;
919 yyextra->roundCount--;
922<ObjCParamType>[^()]* {
925<ObjCMethod,ObjCParams>";" {
926 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
928 yyextra->current->argList.back().type=
"id";
930 if (yyextra->current->argList.empty())
932 yyextra->current->argList.setNoParameters(
true);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
939<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
944 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
946 yyextra->current->argList.back().type=
"id";
948 if (yyextra->current->argList.empty())
950 yyextra->current->argList.setNoParameters(
true);
956<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
957 if (yyextra->insideSlice)
960 yyextra->current->bodyLine = yyextra->yyLineNr;
961 yyextra->current->bodyColumn = yyextra->yyColNr;
962 yyextra->current->fileName = yyextra->fileName ;
963 yyextra->current->startLine = yyextra->yyLineNr ;
964 yyextra->current->startColumn = yyextra->yyColNr;
965 yyextra->current->args.clear();
966 yyextra->current->section = EntryType::makeTypedef();
967 yyextra->isTypedef =
true;
968 BEGIN( SliceSequence );
973<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
974 if (yyextra->insideSlice)
977 yyextra->current->bodyLine = yyextra->yyLineNr;
978 yyextra->current->bodyColumn = yyextra->yyColNr;
979 yyextra->current->fileName = yyextra->fileName ;
980 yyextra->current->startLine = yyextra->yyLineNr ;
981 yyextra->current->startColumn = yyextra->yyColNr;
982 yyextra->current->args.clear();
983 yyextra->current->section = EntryType::makeTypedef() ;
984 yyextra->isTypedef =
true;
985 BEGIN( SliceDictionary );
990<FindMembers>{BN}{1,80} {
993<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
994 if (yyextra->insideJava)
997 yyextra->lastSkipRoundContext = YY_START;
998 yyextra->roundCount=0;
1003 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1004 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1005 yyextra->current->protection = Protection::Public ;
1007 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
1014<ObjCPropAttr>"getter="{ID} {
1015 yyextra->current->read = yytext+7;
1017<ObjCPropAttr>"setter="{ID} {
1018 yyextra->current->write = yytext+7;
1020<ObjCPropAttr>"readonly" {
1021 yyextra->current->spec.setWritable(
false);
1023<ObjCPropAttr>"readwrite" {
1025<ObjCPropAttr>"assign" {
1027<ObjCPropAttr>"unsafe_unretained" {
1028 yyextra->current->spec.setAssign(
false);
1029 yyextra->current->spec.setUnretained(
true);
1031<ObjCPropAttr>"retain" {
1032 yyextra->current->spec.setAssign(
false);
1033 yyextra->current->spec.setRetain(
true);
1035<ObjCPropAttr>"copy" {
1036 yyextra->current->spec.setAssign(
false);
1037 yyextra->current->spec.setCopy(
true);
1039<ObjCPropAttr>"weak" {
1040 yyextra->current->spec.setAssign(
false);
1041 yyextra->current->spec.setWeak(
true);
1043<ObjCPropAttr>"strong" {
1044 yyextra->current->spec.setAssign(
false);
1045 yyextra->current->spec.setStrong(
true);
1047<ObjCPropAttr>"nonatomic" {
1048 yyextra->current->spec.setNonAtomic(
true);
1053<FindMembers>"@"{ID}("."{ID})+ {
1054 if (yyextra->insideJava)
1063<FindMembers>"@"{ID} {
1064 if (yyextra->insideJava)
1068 else if (
qstrcmp(yytext,
"@property")==0)
1070 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1071 yyextra->current->spec.setWritable(
true).setReadable(
true);
1072 yyextra->current->protection = Protection::Public ;
1074 else if (
qstrcmp(yytext,
"@synthesize")==0)
1076 BEGIN( ObjCSkipStatement );
1078 else if (
qstrcmp(yytext,
"@dynamic")==0)
1080 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1087<ObjCSkipStatement>";" {
1090<PackageName>{ID}(("."|"\\"){ID})* {
1091 yyextra->isTypedef=
false;
1093 yyextra->current->name = yytext;
1094 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1095 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1096 yyextra->current->section = EntryType::makeNamespace();
1097 yyextra->current->type =
"namespace" ;
1098 yyextra->current->fileName = yyextra->fileName;
1099 yyextra->current->startLine = yyextra->yyLineNr;
1100 yyextra->current->startColumn = yyextra->yyColNr;
1101 yyextra->current->bodyLine = yyextra->yyLineNr;
1102 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
1106 std::shared_ptr<Entry> tmp = yyextra->current;
1107 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1108 yyextra->current_root = std::move(tmp);
1113 yyextra->curlyCount=0;
1114 BEGIN( ReadNSBody );
1116<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1117 if (!yyextra->insideCpp) REJECT;
1119 yyextra->current->exported =
true;
1121 BEGIN( ModuleName );
1123<FindMembers>{B}*"module"{BN}*";" {
1124 if (!yyextra->insideCpp) REJECT;
1125 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1128 BEGIN( FindMembers );
1130<FindMembers>{B}*"module"{BN}+ {
1131 if (!yyextra->insideCpp) REJECT;
1133 yyextra->current->exported =
false;
1135 BEGIN( ModuleName );
1137<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1138 if (!yyextra->insideCpp) REJECT;
1139 yyextra->current->exported =
true;
1141 BEGIN( ModuleImport );
1143<FindMembers>{B}*"import"{BN}+ {
1144 if (!yyextra->insideCpp) REJECT;
1146 BEGIN( ModuleImport );
1148<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1150 int i = name.
find(
':');
1156 yyextra->current->exported,
1159 yyextra->current->section = EntryType::makeModuleDoc();
1160 yyextra->isTypedef=
false;
1162 yyextra->current->type +=
" module";
1163 yyextra->current->fileName = yyextra->fileName;
1164 yyextra->current->startLine = yyextra->yyLineNr;
1165 yyextra->current->startColumn = yyextra->yyColNr;
1166 yyextra->current->bodyLine = yyextra->yyLineNr;
1167 yyextra->current->bodyColumn = yyextra->yyColNr;
1168 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())
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
int find(char c, int index=0, bool cs=true) const
1171<ModuleName>{MODULE_ID} {
1175 yyextra->current->exported,
1177 yyextra->current->section = EntryType::makeModuleDoc();
1178 yyextra->isTypedef=
false;
1180 yyextra->current->type +=
" module";
1181 yyextra->current->fileName = yyextra->fileName;
1182 yyextra->current->startLine = yyextra->yyLineNr;
1183 yyextra->current->startColumn = yyextra->yyColNr;
1184 yyextra->current->bodyLine = yyextra->yyLineNr;
1185 yyextra->current->bodyColumn = yyextra->yyColNr;
1186 yyextra->current->name = yytext;
1189<ModuleName>":"{BN}+"private" {
1190 yyextra->current->exported = yyextra->exported =
false;
1193<ModuleName>";" { unput(
';');
1198<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1204<ModuleImport>"<"[^>\n]*">" {
1210<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1212 int i = name.
find(
':');
1218 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1222<ModuleImport>{MODULE_ID} {
1226 yyextra->current->exported);
1229<ModuleImport>";" { BEGIN(FindMembers); }
1230<ModuleImport>\n {
lineCount(yyscanner); }
1232<FindMembers>{B}*"export"{BN}+"{" {
1233 yyextra->current->exported = yyextra->exported =
true;
1235<FindMembers>{B}*"export"{BN}+ {
1236 if (!yyextra->insideCpp) REJECT;
1237 yyextra->current->exported=
true;
1239<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1240 yyextra->current->type +=
" initonly ";
1241 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1244<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1245 yyextra->current->isStatic =
true;
1248<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1249 yyextra->current->isStatic =
true;
1252<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1253 yyextra->current->isStatic =
false;
1254 yyextra->current->explicitExternal =
true;
1257<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1259 yyextra->current->type +=
" const ";
1260 if (yyextra->insideCS) yyextra->current->isStatic =
true;
1268<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1269 yyextra->current->type +=
" virtual ";
1270 yyextra->current->virt = Specifier::Virtual;
1273<FindMembers>{B}*"constexpr"{BN}+ {
1274 if (yyextra->insideCpp)
1276 yyextra->current->spec.setConstExpr(
true);
1280<FindMembers>{B}*"consteval"{BN}+ {
1281 if (yyextra->insideCpp)
1283 yyextra->current->spec.setConstEval(
true);
1287<FindMembers>{B}*"constinit"{BN}+ {
1288 if (yyextra->insideCpp)
1290 yyextra->current->spec.setConstInit(
true);
1294<FindMembers>{B}*"published"{BN}+ {
1295 if (yyextra->insideIDL)
1298 yyextra->current->spec.setPublished(
true);
1305<FindMembers>{B}*"sealed"{BN}+ {
1306 if (yyextra->insideCS)
1308 yyextra->current->spec.setSealed(
true);
1315<FindMembers>{B}*"abstract"{BN}+ {
1316 if (yyextra->insidePHP || yyextra->insideCS)
1318 yyextra->current->spec.setAbstract(
true);
1322 if (yyextra->insideCpp) REJECT;
1323 yyextra->current->type +=
" abstract ";
1324 if (!yyextra->insideJava)
1326 yyextra->current->virt = Specifier::Pure;
1330 yyextra->current->spec.setAbstract(
true);
1335<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1336 yyextra->current->spec.setInline(
true);
1339<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1340 yyextra->current->spec.setMutable(
true);
1343<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1344 yyextra->current->spec.setThreadLocal(
true);
1347<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1348 yyextra->current->spec.setExplicit(
true);
1351<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1352 yyextra->current->spec.setLocal(
true);
1355<FindMembers>{B}*"@required"{BN}+ {
1356 yyextra->current->spec.setOptional(
false).setRequired(
true);
1359<FindMembers>{B}*"@optional"{BN}+ {
1360 yyextra->current->spec.setRequired(
false).setOptional(
true);
1368<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1369<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1370 yyextra->isTypedef=
false;
1371 yyextra->current->section = EntryType::makeNamespace();
1372 yyextra->current->type =
"namespace" ;
1373 yyextra->current->fileName = yyextra->fileName;
1374 yyextra->current->startLine = yyextra->yyLineNr;
1375 yyextra->current->startColumn = yyextra->yyColNr;
1376 yyextra->current->bodyLine = yyextra->yyLineNr;
1377 yyextra->current->bodyColumn = yyextra->yyColNr;
1379 if (yyextra->insidePHP)
1381 BEGIN( PackageName );
1385 BEGIN( CompoundName );
1388<FindMembers>{B}*"module"{BN}+ {
1390 if (yyextra->insideIDL || yyextra->insideSlice)
1392 yyextra->isTypedef=
false;
1393 yyextra->current->section = EntryType::makeNamespace();
1394 yyextra->current->type =
"module" ;
1395 yyextra->current->fileName = yyextra->fileName;
1396 yyextra->current->startLine = yyextra->yyLineNr;
1397 yyextra->current->startColumn = yyextra->yyColNr;
1398 yyextra->current->bodyLine = yyextra->yyLineNr;
1399 yyextra->current->bodyColumn = yyextra->yyColNr;
1400 BEGIN( CompoundName );
1402 else if (yyextra->insideD)
1413<FindMembers>{B}*"library"{BN}+ {
1415 if (yyextra->insideIDL)
1417 yyextra->isTypedef=
false;
1418 yyextra->current->section = EntryType::makeNamespace();
1419 yyextra->current->type =
"library" ;
1420 yyextra->current->fileName = yyextra->fileName;
1421 yyextra->current->startLine = yyextra->yyLineNr;
1422 yyextra->current->startColumn = yyextra->yyColNr;
1423 yyextra->current->bodyLine = yyextra->yyLineNr;
1424 yyextra->current->bodyColumn = yyextra->yyColNr;
1425 BEGIN( CompoundName );
1433<FindMembers>{B}*"constants"{BN}+ {
1435 if (yyextra->insideIDL)
1437 yyextra->isTypedef=
false;
1438 yyextra->current->section = EntryType::makeNamespace();
1439 yyextra->current->type =
"constants";
1440 yyextra->current->fileName = yyextra->fileName;
1441 yyextra->current->startLine = yyextra->yyLineNr;
1442 yyextra->current->startColumn = yyextra->yyColNr;
1443 yyextra->current->bodyLine = yyextra->yyLineNr;
1444 yyextra->current->bodyColumn = yyextra->yyColNr;
1445 BEGIN( CompoundName );
1453<FindMembers>{BN}*("service"){BN}+ {
1455 if (yyextra->insideIDL)
1457 yyextra->isTypedef=
false;
1458 yyextra->current->section = EntryType::makeClass();
1462 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1464 yyextra->current->type +=
" service " ;
1465 yyextra->current->fileName = yyextra->fileName;
1466 yyextra->current->startLine = yyextra->yyLineNr;
1467 yyextra->current->bodyLine = yyextra->yyLineNr;
1468 yyextra->current->bodyColumn = yyextra->yyColNr;
1469 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1477<FindMembers>{BN}*("singleton"){BN}+ {
1479 if (yyextra->insideIDL)
1481 yyextra->isTypedef=
false;
1482 yyextra->current->section = EntryType::makeClass();
1484 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1485 setPublished(spec.isPublished());
1487 yyextra->current->type +=
" singleton " ;
1488 yyextra->current->fileName = yyextra->fileName;
1489 yyextra->current->startLine = yyextra->yyLineNr;
1490 yyextra->current->bodyLine = yyextra->yyLineNr;
1491 yyextra->current->bodyColumn = yyextra->yyColNr;
1492 BEGIN( CompoundName );
1500<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1502 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1504 yyextra->isTypedef=
false;
1505 yyextra->current->section = EntryType::makeClass();
1507 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1509 setOptional(spec.isOptional()).
1510 setPublished(spec.isPublished()).
1511 setLocal(spec.isLocal());
1513 yyextra->current->type +=
" interface" ;
1514 yyextra->current->fileName = yyextra->fileName;
1515 yyextra->current->startLine = yyextra->yyLineNr;
1516 yyextra->current->startColumn = yyextra->yyColNr;
1517 yyextra->current->bodyLine = yyextra->yyLineNr;
1518 yyextra->current->bodyColumn = yyextra->yyColNr;
1520 BEGIN( CompoundName );
1528<FindMembers>{B}*"@implementation"{BN}+ {
1530 yyextra->isTypedef=
false;
1531 yyextra->current->section = EntryType::makeObjcImpl();
1532 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1533 yyextra->insideObjC =
true;
1534 yyextra->current->protection = yyextra->protection = Protection::Public ;
1536 yyextra->current->type +=
" implementation" ;
1537 yyextra->current->fileName = yyextra->fileName;
1538 yyextra->current->startLine = yyextra->yyLineNr;
1539 yyextra->current->bodyLine = yyextra->yyLineNr;
1540 yyextra->current->bodyColumn = yyextra->yyColNr;
1541 BEGIN( CompoundName );
1543<FindMembers>{B}*"@interface"{BN}+ {
1545 yyextra->isTypedef=
false;
1546 yyextra->current->section = EntryType::makeClass();
1547 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1548 if (!yyextra->insideJava)
1550 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1551 yyextra->insideObjC =
true;
1553 yyextra->current->protection = yyextra->protection = Protection::Public ;
1555 yyextra->current->type +=
" interface" ;
1556 yyextra->current->fileName = yyextra->fileName;
1557 yyextra->current->startLine = yyextra->yyLineNr;
1558 yyextra->current->startColumn = yyextra->yyColNr;
1559 yyextra->current->bodyLine = yyextra->yyLineNr;
1560 yyextra->current->bodyColumn = yyextra->yyColNr;
1561 BEGIN( CompoundName );
1563<FindMembers>{B}*"@protocol"{BN}+ {
1565 yyextra->isTypedef=
false;
1566 yyextra->current->section = EntryType::makeClass();
1568 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1569 yyextra->insideObjC =
true;
1570 yyextra->current->protection = yyextra->protection = Protection::Public ;
1572 yyextra->current->type +=
" protocol" ;
1573 yyextra->current->fileName = yyextra->fileName;
1574 yyextra->current->startLine = yyextra->yyLineNr;
1575 yyextra->current->startColumn = yyextra->yyColNr;
1576 yyextra->current->bodyLine = yyextra->yyLineNr;
1577 yyextra->current->bodyColumn = yyextra->yyColNr;
1578 BEGIN( CompoundName );
1580<FindMembers>{B}*"exception"{BN}+ {
1581 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1582 yyextra->isTypedef=
false;
1583 yyextra->current->section = EntryType::makeClass();
1586 yyextra->current->spec =
TypeSpecifier().setException(
true).
1587 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1589 yyextra->current->type +=
" exception" ;
1590 yyextra->current->fileName = yyextra->fileName;
1591 yyextra->current->startLine = yyextra->yyLineNr;
1592 yyextra->current->startColumn = yyextra->yyColNr;
1593 yyextra->current->bodyLine = yyextra->yyLineNr;
1594 yyextra->current->bodyColumn = yyextra->yyColNr;
1596 BEGIN( CompoundName );
1598<FindMembers>"@class" |
1599<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1600<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1602 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1603 bool isConst=decl.
find(
"const")!=-1;
1604 bool isVolatile=decl.
find(
"volatile")!=-1;
1605 yyextra->current->section = EntryType::makeClass();
1607 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1610 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1612 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1614 yyextra->current->spec.setLocal(
true);
1618 yyextra->current->type +=
" const";
1620 else if (isVolatile)
1622 yyextra->current->type +=
" volatile";
1624 yyextra->current->type +=
" class" ;
1625 yyextra->current->fileName = yyextra->fileName;
1626 yyextra->current->startLine = yyextra->yyLineNr;
1627 yyextra->current->startColumn = yyextra->yyColNr;
1628 yyextra->current->bodyLine = yyextra->yyLineNr;
1629 yyextra->current->bodyColumn = yyextra->yyColNr;
1632 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1633 yyextra->insideObjC =
true;
1636 if (yytext[yyleng-1]==
'{') unput(
'{');
1637 BEGIN( CompoundName ) ;
1639<FindMembers>{B}*"value class{" |
1640<FindMembers>{B}*"value class"{BN}+ {
1641 yyextra->isTypedef=
false;
1642 yyextra->current->section = EntryType::makeClass();
1645 yyextra->current->type +=
" value class" ;
1646 yyextra->current->fileName = yyextra->fileName;
1647 yyextra->current->startLine = yyextra->yyLineNr;
1648 yyextra->current->startColumn = yyextra->yyColNr;
1649 yyextra->current->bodyLine = yyextra->yyLineNr;
1650 yyextra->current->bodyColumn = yyextra->yyColNr;
1652 if (yytext[yyleng-1]==
'{') unput(
'{');
1653 BEGIN( CompoundName ) ;
1655<FindMembers>{B}*"ref class{" |
1656<FindMembers>{B}*"ref class"{BN}+ {
1657 yyextra->isTypedef=
false;
1658 yyextra->current->section = EntryType::makeClass();
1661 yyextra->current->type +=
" ref class" ;
1662 yyextra->current->fileName = yyextra->fileName;
1663 yyextra->current->startLine = yyextra->yyLineNr;
1664 yyextra->current->startColumn = yyextra->yyColNr;
1665 yyextra->current->bodyLine = yyextra->yyLineNr;
1666 yyextra->current->bodyColumn = yyextra->yyColNr;
1668 if (yytext[yyleng-1]==
'{') unput(
'{');
1669 BEGIN( CompoundName ) ;
1671<FindMembers>{B}*"interface class{" |
1672<FindMembers>{B}*"interface class"{BN}+ {
1673 yyextra->isTypedef=
false;
1674 yyextra->current->section = EntryType::makeClass();
1675 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1677 yyextra->current->type +=
" interface class" ;
1678 yyextra->current->fileName = yyextra->fileName;
1679 yyextra->current->startLine = yyextra->yyLineNr;
1680 yyextra->current->startColumn = yyextra->yyColNr;
1681 yyextra->current->bodyLine = yyextra->yyLineNr;
1682 yyextra->current->bodyColumn = yyextra->yyColNr;
1684 if (yytext[yyleng-1]==
'{') unput(
'{');
1685 BEGIN( CompoundName ) ;
1687<FindMembers>{B}*"coclass"{BN}+ {
1688 if (yyextra->insideIDL)
1690 yyextra->isTypedef=
false;
1691 yyextra->current->section = EntryType::makeClass();
1693 yyextra->current->type +=
" coclass" ;
1694 yyextra->current->fileName = yyextra->fileName;
1695 yyextra->current->startLine = yyextra->yyLineNr;
1696 yyextra->current->startColumn = yyextra->yyColNr;
1697 yyextra->current->bodyLine = yyextra->yyLineNr;
1698 yyextra->current->bodyColumn = yyextra->yyColNr;
1700 BEGIN( CompoundName ) ;
1705 yyextra->current->name = yytext;
1706 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1710<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1711<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1712 if (yyextra->insideJava) REJECT;
1714 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1715 bool isConst=decl.
find(
"const")!=-1;
1716 bool isVolatile=decl.
find(
"volatile")!=-1;
1717 yyextra->current->section = EntryType::makeClass() ;
1721 setPublished(spec.isPublished()).
1722 setInline(spec.isInline()).
1723 setLocal(spec.isLocal());
1729 yyextra->current->type +=
" const";
1731 else if (isVolatile)
1733 yyextra->current->type +=
" volatile";
1735 yyextra->current->type +=
" struct" ;
1736 yyextra->current->fileName = yyextra->fileName;
1737 yyextra->current->startLine = yyextra->yyLineNr;
1738 yyextra->current->startColumn = yyextra->yyColNr;
1739 yyextra->current->bodyLine = yyextra->yyLineNr;
1740 yyextra->current->bodyColumn = yyextra->yyColNr;
1742 if (yytext[yyleng-1]==
'{') unput(
'{');
1743 BEGIN( CompoundName ) ;
1745<FindMembers>{B}*"value struct{" |
1746<FindMembers>{B}*"value struct"{BN}+ {
1747 yyextra->isTypedef=
false;
1748 yyextra->current->section = EntryType::makeClass();
1749 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1751 yyextra->current->type +=
" value struct" ;
1752 yyextra->current->fileName = yyextra->fileName;
1753 yyextra->current->startLine = yyextra->yyLineNr;
1754 yyextra->current->startColumn = yyextra->yyColNr;
1755 yyextra->current->bodyLine = yyextra->yyLineNr;
1756 yyextra->current->bodyColumn = yyextra->yyColNr;
1758 if (yytext[yyleng-1]==
'{') unput(
'{');
1759 BEGIN( CompoundName ) ;
1761<FindMembers>{B}*"ref struct{" |
1762<FindMembers>{B}*"ref struct"{BN}+ {
1763 yyextra->isTypedef=
false;
1764 yyextra->current->section = EntryType::makeClass();
1765 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1767 yyextra->current->type +=
" ref struct" ;
1768 yyextra->current->fileName = yyextra->fileName;
1769 yyextra->current->startLine = yyextra->yyLineNr;
1770 yyextra->current->startColumn = yyextra->yyColNr;
1771 yyextra->current->bodyLine = yyextra->yyLineNr;
1772 yyextra->current->bodyColumn = yyextra->yyColNr;
1774 if (yytext[yyleng-1]==
'{') unput(
'{');
1775 BEGIN( CompoundName ) ;
1777<FindMembers>{B}*"interface struct{" |
1778<FindMembers>{B}*"interface struct"{BN}+ {
1779 yyextra->isTypedef=
false;
1780 yyextra->current->section = EntryType::makeClass();
1781 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1783 yyextra->current->type +=
" interface struct";
1784 yyextra->current->fileName = yyextra->fileName;
1785 yyextra->current->startLine = yyextra->yyLineNr;
1786 yyextra->current->startColumn = yyextra->yyColNr;
1787 yyextra->current->bodyLine = yyextra->yyLineNr;
1788 yyextra->current->bodyColumn = yyextra->yyColNr;
1790 if (yytext[yyleng-1]==
'{') unput(
'{');
1791 BEGIN( CompoundName ) ;
1793<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1794<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1795 if (yyextra->insideJava) REJECT;
1797 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1798 bool isConst=decl.
find(
"const")!=-1;
1799 bool isVolatile=decl.
find(
"volatile")!=-1;
1800 yyextra->current->section = EntryType::makeClass();
1807 yyextra->current->type +=
" const";
1809 else if (isVolatile)
1811 yyextra->current->type +=
" volatile";
1813 yyextra->current->type +=
" union" ;
1814 yyextra->current->fileName = yyextra->fileName;
1815 yyextra->current->startLine = yyextra->yyLineNr;
1816 yyextra->current->startColumn = yyextra->yyColNr;
1817 yyextra->current->bodyLine = yyextra->yyLineNr;
1818 yyextra->current->bodyColumn = yyextra->yyColNr;
1820 if (yytext[yyleng-1]==
'{') unput(
'{');
1821 BEGIN( CompoundName ) ;
1823<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1824<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1826 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1827 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1828 bool isEnumSytruct = text.
find(
"struct")!=-1;
1829 if (yyextra->insideJava)
1831 yyextra->current->section = EntryType::makeClass();
1837 yyextra->current->section = EntryType::makeEnum() ;
1840 yyextra->current->type +=
" enum";
1843 yyextra->current->spec.setStrong(
true);
1847 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1849 yyextra->current->fileName = yyextra->fileName;
1850 yyextra->current->startLine = yyextra->yyLineNr;
1851 yyextra->current->startColumn = yyextra->yyColNr;
1852 yyextra->current->bodyLine = yyextra->yyLineNr;
1853 yyextra->current->bodyColumn = yyextra->yyColNr;
1855 if (yytext[yyleng-1]==
'{') unput(
'{');
1856 BEGIN( CompoundName ) ;
1858<FindMembers>{B}*"concept"{BN}+ {
1859 if (yyextra->insideJava) REJECT;
1860 yyextra->isTypedef=
false;
1861 yyextra->current->section = EntryType::makeConcept();
1863 yyextra->current->type +=
" concept";
1864 yyextra->current->fileName = yyextra->fileName;
1865 yyextra->current->startLine = yyextra->yyLineNr;
1866 yyextra->current->startColumn = yyextra->yyColNr;
1867 yyextra->current->bodyLine = yyextra->yyLineNr;
1868 yyextra->current->bodyColumn = yyextra->yyColNr;
1869 yyextra->current->args = yyextra->fullArgString;
1870 yyextra->keepComment =
true;
1872 BEGIN( ConceptName ) ;
1874<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1876 yyextra->current->name +=
"()";
1877 BEGIN( FindMembers );
1879<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1881 yyextra->current->name += yytext ;
1882 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1883 BEGIN( FindMembers ) ;
1885<Operator>"("{BN}*")"{BNopt}/"(" {
1887 yyextra->current->name += yytext ;
1888 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1889 BEGIN( FindMembers ) ;
1893 BEGIN( FindMembers ) ;
1897 yyextra->current->name += *yytext ;
1899<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1900 if (!yyextra->current->type.startsWith(
"friend "))
1902 yyextra->current->name += yytext;
1906 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1908 BEGIN( FindMembers ) ;
1910<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1913 yyextra->current->tArgLists.
push_back(al);
1914 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1915 yyextra->templateStr=
"<";
1916 yyextra->fullArgString = yyextra->templateStr;
1917 yyextra->copyArgString = &yyextra->templateStr;
1918 yyextra->currentArgumentContext = FindMembers;
1919 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1921<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1922 if (yyextra->insideJava) REJECT;
1924 BEGIN( NSAliasName );
1927 yyextra->aliasName = yytext;
1928 BEGIN( NSAliasArg );
1930<NSAliasArg>({ID}"::")*{ID} {
1932 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1943 BEGIN( FindMembers );
1945<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1947 yyextra->aliasName=yytext;
1950<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1954 yyextra->current->fileName = yyextra->fileName;
1956 yyextra->current->section = EntryType::makeUsingDecl();
1957 yyextra->current_root->copyToSubEntry(yyextra->current);
1959 yyextra->current->section = EntryType::makeUsingDir();
1960 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1962 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1964<PHPUseAs>{BN}+"as"{BN}+ {
1967<PHPUseAs>{PHPUSEKW} {
1971 if (!yyextra->aliasName.isEmpty())
1976 yyextra->aliasName.clear();
const std::string & str() const
1978<PHPUse,PHPUseAs>[,;] {
1988<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1992 yyextra->current->fileName = yyextra->fileName;
1999 yyextra->current->section = EntryType::makeUsingDir();
2000 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)
2004<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2008 yyextra->current->fileName = yyextra->fileName;
2020 if (yyextra->insideD)
2022 yyextra->current->section = EntryType::makeUsingDir();
2027 yyextra->current->section = EntryType::makeUsingDecl();
2029 yyextra->previous = yyextra->current;
2030 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2034<IDLImport>"\""[^"]*"\"" {
2035 QCString fileName(&yytext[1],yyleng-2);
2051<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2052 if (yyextra->insideJava) REJECT;
2053 yyextra->current->startLine=yyextra->yyLineNr;
2054 yyextra->current->startColumn = yyextra->yyColNr;
2058<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2059<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2061 yyextra->current->name=yytext;
2062 yyextra->current->fileName = yyextra->fileName;
2063 yyextra->current->section = EntryType::makeUsingDecl();
2064 yyextra->current->startLine = yyextra->yyLineNr;
2065 yyextra->usingNewVarNeeded =
true;
2066 if (yyextra->insideCS)
2071 yyextra->current->name=yytext;
2072 yyextra->current->fileName = yyextra->fileName;
2073 yyextra->current->startLine = yyextra->yyLineNr;
2074 yyextra->current->startColumn = yyextra->yyColNr;
2075 yyextra->current->section = EntryType::makeUsingDir();
2076 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2081<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2083 yyextra->current->fileName = yyextra->fileName;
2084 yyextra->current->section = EntryType::makeUsingDecl();
2085 yyextra->current->startLine = yyextra->yyLineNr;
2086 yyextra->current->bodyLine = yyextra->yyLineNr;
2087 yyextra->current->bodyColumn = yyextra->yyColNr;
2088 yyextra->lastInitializerContext = UsingAlias;
2089 yyextra->sharpCount=0;
2090 yyextra->initBracketCount=0;
2092 BEGIN(ReadInitializer);
2095 if (yyextra->usingNewVarNeeded)
2097 yyextra->previous = yyextra->current;
2098 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2100 yyextra->usingNewVarNeeded =
false;
2105 yyextra->lastInitializerContext = UsingAlias;
2106 yyextra->sharpCount=0;
2107 yyextra->initBracketCount=0;
2109 yyextra->usingNewVarNeeded =
false;
2110 BEGIN(ReadInitializer);
2113 yyextra->lastCContext = YY_START ;
2114 BEGIN( SkipComment ) ;
2117 yyextra->lastCContext = YY_START ;
2118 BEGIN( SkipCxxComment ) ;
2122 if (yyextra->usingNewVarNeeded)
2124 yyextra->previous = yyextra->current;
2125 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2127 yyextra->usingNewVarNeeded =
false;
2131 yyextra->current->section = EntryType::makeVariable();
2133 init.stripPrefix(
"class ");
2134 init.stripPrefix(
"struct ");
2136 yyextra->current->type =
"typedef "+
init;
2137 yyextra->current->args.clear();
2138 yyextra->current->spec.setAlias(
true);
2139 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2144 yyextra->current->initializer << yytext;
2147 yyextra->current->initializer << yytext;
2151 yyextra->current->fileName = yyextra->fileName;
2152 yyextra->current->section = EntryType::makeUsingDir();
2153 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2155 yyextra->usingNewVarNeeded =
false;
2158<FindMembers>{SCOPENAME}{BN}*"<>" {
2163<FindMembers>{SCOPENAME}{BNopt}/"<" {
2165 if (yyextra->insideCpp && name==
"import") REJECT;
2166 yyextra->roundCount=0;
2167 yyextra->sharpCount=0;
2170 yyextra->current->name=name;
2176 BEGIN( EndTemplate );
2178<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2179 yyextra->sharpCount=0;
2180 yyextra->roundCount=0;
2188 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...
2191 if (!yyextra->insidePHP)
2197 yyextra->lastHereDocContext = YY_START;
2201<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2202 yyextra->current->name+=yytext;
2206 if (yyextra->roundCount==0)
2209 yyextra->sharpCount++;
2211 yyextra->current->name+=yytext;
2213<ClassTemplSpec,EndTemplate>">=" {
2214 yyextra->current->name+=yytext;
2216<ClassTemplSpec,EndTemplate>(">>") {
2217 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2225 yyextra->current->name+=yytext;
2230 yyextra->current->name+=
'>';
2232 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2234 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2239<EndTemplate>">"{BN}*"(" {
2241 yyextra->current->name+=
'>';
2243 if (yyextra->roundCount==0)
2245 --yyextra->sharpCount;
2247 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2249 yyextra->current->bodyLine = yyextra->yyLineNr;
2250 yyextra->current->bodyColumn = yyextra->yyColNr;
2251 yyextra->current->args =
"(";
2252 yyextra->currentArgumentContext = FuncQual;
2253 yyextra->fullArgString = yyextra->current->args;
2254 yyextra->copyArgString = &yyextra->current->args;
2256 BEGIN( ReadFuncArgType ) ;
2260 yyextra->current->name+=
"(";
2261 yyextra->roundCount++;
2264<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2266 yyextra->current->name+=
'>';
2267 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2272<EndTemplate>">"{BNopt}/"::" {
2274 yyextra->current->name+=
'>';
2276 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2278 BEGIN(FindMemberName);
2281<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2282 yyextra->roundCount++;
2284<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2285 if (yyextra->roundCount>0) yyextra->roundCount--;
2288 yyextra->current->name+=*yytext;
2291<FindMembers>"define"{BN}*"("{BN}*["'] {
2292 if (yyextra->insidePHP)
2294 yyextra->current->bodyLine = yyextra->yyLineNr;
2295 yyextra->current->bodyColumn = yyextra->yyColNr;
2302 yyextra->delimiter = yytext;
2303 *yyextra->pCopyHereDocGString << yytext;
2304 BEGIN(CopyHereDocEnd);
2306<CopyHereDoc>"\""{ID}/"\"" {
2307 yyextra->delimiter = &yytext[1];
2308 *yyextra->pCopyHereDocGString << yytext;
2309 BEGIN(CopyHereDocEnd);
2311<CopyHereDoc>"'"{ID}/"'" {
2312 yyextra->delimiter = &yytext[1];
2313 *yyextra->pCopyHereDocGString << yytext;
2314 BEGIN(CopyHereDocEnd);
2317 yyextra->delimiter = yytext;
2320<HereDoc>"\""{ID}/"\"" {
2321 yyextra->delimiter = &yytext[1];
2324<HereDoc>"'"{ID}/"'" {
2325 yyextra->delimiter = &yytext[1];
2328<HereDocEnd>^{Bopt}{ID} {
2331 BEGIN(yyextra->lastHereDocContext);
2335<CopyHereDocEnd>^{Bopt}{ID} {
2336 *yyextra->pCopyHereDocGString << yytext;
2339 BEGIN(yyextra->lastHereDocContext);
2344 *yyextra->pCopyHereDocGString << yytext;
2346<CopyHereDocEnd>{ID} {
2347 *yyextra->pCopyHereDocGString << yytext;
2350 *yyextra->pCopyHereDocGString << yytext;
2352<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2354<FindMembers>"Q_PROPERTY" {
2355 yyextra->yyBegLineNr = yyextra->yyLineNr;
2356 yyextra->yyBegColNr = yyextra->yyColNr;
2357 yyextra->current->protection = Protection::Public ;
2358 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2359 yyextra->current->type.clear();
2369 yyextra->current->name+=yytext;
2372 yyextra->current->type+= yyextra->current->name;
2373 yyextra->current->type+= yytext;
2374 yyextra->current->name=
"";
2376<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2377 yyextra->current->type+= yyextra->current->name;
2378 yyextra->current->name=yytext;
2380<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2381 yyextra->current->spec.setReadable(
true);
2384<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2385 yyextra->current->spec.setWritable(
true);
2388<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2389<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2390<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2391<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2392<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2393<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2394<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2395<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2396<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2397<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2401 yyextra->current->read = yytext;
2405 yyextra->current->write = yytext;
2408<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2409 yyextra->current->name=yytext;
2413<FindMembers>"requires" {
2414 if (yyextra->insideJava) REJECT;
2415 yyextra->current->req.clear();
2416 yyextra->requiresContext = YY_START;
2417 BEGIN(RequiresClause);
2419<RequiresClause>"requires"{BN}*/"{" {
2420 if (yyextra->insideJava) REJECT;
2422 yyextra->current->req+=yytext;
2423 BEGIN( RequiresExpression ) ;
2425<RequiresClause>"requires"{BN}*"(" {
2426 if (yyextra->insideJava) REJECT;
2428 yyextra->current->req+=yytext;
2429 yyextra->lastRoundContext=RequiresExpression;
2430 yyextra->pCopyRoundString=&yyextra->current->req;
2431 yyextra->roundCount=0;
2432 BEGIN( CopyRound ) ;
2434<RequiresExpression>"{" {
2435 yyextra->current->req+=yytext;
2436 yyextra->lastCurlyContext=RequiresClause;
2437 yyextra->pCopyCurlyString=&yyextra->current->req;
2438 yyextra->curlyCount=0;
2439 BEGIN( CopyCurly ) ;
2441<RequiresExpression>\n {
2442 yyextra->current->req+=
' ';
2445<RequiresExpression>. {
2446 yyextra->current->req+=yytext;
2448<RequiresClause>"(" {
2449 yyextra->current->req+=yytext;
2450 yyextra->lastRoundContext=RequiresClause;
2451 yyextra->pCopyRoundString=&yyextra->current->req;
2452 yyextra->roundCount=0;
2453 BEGIN( CopyRound ) ;
2455<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2459 yyextra->current->req+=yytext;
2460 yyextra->lastRoundContext=RequiresClause;
2461 yyextra->pCopyRoundString=&yyextra->current->req;
2462 yyextra->roundCount=0;
2470<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2474 yyextra->current->req+=yytext;
2475 yyextra->lastSharpContext=RequiresClause;
2476 yyextra->pCopySharpString=&yyextra->current->req;
2477 yyextra->sharpCount=0;
2485<RequiresClause>{NOTopt}{SCOPENAME} {
2489 yyextra->current->req=yytext;
2490 BEGIN(yyextra->requiresContext);
2497<RequiresClause>{NOTopt}"::"{ID} {
2499 yyextra->current->req+=yytext;
2501<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2503 yyextra->current->req+=yytext;
2505<RequiresClause>{BN}+ {
2506 yyextra->current->req+=
' ';
2511 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2512 BEGIN(yyextra->requiresContext);
2514<FindMembers,FindMemberName>{SCOPENAME} {
2516 yyextra->yyBegColNr=yyextra->yyColNr;
2517 yyextra->yyBegLineNr=yyextra->yyLineNr;
2519 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2523 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2525 if (yyextra->insideIDL)
2530 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2534 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2539 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2541 BEGIN(IDLUnionCase);
2543 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2545 yyextra->insideTryBlock=
false;
2546 BEGIN(TryFunctionBlock);
2548 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2550 yyextra->lastAlignAsContext = YY_START;
2553 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2555 yyextra->current->type=
"var";
2557 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2559 yyextra->current->type=
"function";
2561 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2565 yyextra->current->name=
"this";
2568 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2571 BEGIN(StaticAssert);
2573 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2577 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2578 yyextra->current->type+=yytext;
2581 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2583 if (yyextra->current->type.isEmpty())
2585 yyextra->current->type =
"optional";
2589 yyextra->current->type +=
" optional";
2591 yyextra->lastModifierContext = YY_START;
2592 BEGIN(SliceOptional);
2596 if (YY_START==FindMembers)
2600 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2601 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2603 yyextra->current->protection = Protection::Public;
2605 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2607 yyextra->current->protection = Protection::Protected;
2609 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2611 yyextra->current->protection = Protection::Package;
2613 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2615 yyextra->current->protection = Protection::Private;
2617 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2619 if (YY_START==FindMembers)
2620 yyextra->current->name = yytext;
2622 yyextra->current->name += yytext;
2623 yyextra->current->isStatic =
true;
2627 if (YY_START==FindMembers)
2628 yyextra->current->name = yytext;
2630 yyextra->current->name += yytext;
2631 if (yyextra->current->name.startsWith(
"static "))
2633 yyextra->current->isStatic =
true;
2634 yyextra->current->name= yyextra->current->name.mid(7);
2636 else if (yyextra->current->name.startsWith(
"inline "))
2638 if (yyextra->current->type.isEmpty())
2640 yyextra->current->type=
"inline";
2644 yyextra->current->type+=
"inline ";
2646 yyextra->current->name= yyextra->current->name.mid(7);
2648 else if (yyextra->current->name.startsWith(
"constexpr "))
2650 if (yyextra->current->type.isEmpty())
2652 yyextra->current->type=
"constexpr";
2656 yyextra->current->type+=
"constexpr ";
2658 yyextra->current->name=yyextra->current->name.mid(10);
2660 else if (yyextra->current->name.startsWith(
"consteval "))
2662 if (yyextra->current->type.isEmpty())
2664 yyextra->current->type=
"consteval";
2668 yyextra->current->type+=
"consteval ";
2670 yyextra->current->name=yyextra->current->name.mid(10);
2672 else if (yyextra->current->name.startsWith(
"constinit "))
2674 if (yyextra->current->type.isEmpty())
2676 yyextra->current->type=
"constinit";
2680 yyextra->current->type+=
"constinit ";
2682 yyextra->current->name=yyextra->current->name.mid(10);
2684 else if (yyextra->current->name.startsWith(
"const "))
2686 if (yyextra->current->type.isEmpty())
2688 yyextra->current->type=
"const";
2692 yyextra->current->type+=
"const ";
2694 yyextra->current->name=yyextra->current->name.mid(6);
2696 else if (yyextra->current->name.startsWith(
"volatile "))
2698 if (yyextra->current->type.isEmpty())
2700 yyextra->current->type=
"volatile";
2704 yyextra->current->type+=
"volatile ";
2706 yyextra->current->name=yyextra->current->name.mid(9);
2708 else if (yyextra->current->name.startsWith(
"typedef "))
2710 if (yyextra->current->type.isEmpty())
2712 yyextra->current->type=
"typedef";
2716 yyextra->current->type+=
"typedef ";
2718 yyextra->current->name=yyextra->current->name.mid(8);
2728 yyextra->externLinkage=
false;
2732 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2735 yyextra->lastSkipRoundContext = FindMembers;
2736 yyextra->roundCount=0;
2739<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2745 yyextra->current->type+=yytext;
2746 yyextra->lastRoundContext=FindMembers;
2747 yyextra->pCopyRoundString=&yyextra->current->type;
2748 yyextra->roundCount=0;
2751<DeclType>{BN}+ {
lineCount(yyscanner); }
2756<CSIndexer>"["[^\n\]]*"]" {
2760<FindMembers>[0-9]{ID} {
2763 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2765 yyextra->current->name+=
".";
2769 yyextra->current->name+=yytext;
2771<CppQuote>"("{B}*"\"" {
2772 yyextra->insideCppQuote=
true;
2776<IDLUnionCase>":" { BEGIN(FindMembers); }
2777<IDLUnionCase>\n {
lineCount(yyscanner); }
2779<TryFunctionBlock>\n {
lineCount(yyscanner); }
2780<TryFunctionBlock>"{" {
2781 yyextra->curlyCount=0;
2782 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2786<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2788<TryFunctionBlockEnd>\n { unput(*yytext);
2789 BEGIN( FindMembers );
2791<TryFunctionBlockEnd>. { unput(*yytext);
2792 BEGIN( FindMembers );
2795 yyextra->insideCppQuote=
false;
2798<FindConceptParts>[^\/\n]* {
2799 yyextra->current->initializer << yytext;
2801<FindConceptParts>. {
2802 yyextra->current->initializer << yytext;
2804<FindConceptParts>\n {
2805 yyextra->current->initializer << yytext;
2806 yyextra->yyLineNr++;
2808<FindConceptParts>{CCS} {
2809 yyextra->current->initializer << yytext;
2811<FindConceptParts>{CPPC} {
2812 yyextra->current->initializer << yytext;
2814<FindConceptParts>^[ \t]*{CCS}[!*] {
2816 int indent = text.
find(
'/');
2818 if (!yyextra->current->initializer.empty())
2820 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2823 yyextra->current->section = EntryType::makeConceptDocPart();
2824 yyextra->current->startLine = yyextra->yyLineNr;
2825 yyextra->current->startColumn = indent;
2826 yyextra->current->initializer.clear();
2827 BEGIN(FindConceptDocs);
2829<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2830 if (!yyextra->current->initializer.empty())
2832 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2836 int indent = line.find(
'/');
2837 yyextra->current->section = EntryType::makeConceptDocPart();
2838 yyextra->current->startLine = yyextra->yyLineNr;
2839 yyextra->current->startColumn = indent;
2840 yyextra->current->initializer.clear();
2841 yyextra->current->initializer << line.mid(indent+3);
2842 yyextra->yyLineNr++;
2843 BEGIN(FindConceptCxxDocs);
2845<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2847 int p = line.find(
'/');
2848 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2849 yyextra->current->initializer << line.mid(p+2);
2850 yyextra->yyLineNr++;
2852<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2853 yyextra->current->initializer << yytext;
2855<FindConceptCxxDocs>. {
2856 if (!yyextra->current->initializer.empty())
2860 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2864 yyextra->current->section = EntryType::makeConceptCodePart();
2865 yyextra->current->startLine = yyextra->yyLineNr;
2866 BEGIN(FindConceptParts);
2868<FindConceptDocs>^[ \t]*"*"+/[^/] {
2870<FindConceptDocs>[^\*\n]+ {
2871 yyextra->current->initializer << yytext;
2873<FindConceptDocs>\n {
2874 yyextra->current->initializer << yytext;
2875 yyextra->yyLineNr++;
2877<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2878 if (!yyextra->current->initializer.empty())
2882 yyextra->current->section = EntryType::makeConceptDocPart();
2883 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2887 yyextra->current->section = EntryType::makeConceptCodePart();
2888 yyextra->current->startLine = yyextra->yyLineNr;
2889 BEGIN(FindConceptParts);
2891<FindConceptDocs>"*"*{CCE} {
2892 if (!yyextra->current->initializer.empty())
2896 yyextra->current->section = EntryType::makeConceptDocPart();
2897 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2900 yyextra->current->section = EntryType::makeConceptCodePart();
2901 yyextra->current->startLine = yyextra->yyLineNr;
2902 BEGIN(FindConceptParts);
2904<FindConceptParts><<EOF>> {
2905 if (!yyextra->current->initializer.empty())
2907 if (!yyextra->current->section.isConceptCodePart())
2909 yyextra->current->section = EntryType::makeConceptDocPart();
2911 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2916<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2918 yyextra->lastCPPContext = YY_START;
2921<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2922<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2923 if (yyextra->insidePHP)
2925 yyextra->current->bodyLine = yyextra->yyLineNr;
2926 yyextra->current->bodyColumn = yyextra->yyColNr;
2927 yyextra->current->fileName = yyextra->fileName;
2928 yyextra->current->startLine = yyextra->yyLineNr;
2929 yyextra->current->startColumn = yyextra->yyColNr;
2930 yyextra->current->type.clear();
2931 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2932 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2933 yyextra->current->section = EntryType::makeDefine();
2934 yyextra->lastDefineContext = YY_START;
2937<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2938 yyextra->yyLineNr = atoi(&yytext[1]);
2940 yyextra->lastPreLineCtrlContext = YY_START;
2941 if (YY_START==ReadBody ||
2942 YY_START==ReadNSBody ||
2943 YY_START==ReadBodyIntf)
2945 yyextra->current->program << yytext;
2947 BEGIN( PreLineCtrl );
2949<PreLineCtrl>"\""[^\n\"]*"\"" {
2951 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2952 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2953 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2955 yyextra->current->program << yytext;
2959 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2960 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2961 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2963 yyextra->current->program << yytext;
2967 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2968 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2969 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2971 yyextra->current->program << yytext;
2974 BEGIN( yyextra->lastPreLineCtrlContext );
2977<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2978<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2979 BEGIN( yyextra->lastCPPContext) ;
2981<SDefine>{ID}{B}*"(" {
2982 yyextra->current->name = yytext;
2983 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2984 yyextra->current->args =
"(";
2985 yyextra->current->bodyLine = yyextra->yyLineNr;
2986 yyextra->current->bodyColumn = yyextra->yyColNr;
2987 yyextra->currentArgumentContext = DefineEnd;
2988 yyextra->fullArgString=yyextra->current->args;
2989 yyextra->copyArgString=&yyextra->current->args;
2990 BEGIN( ReadFuncArgType ) ;
3005 yyextra->current->bodyLine = yyextra->yyLineNr;
3006 yyextra->current->bodyColumn = yyextra->yyColNr;
3007 yyextra->current->name = yytext;
3014 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3016 BEGIN(yyextra->lastDefineContext);
3020 yyextra->current->fileName = yyextra->fileName;
3021 yyextra->current->startLine = yyextra->yyLineNr;
3022 yyextra->current->startColumn = yyextra->yyColNr;
3023 yyextra->current->type.clear();
3024 yyextra->current->type =
"const";
3028 yyextra->current->initializer.str(
init.str());
3029 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3030 yyextra->current->section = EntryType::makeVariable();
3031 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3036<DefineEnd>\\[\r]?\n {
3038 yyextra->current->endBodyLine = yyextra->yyLineNr;
3041 if (yyextra->insideIDL && yyextra->insideCppQuote)
3047 yyextra->lastStringContext=DefineEnd;
3052<DefinePHP>{ID}["']{BN}*","{BN}* {
3053 yyextra->current->name = yytext;
3054 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3055 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3056 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3057 yyextra->current->bodyLine = yyextra->yyLineNr;
3058 yyextra->current->bodyColumn = yyextra->yyColNr;
3059 yyextra->lastRoundContext = DefinePHPEnd;
3060 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3061 yyextra->roundCount = 0;
3062 BEGIN( GCopyRound );
3066 if (yyextra->insideCli)
3069 yyextra->current->name = yytext ;
3077 yyextra->current->name += yytext ;
3080<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3081 if (YY_START==ReadInitializer && yyextra->keepComment)
3087 if (yyextra->current->bodyLine==-1)
3089 yyextra->current->bodyLine=yyextra->yyLineNr;
3090 yyextra->current->bodyColumn = yyextra->yyColNr;
3092 yyextra->docBlockContext = YY_START;
3093 yyextra->docBlockInBody =
false;
3094 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3096 if (YY_START==MemberSpec && yyextra->memspecEntry && yyextra->memspecEntry->briefFile.isEmpty())
3098 if (yytext[yyleng-3]==
'/')
3100 yyextra->memspecEntry->briefFile = yyextra->fileName;
3101 yyextra->memspecEntry->briefLine = yyextra->yyLineNr;
3105 yyextra->memspecEntry->docFile = yyextra->fileName;
3106 yyextra->memspecEntry->docLine = yyextra->yyLineNr;
3112 yyextra->docBlock.
str(indent.
str());
3116 yyextra->docBlockTerm =
';';
3117 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3119 yyextra->current->bitfields =
":"+yyextra->current->args;
3120 yyextra->current->args.clear();
3121 yyextra->current->section = EntryType::makeVariable();
3123 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
3135<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3136 if (YY_START==ReadInitializer && yyextra->keepComment)
3142 yyextra->docBlockContext = YY_START;
3143 yyextra->docBlockInBody =
false;
3144 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3149 yyextra->docBlock.
str(indent.
str());
3152 yyextra->docBlockTerm =
',';
3153 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3155 yyextra->current->bitfields =
":"+yyextra->current->args;
3156 yyextra->current->args.clear();
3157 yyextra->current->section = EntryType::makeVariable();
3159 if (yytext[yyleng-3]==
'/')
3171<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3172 if (YY_START==ReadInitializer && yyextra->keepComment)
3178 if (yyextra->current->bodyLine==-1)
3180 yyextra->current->bodyLine=yyextra->yyLineNr;
3181 yyextra->current->bodyColumn = yyextra->yyColNr;
3183 yyextra->docBlockContext = YY_START;
3184 yyextra->docBlockInBody =
false;
3185 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3189 yyextra->docBlock.
str(indent.
str());
3192 yyextra->docBlockTerm = 0;
3193 if (yytext[yyleng-3]==
'/')
3206<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3208 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3211 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3216 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3222 if (yytext[2]==
'!' || yytext[2]==
'/')
3224 yyextra->docBlockContext = YY_START;
3225 yyextra->docBlockInBody =
false;
3226 yyextra->docBlockAutoBrief =
false;
3227 yyextra->docBlock.str(std::string());
3228 yyextra->docBlockTerm = 0;
3234 yyextra->lastCContext=YY_START;
3235 BEGIN(SkipCxxComment);
3240 if (yytext[2]==
'!' || yytext[2]==
'*')
3242 yyextra->docBlockContext = YY_START;
3243 yyextra->docBlockInBody =
false;
3244 yyextra->docBlock.str(std::string());
3245 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3247 yyextra->docBlockTerm = 0;
3253 yyextra->lastCContext=YY_START;
3258<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3259 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3260 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3264 if (!yyextra->insideCS) REJECT;
3265 yyextra->current->bodyLine = yyextra->yyLineNr;
3266 yyextra->current->bodyColumn = yyextra->yyColNr;
3267 yyextra->current->initializer.str(yytext);
3268 yyextra->lastInitializerContext = YY_START;
3269 yyextra->sharpCount=0;
3270 yyextra->initBracketCount=0;
3271 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3272 yyextra->current->spec.setGettable(
true);
3273 BEGIN(ReadInitializerPtr);
3276 yyextra->current->bodyLine = yyextra->yyLineNr;
3277 yyextra->current->bodyColumn = yyextra->yyColNr;
3278 yyextra->current->initializer.str(
" ");
3279 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3280 yyextra->current->initializer <<
" ";
3281 yyextra->current->initializer <<
"=";
3282 yyextra->lastInitializerContext = YY_START;
3283 yyextra->sharpCount=0;
3284 yyextra->initBracketCount=0;
3285 BEGIN(ReadInitializer);
3287<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3289 yyextra->current->exception +=
" ";
3292<UNOIDLAttributeBlock>"}" {
3293 yyextra->current->exception +=
" }";
3297<ReadInitializer,ReadInitializerPtr>"(" {
3298 yyextra->lastRoundContext=YY_START;
3299 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3300 yyextra->roundCount=0;
3301 yyextra->current->initializer << *yytext;
3304<ReadInitializer,ReadInitializerPtr>"[" {
3305 if (!yyextra->insidePHP) REJECT;
3306 yyextra->lastSquareContext=YY_START;
3307 yyextra->pCopySquareGString=&yyextra->current->initializer;
3308 yyextra->squareCount=0;
3309 yyextra->current->initializer << *yytext;
3312<ReadInitializer,ReadInitializerPtr>"{" {
3313 yyextra->lastCurlyContext=YY_START;
3314 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3315 yyextra->curlyCount=0;
3316 yyextra->current->initializer << *yytext;
3319<ReadInitializer,ReadInitializerPtr>[;,] {
3321 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3323 yyextra->current->fileName = yyextra->fileName;
3324 yyextra->current->startLine = yyextra->yyLineNr;
3325 yyextra->current->startColumn = yyextra->yyColNr;
3326 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3327 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3328 yyextra->current->section = EntryType::makeVariable();
3329 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3333 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3336 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3337 BEGIN(yyextra->lastInitializerContext);
3339 else if (*yytext==
',' && yyextra->initBracketCount==0)
3342 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3343 BEGIN(yyextra->lastInitializerContext);
3347 yyextra->current->initializer << *yytext;
3350<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3351 if (!yyextra->insideCpp)
3357 yyextra->current->initializer << yytext;
3359 yyextra->lastRawStringContext = YY_START;
3360 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3365<ReadInitializer>{CPPC}.* {
3366 if (yyextra->keepComment)
3368 yyextra->current->initializer << yytext;
3375<ReadInitializer>{CCS} {
3376 if (yyextra->keepComment)
3378 yyextra->current->initializer << yytext;
3379 BEGIN(InitCopyComment);
3386<InitCopyComment>{CCE} {
3387 yyextra->current->initializer << yytext;
3388 BEGIN(ReadInitializer);
3390<InitCopyComment>\n {
3392 yyextra->current->initializer << yytext;
3395 yyextra->current->initializer << yytext;
3397<InitCopyComment><<EOF>> {
3398 warn(yyextra->fileName,yyextra->yyLineNr,
3399 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3402<RawGString>{RAWEND} {
3405 *yyextra->pCopyRawGString << yytext;
3406 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3413<RawGString>[^)\n]+ {
3414 *yyextra->pCopyRawGString << yytext;
3417 *yyextra->pCopyRawGString << yytext;
3420 *yyextra->pCopyRawGString << yytext;
3423<RawString>{RAWEND} {
3424 *yyextra->pCopyRawString+=yytext;
3425 yyextra->fullArgString+=yytext;
3428 BEGIN(yyextra->lastRawStringContext);
3432 *yyextra->pCopyRawString += yytext;
3433 yyextra->fullArgString+=yytext;
3436 *yyextra->pCopyRawString += yytext;
3437 yyextra->fullArgString+=yytext;
3440 *yyextra->pCopyRawString += yytext;
3441 yyextra->fullArgString+=yytext;
3444<ReadInitializer,ReadInitializerPtr>\" {
3445 if (yyextra->insideIDL && yyextra->insideCppQuote)
3451 yyextra->lastStringContext=YY_START;
3452 yyextra->current->initializer << yytext;
3453 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3454 yyextra->stopAtInvalidString=
false;
3458<ReadInitializer,ReadInitializerPtr>"->" {
3459 yyextra->current->initializer << yytext;
3461<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3462 yyextra->current->initializer << yytext;
3464<ReadInitializer,ReadInitializerPtr>(">>") {
3465 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3468 yyextra->initBracketCount-=2;
3469 yyextra->sharpCount-=2;
3471 yyextra->current->initializer << yytext;
3473<ReadInitializer,ReadInitializerPtr>(">=") {
3474 yyextra->current->initializer << yytext;
3476<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3477 yyextra->initBracketCount++;
3478 yyextra->sharpCount++;
3479 yyextra->current->initializer << *yytext;
3481<ReadInitializer,ReadInitializerPtr>[>\]})] {
3482 yyextra->initBracketCount--;
3483 yyextra->sharpCount--;
3486 yyextra->current->endBodyLine=yyextra->yyLineNr;
3488 yyextra->current->initializer << *yytext;
3490<ReadInitializer,ReadInitializerPtr>\' {
3491 if (yyextra->insidePHP)
3493 yyextra->current->initializer << yytext;
3494 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3495 yyextra->lastStringContext=YY_START;
3496 BEGIN(CopyPHPGString);
3500 yyextra->current->initializer << yytext;
3503<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3504 if (yyextra->insidePHP)
3510 yyextra->current->initializer << yytext;
3513<ReadInitializer,ReadInitializerPtr>\n {
3514 yyextra->current->initializer << *yytext;
3517<ReadInitializer,ReadInitializerPtr>"@\"" {
3519 yyextra->current->initializer << yytext;
3520 if (!yyextra->insideCS && !yyextra->insideObjC)
3527 yyextra->lastSkipVerbStringContext=YY_START;
3528 yyextra->pSkipVerbString=&yyextra->current->initializer;
3529 BEGIN(SkipVerbString);
3532<SkipVerbString>[^\n"\\]+ {
3533 *yyextra->pSkipVerbString << yytext;
3535<SkipVerbString>"\\\\" {
3536 if (yyextra->insideCS) REJECT
3537 *yyextra->pSkipVerbString << yytext;
3539<SkipVerbString>"\\\"" {
3540 if (yyextra->insideCS) REJECT
3541 *yyextra->pSkipVerbString << yytext;
3543<SkipVerbString>"\"\"" {
3544 *yyextra->pSkipVerbString << yytext;
3546<SkipVerbString>"\"" {
3547 *yyextra->pSkipVerbString << *yytext;
3548 BEGIN(yyextra->lastSkipVerbStringContext);
3551 *yyextra->pSkipVerbString << *yytext;
3555 *yyextra->pSkipVerbString << *yytext;
3557<ReadInitializer,ReadInitializerPtr>"?>" {
3558 if (yyextra->insidePHP)
3559 BEGIN( FindMembersPHP );
3561 yyextra->current->initializer << yytext;
3563<ReadInitializer,ReadInitializerPtr>. {
3564 yyextra->current->initializer << *yytext;
3568<CopyString,CopyPHPString>\\. {
3569 *yyextra->pCopyQuotedString+=yytext;
3572 *yyextra->pCopyQuotedString+=*yytext;
3573 BEGIN( yyextra->lastStringContext );
3576 *yyextra->pCopyQuotedString+=*yytext;
3577 BEGIN( yyextra->lastStringContext );
3579<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3580 *yyextra->pCopyQuotedString+=yytext;
3582<CopyString,CopyPHPString>\n {
3583 *yyextra->pCopyQuotedString+=*yytext;
3586<CopyString,CopyPHPString>. {
3587 *yyextra->pCopyQuotedString+=*yytext;
3591<CopyGString,CopyPHPGString>\\. {
3592 *yyextra->pCopyQuotedGString << yytext;
3595 *yyextra->pCopyQuotedGString << *yytext;
3596 BEGIN( yyextra->lastStringContext );
3599 *yyextra->pCopyQuotedGString << *yytext;
3600 BEGIN( yyextra->lastStringContext );
3602<CopyGString,CopyPHPGString>"<?php" {
3603 *yyextra->pCopyQuotedGString << yytext;
3604 BEGIN( yyextra->lastStringContext );
3606<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3607 *yyextra->pCopyQuotedGString << yytext;
3609<CopyGString,CopyPHPGString>\n {
3610 *yyextra->pCopyQuotedGString << *yytext;
3611 if (yyextra->stopAtInvalidString)
3613 BEGIN( yyextra->lastStringContext );
3620<CopyGString,CopyPHPGString>. {
3621 *yyextra->pCopyQuotedGString << *yytext;
3625<CopyC11Attribute>\" {
3626 *yyextra->pCopyC11AttributeString += *yytext;
3627 yyextra->pCopyQuotedString=yyextra->pCopyC11AttributeString;
3628 yyextra->lastStringContext=YY_START;
3631<CopyC11Attribute>\n {
3633 *yyextra->pCopyC11AttributeString += *yytext;
3635<CopyC11Attribute>{ID} {
3636 if (
qstrcmp(yytext,
"nodiscard")==0)
3638 yyextra->current->spec.setNoDiscard(
true);
3640 *yyextra->pCopyC11AttributeString += yytext;
3642<CopyC11Attribute>. {
3643 *yyextra->pCopyC11AttributeString += *yytext;
3645<CopyC11Attribute>"]]" {
3646 yyextra->commentScanner.addDeprecatedDocs(yyextra->current.get(),
3649 yyextra->thisParser);
3650 BEGIN(yyextra->lastC11AttributeContext);
3656 *yyextra->pCopyRoundString += *yytext;
3657 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3658 yyextra->lastStringContext=YY_START;
3662 *yyextra->pCopyRoundString += *yytext;
3663 yyextra->roundCount++;
3666 *yyextra->pCopyRoundString += *yytext;
3667 if (--yyextra->roundCount<0)
3668 BEGIN(yyextra->lastRoundContext);
3672 *yyextra->pCopyRoundString += *yytext;
3675 if (yyextra->insidePHP)
3677 yyextra->current->initializer << yytext;
3678 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3679 yyextra->lastStringContext=YY_START;
3680 BEGIN(CopyPHPString);
3684 *yyextra->pCopyRoundString += yytext;
3687<CopyRound>{CHARLIT} {
3688 if (yyextra->insidePHP)
3694 *yyextra->pCopyRoundString+=yytext;
3697<CopyRound>[^"'()\n,]+ {
3698 *yyextra->pCopyRoundString+=yytext;
3701 *yyextra->pCopyRoundString+=*yytext;
3706 *yyextra->pCopySharpString += *yytext;
3707 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3708 yyextra->lastStringContext=YY_START;
3712 *yyextra->pCopySharpString += *yytext;
3713 yyextra->sharpCount++;
3716 *yyextra->pCopySharpString += *yytext;
3717 if (--yyextra->sharpCount<0)
3719 BEGIN(yyextra->lastSharpContext);
3724 *yyextra->pCopySharpString += *yytext;
3727 if (yyextra->insidePHP)
3729 yyextra->current->initializer << yytext;
3730 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3731 yyextra->lastStringContext=YY_START;
3732 BEGIN(CopyPHPString);
3736 *yyextra->pCopySharpString += yytext;
3739<CopySharp>{CHARLIT} {
3740 if (yyextra->insidePHP)
3746 *yyextra->pCopySharpString+=yytext;
3749<CopySharp>[^"'<>\n,]+ {
3750 *yyextra->pCopySharpString+=yytext;
3753 *yyextra->pCopySharpString+=*yytext;
3759 *yyextra->pCopyRoundGString << *yytext;
3760 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3761 yyextra->lastStringContext=YY_START;
3765 *yyextra->pCopyRoundGString << *yytext;
3766 yyextra->roundCount++;
3769 *yyextra->pCopyRoundGString << *yytext;
3770 if (--yyextra->roundCount<0)
3771 BEGIN(yyextra->lastRoundContext);
3775 *yyextra->pCopyRoundGString << *yytext;
3778 if (yyextra->insidePHP)
3780 yyextra->current->initializer << yytext;
3781 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3782 yyextra->lastStringContext=YY_START;
3783 BEGIN(CopyPHPGString);
3787 *yyextra->pCopyRoundGString << yytext;
3790<GCopyRound>{CHARLIT} {
3791 if (yyextra->insidePHP)
3797 *yyextra->pCopyRoundGString << yytext;
3801 if (!yyextra->insideCS) REJECT;
3802 *yyextra->pCopyRoundGString << yytext;
3803 yyextra->lastSkipVerbStringContext=YY_START;
3804 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3805 BEGIN(SkipVerbString);
3807<GCopyRound>[^"'()\n\/,R]+ {
3808 *yyextra->pCopyRoundGString << yytext;
3810<GCopyRound>{RAWBEGIN} {
3811 *yyextra->pCopyRoundGString << yytext;
3813 yyextra->lastRawStringContext = YY_START;
3814 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3818 *yyextra->pCopyRoundGString << *yytext;
3823 *yyextra->pCopySquareGString << *yytext;
3824 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3825 yyextra->lastStringContext=YY_START;
3829 *yyextra->pCopySquareGString << *yytext;
3830 if (yyextra->insidePHP)
3832 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3833 yyextra->lastStringContext=YY_START;
3834 BEGIN(CopyPHPGString);
3838 *yyextra->pCopySquareGString << *yytext;
3839 yyextra->squareCount++;
3842 *yyextra->pCopySquareGString << *yytext;
3843 if (--yyextra->squareCount<0)
3844 BEGIN(yyextra->lastSquareContext);
3848 *yyextra->pCopySquareGString << *yytext;
3851 if (yyextra->insidePHP)
3853 yyextra->current->initializer << yytext;
3854 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3855 yyextra->lastStringContext=YY_START;
3856 BEGIN(CopyPHPGString);
3860 *yyextra->pCopySquareGString << yytext;
3863<GCopySquare>{CHARLIT} {
3864 if (yyextra->insidePHP)
3870 *yyextra->pCopySquareGString << yytext;
3873<GCopySquare>[^"'\[\]\n\/,]+ {
3874 *yyextra->pCopySquareGString << yytext;
3877 *yyextra->pCopySquareGString << *yytext;
3882 *yyextra->pCopyCurlyString += *yytext;
3883 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3884 yyextra->lastStringContext=YY_START;
3885 yyextra->keepComment=
false;
3889 *yyextra->pCopyCurlyString += *yytext;
3890 if (yyextra->insidePHP)
3892 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3893 yyextra->lastStringContext=YY_START;
3894 yyextra->keepComment=
false;
3895 BEGIN(CopyPHPString);
3899 *yyextra->pCopyCurlyString += *yytext;
3900 yyextra->curlyCount++;
3903 *yyextra->pCopyCurlyString += *yytext;
3904 if (--yyextra->curlyCount<0)
3906 yyextra->keepComment=
false;
3907 BEGIN(yyextra->lastCurlyContext);
3910<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3916 *yyextra->pCopyCurlyString += yytext;
3919<CopyCurly>[^"'{}\/\n,]+ {
3920 *yyextra->pCopyCurlyString += yytext;
3922<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3925 *yyextra->pCopyCurlyString += *yytext;
3928 *yyextra->pCopyCurlyString += *yytext;
3930<CopyCurly>{CPPC}[^\n]* {
3931 if (yyextra->keepComment)
3933 *yyextra->pCopyCurlyString += yytext;
3941 if (yyextra->keepComment)
3943 *yyextra->pCopyCurlyString += yytext;
3952 *yyextra->pCopyCurlyString += yytext;
3957 *yyextra->pCopyCurlyString += *yytext;
3960 *yyextra->pCopyCurlyString += *yytext;
3962<CopyComment><<EOF>> {
3963 warn(yyextra->fileName,yyextra->yyLineNr,
3964 "reached end of file while inside a C style comment block!");
3969<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3971<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3973 int s = line.
find(
' ');
3974 int e = line.
find(
'"',s);
3975 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3976 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3983 *yyextra->pCopyCurlyGString << *yytext;
3984 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3985 yyextra->lastStringContext=YY_START;
3986 yyextra->keepComment =
false;
3990 *yyextra->pCopyCurlyGString << *yytext;
3991 if (yyextra->insidePHP)
3993 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3994 yyextra->lastStringContext=YY_START;
3995 yyextra->keepComment =
false;
3996 BEGIN(CopyPHPGString);
4000 *yyextra->pCopyCurlyGString << *yytext;
4001 yyextra->curlyCount++;
4004 *yyextra->pCopyCurlyGString << *yytext;
4005 if (--yyextra->curlyCount<0)
4007 yyextra->current->endBodyLine = yyextra->yyLineNr;
4008 yyextra->keepComment =
false;
4009 BEGIN(yyextra->lastCurlyContext);
4012<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
4018 *yyextra->pCopyCurlyGString << yytext;
4021<GCopyCurly>[^"'{}\/\n,]+ {
4022 *yyextra->pCopyCurlyGString << yytext;
4025 *yyextra->pCopyCurlyGString << yytext;
4027<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
4030 *yyextra->pCopyCurlyGString << *yytext;
4033 *yyextra->pCopyCurlyGString << *yytext;
4035<GCopyCurly>{CPPC}[^\n]* {
4036 if (yyextra->keepComment)
4038 *yyextra->pCopyCurlyGString << yytext;
4046 if (yyextra->keepComment)
4048 *yyextra->pCopyCurlyGString << yytext;
4049 BEGIN(GCopyComment);
4056<GCopyComment>{CCE} {
4057 *yyextra->pCopyCurlyGString << yytext;
4062 *yyextra->pCopyCurlyGString << *yytext;
4065 *yyextra->pCopyCurlyGString << *yytext;
4067<GCopyComment><<EOF>> {
4068 warn(yyextra->fileName,yyextra->yyLineNr,
4069 "reached end of file while inside a C style comment block!");
4077 if (yyextra->current->type.isEmpty() &&
4078 yyextra->current->name==
"enum")
4080 yyextra->current->section = EntryType::makeEnum();
4081 yyextra->current->name.clear();
4082 yyextra->current->args.clear();
4083 BEGIN(EnumBaseType);
4087 if (yyextra->current->type.isEmpty())
4090 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4093 yyextra->current->bitfields+=
":";
4097 yyextra->current->bitfields+=*yytext;
4100 yyextra->current->args+=*yytext;
4104 yyextra->current->args+=
' ';
4107 QCString oldType = yyextra->current->type;
4108 if (yyextra->current->bodyLine==-1)
4110 yyextra->current->bodyLine = yyextra->yyLineNr;
4111 yyextra->current->bodyColumn = yyextra->yyColNr;
4113 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4115 yyextra->current->type = yyextra->current->type.mid(3);
4117 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4119 yyextra->current->type.prepend(
"typedef ");
4121 bool isStatic = yyextra->current->isStatic;
4122 Protection prot = yyextra->current->protection;
4123 bool isConcept = yyextra->current->section.isConcept();
4124 bool isModule = yyextra->current->section.isModuleDoc();
4127 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4132 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4135 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4137 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4139 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4140 if (yyextra->current->section.isClass())
4144 yyextra->current->section = EntryType::makeVariable() ;
4145 yyextra->current->fileName = yyextra->fileName;
4146 yyextra->current->startLine = yyextra->yyBegLineNr;
4147 yyextra->current->startColumn = yyextra->yyBegColNr;
4148 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4151 if ( *yytext ==
',')
4153 yyextra->current->isStatic = isStatic;
4154 yyextra->current->protection = prot;
4155 yyextra->current->name.clear();
4156 yyextra->current->args.clear();
4157 yyextra->current->brief.clear();
4158 yyextra->current->doc.clear();
4159 yyextra->current->initializer.str(std::string());
4160 yyextra->current->bitfields.clear();
4165 yyextra->mtype = MethodTypes::Method;
4166 yyextra->virt = Specifier::Normal;
4167 yyextra->current->bodyLine = -1;
4168 yyextra->current->bodyColumn = 1;
4169 yyextra->current->groups.clear();
4175 if (yyextra->insideSlice)
4177 yyextra->squareCount=1;
4178 yyextra->lastSquareContext = YY_START;
4179 yyextra->current->metaData +=
"[";
4180 BEGIN( SliceMetadata );
4182 else if (!yyextra->insideCS &&
4183 (yyextra->current->name.isEmpty() ||
4184 yyextra->current->name==
"typedef"
4188 yyextra->squareCount=1;
4189 yyextra->lastSquareContext = YY_START;
4190 yyextra->idlAttr.clear();
4191 yyextra->idlProp.clear();
4192 yyextra->current->mtype = yyextra->mtype;
4195 yyextra->current->mtype == MethodTypes::Property)
4197 yyextra->odlProp =
true;
4198 yyextra->current->spec.setGettable(
true).setSettable(
true);
4201 BEGIN( IDLAttribute );
4203 else if (yyextra->insideCS &&
4204 yyextra->current->name.isEmpty())
4206 yyextra->squareCount=1;
4207 yyextra->lastSquareContext = YY_START;
4210 yyextra->current->args.clear();
4211 BEGIN( SkipSquare );
4215 yyextra->current->args += yytext ;
4216 yyextra->squareCount=1;
4217 yyextra->externLinkage=
false;
4222 yyextra->squareCount++;
4223 yyextra->current->metaData +=
"[";
4225<SliceMetadata>{BN}* {
4228<SliceMetadata>\"[^\"]*\" {
4229 yyextra->current->metaData += yytext;
4232 yyextra->current->metaData += yytext;
4235 yyextra->current->metaData += yytext;
4236 if (--yyextra->squareCount<=0)
4238 BEGIN (yyextra->lastSquareContext);
4242 yyextra->current->type +=
"(";
4243 yyextra->roundCount++;
4245<SliceOptional>[0-9]+ {
4246 yyextra->current->type += yytext;
4249 yyextra->current->type +=
")";
4250 if(--yyextra->roundCount<=0)
4252 BEGIN (yyextra->lastModifierContext);
4257 if (--yyextra->squareCount<=0)
4260 if (yyextra->current->mtype == MethodTypes::Property)
4261 BEGIN( IDLPropName );
4263 BEGIN( yyextra->lastSquareContext );
4266<IDLAttribute>"propput" {
4269 yyextra->current->mtype = MethodTypes::Property;
4271 yyextra->current->spec.setSettable(
true);
4273<IDLAttribute>"propget" {
4276 yyextra->current->mtype = MethodTypes::Property;
4278 yyextra->current->spec.setGettable(
true);
4280<IDLAttribute>"property" {
4281 yyextra->current->spec.setProperty(
true);
4283<IDLAttribute>"attribute" {
4284 yyextra->current->spec.setAttribute(
true);
4286<IDLAttribute>"optional" {
4287 yyextra->current->spec.setOptional(
true);
4289<IDLAttribute>"readonly" {
4292 yyextra->current->spec.setSettable(
false);
4296 yyextra->current->spec.setReadonly(
true);
4299<IDLAttribute>"bound" {
4300 yyextra->current->spec.setBound(
true);
4302<IDLAttribute>"removable" {
4303 yyextra->current->spec.setRemovable(
true);
4305<IDLAttribute>"constrained" {
4306 yyextra->current->spec.setConstrained(
true);
4308<IDLAttribute>"transient" {
4309 yyextra->current->spec.setTransient(
true);
4311<IDLAttribute>"maybevoid" {
4312 yyextra->current->spec.setMaybeVoid(
true);
4314<IDLAttribute>"maybedefault" {
4315 yyextra->current->spec.setMaybeDefault(
true);
4317<IDLAttribute>"maybeambiguous" {
4318 yyextra->current->spec.setMaybeAmbiguous(
true);
4322<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4325 if (yyextra->odlProp)
4327 yyextra->idlProp = yytext;
4330<IDLPropName>{ID}{BN}*"(" {
4331 yyextra->current->name = yytext;
4332 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4333 yyextra->current->startLine = yyextra->yyLineNr;
4334 yyextra->current->startColumn = yyextra->yyColNr;
4337<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4338 if (yyextra->odlProp)
4340 yyextra->idlProp += yytext;
4343<IDLPropName>{ID}{BNopt}/";" {
4344 if (yyextra->odlProp)
4346 yyextra->current->name = yytext;
4347 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4348 yyextra->odlProp =
false;
4353<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4354 yyextra->idlAttr = yytext;
4355 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4358 yyextra->idlProp = yytext;
4360<IDLProp>{BN}*{ID}{BN}*"," {
4361 if (yyextra->current->args.isEmpty())
4362 yyextra->current->args =
"(";
4364 yyextra->current->args +=
", ";
4365 yyextra->current->args += yyextra->idlAttr;
4366 yyextra->current->args +=
" ";
4367 yyextra->current->args += yyextra->idlProp;
4368 yyextra->current->args +=
" ";
4369 yyextra->current->args += yytext;
4370 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4371 yyextra->idlProp.clear();
4372 yyextra->idlAttr.clear();
4375<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4379 yyextra->current->fileName = yyextra->fileName;
4380 yyextra->current->type = yyextra->idlProp;
4381 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4382 if (!yyextra->current->args.isEmpty())
4383 yyextra->current->args +=
")";
4384 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4385 yyextra->current->section = EntryType::makeVariable();
4386 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4388 BEGIN( FindMembers );
4393<Array>"]" { yyextra->current->args += *yytext ;
4394 if (--yyextra->squareCount<=0)
4395 BEGIN( FindMembers ) ;
4397<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4398 if (--yyextra->squareCount<=0)
4399 BEGIN( SFunction ) ;
4401<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4402 yyextra->squareCount++;
4404<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4405<SkipSquare>"[" { yyextra->squareCount++; }
4407 if (--yyextra->squareCount<=0)
4408 BEGIN( yyextra->lastSquareContext );
4411 yyextra->lastStringContext=YY_START;
4412 BEGIN( SkipString );
4414<SkipSquare>[^\n\[\]\"]+
4415<FindMembers>"<" {
addType(yyscanner);
4416 yyextra->current->type += yytext ;
4419<Sharp>">" { yyextra->current->type += *yytext ;
4420 if (--yyextra->sharpCount<=0)
4421 BEGIN( FindMembers ) ;
4423<Sharp>"<" { yyextra->current->type += *yytext ;
4424 yyextra->sharpCount++;
4427 yyextra->current->type +=
' ';
4430<Sharp>. { yyextra->current->type += *yytext ; }
4433 yyextra->current->bodyLine = yyextra->yyLineNr;
4434 yyextra->current->bodyColumn = yyextra->yyColNr;
4435 yyextra->current->name = yytext;
4440 yyextra->lastInitializerContext = YY_START;
4441 yyextra->sharpCount=0;
4442 yyextra->initBracketCount=0;
4443 yyextra->current->initializer.str(
"=");
4444 BEGIN(ReadInitializer);
4447 yyextra->lastInitializerContext = YY_START;
4448 yyextra->sharpCount=0;
4449 yyextra->initBracketCount=0;
4450 yyextra->current->initializer.str(yytext);
4451 BEGIN(ReadInitializer);
4454 if (yyextra->insideJava)
4456 if (!yyextra->current->name.isEmpty())
4458 yyextra->current->fileName = yyextra->fileName;
4459 yyextra->current->startLine = yyextra->yyLineNr;
4460 yyextra->current->startColumn = yyextra->yyColNr;
4461 if (!yyextra->current_root->spec.isEnum())
4463 yyextra->current->type =
"@";
4465 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4466 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4467 yyextra->current->section = EntryType::makeVariable();
4468 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4472 BEGIN( FindMembers );
4483 if (!yyextra->current->name.isEmpty())
4485 yyextra->current->fileName = yyextra->fileName;
4486 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4488 yyextra->current->startLine = yyextra->current->bodyLine;
4489 yyextra->current->startColumn = yyextra->current->bodyColumn;
4493 yyextra->current->startLine = yyextra->yyLineNr;
4494 yyextra->current->startColumn = yyextra->yyColNr;
4496 if (!yyextra->current_root->spec.isEnum())
4498 yyextra->current->type =
"@";
4500 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4501 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4502 yyextra->current->section = EntryType::makeVariable();
4504 if (!yyextra->insideCS && !yyextra->insideJava &&
4505 !yyextra->current_root->spec.isStrong())
4512 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4514 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4519 yyextra->current->reset();
4524 yyextra->squareCount=1;
4525 yyextra->lastSquareContext = YY_START;
4528<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4529<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4530<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4533 yyextra->current->program << yytext ;
4536<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4537 yyextra->current->program << yytext ;
4538 yyextra->pSkipInterpString = &yyextra->current->program;
4539 yyextra->lastSkipInterpStringContext=YY_START;
4540 yyextra->strCurlyCount = 0;
4541 BEGIN( SkipInterpString );
4543<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})* {
4544 *yyextra->pSkipInterpString << yytext;
4546<SkipInterpString>"{" {
4547 *yyextra->pSkipInterpString << *yytext;
4548 yyextra->strCurlyCount++;
4550<SkipInterpString>"}" {
4551 *yyextra->pSkipInterpString << *yytext;
4552 yyextra->strCurlyCount--;
4554<SkipInterpString>\" {
4555 *yyextra->pSkipInterpString << *yytext;
4556 if (yyextra->strCurlyCount==0)
4558 BEGIN( yyextra->lastSkipInterpStringContext );
4561<SkipInterpString>. {
4562 *yyextra->pSkipInterpString << *yytext;
4565<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4566 yyextra->current->program << yytext ;
4567 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4568 yyextra->lastSkipInterpVerbStringContext=YY_START;
4569 yyextra->strCurlyCount = 0;
4570 BEGIN( SkipInterpVerbString );
4572<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4573 *yyextra->pSkipInterpVerbString << yytext;
4575<SkipInterpVerbString>"{" {
4576 *yyextra->pSkipInterpVerbString << *yytext;
4577 yyextra->strCurlyCount++;
4579<SkipInterpVerbString>"}" {
4580 *yyextra->pSkipInterpVerbString << *yytext;
4581 yyextra->strCurlyCount--;
4583<SkipInterpVerbString>\" {
4584 *yyextra->pSkipInterpVerbString << *yytext;
4585 if (yyextra->strCurlyCount==0)
4587 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4590<SkipInterpVerbString>. {
4591 *yyextra->pSkipInterpVerbString << *yytext;
4593<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4594<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4595 yyextra->pSkipVerbString = &yyextra->current->program;
4596 yyextra->lastSkipVerbStringContext=YY_START;
4597 BEGIN( SkipVerbString );
4599<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4601 yyextra->current->program << yytext ;
4602 yyextra->pCopyHereDocGString = &yyextra->current->program;
4603 yyextra->lastHereDocContext=YY_START;
4604 BEGIN( CopyHereDoc );
4611<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4612 yyextra->current->program << yytext;
4614 yyextra->lastRawStringContext = YY_START;
4615 yyextra->pCopyRawGString = &yyextra->current->program;
4618<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4619 yyextra->pCopyQuotedGString = &yyextra->current->program;
4620 yyextra->lastStringContext=YY_START;
4621 yyextra->stopAtInvalidString=
false;
4622 BEGIN( CopyGString );
4624<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4625<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4626 yyextra->lastContext = YY_START ;
4629<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4630 ++yyextra->yyLineNr ;
4631 yyextra->lastContext = YY_START ;
4634<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4635 if (!yyextra->insidePHP)
4637 yyextra->current->program << yytext;
4641 yyextra->current->program << yytext;
4642 yyextra->pCopyQuotedGString = &yyextra->current->program;
4643 yyextra->lastStringContext=YY_START;
4644 BEGIN(CopyPHPGString);
4647<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4648 if (yyextra->insidePHP)
4655 yyextra->current->program << yytext;
4658<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4659 ++yyextra->curlyCount ;
4662 yyextra->current->program << yytext ;
4663 --yyextra->curlyCount ;
4665<ReadBody,ReadNSBody>"}" {
4666 if ( yyextra->curlyCount>0 )
4668 yyextra->current->program << yytext ;
4669 --yyextra->curlyCount ;
4673 yyextra->current->endBodyLine = yyextra->yyLineNr;
4674 std::shared_ptr<Entry> original_root = yyextra->current_root;
4675 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4680 QCString doc = yyextra->current->doc;
4681 int docLine = yyextra->current->docLine;
4682 QCString docFile = yyextra->current->docFile;
4683 QCString brief = yyextra->current->brief;
4684 int briefLine = yyextra->current->briefLine;
4685 QCString briefFile = yyextra->current->briefFile;
4686 auto groups = yyextra->current->groups;
4687 auto anchors = yyextra->current->anchors;
4688 auto sli = yyextra->current->sli;
4689 auto rqli = yyextra->current->rqli;
4691 yyextra->current->doc =
"";
4692 yyextra->current->docLine = 0;
4693 yyextra->current->docFile =
"";
4694 yyextra->current->brief =
"";
4695 yyextra->current->briefLine = 0;
4696 yyextra->current->briefFile =
"";
4697 yyextra->current->groups.
clear();
4698 yyextra->current->anchors.clear();
4699 yyextra->current->sli.clear();
4700 yyextra->current->rqli.clear();
4701 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4703 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4704 yyextra->current->program.str(std::string());
4705 new_current->name = yyextra->current->name.mid(split_point + 2);
4706 yyextra->current->name = yyextra->current->name.left(split_point);
4707 if (yyextra->current->name.startsWith(
"inline "))
4709 yyextra->current->name = yyextra->current->name.mid(7);
4710 yyextra->current->spec.setInline(
true);
4712 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4714 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4715 yyextra->current_root = yyextra->current;
4716 yyextra->current = new_current;
4719 yyextra->current->doc = doc;
4720 yyextra->current->docLine = docLine;
4721 yyextra->current->docFile = docFile;
4722 yyextra->current->brief = brief;
4723 yyextra->current->briefLine = briefLine;
4724 yyextra->current->briefFile = briefFile;
4725 yyextra->current->groups = groups;
4726 yyextra->current->anchors = anchors;
4727 yyextra->current->sli = sli;
4728 yyextra->current->rqli = rqli;
4730 QCString &cn = yyextra->current->name;
4734 yyextra->current->spec.setInline(
true);
4736 QCString rn = yyextra->current_root->name;
4742 if (yyextra->isTypedef && cn.
isEmpty())
4745 BEGIN( TypedefName );
4749 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4751 yyextra->current->program <<
',';
4756 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4757 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4759 if (yyextra->insideObjC &&
4760 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4763 BEGIN( ReadBodyIntf ) ;
4767 yyextra->memspecEntry = yyextra->current;
4768 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4769 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4770 if (yyextra->current->section.isNamespace() ||
4771 yyextra->current->spec.isInterface() ||
4772 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4773 yyextra->insideSlice
4776 yyextra->current->reset();
4777 yyextra->current_root = std::move(original_root);
4779 yyextra->memspecEntry.reset();
4780 BEGIN( FindMembers ) ;
4785 yyextra->current->doc.clear();
4786 yyextra->current->brief.clear();
4787 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4793<ReadBody>"}"{BN}+"typedef"{BN}+ {
4795 if ( yyextra->curlyCount>0 )
4797 yyextra->current->program << yytext ;
4798 --yyextra->curlyCount ;
4802 yyextra->isTypedef =
true;
4803 yyextra->current->endBodyLine = yyextra->yyLineNr;
4804 QCString &cn = yyextra->current->name;
4805 QCString rn = yyextra->current_root->name;
4810 BEGIN( TypedefName );
4813<TypedefName>("const"|"volatile"){BN} {
4815 yyextra->current->type.prepend(yytext);
4818 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4820 yyextra->current->program <<
",";
4822 yyextra->current->name=yytext;
4824 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4825 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4827 if (!yyextra->firstTypedefEntry)
4829 yyextra->firstTypedefEntry = yyextra->current;
4831 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4833 yyextra->isTypedef=
true;
4834 BEGIN(MemberSpecSkip);
4838 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4840 yyextra->current->program <<
',';
4843 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4844 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4845 yyextra->memspecEntry = yyextra->current;
4846 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4849 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4851<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4853 int i=0,l=(int)yyleng,j;
4854 while (i<l && (!
isId(yytext[i]))) i++;
4856 j=yyextra->msName.
find(
"[");
4859 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4860 yyextra->msName=yyextra->msName.left(j);
4865 if (yyextra->firstTypedefEntry)
4867 if (yyextra->firstTypedefEntry->spec.isStruct())
4869 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4871 else if (yyextra->firstTypedefEntry->spec.isUnion())
4873 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4875 else if (yyextra->firstTypedefEntry->section.isEnum())
4877 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4881 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4887 yyextra->current->name = yyextra->msName;
4894 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4900 const Entry *p=yyextra->current.get();
4908 int pi = (i==-1) ? 0 : i+2;
4918 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4922 if (!yyextra->msName.isEmpty()
4928 if (typedefHidesStruct &&
4929 yyextra->isTypedef &&
4930 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4931 yyextra->msType.stripWhiteSpace().isEmpty() &&
4932 yyextra->memspecEntry)
4934 yyextra->memspecEntry->name=yyextra->msName;
4938 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4939 varEntry->lang = yyextra->language;
4940 varEntry->protection = yyextra->current->protection ;
4941 varEntry->mtype = yyextra->current->mtype;
4942 varEntry->virt = yyextra->current->virt;
4943 varEntry->isStatic = yyextra->current->isStatic;
4944 varEntry->section = EntryType::makeVariable();
4945 varEntry->name = yyextra->msName.stripWhiteSpace();
4946 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4947 varEntry->args = yyextra->msArgs;
4948 if (yyextra->isTypedef)
4950 varEntry->type.prepend(
"typedef ");
4953 if (typedefHidesStruct &&
4954 yyextra->isTypedef &&
4955 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4956 yyextra->memspecEntry
4959 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4963 varEntry->type+=yyextra->current->name+yyextra->msType;
4965 varEntry->fileName = yyextra->fileName;
4966 varEntry->startLine = yyextra->yyLineNr;
4967 varEntry->startColumn = yyextra->yyColNr;
4968 varEntry->doc = yyextra->current->doc;
4969 varEntry->brief = yyextra->current->brief;
4970 varEntry->mGrpId = yyextra->current->mGrpId;
4971 varEntry->initializer.str(yyextra->current->initializer.str());
4972 varEntry->groups = yyextra->current->groups;
4973 varEntry->sli = yyextra->current->sli;
4978 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4983 if (!yyextra->isTypedef && yyextra->msName.isEmpty() &&
4984 yyextra->memspecEntry && yyextra->current->section.isCompound())
4986 if (!yyextra->current->doc.isEmpty())
4988 yyextra->memspecEntry->doc += yyextra->current->doc;
4990 if (!yyextra->current->brief.isEmpty())
4992 yyextra->memspecEntry->brief += yyextra->current->brief;
4995 yyextra->msType.clear();
4996 yyextra->msName.clear();
4997 yyextra->msArgs.clear();
4998 yyextra->isTypedef=
false;
4999 yyextra->firstTypedefEntry.reset();
5000 yyextra->memspecEntry.reset();
5001 yyextra->current->reset();
5003 BEGIN( FindMembers );
5007 yyextra->current->doc.clear();
5008 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
5013 yyextra->lastInitializerContext=YY_START;
5014 yyextra->sharpCount=0;
5015 yyextra->initBracketCount=0;
5016 yyextra->current->initializer.str(yytext);
5017 BEGIN(ReadInitializer);
5028<MemberSpecSkip>"," { BEGIN(MemberSpec); }
5029<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
5030<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5033<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5034 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5036 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5037 yyextra->insideObjC=
false;
5038 BEGIN( FindMembers );
5040<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5041<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5043<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5044<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5045 if (yyextra->insidePHP)
5051 yyextra->current->bodyLine = yyextra->yyLineNr;
5052 yyextra->current->bodyColumn = yyextra->yyColNr;
5055 yyextra->funcPtrType=yytext;
5056 yyextra->roundCount=0;
5061<FuncPtr>{SCOPENAME} {
5062 yyextra->current->name = yytext;
5065 BEGIN( FuncPtrOperator );
5069 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5071 yyextra->funcPtrType += yyextra->current->name;
5075 BEGIN( EndFuncPtr );
5082<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5083 yyextra->current->name += yytext;
5084 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5087<FuncPtrOperator>\n {
5089 yyextra->current->name += *yytext;
5091<FuncPtrOperator>"(" {
5093 BEGIN( EndFuncPtr );
5096 yyextra->current->name += *yytext;
5098<EndFuncPtr>")"{BNopt}/";" {
5100 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5103<EndFuncPtr>")"{BNopt}/"(" {
5105 if (yyextra->funcPtrType!=
"(")
5107 yyextra->current->type+=yyextra->funcPtrType+
")";
5111<EndFuncPtr>")"{BNopt}/"[" {
5113 yyextra->current->type+=yyextra->funcPtrType;
5114 yyextra->current->args +=
")";
5119 yyextra->current->args += *yytext ;
5122 yyextra->current->bodyLine = yyextra->yyLineNr;
5123 yyextra->current->bodyColumn = yyextra->yyColNr;
5124 yyextra->currentArgumentContext = FuncFuncEnd;
5125 yyextra->fullArgString=yyextra->current->args;
5126 yyextra->copyArgString=&yyextra->current->args;
5127 BEGIN( ReadFuncArgType ) ;
5129<EndFuncPtr>"["[^\n\]]*"]" {
5130 yyextra->funcPtrType+=yytext;
5136 yyextra->current->args += *yytext ;
5137 ++yyextra->roundCount;
5140 yyextra->current->args += *yytext ;
5141 if ( yyextra->roundCount )
5142 --yyextra->roundCount;
5148<FuncFuncEnd>")"{BN}*"(" {
5150 yyextra->current->type+=yyextra->funcPtrType+
")(";
5151 BEGIN(FuncFuncType);
5153<FuncFuncEnd>")"{BNopt}/[;{] {
5155 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5158<FuncFuncEnd>")"{BNopt}/"[" {
5160 yyextra->current->type+=yyextra->funcPtrType;
5161 yyextra->current->args+=
")";
5162 BEGIN(FuncFuncArray);
5165 yyextra->current->args += *yytext;
5168 yyextra->current->type += *yytext;
5169 yyextra->roundCount++;
5172 yyextra->current->type += *yytext;
5173 if (yyextra->roundCount)
5174 --yyextra->roundCount;
5178<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5179<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5181 yyextra->current->type += *yytext;
5183<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5184 if (yyextra->current->type.startsWith(
"typedef") &&
5185 yyextra->current->bodyLine==-1)
5188 yyextra->current->bodyLine = yyextra->yyLineNr;
5189 yyextra->current->bodyColumn = yyextra->yyColNr;
5190 BEGIN( GetCallType );
5192 else if (!yyextra->current->name.isEmpty())
5194 yyextra->current->args = yytext;
5195 yyextra->current->bodyLine = yyextra->yyLineNr;
5196 yyextra->current->bodyColumn = yyextra->yyColNr;
5197 yyextra->currentArgumentContext = FuncQual;
5198 yyextra->fullArgString=yyextra->current->args;
5199 yyextra->copyArgString=&yyextra->current->args;
5200 BEGIN( ReadFuncArgType ) ;
5204<GetCallType>{BN}*{ID}{BN}*"*" {
5207 yyextra->funcPtrType=
"(";
5208 yyextra->funcPtrType+=yytext;
5209 yyextra->roundCount=0;
5213 if (!yyextra->current->name.isEmpty())
5215 yyextra->current->args = yytext;
5216 yyextra->current->bodyLine = yyextra->yyLineNr;
5217 yyextra->current->bodyColumn = yyextra->yyColNr;
5218 yyextra->currentArgumentContext = FuncQual;
5219 yyextra->fullArgString=yyextra->current->args;
5220 yyextra->copyArgString=&yyextra->current->args;
5221 BEGIN( ReadFuncArgType ) ;
5228<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5229 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5230 else yyextra->fullArgString+=yytext;
5232<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5233 yyextra->fullArgString+=yytext;
5235<CopyArgRound>[^\/\n\)\(\"\']+ {
5236 *yyextra->copyArgString+=yytext;
5237 yyextra->fullArgString+=yytext;
5239<CopyArgSquare>[^\/\n\]\[\"\']+ {
5240 *yyextra->copyArgString+=yytext;
5241 yyextra->fullArgString+=yytext;
5243<ReadFuncArgType,ReadTempArgs>{BN}* {
5244 *yyextra->copyArgString+=
" ";
5245 yyextra->fullArgString+=
" ";
5248<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5250 yyextra->lastRawStringContext = YY_START;
5251 yyextra->pCopyRawString = yyextra->copyArgString;
5252 *yyextra->pCopyRawString+=yytext;
5253 yyextra->fullArgString+=yytext;
5256<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5257 *yyextra->copyArgString+=*yytext;
5258 yyextra->fullArgString+=*yytext;
5259 yyextra->lastCopyArgStringContext = YY_START;
5260 BEGIN( CopyArgString );
5262<ReadFuncArgType>"[" {
5263 if (!yyextra->insidePHP) REJECT;
5264 *yyextra->copyArgString+=*yytext;
5265 yyextra->fullArgString+=*yytext;
5266 yyextra->argSquareCount=0;
5267 yyextra->lastCopyArgContext = YY_START;
5268 BEGIN( CopyArgSquare );
5270<ReadFuncArgType,ReadTempArgs>"(" {
5271 *yyextra->copyArgString+=*yytext;
5272 yyextra->fullArgString+=*yytext;
5273 yyextra->argRoundCount=0;
5274 yyextra->lastCopyArgContext = YY_START;
5275 BEGIN( CopyArgRound );
5277<ReadFuncArgType>")" {
5278 *yyextra->copyArgString+=*yytext;
5279 yyextra->fullArgString+=*yytext;
5281 if (yyextra->insideJS)
5292 yyextra->docBackup = yyextra->current->doc;
5293 yyextra->briefBackup = yyextra->current->brief;
5295 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5298<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5299 if (yyextra->currentArgumentContext==DefineEnd)
5303 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5309 BEGIN( yyextra->currentArgumentContext );
5315 yyextra->fullArgString+=yytext;
5316 yyextra->lastCopyArgChar=0;
5317 yyextra->lastCommentInArgContext=YY_START;
5319 BEGIN( CopyArgCommentLine );
5321 BEGIN( CopyArgComment );
5325<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5326<ReadFuncArgType,ReadTempArgs>{CCS} {
5327 yyextra->lastCContext = YY_START;
5328 BEGIN( SkipComment );
5330<ReadFuncArgType,ReadTempArgs>{CPPC} {
5331 yyextra->lastCContext = YY_START;
5332 BEGIN( SkipCxxComment );
5348<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5350 if (yyextra->currentArgumentContext==DefineEnd)
5354 int i;
for (i=(
int)yyleng-1;i>0;i--)
5358 *yyextra->copyArgString+=*yytext;
5359 yyextra->fullArgString+=*yytext;
5362 BEGIN( yyextra->currentArgumentContext );
5368 yyextra->lastCopyArgChar=*yytext;
5371 yyextra->lastCommentInArgContext=YY_START;
5372 yyextra->fullArgString+=text;
5373 if (text.
find(
"//")!=-1)
5374 BEGIN( CopyArgCommentLine );
5376 BEGIN( CopyArgComment );
5379<CopyArgComment>^{B}*"*"+/{BN}+
5380<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5381<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5382 if (yyextra->lastCopyArgChar!=0)
5383 unput(yyextra->lastCopyArgChar);
5384 BEGIN( yyextra->lastCommentInArgContext );
5386<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5388 if (yyextra->lastCopyArgChar!=0)
5389 unput(yyextra->lastCopyArgChar);
5390 BEGIN( yyextra->lastCommentInArgContext );
5392<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5393 yyextra->docBlockName=
"uml";
5394 yyextra->fullArgString+=yytext;
5395 BEGIN(CopyArgVerbatim);
5397<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5398 yyextra->docBlockName=&yytext[1];
5399 yyextra->fullArgString+=yytext;
5400 BEGIN(CopyArgVerbatim);
5402<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5403 yyextra->docBlockName=&yytext[1];
5404 if (yyextra->docBlockName.at(1)==
'[')
5406 yyextra->docBlockName.at(1)=
']';
5408 if (yyextra->docBlockName.at(1)==
'{')
5410 yyextra->docBlockName.at(1)=
'}';
5412 if (yyextra->docBlockName.at(1)==
'(')
5414 yyextra->docBlockName.at(1)=
')';
5416 yyextra->fullArgString+=yytext;
5417 BEGIN(CopyArgVerbatim);
5419<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5420 yyextra->fullArgString+=yytext;
5421 if (&yytext[4]==yyextra->docBlockName)
5423 yyextra->docBlockName=
"";
5424 BEGIN(CopyArgCommentLine);
5427<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5428 yyextra->fullArgString+=yytext;
5429 if (yyextra->docBlockName==&yytext[1])
5431 yyextra->docBlockName=
"";
5432 BEGIN(CopyArgCommentLine);
5435<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5436<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5437<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5438<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5439<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5440 warn(yyextra->fileName,yyextra->yyLineNr,
5441 "Ignoring {:c}brief command inside argument documentation",*yytext
5443 yyextra->fullArgString+=
' ';
5446 *yyextra->copyArgString+=*yytext;
5447 yyextra->fullArgString+=*yytext;
5448 yyextra->argSharpCount=1;
5449 BEGIN( CopyArgSharp );
5452 *yyextra->copyArgString+=*yytext;
5453 yyextra->fullArgString+=*yytext;
5455 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5457 BEGIN( yyextra->currentArgumentContext );
5460 yyextra->argRoundCount++;
5461 *yyextra->copyArgString+=*yytext;
5462 yyextra->fullArgString+=*yytext;
5465 *yyextra->copyArgString+=*yytext;
5466 yyextra->fullArgString+=*yytext;
5467 if (yyextra->argRoundCount>0)
5468 yyextra->argRoundCount--;
5470 BEGIN( yyextra->lastCopyArgContext );
5473 yyextra->argSquareCount++;
5474 *yyextra->copyArgString+=*yytext;
5475 yyextra->fullArgString+=*yytext;
5478 *yyextra->copyArgString+=*yytext;
5479 yyextra->fullArgString+=*yytext;
5480 if (yyextra->argSquareCount>0)
5481 yyextra->argSquareCount--;
5483 BEGIN( yyextra->lastCopyArgContext );
5486 *yyextra->copyArgString+=*yytext;
5487 yyextra->fullArgString+=*yytext;
5488 yyextra->argRoundCount=0;
5489 yyextra->lastCopyArgContext = YY_START;
5490 BEGIN( CopyArgRound );
5493 yyextra->argSharpCount++;
5495 *yyextra->copyArgString+=*yytext;
5496 yyextra->fullArgString+=*yytext;
5499 *yyextra->copyArgString+=*yytext;
5500 yyextra->fullArgString+=*yytext;
5501 yyextra->argSharpCount--;
5502 if (yyextra->argSharpCount>0)
5508 BEGIN( ReadTempArgs );
5512<CopyArgString,CopyArgPHPString>\\. {
5513 *yyextra->copyArgString+=yytext;
5514 yyextra->fullArgString+=yytext;
5517 *yyextra->copyArgString+=*yytext;
5518 yyextra->fullArgString+=*yytext;
5519 BEGIN( yyextra->lastCopyArgStringContext );
5521<CopyArgPHPString>\' {
5522 *yyextra->copyArgString+=*yytext;
5523 yyextra->fullArgString+=*yytext;
5524 BEGIN( yyextra->lastCopyArgStringContext );
5526<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5527 if (yyextra->insidePHP)
5533 *yyextra->copyArgString+=yytext;
5534 yyextra->fullArgString+=yytext;
5537<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5538 *yyextra->copyArgString+=yytext;
5539 yyextra->fullArgString+=yytext;
5540 if (yyextra->insidePHP)
5542 yyextra->lastCopyArgStringContext=YY_START;
5543 BEGIN(CopyArgPHPString);
5546<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5547 *yyextra->copyArgString+=yytext;
5548 yyextra->fullArgString+=yytext;
5550<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5552 *yyextra->copyArgString+=*yytext;
5553 yyextra->fullArgString+=*yytext;
5555<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5556 *yyextra->copyArgString+=yytext;
5557 yyextra->fullArgString+=yytext;
5559<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5560 *yyextra->copyArgString+=*yytext;
5561 yyextra->fullArgString+=*yytext;
5569<FuncRound>"(" { yyextra->current->args += *yytext ;
5570 ++yyextra->roundCount ;
5572<FuncRound>")" { yyextra->current->args += *yytext ;
5573 if ( yyextra->roundCount )
5574 --yyextra->roundCount ;
5586 if (
qstrcmp(yytext,
";")==0 &&
5587 ((yyextra->insideJS || yyextra->insidePHP) &&
5590 yyextra->current->reset();
5592 BEGIN( FindMembers );
5596 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns true iff string s contains word w
5599<FuncQual>{BN}*"abstract"{BN}* {
5601 yyextra->current->virt = Specifier::Pure;
5602 yyextra->current->args +=
" override ";
5604<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5606 yyextra->current->spec.setOverride(
true);
5607 yyextra->current->args +=
" override ";
5608 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5611<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5613 yyextra->current->spec.setFinal(
true);
5614 yyextra->current->args +=
" final ";
5615 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5618<FuncQual>{BN}*"sealed"{BN}* {
5620 yyextra->current->spec.setSealed(
true);
5621 yyextra->current->args +=
" sealed ";
5623<FuncQual>{BN}*"new"{BN}* {
5625 yyextra->current->spec.setNew(
true);
5626 yyextra->current->args +=
" new ";
5628<FuncQual>{BN}*"const"{BN}* {
5630 yyextra->current->args +=
" const ";
5631 yyextra->current->argList.setConstSpecifier(
true);
5633<FuncQual>{BN}*"volatile"{BN}* {
5635 yyextra->current->args +=
" volatile ";
5636 yyextra->current->argList.setVolatileSpecifier(
true);
5638<FuncQual>{BN}*"noexcept"{BN}* {
5640 yyextra->current->args +=
" noexcept ";
5641 yyextra->current->spec.setNoExcept(
true);
5643<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5645 yyextra->current->args +=
" noexcept(false)";
5647<FuncQual>{BN}*"noexcept"{BN}*"(" {
5649 yyextra->current->args +=
" noexcept(";
5650 yyextra->current->spec.setNoExcept(
true);
5651 yyextra->lastRoundContext=FuncQual;
5652 yyextra->pCopyRoundString=&yyextra->current->args;
5653 yyextra->roundCount=0;
5657 yyextra->current->args +=
" &";
5660<FuncQual>{BN}*"&&" {
5661 yyextra->current->args +=
" &&";
5665<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5667 yyextra->current->args +=
" = 0";
5668 yyextra->current->virt = Specifier::Pure;
5669 yyextra->current->argList.setPureSpecifier(
true);
5670 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5673<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5675 yyextra->current->args +=
" = delete";
5676 yyextra->current->spec.setDelete(
true);
5677 yyextra->current->argList.setIsDeleted(
true);
5678 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5681<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5683 yyextra->current->args +=
" = default";
5684 yyextra->current->spec.setDefault(
true);
5685 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5688<FuncQual>{BN}*"->"{BN}* {
5690 yyextra->current->argList.setTrailingReturnType(
" -> ");
5691 yyextra->current->args +=
" -> ";
5692 yyextra->roundCount=0;
5693 BEGIN(TrailingReturn);
5695<TrailingReturn>[{;] {
5696 if (yyextra->roundCount>0) REJECT;
5698 yyextra->current->argList.finishTrailingReturnType();
5701<TrailingReturn>"requires"{BN}+ {
5702 if (yyextra->insideJava) REJECT;
5703 yyextra->requiresContext = FuncQual;
5704 yyextra->current->req+=
' ';
5705 yyextra->current->argList.finishTrailingReturnType();
5706 BEGIN(RequiresClause);
5708<TrailingReturn>"(" {
5709 yyextra->roundCount++;
5710 yyextra->current->argList.appendTrailingReturnType(yytext);
5711 yyextra->current->args+=yytext;
5713<TrailingReturn>")" {
5714 if (yyextra->roundCount>0)
5716 yyextra->roundCount--;
5720 warn(yyextra->fileName,yyextra->yyLineNr,
5721 "Found ')' without opening '(' for trailing return type '{})...'",
5722 yyextra->current->argList.trailingReturnType());
5724 yyextra->current->argList.appendTrailingReturnType(yytext);
5725 yyextra->current->args+=yytext;
5728 yyextra->current->argList.appendTrailingReturnType(yytext);
5729 yyextra->current->args+=yytext;
5733 yyextra->current->argList.appendTrailingReturnType(yytext);
5734 yyextra->current->args+=
' ';
5736<FuncRound,FuncFunc>{BN}*","{BN}* {
5738 yyextra->current->args +=
", " ;
5740<FuncQual,FuncRound,FuncFunc>{BN}+ {
5742 yyextra->current->args +=
' ' ;
5744<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5746 yyextra->lastCPPContext = YY_START;
5750 if (!yyextra->insideCS)
5757 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5764 yyextra->lastInitializerContext=YY_START;
5765 yyextra->sharpCount=0;
5766 yyextra->initBracketCount=0;
5767 yyextra->current->initializer.str(yytext);
5768 BEGIN(ReadInitializer);
5771<ReadExpressionBody>";" {
5772 if (!yyextra->current->sli.empty() && yyextra->previous)
5774 yyextra->previous->sli = yyextra->current->sli;
5775 yyextra->current->sli.clear();
5777 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5792 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5795 yyextra->requiresContext = YY_START;
5796 if (!yyextra->current->req.isEmpty())
5798 yyextra->current->req+=
" && ";
5800 BEGIN(RequiresClause);
5802 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5805 yyextra->current->typeConstr.clear();
5806 yyextra->current->typeConstr.push_back(
Argument());
5807 yyextra->lastCSConstraint = YY_START;
5808 BEGIN( CSConstraintName );
5812 yyextra->current->args = yytext;
5813 yyextra->oldStyleArgType.clear();
5814 BEGIN(OldStyleArgs);
5818 yyextra->current->args += yytext;
5824 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5826 if (yyextra->current->doc!=yyextra->docBackup)
5828 doc=yyextra->current->doc;
5829 yyextra->current->doc=yyextra->docBackup;
5831 if (yyextra->current->brief!=yyextra->briefBackup)
5833 brief=yyextra->current->brief;
5834 yyextra->current->brief=yyextra->briefBackup;
5836 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5837 oldStyleArgName,brief,doc);
5838 yyextra->current->args.clear();
5839 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5841<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5843 if (yyextra->current->argList.empty())
5845 yyextra->current->argList.setNoParameters(
true);
5851<OldStyleArgs>. { yyextra->current->args += *yytext; }
5852<FuncQual,FuncRound,FuncFunc>\" {
5853 if (yyextra->insideIDL && yyextra->insideCppQuote)
5859 yyextra->current->args += *yytext;
5862<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5863<FuncQual>{BN}*"try:" |
5864<FuncQual>{BN}*"try"{BN}+ {
5865 yyextra->insideTryBlock=
true;
5867 if (yytext[yyleng-1]==
':')
5873<FuncQual>{BN}*"throw"{BN}*"(" {
5874 yyextra->current->exception =
" throw (" ;
5875 yyextra->roundCount=0;
5877 BEGIN( ExcpRound ) ;
5879<FuncQual>{BN}*"raises"{BN}*"(" {
5880 yyextra->current->exception =
" raises (" ;
5882 yyextra->roundCount=0;
5883 BEGIN( ExcpRound ) ;
5885<FuncQual>{BN}*"throws"{BN}+ {
5886 yyextra->current->exception =
" throws " ;
5890<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5891 ++yyextra->roundCount ;
5893<ExcpRound>")" { yyextra->current->exception += *yytext ;
5894 if ( yyextra->roundCount )
5895 --yyextra->roundCount ;
5900 yyextra->current->exception += *yytext;
5903 unput(
'{'); BEGIN( FuncQual );
5906 unput(
';'); BEGIN( FuncQual );
5909 yyextra->current->exception +=
' ';
5913 yyextra->current->exception += *yytext;
5915<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5916 yyextra->current->name = yyextra->current->args ;
5917 yyextra->current->args = yytext ;
5918 yyextra->roundCount=0;
5919 BEGIN( FuncRound ) ;
5922 if (!yyextra->insidePHP) BEGIN(SkipInits);
5928 yyextra->current->fileName = yyextra->fileName;
5929 yyextra->current->startLine = yyextra->yyBegLineNr;
5930 yyextra->current->startColumn = yyextra->yyBegColNr;
5931 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5933 std::string type = yyextra->current->type.str();
5937 ti = (int)
match.position();
5941 int di = yyextra->current->type.find(
"decltype(");
5942 if (di!=-1 && di<ti)
5947 int ts=yyextra->current->type.find(
'<');
5948 int te=yyextra->current->type.findRev(
'>');
5951 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5952 bool isFunction = ti==-1 ||
5953 (ts!=-1 && ts<te && ts<ti && ti<te);
5954 bool isVariable = !yyextra->current->type.isEmpty() &&
5955 (!isFunction || startsWithTypedef);
5960 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5965 if (yyextra->isTypedef && !startsWithTypedef)
5967 yyextra->current->type.prepend(
"typedef ");
5969 yyextra->current->section = EntryType::makeVariable() ;
5974 yyextra->current->section = EntryType::makeFunction() ;
5975 yyextra->current->proto = *yytext==
';';
5983 if (yyextra->isTypedef && !startsWithTypedef)
5985 yyextra->current->type.prepend(
"typedef ");
5988 yyextra->current->section = EntryType::makeVariable();
5993 yyextra->current->section = EntryType::makeFunction();
5994 yyextra->current->proto =
true;
5998 if ( yyextra->insidePHP)
6002 yyextra->current->spec.setFinal(
true);
6006 yyextra->current->spec.setAbstract(
true);
6009 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
6012 if ( *yytext ==
'{' )
6014 yyextra->lastCurlyContext = FindMembers;
6015 yyextra->curlyCount=0;
6020 BEGIN( FindMembers );
6025 if ( yyextra->insidePHP)
6029 yyextra->previous = yyextra->current;
6030 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6033 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6035 yyextra->current->spec.setOptional(
true).setRequired(
true);
6037 yyextra->lastCurlyContext = FindMembers;
6038 if ( *yytext ==
',' )
6040 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6042 if ( *yytext ==
'{' )
6044 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6046 yyextra->previous->spec.setInline(
true);
6048 yyextra->curlyCount=0;
6049 BEGIN( SkipCurly ) ;
6051 else if ( *yytext ==
'=' )
6053 yyextra->previous->spec.setInline(
true);
6054 yyextra->curlyCount=0;
6055 BEGIN( ReadExpressionBody );
6059 if (!yyextra->previous->section.isVariable())
6060 yyextra->previous->bodyLine=-1;
6061 BEGIN( FindMembers ) ;
Class representing a regular expression.
Object representing the matching results.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
6065<SkipInits>">"{BN}*"{" {
6067 yyextra->curlyCount=1;
6068 BEGIN(SkipC11Inits);
6070<SkipInits>{ID}{BN}*"{" {
6072 yyextra->curlyCount=1;
6073 BEGIN(SkipC11Inits);
6076 ++yyextra->curlyCount;
6079 if ( --yyextra->curlyCount<=0 )
6090 ++yyextra->curlyCount ;
6092<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6095 if( yyextra->curlyCount )
6097 --yyextra->curlyCount ;
6101 if (!yyextra->current->sli.empty() && yyextra->previous)
6103 yyextra->previous->sli = yyextra->current->sli;
6104 yyextra->current->sli.clear();
6106 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6107 BEGIN( yyextra->lastCurlyContext ) ;
6110<SkipCurly>"}"{BN}*{DCOMM}"<" {
6112 if ( yyextra->curlyCount )
6115 --yyextra->curlyCount ;
6119 yyextra->current->endBodyLine=yyextra->yyLineNr;
6120 yyextra->tempEntry = yyextra->current;
6121 yyextra->current = yyextra->previous;
6123 yyextra->docBlockContext = SkipCurlyEndDoc;
6124 yyextra->docBlockInBody =
false;
6125 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6127 yyextra->docBlock.str(std::string());
6128 yyextra->docBlockTerm =
'}';
6129 if (yytext[yyleng-3]==
'/')
6141<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6142 yyextra->docBlockContext = SkipCurlyEndDoc;
6143 yyextra->docBlockInBody =
false;
6144 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6146 yyextra->docBlock.str(std::string());
6147 yyextra->docBlockTerm =
'}';
6148 if (yytext[yyleng-3]==
'/')
6159<SkipCurlyEndDoc>"}" {
6161 if (yyextra->tempEntry)
6163 yyextra->current = yyextra->tempEntry;
6164 yyextra->tempEntry.reset();
6166 BEGIN( yyextra->lastCurlyContext );
6168<SkipCurly,ReadExpressionBody>\" {
6170 yyextra->lastStringContext=YY_START;
6171 BEGIN( SkipString );
6173<SkipCurly>^{B}*"#" {
6174 if (yyextra->insidePHP)
6177 BEGIN( SkipCurlyCpp );
6179<SkipCurly,SkipC11Inits,SkipInits,ReadExpressionBody>\n {
6183<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6184 if (!yyextra->insidePHP)
6190 yyextra->lastHereDocContext = YY_START;
6194<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6196 yyextra->lastRawStringContext = YY_START;
6197 yyextra->dummyRawString.clear();
6198 yyextra->pCopyRawString = &yyextra->dummyRawString;
6199 *yyextra->pCopyRawString += yytext;
6202<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6206<SkipCurly,SkipCurlyCpp>"\$" {}
6210 yyextra->lastCurlyContext = FindMembers;
6213<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6217<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CCS} {
6219 yyextra->lastCContext = YY_START;
6222<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CPPC} {
6224 yyextra->lastCContext = YY_START;
6225 BEGIN(SkipCxxComment);
6227<SkipInits,SkipC11Inits>"(" {
6228 yyextra->roundCount=0;
6229 yyextra->lastSkipRoundContext=YY_START;
6232<SkipInits,SkipC11Inits>\" {
6233 yyextra->lastStringContext=YY_START;
6234 BEGIN( SkipString );
6237 warn(yyextra->fileName,yyextra->yyLineNr,
6238 "Found ';' while parsing initializer list! "
6239 "(doxygen could be confused by a macro call without semicolon)"
6241 BEGIN( FindMembers );
6243<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6244 if (!yyextra->insidePHP)
6247 yyextra->lastCContext = YY_START;
6248 BEGIN(SkipCxxComment);
6250<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6251 if (!yyextra->insideCS) REJECT;
6254 yyextra->lastSkipVerbStringContext=YY_START;
6255 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6256 yyextra->dummyTextStream.clear();
6257 BEGIN(SkipVerbString);
6259<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6260 if (yyextra->insidePHP) REJECT;
6262<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6263 if (yyextra->insidePHP)
6265 yyextra->lastStringContext=YY_START;
6266 BEGIN(SkipPHPString);
6269<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>. { }
6270<SkipString,SkipPHPString>\\. { }
6272 BEGIN( yyextra->lastStringContext );
6275 BEGIN( yyextra->lastStringContext );
6277<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6278<SkipString,SkipPHPString>\n {
6282<SkipString,SkipPHPString>. { }
6288 yyextra->current->section = EntryType::makeEmpty() ;
6289 yyextra->current->type.clear() ;
6290 yyextra->current->name.clear() ;
6291 yyextra->current->args.clear() ;
6292 yyextra->current->argList.clear();
6293 BEGIN( FindMembers ) ;
6296 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6300 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6304 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6306 if (!yyextra->baseName.isEmpty())
6308 yyextra->current->extends.emplace_back(
6309 yyextra->baseName,Protection::Public,Specifier::Normal);
6310 yyextra->baseName.clear();
6312 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6317 yyextra->current->section = EntryType::makeEmpty() ;
6318 yyextra->current->type.clear() ;
6319 yyextra->current->name.clear() ;
6320 yyextra->current->args.clear() ;
6321 yyextra->current->argList.clear();
6323 BEGIN( FindMembers ) ;
6325<CompoundName>{SCOPENAME}/{BN}*"<" {
6326 yyextra->sharpCount = 0;
6327 yyextra->current->name = yytext ;
6329 if (yyextra->current->spec.isProtocol())
6331 yyextra->current->name+=
"-p";
6334 yyextra->lastClassTemplSpecContext = ClassVar;
6335 if (yyextra->insideObjC)
6337 BEGIN( ObjCProtocolList );
6339 else if (yyextra->insideCS)
6346 yyextra->roundCount=0;
6347 BEGIN( ClassTemplSpec );
6354 yyextra->current->tArgLists.
push_back(al);
6355 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6356 yyextra->templateStr=
"<";
6357 yyextra->current->name +=
"<";
6358 yyextra->fullArgString = yyextra->templateStr;
6359 yyextra->copyArgString = &yyextra->current->name;
6361 yyextra->currentArgumentContext = ClassVar;
6362 BEGIN( ReadTempArgs );
6364<ObjCProtocolList>"<" {
6365 yyextra->insideProtocolList=
true;
6368<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6369 yyextra->current->name += yytext;
6371 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6374 if (yyextra->current->spec.isProtocol())
6381 BEGIN( yyextra->lastClassTemplSpecContext );
6385<ClassTemplSpec>"<" {
6386 yyextra->current->name += yytext;
6387 if (yyextra->roundCount==0) yyextra->sharpCount++;
6390 yyextra->current->name += yytext;
6392<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6393 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6397 yyextra->current->name =
substitute(yytext,
".",
"::");
6398 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6403 else if (!yyextra->current->tArgLists.empty())
6407 yyextra->current->name = yytext;
6408 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6411 QCString rn = yyextra->current_root->name;
6413 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6417 yyextra->current->spec.setForwardDecl(
true);
6418 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6420 else if (yyextra->insideIDL &&
6421 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6422 yyextra->current->spec.isInterface()) ||
6423 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6424 yyextra->current->spec.isService())
6432 yyextra->current->name = yytext;
6433 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6434 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6437 yyextra->current->spec.setInterface(
false).setService(
false);
6441 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6444 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6447 yyextra->current->reset();
6449 if (yyextra->insideObjC)
6451 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6452 yyextra->insideObjC =
false;
6454 if (yyextra->isTypedef)
6456 yyextra->current->type.prepend(
"typedef");
6458 BEGIN( FindMembers );
Wrapper class for the Entry type.
6461<CompoundName>{SCOPENAME}/{BN}*"(" {
6462 yyextra->current->name = yytext ;
6465 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6467 yyextra->lastAlignAsContext = YY_START;
6472 if (yyextra->current->spec.isProtocol())
6474 yyextra->current->name +=
"-p";
6479<AlignAs>"(" { yyextra->roundCount=0;
6480 BEGIN( AlignAsEnd );
6484<AlignAsEnd>"(" { yyextra->roundCount++; }
6485<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6487 BEGIN( yyextra->lastAlignAsContext );
6493 yyextra->current->name = yytext ;
6497 yyextra->current->bodyLine = yyextra->yyLineNr;
6498 yyextra->current->bodyColumn = yyextra->yyColNr;
6499 yyextra->current->initializer.str(std::string());
6500 yyextra->lastInitializerContext = FindMembers;
6501 yyextra->sharpCount=0;
6502 yyextra->initBracketCount=0;
6503 BEGIN(ReadInitializer);
6505<CompoundName>{SCOPENAME}/{BN}*"," {
6507 yyextra->current->reset();
6510<CompoundName>{SCOPENAME} {
6511 yyextra->current->name = yytext ;
6514 if (yyextra->current->spec.isProtocol())
6516 yyextra->current->name +=
"-p";
6518 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6524<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6525 if (yyextra->current->section.isNamespace())
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6537<CompoundName>{CSSCOPENAME} {
6538 yyextra->current->name =
substitute(yytext,
".",
"::");
6542<ClassVar>{SCOPENAME}{BNopt}/"(" {
6543 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6546 yyextra->roundCount=0;
6547 BEGIN(SkipUnionSwitch);
6552 yyextra->yyBegColNr=yyextra->yyColNr;
6553 yyextra->yyBegLineNr=yyextra->yyLineNr;
6554 yyextra->current->name = yytext;
6555 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6558 BEGIN( FindMembers );
6562 if (yyextra->isTypedef)
6566 yyextra->current->type.prepend(
"typedef ");
6574<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6575 if (yyextra->insideCli)
6578 yyextra->current->spec.setSealedClass(
true);
6580 yyextra->current->spec.setAbstractClass(
true);
6588<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6589 yyextra->yyBegColNr=yyextra->yyColNr;
6590 yyextra->yyBegLineNr=yyextra->yyLineNr;
6593 if (yyextra->current->section.isEnum())
6595 yyextra->current->section = EntryType::makeVariable() ;
6597 yyextra->current->type +=
' ' ;
6598 yyextra->current->type += yyextra->current->name ;
6607 yyextra->yyBegColNr=yyextra->yyColNr;
6608 yyextra->yyBegLineNr=yyextra->yyLineNr;
6610 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6613 yyextra->roundCount=0;
6614 BEGIN(SkipUnionSwitch);
6616 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6618 yyextra->current->type.clear();
6619 yyextra->baseProt = Protection::Public;
6620 yyextra->baseVirt = Specifier::Normal;
6621 yyextra->baseName.clear();
6622 BEGIN( BasesProt ) ;
6624 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6626 yyextra->current->typeConstr.clear();
6627 yyextra->current->typeConstr.push_back(
Argument());
6628 yyextra->lastCSConstraint = YY_START;
6629 BEGIN( CSConstraintName );
6631 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6633 yyextra->current->spec.setAbstract(
true);
6635 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6637 yyextra->current->spec.setSealed(
true);
6639 else if (
qstrcmp(yytext,
"final")==0)
6641 yyextra->current->spec.setFinal(
true);
6645 if (yyextra->current->section.isEnum())
6647 yyextra->current->section = EntryType::makeVariable() ;
6649 yyextra->current->type +=
' ' ;
6650 yyextra->current->type += yyextra->current->name ;
6651 yyextra->current->name = yytext ;
6660 if (yyextra->insideObjC && *yytext==
'(')
6662 yyextra->current->name+=
'(';
6663 yyextra->current->spec.setCategory(
true);
6664 BEGIN( ClassCategory );
6666 else if (yyextra->insideCS && *yytext==
'(')
6668 yyextra->current->args=yytext;
6669 yyextra->currentArgumentContext = ClassVar;
6670 yyextra->fullArgString = yyextra->current->args;
6671 yyextra->copyArgString = &yyextra->current->args;
6672 BEGIN( ReadFuncArgType ) ;
6678 BEGIN( FindMembers );
6681<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6682<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6683 yyextra->fullArgString.clear();
6684 yyextra->lastCopyArgChar=
'#';
6685 yyextra->lastCommentInArgContext=YY_START;
6687 BEGIN( CopyArgCommentLine );
6689 BEGIN( CopyArgComment );
6691<CSConstraintType,CSConstraintName>"#" {
6692 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6694<CSConstraintType>"=>" {
6699 BEGIN( yyextra->lastCSConstraint );
6701<CSConstraintType>"{" {
6705 BEGIN( yyextra->lastCSConstraint );
6707<CSConstraintType,CSConstraintName>";" {
6710 BEGIN( yyextra->lastCSConstraint );
6712<CSConstraintName>":" {
6713 BEGIN( CSConstraintType );
6715<CSConstraintName>{ID} {
6717 yyextra->current->typeConstr.back().name=yytext;
6719<CSConstraintType>"where" {
6720 yyextra->current->typeConstr.push_back(
Argument());
6721 BEGIN( CSConstraintName );
6723<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6724 if (yyextra->current->typeConstr.back().type.isEmpty())
6727 yyextra->current->typeConstr.back().type=yytext;
6731 QCString name = yyextra->current->typeConstr.back().name;
6732 yyextra->current->typeConstr.push_back(
Argument());
6733 yyextra->current->typeConstr.back().name=name;
6734 yyextra->current->typeConstr.back().type=yytext;
6737<CSConstraintName,CSConstraintType>\n {
6740<CSConstraintName,CSConstraintType>. {
6742<ClassCategory>{ID} {
6743 yyextra->current->name+=yytext;
6745<ClassCategory>")"/{BN}*"{" {
6746 yyextra->current->name+=
')';
6749<ClassCategory>")"/{BN}*"<" {
6750 yyextra->current->name+=
')';
6751 BEGIN( ObjCProtocolList );
6754 yyextra->current->name+=
')';
6755 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6767 if (yyextra->current->section.isVariable())
6769 yyextra->current->bitfields+=
":";
6770 yyextra->current->args.clear();
6773 else if (yyextra->current->section.isEnum())
6776 yyextra->current->args.clear();
6777 BEGIN(EnumBaseType);
6781 yyextra->current->type.clear();
6782 if (yyextra->current->spec.isInterface() ||
6783 yyextra->current->spec.isStruct() ||
6784 yyextra->current->spec.isRef() ||
6785 yyextra->current->spec.isValue() ||
6786 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6789 yyextra->baseProt = Protection::Public;
6793 yyextra->baseProt = Protection::Private;
6795 yyextra->baseVirt = Specifier::Normal;
6796 yyextra->baseName.clear();
6797 BEGIN( BasesProt ) ;
6801 if (yyextra->isTypedef)
6803 yyextra->current->type.prepend(
"typedef");
6805 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6807 yyextra->current->section = EntryType::makeVariable() ;
6809 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6811 yyextra->current->reset();
6818 BEGIN( FindMembers );
6820<Bases,ClassVar>{CPPC}"/"/[^/] {
6821 if (!yyextra->insideObjC)
6828 yyextra->current->program << yytext;
6829 yyextra->current->fileName = yyextra->fileName ;
6830 yyextra->current->startLine = yyextra->yyLineNr ;
6831 yyextra->current->startColumn = yyextra->yyColNr;
6832 yyextra->curlyCount=0;
6833 BEGIN( ReadBodyIntf );
6836<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6837<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6838<Bases,ClassVar>{CPPC}"!" |
6839<Bases,ClassVar>[\-+]{BN}* {
6840 if (!yyextra->insideObjC)
6847 yyextra->current->program << yytext;
6848 yyextra->current->fileName = yyextra->fileName ;
6849 yyextra->current->startLine = yyextra->yyLineNr ;
6850 yyextra->current->startColumn = yyextra->yyColNr;
6851 yyextra->curlyCount=0;
6852 BEGIN( ReadBodyIntf );
6855<CompoundName,ClassVar>{B}*"{"{B}* {
6856 yyextra->current->program.str(std::string());
6857 yyextra->current->fileName = yyextra->fileName ;
6858 yyextra->current->bodyLine = yyextra->yyLineNr;
6859 yyextra->current->bodyColumn = yyextra->yyColNr;
6861 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6863 if (yyextra->current->section.isNamespace())
6867 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6879 yyextra->curlyCount=0;
6880 if (yyextra->current_root &&
6881 !yyextra->current_root->spec.isInterface() &&
6882 (yyextra->current->spec.isInterface() ||
6883 yyextra->current->spec.isProtocol() ||
6884 yyextra->current->spec.isCategory() ||
6885 yyextra->current->section.isObjcImpl()
6890 BEGIN( ReadBodyIntf );
6892 else if (yyextra->current->section.isNamespace())
6894 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6901<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6902<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6903<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6904<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6905<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6906<BasesProt>{BN} {
lineCount(yyscanner); }
6907<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6908<Bases>"decltype"{BN}*"(" {
6910 yyextra->roundCount=0;
6911 yyextra->lastSkipRoundContext=YY_START;
6914<Bases>("\\")?({ID}"\\")*{ID} {
6915 if (!yyextra->insidePHP)
6924 yyextra->baseName += bn;
6925 yyextra->current->args +=
' ';
6926 yyextra->current->args += yytext;
6929<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6935 yyextra->current->typeConstr.clear();
6936 yyextra->current->typeConstr.push_back(
Argument());
6937 yyextra->lastCSConstraint = YY_START;
6938 BEGIN( CSConstraintName );
6942 yyextra->baseName+=yytext;
6943 yyextra->current->args +=
' ';
6944 yyextra->current->args += yytext;
6947<Bases>{BN}*{ID}("."{ID})* {
6949 yyextra->baseName += name;
6950 yyextra->current->args +=
' ';
6951 yyextra->current->args += name;
6953<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6954 if (!yyextra->insideObjC)
6964<ClassVar,Bases>"@end" {
6972<ClassVar>"<" { yyextra->current->name += *yytext;
6973 yyextra->sharpCount=1;
6974 yyextra->roundCount=0;
6975 yyextra->lastSkipSharpContext = YY_START;
6976 yyextra->specName = &yyextra->current->name;
6977 BEGIN ( Specialization );
6981 yyextra->sharpCount=1;
6982 yyextra->roundCount=0;
6983 yyextra->lastSkipSharpContext = YY_START;
6984 if (yyextra->insideObjC)
6994 yyextra->templateStr = yytext;
6995 yyextra->specName = &yyextra->templateStr;
6996 BEGIN ( Specialization );
6999<Specialization>"<" { *yyextra->specName += *yytext;
7000 if (yyextra->roundCount==0) yyextra->sharpCount++;
7002<Specialization>">" {
7003 *yyextra->specName += *yytext;
7004 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
7007 BEGIN(yyextra->lastSkipSharpContext);
7010<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
7011<Specialization>"<<" { *yyextra->specName += yytext; }
7012<Specialization>">>"/{B}*"::" {
7017<Specialization>">>" {
7018 if (yyextra->insideCS)
7028 if (yyextra->roundCount>0)
7030 *yyextra->specName += yytext;
7040<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7041<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7042<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7044<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7045<Specialization>"\\'" { *yyextra->specName += *yytext;}
7046<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7047<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7048<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7049<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7050<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7051<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7052<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7053<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7054<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7057 *yyextra->specName += *yytext;
7059<SkipRound>"(" { ++yyextra->roundCount; }
7060<SkipRound>")" {
if (--yyextra->roundCount<0)
7061 BEGIN ( yyextra->lastSkipRoundContext );
7064 yyextra->lastStringContext=SkipRound;
7067<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7068 if (yyextra->insideProtocolList)
7070 yyextra->baseName+=
"-p";
7074 yyextra->current->args +=
',' ;
7077 if (!yyextra->baseName.isEmpty())
7079 yyextra->current->extends.emplace_back(
7080 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7083 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7084 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7085 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7087 yyextra->baseProt=Protection::Public;
7091 yyextra->baseProt=Protection::Private;
7093 yyextra->baseVirt=Specifier::Normal;
7094 yyextra->baseName.clear();
7097 yyextra->insideProtocolList=
false;
7100 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7116 if (*yytext==
',' && yyextra->insideObjC)
7118 yyextra->insideProtocolList=
true;
7124 yyextra->current->program.str(std::string());
7125 yyextra->current->fileName = yyextra->fileName ;
7126 yyextra->current->bodyLine = yyextra->yyLineNr;
7127 yyextra->current->bodyColumn = yyextra->yyColNr;
7129 if (!yyextra->baseName.isEmpty())
7131 yyextra->current->extends.emplace_back(
7132 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7134 yyextra->baseName.clear();
7136 yyextra->curlyCount=0;
7137 if (yyextra->insideObjC)
7139 BEGIN( ReadBodyIntf );
7146<SkipUnionSwitch>{B}*"(" {
7147 yyextra->roundCount++;
7149<SkipUnionSwitch>")" {
7150 if (--yyextra->roundCount==0)
7155<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7157<Comment>{BN}+ { yyextra->current->program << yytext ;
7160<Comment>{CCS} { yyextra->current->program << yytext ; }
7161<Comment>{CPPC} { yyextra->current->program << yytext ; }
7162<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7163 if (yyextra->doxygenComment) yyextra->insideCode=
true;
7164 yyextra->current->program << yytext ;
7166<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7167 if (yyextra->doxygenComment) yyextra->insideCode=
false;
7168 yyextra->current->program << yytext ;
7170<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7171<Comment>{CCE} { yyextra->current->program << yytext ;
7172 if (!yyextra->insideCode)
7174 yyextra->doxygenComment=
false;
7175 BEGIN( yyextra->lastContext );
7178<Comment>. { yyextra->current->program << *yytext ; }
7180<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7182 if (!yyextra->current->doc.isEmpty())
7184 yyextra->current->doc+=
"\n\n";
7188 yyextra->current->docLine = yyextra->yyLineNr;
7189 yyextra->current->docFile = yyextra->fileName;
7192 yyextra->lastDocContext = YY_START;
7193 if (yyextra->current_root->section.isScope())
7195 yyextra->current->inside = yyextra->current_root->name+
"::";
7197 yyextra->docBlockContext = YY_START;
7198 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7203 yyextra->docBlock.
str(indent.
str());
7205 if (yyextra->docBlockAutoBrief)
7207 yyextra->current->briefLine = yyextra->yyLineNr;
7208 yyextra->current->briefFile = yyextra->fileName;
7213<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7219 yyextra->lastDocContext = YY_START;
7222 if (yyextra->current_root->section.isScope())
7224 yyextra->current->inside = yyextra->current_root->name+
"::";
7226 yyextra->current->docLine = yyextra->yyLineNr;
7227 yyextra->current->docFile = yyextra->fileName;
7228 yyextra->docBlockContext = YY_START;
7229 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7231 yyextra->docBlockAutoBrief = javadocAutoBrief;
7235 yyextra->docBlock.
str(indent.
str());
7237 if (yyextra->docBlockAutoBrief)
7239 yyextra->current->briefLine = yyextra->yyLineNr;
7240 yyextra->current->briefFile = yyextra->fileName;
7247 yyextra->current->program << yytext ;
7248 yyextra->lastContext = YY_START ;
7249 yyextra->doxygenComment=
true;
7253<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7258<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7259 yyextra->lastDocContext = YY_START;
7262 if (yyextra->current_root->section.isScope())
7264 yyextra->current->inside = yyextra->current_root->name+
"::";
7266 yyextra->current->docLine = yyextra->yyLineNr;
7267 yyextra->current->docFile = yyextra->fileName;
7268 yyextra->docBlockContext = YY_START;
7269 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7271 yyextra->docBlockAutoBrief = javadocAutoBrief;
7275 yyextra->docBlock.
str(indent.
str());
7277 if (yyextra->docBlockAutoBrief)
7279 yyextra->current->briefLine = yyextra->yyLineNr;
7280 yyextra->current->briefFile = yyextra->fileName;
7285<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7286 yyextra->lastDocContext = YY_START;
7287 if (yyextra->current_root->section.isScope())
7289 yyextra->current->inside = yyextra->current_root->name+
"::";
7291 yyextra->docBlockContext = YY_START;
7292 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7293 yyextra->docBlockAutoBrief =
false;
7297 yyextra->docBlock.
str(indent.
str());
7302<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7303 yyextra->lastDocContext = YY_START;
7304 if (yyextra->current_root->section.isScope())
7306 yyextra->current->inside = yyextra->current_root->name+
"::";
7308 yyextra->docBlockContext = YY_START;
7309 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7310 yyextra->docBlockAutoBrief =
false;
7313 yyextra->docBlock.
str(indent.
str());
7317<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7319 yyextra->externLinkage=
true;
7322 if (yyextra->externLinkage)
7324 yyextra->externLinkage=
false;
7326 else if (yyextra->insideCS &&
7327 !yyextra->current->name.isEmpty() &&
7328 !yyextra->current->type.isEmpty())
7330 if (yyextra->current->mtype == MethodTypes::Event)
7332 yyextra->mtype = MethodTypes::Event;
7336 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7340 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7342 yyextra->current->bodyLine = yyextra->yyLineNr;
7343 yyextra->current->bodyColumn = yyextra->yyColNr;
7344 yyextra->curlyCount=0;
7345 BEGIN( CSAccessorDecl );
7347 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7351 yyextra->current->exception =
" {";
7352 BEGIN(UNOIDLAttributeBlock);
7356 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7357 yyextra->current->name.isEmpty()
7361 yyextra->needsSemi =
false;
7362 if (yyextra->current->isStatic)
7364 yyextra->current->name=
"[static initializer]";
7365 yyextra->current->type.clear();
7369 yyextra->current->name=
"[instance initializer]";
7386 yyextra->current->bodyLine = yyextra->yyLineNr;
7387 yyextra->current->bodyColumn = yyextra->yyColNr;
7388 yyextra->current->initializer.str(yytext);
7389 yyextra->lastInitializerContext = YY_START;
7390 yyextra->sharpCount=0;
7391 yyextra->initBracketCount=1;
7392 BEGIN(ReadInitializer);
7396<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7397<CSAccessorDecl>"}"{B}*"=" {
7399 if (yyextra->curlyCount != 0) REJECT;
7400 yyextra->current->initializer.str(
"=");
7401 yyextra->current->endBodyLine=yyextra->yyLineNr;
7402 yyextra->lastInitializerContext = FindMembers;
7403 BEGIN(ReadInitializer);
7405<CSAccessorDecl>"}" {
7406 if (yyextra->curlyCount)
7408 yyextra->curlyCount--;
7412 yyextra->mtype = MethodTypes::Method;
7413 yyextra->virt = Specifier::Normal;
7415 yyextra->current->endBodyLine=yyextra->yyLineNr;
7420<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7421<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7422<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7423<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7424<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7425<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7426<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7427<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7428<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7429<CSAccessorDecl>{CHARLIT} {}
7430<CSAccessorDecl>"\"" { BEGIN(CSString);}
7431<CSAccessorDecl>"." {}
7432<CSAccessorDecl>\n {
lineCount(yyscanner); }
7433<CSString>"\"" { BEGIN(CSAccessorDecl);}
7441<SliceSequence>{SCOPENAME} {
7442 if (yyextra->current->spec.isLocal())
7444 yyextra->current->type =
"local ";
7446 yyextra->current->type +=
"sequence<";
7447 yyextra->current->type += yytext;
7448 yyextra->current->type +=
">";
7451<SliceSequence>{BN}*">"{BN}* {
7453 BEGIN(SliceSequenceName);
7456<SliceSequenceName>{ID}{BN}* {
7458 yyextra->current->name = yytext ;
7459 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7462<SliceSequenceName>";" {
7463 yyextra->current->section = EntryType::makeVariable();
7464 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7469<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7471 if (yyextra->current->spec.isLocal())
7473 yyextra->current->type =
"local ";
7475 yyextra->current->type +=
"dictionary<";
7476 yyextra->current->type += yytext;
7477 yyextra->current->type +=
">";
7478 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7481<SliceDictionary>{BN}*">"{BN}* {
7483 BEGIN(SliceDictionaryName);
7486<SliceDictionaryName>{ID}{BN}* {
7488 yyextra->current->name = yytext ;
7489 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7492<SliceDictionaryName>";" {
7493 yyextra->current->section = EntryType::makeVariable();
7494 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7504<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7505 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7506 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7509<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7510 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7511 BEGIN( yyextra->docBlockContext );
7513<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7514 yyextra->docBlock << yytext;
7515 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7516 BEGIN( yyextra->docBlockContext );
7518<DocLine>{NONLopt}/"\n" {
7519 yyextra->docBlock << yytext;
7520 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7521 BEGIN( yyextra->docBlockContext );
7526<DocBlock>"*"*{CCE} {
7528 BEGIN(yyextra->docBlockContext);
7530<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7533 yyextra->docBlock <<
"\\ilinebr " << indent;
7535<DocBlock>^{B}*"*"+/[^/] {
7538 yyextra->docBlock << indent;
7540<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7543 yyextra->docBlock << indent;
7545<DocBlock>^{B}*({CPPC}){B}* {
7548 yyextra->docBlock << yytext;
7552 yyextra->docBlock << yytext;
7554<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7555 yyextra->docBlock << yytext;
7557<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7558 yyextra->docBlock << yytext;
7559 char blockName[] =
"f$";
7561 if (c==
'[') blockName[1]=
']';
7562 else if (c==
'{') blockName[1]=
'}';
7563 else if (c==
'(') blockName[1]=
')';
7565 BEGIN(DocCopyBlock);
7567<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7568 yyextra->fileName = &yytext[6];
7569 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7570 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7571 yyextra->docBlock << yytext;
7573<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7574 yyextra->fileName = &yytext[6];
7575 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7576 yyextra->docBlock << yytext;
7578<DocBlock>{CMD}"iline"{LINENR}{B} {
7583 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7587 yyextra->yyLineNr = nr;
7589 yyextra->docBlock << yytext;
7591<DocBlock>{B}*"<"{PRE}">" {
7592 yyextra->docBlock << yytext;
7594 BEGIN(DocCopyBlock);
7596<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7597 yyextra->docBlock << yytext;
7599 BEGIN(DocCopyBlock);
7601<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7602 yyextra->docBlock << yytext;
7604 BEGIN(DocCopyBlock);
7606<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7607 yyextra->docBlock << yytext;
7609 BEGIN(DocCopyBlock);
7611<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7613 yyextra->docBlock <<
"\\ilinebr ";
7614 yyextra->docBlock << pat;
7616 BEGIN(DocCopyBlock);
7618<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7620 yyextra->docBlock << pat;
7622 BEGIN(DocCopyBlock);
7624<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7625<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7626<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7628 yyextra->docBlock <<
"\\ilinebr ";
7629 yyextra->docBlock << pat;
7631 BEGIN(DocCopyBlock);
7633<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7634<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7635<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7637 yyextra->docBlock << pat;
7639 BEGIN(DocCopyBlock);
7642 yyextra->docBlock <<
"```";
7645 yyextra->docBlock << yytext;
7648 yyextra->docBlock << yytext;
7650 BEGIN(DocCopyBlock);
7652<DocBlock>{B}*"<"{CODE}">" {
7653 if (yyextra->insideCS)
7655 yyextra->docBlock << yytext;
7657 BEGIN(DocCopyBlock);
7664<DocBlock>[^@*~`'\/\\\n]+ {
7665 yyextra->docBlock << yytext;
7669 yyextra->docBlock << *yytext;
7672 yyextra->docBlock << *yytext;
7677<DocCopyBlock>"</"{PRE}">" {
7682 yyextra->docBlock << yytext;
7684<DocCopyBlock>"</"{CODE}">" {
7689 yyextra->docBlock << yytext;
7691<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7696 yyextra->docBlock << yytext;
7698<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7703 yyextra->docBlock << yytext;
7705<DocCopyBlock>^{B}*"*"+/{BN}+ {
7706 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7714 yyextra->docBlock << indent;
7717<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7718 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7722 yyextra->docBlock << indent;
7729<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7730 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7734 yyextra->docBlock << indent+
"*";
7741<DocCopyBlock>^{B}*"*"+/{BN}* {
7742 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7745 if (yyextra->nestedComment>0)
7748 yyextra->docBlock << indent+
"*";
7753 yyextra->docBlock << indent;
7761<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7767 yyextra->docBlock << pat;
7769<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7775 yyextra->docBlock << pat;
7777<DocCopyBlock>"```" {
7778 if (yyextra->docBlockName==
"``")
7780 yyextra->docBlock <<
"`";
7782 yyextra->docBlock <<
"``";
7787 yyextra->docBlock << yytext;
7790<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7795 yyextra->docBlock << yytext;
7797<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7802 yyextra->docBlock << yytext;
7804<DocCopyBlock>"`"{1,2} {
7809 yyextra->docBlock << yytext;
7811<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7812 yyextra->docBlock << yytext;
7815 yyextra->docBlock << yytext;
7816 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7820 yyextra->lastStringContext=YY_START;
7821 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7822 yyextra->stopAtInvalidString=
true;
7826<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7829 yyextra->nestedComment++;
7831 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7833 yyextra->nestedComment--;
7835 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7837 warn(yyextra->fileName,yyextra->yyLineNr,
7838 "Found end of C comment inside a '{}' block without matching start of the comment!"
7839 " Maybe the end marker for the block is missing?",
7840 yyextra->docBlockName);
7843 yyextra->docBlock << yytext;
7846 yyextra->docBlock << *yytext;
7850 yyextra->docBlock << *yytext;
7852<DocCopyBlock><<EOF>> {
7853 warn(yyextra->fileName,yyextra->yyLineNr,
7854 "reached end of file while inside a '{}' block!"
7855 " The command that should end the block seems to be missing!",
7856 yyextra->docBlockName);
7863<Prototype>"operator"{B}*"("{B}*")" {
7864 yyextra->current->name+=yytext;
7867 yyextra->current->args+=*yytext;
7868 yyextra->currentArgumentContext = PrototypeQual;
7869 yyextra->fullArgString = yyextra->current->args;
7870 yyextra->copyArgString = &yyextra->current->args;
7871 BEGIN( ReadFuncArgType ) ;
7873<Prototype>"("({ID}"::")*({B}*[&*])+ {
7874 if (yyextra->insidePHP)
7880 yyextra->current->type+=yyextra->current->name+yytext;
7881 yyextra->current->name.clear();
7882 BEGIN( PrototypePtr );
7885<PrototypePtr>{SCOPENAME} {
7886 yyextra->current->name+=yytext;
7889 yyextra->current->args+=*yytext;
7890 yyextra->currentArgumentContext = PrototypeQual;
7891 yyextra->fullArgString = yyextra->current->args;
7892 yyextra->copyArgString = &yyextra->current->args;
7893 BEGIN( ReadFuncArgType ) ;
7896 yyextra->current->type+=
')';
7900 yyextra->current->name+=yytext;
7903 BEGIN( PrototypeSkipLine);
7905<PrototypeQual>{B}*"const"{B}* {
7906 yyextra->current->args +=
" const ";
7907 yyextra->current->argList.setConstSpecifier(
true);
7909<PrototypeQual>{B}*"volatile"{B}* {
7910 yyextra->current->args +=
" volatile ";
7911 yyextra->current->argList.setVolatileSpecifier(
true);
7913<PrototypeQual>{B}*"="{B}*"0"{B}* {
7914 yyextra->current->args +=
" = 0";
7915 yyextra->current->virt = Specifier::Pure;
7916 yyextra->current->argList.setPureSpecifier(
true);
7918<PrototypeQual>"throw"{B}*"(" {
7919 yyextra->current->exception =
"throw(";
7920 BEGIN(PrototypeExc);
7923 yyextra->current->exception +=
')';
7924 BEGIN(PrototypeQual);
7927 yyextra->current->exception += *yytext;
7930 yyextra->current->args += *yytext;
7933 yyextra->current->name += *yytext;
7935<PrototypeSkipLine>. {
7941<SkipCxxComment>.*"\\\n" {
7942 if (yyextra->insideCS)
7951<SkipCxxComment>{ANYopt}/\n {
7952 BEGIN( yyextra->lastCContext ) ;
7954<SkipComment>[^\*\n]+
7959 if (!yyextra->insideCpp) REJECT;
7960 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7961 yyextra->lastC11AttributeContext = YY_START;
7962 yyextra->pCopyC11AttributeString = &yyextra->current->attributes;
7963 BEGIN( CopyC11Attribute );
7968 if (yyextra->insideIDL && yyextra->insideCppQuote)
7972 else if (yyextra->insidePHP)
7974 yyextra->lastStringContext=YY_START;
7979 if (!yyextra->insidePHP)
7981 yyextra->lastCPPContext = YY_START;
7986 yyextra->lastCContext = YY_START ;
7987 BEGIN( SkipCxxComment ) ;
7991 if (!yyextra->insidePHP)
7993 yyextra->lastCContext = YY_START ;
7994 BEGIN( SkipCxxComment ) ;
7997 if (yyextra->insidePHP)
7999 yyextra->lastStringContext=YY_START;
8000 BEGIN(SkipPHPString);
8004 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
8006 if (yyextra->current->type.isEmpty())
8008 if (yyextra->current->name.isEmpty())
8009 yyextra->current->name=
"?";
8011 yyextra->current->name+=
"?";
8015 yyextra->current->type+=
"?";
8019<*>"}" { yyextra->exported=
false; }
8021<SkipComment>{CPPC}|{CCS}
8022<*>{CCS} { yyextra->lastCContext = YY_START ;
8023 BEGIN( SkipComment ) ;
8025<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8027 yyextra->lastCContext = YY_START ;
8028 BEGIN( SkipCxxComment ) ;
8031 if (yyextra->insideCS && yyextra->fakeNS)
8035 BEGIN ( ReadNSBody);
8047 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8049 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8051 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8061 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8062 yyextra->outerScopeEntries.clear();
8063 yyextra->baseName.clear();
8064 yyextra->protection = Protection::Public;
8065 yyextra->baseProt = Protection::Public;
8066 yyextra->sharpCount = 0;
8067 yyextra->roundCount = 0;
8068 yyextra->curlyCount = 0;
8069 yyextra->mtype = MethodTypes::Method;
8070 yyextra->isStatic =
false;
8071 yyextra->virt = Specifier::Normal;
8072 yyextra->baseVirt = Specifier::Normal;
8073 yyextra->isTypedef =
false;
8074 yyextra->insideTryBlock =
false;
8075 yyextra->insideFormula =
false;
8076 yyextra->insideCode=
false;
8078 yyextra->previous = 0;
8079 yyextra->firstTypedefEntry.reset();
8080 yyextra->memspecEntry.reset();
8085 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8086 if (yyextra->insideJava)
8088 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8090 yyextra->current->protection = yyextra->protection;
8091 yyextra->current->exported = yyextra->exported ;
8092 yyextra->current->mtype = yyextra->mtype;
8093 yyextra->current->virt = yyextra->virt;
8094 yyextra->current->isStatic = yyextra->isStatic;
8095 yyextra->current->lang = yyextra->language;
8097 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8098 yyextra->isTypedef=
false;
8106 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8107 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8109 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8115 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8118 for (p = yytext ; *p ; ++p )
8122 yyextra->yyLineNr++;
8128 yyextra->column+=tabSize - (yyextra->column%tabSize);
8141 int col=startIndent;
8147 if (c==
'\t') col+=tabSize-(col%tabSize);
8148 else if (c==
'\n') col=0;
8156 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8157 yyextra->current->
protection = yyextra->protection = prot;
8158 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8159 yyextra->current->type.clear();
8160 yyextra->current->name.clear();
8161 yyextra->current->args.clear();
8162 yyextra->current->argList.clear();
8168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8169 size_t tl=yyextra->current->type.length();
8170 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8172 yyextra->current->type +=
' ' ;
8174 yyextra->current->type += yyextra->current->name;
8175 yyextra->current->name.clear() ;
8176 tl=yyextra->current->type.length();
8177 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8179 yyextra->current->type +=
' ' ;
8181 yyextra->current->type += yyextra->current->args ;
8182 yyextra->current->args.clear() ;
8183 yyextra->current->argList.clear();
8190 if (s==
nullptr || *s==0)
return name;
8192 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8204 bool funcPtr = i>0 && type[i-1]==
')';
8206 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8207 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8208 return type.
left(i);
8214 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8217 yyextra->docBlock <<
"\\iskip";
8219 yyextra->docBlockName=blockName;
8220 yyextra->fencedSize=fencedSize;
8221 yyextra->isCodeBlock=codeBlock;
8222 yyextra->nestedComment=0;
8228 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8229 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8233 yyextra->docBlock <<
"\\endiskip";
8235 yyextra->docBlockName=
"";
8255 int i=name.
find(
"operator");
8256 if (i==-1)
return false;
8257 if (i==0 && !
isId(name.
at(8)))
return true;
8258 if (i>0 && !
isId(name.
at(i-1)) && !
isId(name.
at(i+8)))
return true;
8266 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8268 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8269 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8270 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8271 yyextra->insideD = yyextra->language==SrcLangExt::D;
8272 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8273 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8274 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8275 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8276 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8277 yyextra->language==SrcLangExt::Lex);
8288 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8289 if (yyextra->current_root->section.isScope())
8292 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8294 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8296 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8306 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8307 if (!yyextra->fileName.lower().endsWith(
".c"))
return false;
8308 if (yyextra->current->argList.empty())
return false;
8309 for (
const Argument &a : yyextra->current->argList)
8320 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8321 if (yyextra->insideJava)
8324 yyextra->current->protection = Protection::Public;
8325 if (text.
find(
"protected")!=-1)
8326 yyextra->current->protection = Protection::Protected;
8327 else if (text.
find(
"private")!=-1)
8328 yyextra->current->protection = Protection::Private;
8329 else if (text.
find(
"package")!=-1)
8330 yyextra->current->protection = Protection::Package;
8337 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8338 int si =
static_cast<int>(yyextra->current->args.length());
8339 if (yyextra->oldStyleArgType.isEmpty())
8341 std::string args = yyextra->current->args.str();
8342 static const reg::Ex re(R
"(\([^)]*\).*)");
8348 bi1=(int)match.position();
8349 size_t secondMatchStart = match.position()+match.length();
8352 bi2=(int)match.position();
8356 if (bi1!=-1 && bi2!=-1)
8359 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8361 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8362 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8364 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8365 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8366 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8371 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8374 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8375 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8377 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8378 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8384 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8387 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8391 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8392 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8405 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8408 oldStyleArgPtr=yyextra->current->args.
left(j);
8427 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8428 for (
Argument &a : yyextra->current->argList)
8437 a.
docs=brief+
"\n\n"+docs;
8469 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8472 yyextra->current->briefFile = yyextra->fileName;
8473 yyextra->current->briefLine = yyextra->yyLineNr;
8477 yyextra->current->docFile = yyextra->fileName;
8478 yyextra->current->docLine = yyextra->yyLineNr;
8486 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8487 if (yyextra->tempEntry==0)
8492 yyextra->previous = yyextra->current;
8493 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8497 yyextra->previous = yyextra->current;
8498 yyextra->current = yyextra->tempEntry;
8499 yyextra->tempEntry.reset();
8506 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8509 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8510 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8513 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8514 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8516 docEntry->inbodyFile = yyextra->fileName;
8517 docEntry->inbodyLine = lineNr;
8521 bool needsEntry=
false;
8523 Markdown markdown(yyextra->fileName,lineNr);
8526 while (yyextra->commentScanner.parseCommentBlock(
8527 yyextra->thisParser,
8528 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8532 yyextra->docBlockInBody ?
false : brief,
8533 yyextra->docBlockInBody ?
false : yyextra->docBlockAutoBrief,
8534 yyextra->docBlockInBody,
8535 yyextra->protection,
8546 QCString docFile = yyextra->current->docFile;
8548 yyextra->current->docFile = docFile;
8549 yyextra->current->docLine = lineNr;
8557 if (yyextra->docBlockTerm)
8559 unput(yyextra->docBlockTerm);
8560 yyextra->docBlockTerm=0;
8567 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8578 QCString orgDoc = yyextra->current->doc;
8579 QCString orgBrief = yyextra->current->brief;
8580 int orgDocLine = yyextra->current->docLine;
8581 int orgBriefLine = yyextra->current->briefLine;
8583 yyextra->current->doc.
clear();
8584 yyextra->current->brief.clear();
8587 int lineNr = orgDocLine;
8589 Markdown markdown(yyextra->fileName,lineNr);
8592 while (yyextra->commentScanner.parseCommentBlock(
8593 yyextra->thisParser,
8594 yyextra->current.get(),
8601 yyextra->protection,
8610 if (needsEntry)
newEntry(yyscanner);
8616 a.
docs = yyextra->current->doc;
8619 yyextra->current->doc = orgDoc;
8620 yyextra->current->brief = orgBrief;
8621 yyextra->current->docLine = orgDocLine;
8622 yyextra->current->briefLine = orgBriefLine;
8633 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8634 for (
const auto &ce : rt->children())
8636 if (!ce->program.empty())
8640 yyextra->padCount=0;
8642 yyextra->programStr = ce->program.str();
8643 yyextra->inputString = yyextra->programStr.data();
8644 yyextra->inputPosition = 0;
8645 if (ce->section.isEnum() || ce->spec.isEnum())
8646 BEGIN( FindFields ) ;
8648 BEGIN( FindMembers ) ;
8649 yyextra->current_root = ce;
8650 yyextra->fileName = ce->fileName;
8652 yyextra->yyLineNr = ce->bodyLine;
8653 yyextra->yyColNr = ce->bodyColumn;
8654 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8656 yyextra->current = std::make_shared<Entry>();
8657 yyextra->isStatic =
false;
8662 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8664 ce->groups = rt->groups;
8667 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8669 if ( ce->section.isClass() )
8671 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8673 yyextra->current->protection = yyextra->protection = Protection::Public ;
8675 else if (yyextra->insideJava)
8677 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8679 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8681 if (ce->lang==SrcLangExt::ObjC)
8683 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8687 yyextra->current->protection = yyextra->protection = Protection::Public ;
8692 yyextra->current->protection = yyextra->protection = Protection::Private ;
8695 else if (ce->section.isEnum() )
8697 yyextra->current->protection = yyextra->protection = ce->protection;
8699 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8701 if (ce->section.isNamespace() )
8703 yyextra->current->isStatic = yyextra->isStatic =
true;
8705 yyextra->current->protection = yyextra->protection = ce->protection;
8706 yyextra->current->exported = yyextra->exported =
false;
8708 else if (ce->section.isNamespace() )
8710 yyextra->current->protection = yyextra->protection = Protection::Public ;
8711 yyextra->current->exported = yyextra->exported = ce->exported;
8715 yyextra->current->protection = yyextra->protection = Protection::Public ;
8716 yyextra->current->exported = yyextra->exported =
false;
8718 yyextra->mtype = MethodTypes::Method;
8719 yyextra->virt = Specifier::Normal;
8726 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8728 scannerYYlex(yyscanner);
8731 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8733 yyextra->programStr.clear();
8734 ce->program.str(std::string());
8748 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8749 for (
const auto &ce : rt->children())
8751 if (ce->section.isConcept())
8755 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8757 yyextra->padCount =0;
8759 yyextra->programStr = ce->initializer.str();
8760 yyextra->inputString = yyextra->programStr.data();
8761 yyextra->inputPosition = 0;
8762 yyextra->current_root = ce;
8763 yyextra->fileName = ce->fileName;
8764 yyextra->yyLineNr = ce->bodyLine;
8765 yyextra->yyColNr = ce->bodyColumn;
8766 yyextra->insideObjC =
false;
8767 yyextra->current = std::make_shared<Entry>();
8771 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8773 if (!ce->args.isEmpty())
8775 templArgs=indent+
"template"+ce->args+
"\n";
8777 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8779 yyextra->isStatic =
false;
8781 yyextra->current->section = EntryType::makeConceptCodePart();
8782 yyextra->current->startLine = yyextra->yyLineNr;
8783 BEGIN( FindConceptParts );
8784 scannerYYlex(yyscanner);
8785 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8796 const char *fileBuf,
8797 const std::shared_ptr<Entry> &rt,
8801 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8804 yyextra->inputString = fileBuf;
8805 yyextra->inputPosition = 0;
8806 yyextra->column = 0;
8807 scannerYYrestart(
nullptr,yyscanner);
8810 yyextra->protection = Protection::Public;
8811 yyextra->mtype = MethodTypes::Method;
8812 yyextra->isStatic =
false;
8813 yyextra->exported =
false;
8814 yyextra->virt = Specifier::Normal;
8815 yyextra->current_root = rt;
8816 yyextra->yyLineNr = 1 ;
8817 yyextra->yyBegLineNr = 1;
8818 yyextra->yyBegColNr = 0;
8819 yyextra->anonCount = 0;
8820 yyextra->anonNSCount = 0;
8821 yyextra->fileName = fileName;
8822 yyextra->clangParser = clangParser;
8824 rt->lang = yyextra->language;
8825 msg(
"Parsing file {}...\n",yyextra->fileName);
8827 yyextra->current_root = rt;
8829 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8830 yyextra->current = std::make_shared<Entry>();
8835 yyextra->current->name = yyextra->fileName;
8836 yyextra->current->section = sec;
8837 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8839 yyextra->current->reset();
8841 if ( yyextra->insidePHP )
8843 BEGIN( FindMembersPHP );
8845 else if ( yyextra->insideJava )
8847 yyextra->current->name=
"java::lang";
8848 yyextra->current->fileName = yyextra->fileName;
8849 yyextra->current->section = EntryType::makeUsingDir();
8850 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8852 BEGIN( FindMembers );
8856 BEGIN( FindMembers );
8859 scannerYYlex(yyscanner);
8861 if (YY_START==Comment)
8863 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8867 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8869 yyextra->programStr.clear();
8870 rt->program.str(std::string());
8875 yyextra->anonNSCount++;
8878 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8881 parent->moveToSubEntryAndKeep(child);
8883 yyextra->outerScopeEntries.clear();
8892 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8895 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8898 if (!yyextra->current)
8903 const char *orgInputString;
8904 int orgInputPosition;
8905 YY_BUFFER_STATE orgState;
8908 orgState = YY_CURRENT_BUFFER;
8909 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8910 orgInputString = yyextra->inputString;
8911 orgInputPosition = yyextra->inputPosition;
8914 yyextra->inputString = text.
data();
8915 yyextra->inputPosition = 0;
8916 yyextra->column = 0;
8917 scannerYYrestart(
nullptr, yyscanner);
8919 scannerYYlex(yyscanner);
8921 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8922 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8924 yyextra->current->section = EntryType::makeVariableDoc();
8928 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8929 yy_switch_to_buffer(orgState, yyscanner);
8930 yyextra->inputString = orgInputString;
8931 yyextra->inputPosition = orgInputPosition;
8947 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8955 scannerYYlex_destroy(
p->yyscanner);
8959 const char *fileBuf,
8960 const std::shared_ptr<Entry> &root,
8964 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8965 yyextra->thisParser =
this;
8969 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8977 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8978 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8979 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8990#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)
#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.
QCString trunc(const QCString &s, size_t numChars=15)
const char * qPrint(const char *s)
static void newEntry(yyscan_t yyscanner)
static void parseCompounds(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, ClangTUParser *clangParser)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
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)