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;
static void addType(yyscan_t yyscanner)
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);
static void initEntry(yyscan_t yyscanner)
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())
int find(char c, int index=0, bool cs=TRUE) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
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);
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
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)
static void startCommentBlock(yyscan_t yyscanner, bool)
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>"]]" {
3647 BEGIN(yyextra->lastC11AttributeContext);
3653 *yyextra->pCopyRoundString += *yytext;
3654 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3655 yyextra->lastStringContext=YY_START;
3659 *yyextra->pCopyRoundString += *yytext;
3660 yyextra->roundCount++;
3663 *yyextra->pCopyRoundString += *yytext;
3664 if (--yyextra->roundCount<0)
3665 BEGIN(yyextra->lastRoundContext);
3669 *yyextra->pCopyRoundString += *yytext;
3672 if (yyextra->insidePHP)
3674 yyextra->current->initializer << yytext;
3675 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3676 yyextra->lastStringContext=YY_START;
3677 BEGIN(CopyPHPString);
3681 *yyextra->pCopyRoundString += yytext;
3684<CopyRound>{CHARLIT} {
3685 if (yyextra->insidePHP)
3691 *yyextra->pCopyRoundString+=yytext;
3694<CopyRound>[^"'()\n,]+ {
3695 *yyextra->pCopyRoundString+=yytext;
3698 *yyextra->pCopyRoundString+=*yytext;
3703 *yyextra->pCopySharpString += *yytext;
3704 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3705 yyextra->lastStringContext=YY_START;
3709 *yyextra->pCopySharpString += *yytext;
3710 yyextra->sharpCount++;
3713 *yyextra->pCopySharpString += *yytext;
3714 if (--yyextra->sharpCount<0)
3716 BEGIN(yyextra->lastSharpContext);
3721 *yyextra->pCopySharpString += *yytext;
3724 if (yyextra->insidePHP)
3726 yyextra->current->initializer << yytext;
3727 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3728 yyextra->lastStringContext=YY_START;
3729 BEGIN(CopyPHPString);
3733 *yyextra->pCopySharpString += yytext;
3736<CopySharp>{CHARLIT} {
3737 if (yyextra->insidePHP)
3743 *yyextra->pCopySharpString+=yytext;
3746<CopySharp>[^"'<>\n,]+ {
3747 *yyextra->pCopySharpString+=yytext;
3750 *yyextra->pCopySharpString+=*yytext;
3756 *yyextra->pCopyRoundGString << *yytext;
3757 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3758 yyextra->lastStringContext=YY_START;
3762 *yyextra->pCopyRoundGString << *yytext;
3763 yyextra->roundCount++;
3766 *yyextra->pCopyRoundGString << *yytext;
3767 if (--yyextra->roundCount<0)
3768 BEGIN(yyextra->lastRoundContext);
3772 *yyextra->pCopyRoundGString << *yytext;
3775 if (yyextra->insidePHP)
3777 yyextra->current->initializer << yytext;
3778 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3779 yyextra->lastStringContext=YY_START;
3780 BEGIN(CopyPHPGString);
3784 *yyextra->pCopyRoundGString << yytext;
3787<GCopyRound>{CHARLIT} {
3788 if (yyextra->insidePHP)
3794 *yyextra->pCopyRoundGString << yytext;
3798 if (!yyextra->insideCS) REJECT;
3799 *yyextra->pCopyRoundGString << yytext;
3800 yyextra->lastSkipVerbStringContext=YY_START;
3801 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3802 BEGIN(SkipVerbString);
3804<GCopyRound>[^"'()\n\/,R]+ {
3805 *yyextra->pCopyRoundGString << yytext;
3807<GCopyRound>{RAWBEGIN} {
3808 *yyextra->pCopyRoundGString << yytext;
3810 yyextra->lastRawStringContext = YY_START;
3811 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3815 *yyextra->pCopyRoundGString << *yytext;
3820 *yyextra->pCopySquareGString << *yytext;
3821 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3822 yyextra->lastStringContext=YY_START;
3826 *yyextra->pCopySquareGString << *yytext;
3827 if (yyextra->insidePHP)
3829 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3830 yyextra->lastStringContext=YY_START;
3831 BEGIN(CopyPHPGString);
3835 *yyextra->pCopySquareGString << *yytext;
3836 yyextra->squareCount++;
3839 *yyextra->pCopySquareGString << *yytext;
3840 if (--yyextra->squareCount<0)
3841 BEGIN(yyextra->lastSquareContext);
3845 *yyextra->pCopySquareGString << *yytext;
3848 if (yyextra->insidePHP)
3850 yyextra->current->initializer << yytext;
3851 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3852 yyextra->lastStringContext=YY_START;
3853 BEGIN(CopyPHPGString);
3857 *yyextra->pCopySquareGString << yytext;
3860<GCopySquare>{CHARLIT} {
3861 if (yyextra->insidePHP)
3867 *yyextra->pCopySquareGString << yytext;
3870<GCopySquare>[^"'\[\]\n\/,]+ {
3871 *yyextra->pCopySquareGString << yytext;
3874 *yyextra->pCopySquareGString << *yytext;
3879 *yyextra->pCopyCurlyString += *yytext;
3880 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3881 yyextra->lastStringContext=YY_START;
3882 yyextra->keepComment=
false;
3886 *yyextra->pCopyCurlyString += *yytext;
3887 if (yyextra->insidePHP)
3889 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3890 yyextra->lastStringContext=YY_START;
3891 yyextra->keepComment=
false;
3892 BEGIN(CopyPHPString);
3896 *yyextra->pCopyCurlyString += *yytext;
3897 yyextra->curlyCount++;
3900 *yyextra->pCopyCurlyString += *yytext;
3901 if (--yyextra->curlyCount<0)
3903 yyextra->keepComment=
false;
3904 BEGIN(yyextra->lastCurlyContext);
3907<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3913 *yyextra->pCopyCurlyString += yytext;
3916<CopyCurly>[^"'{}\/\n,]+ {
3917 *yyextra->pCopyCurlyString += yytext;
3919<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3922 *yyextra->pCopyCurlyString += *yytext;
3925 *yyextra->pCopyCurlyString += *yytext;
3927<CopyCurly>{CPPC}[^\n]* {
3928 if (yyextra->keepComment)
3930 *yyextra->pCopyCurlyString += yytext;
3938 if (yyextra->keepComment)
3940 *yyextra->pCopyCurlyString += yytext;
3949 *yyextra->pCopyCurlyString += yytext;
3954 *yyextra->pCopyCurlyString += *yytext;
3957 *yyextra->pCopyCurlyString += *yytext;
3959<CopyComment><<EOF>> {
3960 warn(yyextra->fileName,yyextra->yyLineNr,
3961 "reached end of file while inside a C style comment block!");
3966<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3968<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3970 int s = line.
find(
' ');
3971 int e = line.
find(
'"',s);
3972 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3973 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3980 *yyextra->pCopyCurlyGString << *yytext;
3981 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3982 yyextra->lastStringContext=YY_START;
3983 yyextra->keepComment =
false;
3987 *yyextra->pCopyCurlyGString << *yytext;
3988 if (yyextra->insidePHP)
3990 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3991 yyextra->lastStringContext=YY_START;
3992 yyextra->keepComment =
false;
3993 BEGIN(CopyPHPGString);
3997 *yyextra->pCopyCurlyGString << *yytext;
3998 yyextra->curlyCount++;
4001 *yyextra->pCopyCurlyGString << *yytext;
4002 if (--yyextra->curlyCount<0)
4004 yyextra->current->endBodyLine = yyextra->yyLineNr;
4005 yyextra->keepComment =
false;
4006 BEGIN(yyextra->lastCurlyContext);
4009<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
4015 *yyextra->pCopyCurlyGString << yytext;
4018<GCopyCurly>[^"'{}\/\n,]+ {
4019 *yyextra->pCopyCurlyGString << yytext;
4022 *yyextra->pCopyCurlyGString << yytext;
4024<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
4027 *yyextra->pCopyCurlyGString << *yytext;
4030 *yyextra->pCopyCurlyGString << *yytext;
4032<GCopyCurly>{CPPC}[^\n]* {
4033 if (yyextra->keepComment)
4035 *yyextra->pCopyCurlyGString << yytext;
4043 if (yyextra->keepComment)
4045 *yyextra->pCopyCurlyGString << yytext;
4046 BEGIN(GCopyComment);
4053<GCopyComment>{CCE} {
4054 *yyextra->pCopyCurlyGString << yytext;
4059 *yyextra->pCopyCurlyGString << *yytext;
4062 *yyextra->pCopyCurlyGString << *yytext;
4064<GCopyComment><<EOF>> {
4065 warn(yyextra->fileName,yyextra->yyLineNr,
4066 "reached end of file while inside a C style comment block!");
4074 if (yyextra->current->type.isEmpty() &&
4075 yyextra->current->name==
"enum")
4077 yyextra->current->section = EntryType::makeEnum();
4078 yyextra->current->name.clear();
4079 yyextra->current->args.clear();
4080 BEGIN(EnumBaseType);
4084 if (yyextra->current->type.isEmpty())
4087 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4090 yyextra->current->bitfields+=
":";
4094 yyextra->current->bitfields+=*yytext;
4097 yyextra->current->args+=*yytext;
4101 yyextra->current->args+=
' ';
4104 QCString oldType = yyextra->current->type;
4105 if (yyextra->current->bodyLine==-1)
4107 yyextra->current->bodyLine = yyextra->yyLineNr;
4108 yyextra->current->bodyColumn = yyextra->yyColNr;
4110 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4112 yyextra->current->type = yyextra->current->type.mid(3);
4114 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4116 yyextra->current->type.prepend(
"typedef ");
4118 bool isStatic = yyextra->current->isStatic;
4119 Protection prot = yyextra->current->protection;
4120 bool isConcept = yyextra->current->section.isConcept();
4121 bool isModule = yyextra->current->section.isModuleDoc();
4124 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4129 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4132 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4134 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4136 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4137 if (yyextra->current->section.isClass())
4141 yyextra->current->section = EntryType::makeVariable() ;
4142 yyextra->current->fileName = yyextra->fileName;
4143 yyextra->current->startLine = yyextra->yyBegLineNr;
4144 yyextra->current->startColumn = yyextra->yyBegColNr;
4145 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4148 if ( *yytext ==
',')
4150 yyextra->current->isStatic = isStatic;
4151 yyextra->current->protection = prot;
4152 yyextra->current->name.clear();
4153 yyextra->current->args.clear();
4154 yyextra->current->brief.clear();
4155 yyextra->current->doc.clear();
4156 yyextra->current->initializer.str(std::string());
4157 yyextra->current->bitfields.clear();
4162 yyextra->mtype = MethodTypes::Method;
4163 yyextra->virt = Specifier::Normal;
4164 yyextra->current->bodyLine = -1;
4165 yyextra->current->bodyColumn = 1;
4166 yyextra->current->groups.clear();
4172 if (yyextra->insideSlice)
4174 yyextra->squareCount=1;
4175 yyextra->lastSquareContext = YY_START;
4176 yyextra->current->metaData +=
"[";
4177 BEGIN( SliceMetadata );
4179 else if (!yyextra->insideCS &&
4180 (yyextra->current->name.isEmpty() ||
4181 yyextra->current->name==
"typedef"
4185 yyextra->squareCount=1;
4186 yyextra->lastSquareContext = YY_START;
4187 yyextra->idlAttr.clear();
4188 yyextra->idlProp.clear();
4189 yyextra->current->mtype = yyextra->mtype;
4192 yyextra->current->mtype == MethodTypes::Property)
4194 yyextra->odlProp =
true;
4195 yyextra->current->spec.setGettable(
true).setSettable(
true);
4198 BEGIN( IDLAttribute );
4200 else if (yyextra->insideCS &&
4201 yyextra->current->name.isEmpty())
4203 yyextra->squareCount=1;
4204 yyextra->lastSquareContext = YY_START;
4207 yyextra->current->args.clear();
4208 BEGIN( SkipSquare );
4212 yyextra->current->args += yytext ;
4213 yyextra->squareCount=1;
4214 yyextra->externLinkage=
FALSE;
4219 yyextra->squareCount++;
4220 yyextra->current->metaData +=
"[";
4222<SliceMetadata>{BN}* {
4225<SliceMetadata>\"[^\"]*\" {
4226 yyextra->current->metaData += yytext;
4229 yyextra->current->metaData += yytext;
4232 yyextra->current->metaData += yytext;
4233 if (--yyextra->squareCount<=0)
4235 BEGIN (yyextra->lastSquareContext);
4239 yyextra->current->type +=
"(";
4240 yyextra->roundCount++;
4242<SliceOptional>[0-9]+ {
4243 yyextra->current->type += yytext;
4246 yyextra->current->type +=
")";
4247 if(--yyextra->roundCount<=0)
4249 BEGIN (yyextra->lastModifierContext);
4254 if (--yyextra->squareCount<=0)
4257 if (yyextra->current->mtype == MethodTypes::Property)
4258 BEGIN( IDLPropName );
4260 BEGIN( yyextra->lastSquareContext );
4263<IDLAttribute>"propput" {
4266 yyextra->current->mtype = MethodTypes::Property;
4268 yyextra->current->spec.setSettable(
true);
4270<IDLAttribute>"propget" {
4273 yyextra->current->mtype = MethodTypes::Property;
4275 yyextra->current->spec.setGettable(
true);
4277<IDLAttribute>"property" {
4278 yyextra->current->spec.setProperty(
true);
4280<IDLAttribute>"attribute" {
4281 yyextra->current->spec.setAttribute(
true);
4283<IDLAttribute>"optional" {
4284 yyextra->current->spec.setOptional(
true);
4286<IDLAttribute>"readonly" {
4289 yyextra->current->spec.setSettable(
false);
4293 yyextra->current->spec.setReadonly(
true);
4296<IDLAttribute>"bound" {
4297 yyextra->current->spec.setBound(
true);
4299<IDLAttribute>"removable" {
4300 yyextra->current->spec.setRemovable(
true);
4302<IDLAttribute>"constrained" {
4303 yyextra->current->spec.setConstrained(
true);
4305<IDLAttribute>"transient" {
4306 yyextra->current->spec.setTransient(
true);
4308<IDLAttribute>"maybevoid" {
4309 yyextra->current->spec.setMaybeVoid(
true);
4311<IDLAttribute>"maybedefault" {
4312 yyextra->current->spec.setMaybeDefault(
true);
4314<IDLAttribute>"maybeambiguous" {
4315 yyextra->current->spec.setMaybeAmbiguous(
true);
4319<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4322 if (yyextra->odlProp)
4324 yyextra->idlProp = yytext;
4327<IDLPropName>{ID}{BN}*"(" {
4328 yyextra->current->name = yytext;
4329 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4330 yyextra->current->startLine = yyextra->yyLineNr;
4331 yyextra->current->startColumn = yyextra->yyColNr;
4334<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4335 if (yyextra->odlProp)
4337 yyextra->idlProp += yytext;
4340<IDLPropName>{ID}{BNopt}/";" {
4341 if (yyextra->odlProp)
4343 yyextra->current->name = yytext;
4344 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4345 yyextra->odlProp =
false;
4350<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4351 yyextra->idlAttr = yytext;
4352 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4355 yyextra->idlProp = yytext;
4357<IDLProp>{BN}*{ID}{BN}*"," {
4358 if (yyextra->current->args.isEmpty())
4359 yyextra->current->args =
"(";
4361 yyextra->current->args +=
", ";
4362 yyextra->current->args += yyextra->idlAttr;
4363 yyextra->current->args +=
" ";
4364 yyextra->current->args += yyextra->idlProp;
4365 yyextra->current->args +=
" ";
4366 yyextra->current->args += yytext;
4367 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4368 yyextra->idlProp.clear();
4369 yyextra->idlAttr.clear();
4372<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4376 yyextra->current->fileName = yyextra->fileName;
4377 yyextra->current->type = yyextra->idlProp;
4378 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4379 if (!yyextra->current->args.isEmpty())
4380 yyextra->current->args +=
")";
4381 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4382 yyextra->current->section = EntryType::makeVariable();
4383 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4385 BEGIN( FindMembers );
4390<Array>"]" { yyextra->current->args += *yytext ;
4391 if (--yyextra->squareCount<=0)
4392 BEGIN( FindMembers ) ;
4394<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4395 if (--yyextra->squareCount<=0)
4396 BEGIN( SFunction ) ;
4398<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4399 yyextra->squareCount++;
4401<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4402<SkipSquare>"[" { yyextra->squareCount++; }
4404 if (--yyextra->squareCount<=0)
4405 BEGIN( yyextra->lastSquareContext );
4408 yyextra->lastStringContext=YY_START;
4409 BEGIN( SkipString );
4411<SkipSquare>[^\n\[\]\"]+
4412<FindMembers>"<" {
addType(yyscanner);
4413 yyextra->current->type += yytext ;
4416<Sharp>">" { yyextra->current->type += *yytext ;
4417 if (--yyextra->sharpCount<=0)
4418 BEGIN( FindMembers ) ;
4420<Sharp>"<" { yyextra->current->type += *yytext ;
4421 yyextra->sharpCount++;
4424 yyextra->current->type +=
' ';
4427<Sharp>. { yyextra->current->type += *yytext ; }
4430 yyextra->current->bodyLine = yyextra->yyLineNr;
4431 yyextra->current->bodyColumn = yyextra->yyColNr;
4432 yyextra->current->name = yytext;
4437 yyextra->lastInitializerContext = YY_START;
4438 yyextra->sharpCount=0;
4439 yyextra->initBracketCount=0;
4440 yyextra->current->initializer.str(
"=");
4441 BEGIN(ReadInitializer);
4444 yyextra->lastInitializerContext = YY_START;
4445 yyextra->sharpCount=0;
4446 yyextra->initBracketCount=0;
4447 yyextra->current->initializer.str(yytext);
4448 BEGIN(ReadInitializer);
4451 if (yyextra->insideJava)
4453 if (!yyextra->current->name.isEmpty())
4455 yyextra->current->fileName = yyextra->fileName;
4456 yyextra->current->startLine = yyextra->yyLineNr;
4457 yyextra->current->startColumn = yyextra->yyColNr;
4458 if (!yyextra->current_root->spec.isEnum())
4460 yyextra->current->type =
"@";
4462 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4463 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4464 yyextra->current->section = EntryType::makeVariable();
4465 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4469 BEGIN( FindMembers );
4480 if (!yyextra->current->name.isEmpty())
4482 yyextra->current->fileName = yyextra->fileName;
4483 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4485 yyextra->current->startLine = yyextra->current->bodyLine;
4486 yyextra->current->startColumn = yyextra->current->bodyColumn;
4490 yyextra->current->startLine = yyextra->yyLineNr;
4491 yyextra->current->startColumn = yyextra->yyColNr;
4493 if (!yyextra->current_root->spec.isEnum())
4495 yyextra->current->type =
"@";
4497 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4498 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4499 yyextra->current->section = EntryType::makeVariable();
4501 if (!yyextra->insideCS && !yyextra->insideJava &&
4502 !yyextra->current_root->spec.isStrong())
4509 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4511 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4516 yyextra->current->reset();
4521 yyextra->squareCount=1;
4522 yyextra->lastSquareContext = YY_START;
4525<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4526<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4527<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4530 yyextra->current->program << yytext ;
4533<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4534 yyextra->current->program << yytext ;
4535 yyextra->pSkipInterpString = &yyextra->current->program;
4536 yyextra->lastSkipInterpStringContext=YY_START;
4537 yyextra->strCurlyCount = 0;
4538 BEGIN( SkipInterpString );
4540<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})* {
4541 *yyextra->pSkipInterpString << yytext;
4543<SkipInterpString>"{" {
4544 *yyextra->pSkipInterpString << *yytext;
4545 yyextra->strCurlyCount++;
4547<SkipInterpString>"}" {
4548 *yyextra->pSkipInterpString << *yytext;
4549 yyextra->strCurlyCount--;
4551<SkipInterpString>\" {
4552 *yyextra->pSkipInterpString << *yytext;
4553 if (yyextra->strCurlyCount==0)
4555 BEGIN( yyextra->lastSkipInterpStringContext );
4558<SkipInterpString>. {
4559 *yyextra->pSkipInterpString << *yytext;
4562<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4563 yyextra->current->program << yytext ;
4564 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4565 yyextra->lastSkipInterpVerbStringContext=YY_START;
4566 yyextra->strCurlyCount = 0;
4567 BEGIN( SkipInterpVerbString );
4569<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4570 *yyextra->pSkipInterpVerbString << yytext;
4572<SkipInterpVerbString>"{" {
4573 *yyextra->pSkipInterpVerbString << *yytext;
4574 yyextra->strCurlyCount++;
4576<SkipInterpVerbString>"}" {
4577 *yyextra->pSkipInterpVerbString << *yytext;
4578 yyextra->strCurlyCount--;
4580<SkipInterpVerbString>\" {
4581 *yyextra->pSkipInterpVerbString << *yytext;
4582 if (yyextra->strCurlyCount==0)
4584 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4587<SkipInterpVerbString>. {
4588 *yyextra->pSkipInterpVerbString << *yytext;
4590<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4591<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4592 yyextra->pSkipVerbString = &yyextra->current->program;
4593 yyextra->lastSkipVerbStringContext=YY_START;
4594 BEGIN( SkipVerbString );
4596<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4598 yyextra->current->program << yytext ;
4599 yyextra->pCopyHereDocGString = &yyextra->current->program;
4600 yyextra->lastHereDocContext=YY_START;
4601 BEGIN( CopyHereDoc );
4608<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4609 yyextra->current->program << yytext;
4611 yyextra->lastRawStringContext = YY_START;
4612 yyextra->pCopyRawGString = &yyextra->current->program;
4615<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4616 yyextra->pCopyQuotedGString = &yyextra->current->program;
4617 yyextra->lastStringContext=YY_START;
4618 yyextra->stopAtInvalidString=
false;
4619 BEGIN( CopyGString );
4621<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4622<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4623 yyextra->lastContext = YY_START ;
4626<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4627 ++yyextra->yyLineNr ;
4628 yyextra->lastContext = YY_START ;
4631<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4632 if (!yyextra->insidePHP)
4634 yyextra->current->program << yytext;
4638 yyextra->current->program << yytext;
4639 yyextra->pCopyQuotedGString = &yyextra->current->program;
4640 yyextra->lastStringContext=YY_START;
4641 BEGIN(CopyPHPGString);
4644<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4645 if (yyextra->insidePHP)
4652 yyextra->current->program << yytext;
4655<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4656 ++yyextra->curlyCount ;
4659 yyextra->current->program << yytext ;
4660 --yyextra->curlyCount ;
4662<ReadBody,ReadNSBody>"}" {
4663 if ( yyextra->curlyCount>0 )
4665 yyextra->current->program << yytext ;
4666 --yyextra->curlyCount ;
4670 yyextra->current->endBodyLine = yyextra->yyLineNr;
4671 std::shared_ptr<Entry> original_root = yyextra->current_root;
4672 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4677 QCString doc = yyextra->current->doc;
4678 int docLine = yyextra->current->docLine;
4679 QCString docFile = yyextra->current->docFile;
4680 QCString brief = yyextra->current->brief;
4681 int briefLine = yyextra->current->briefLine;
4682 QCString briefFile = yyextra->current->briefFile;
4683 auto groups = yyextra->current->groups;
4684 auto anchors = yyextra->current->anchors;
4685 auto sli = yyextra->current->sli;
4686 auto rqli = yyextra->current->rqli;
4688 yyextra->current->doc =
"";
4689 yyextra->current->docLine = 0;
4690 yyextra->current->docFile =
"";
4691 yyextra->current->brief =
"";
4692 yyextra->current->briefLine = 0;
4693 yyextra->current->briefFile =
"";
4694 yyextra->current->groups.
clear();
4695 yyextra->current->anchors.clear();
4696 yyextra->current->sli.clear();
4697 yyextra->current->rqli.clear();
4698 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4700 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4701 yyextra->current->program.str(std::string());
4702 new_current->name = yyextra->current->name.mid(split_point + 2);
4703 yyextra->current->name = yyextra->current->name.left(split_point);
4704 if (yyextra->current->name.startsWith(
"inline "))
4706 yyextra->current->name = yyextra->current->name.mid(7);
4707 yyextra->current->spec.setInline(
true);
4709 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4711 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4712 yyextra->current_root = yyextra->current;
4713 yyextra->current = new_current;
4716 yyextra->current->doc = doc;
4717 yyextra->current->docLine = docLine;
4718 yyextra->current->docFile = docFile;
4719 yyextra->current->brief = brief;
4720 yyextra->current->briefLine = briefLine;
4721 yyextra->current->briefFile = briefFile;
4722 yyextra->current->groups = groups;
4723 yyextra->current->anchors = anchors;
4724 yyextra->current->sli = sli;
4725 yyextra->current->rqli = rqli;
4727 QCString &cn = yyextra->current->name;
4731 yyextra->current->spec.setInline(
true);
4733 QCString rn = yyextra->current_root->name;
4739 if (yyextra->isTypedef && cn.
isEmpty())
4742 BEGIN( TypedefName );
4746 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4748 yyextra->current->program <<
',';
4753 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4754 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4756 if (yyextra->insideObjC &&
4757 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4760 BEGIN( ReadBodyIntf ) ;
4764 yyextra->memspecEntry = yyextra->current;
4765 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4766 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4767 if (yyextra->current->section.isNamespace() ||
4768 yyextra->current->spec.isInterface() ||
4769 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4770 yyextra->insideSlice
4773 yyextra->current->reset();
4774 yyextra->current_root = std::move(original_root);
4776 yyextra->memspecEntry.reset();
4777 BEGIN( FindMembers ) ;
4782 yyextra->current->doc.clear();
4783 yyextra->current->brief.clear();
4784 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4790<ReadBody>"}"{BN}+"typedef"{BN}+ {
4792 if ( yyextra->curlyCount>0 )
4794 yyextra->current->program << yytext ;
4795 --yyextra->curlyCount ;
4799 yyextra->isTypedef =
TRUE;
4800 yyextra->current->endBodyLine = yyextra->yyLineNr;
4801 QCString &cn = yyextra->current->name;
4802 QCString rn = yyextra->current_root->name;
4807 BEGIN( TypedefName );
4810<TypedefName>("const"|"volatile"){BN} {
4812 yyextra->current->type.prepend(yytext);
4815 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4817 yyextra->current->program <<
",";
4819 yyextra->current->name=yytext;
4821 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4822 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4824 if (!yyextra->firstTypedefEntry)
4826 yyextra->firstTypedefEntry = yyextra->current;
4828 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4830 yyextra->isTypedef=
TRUE;
4831 BEGIN(MemberSpecSkip);
4835 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4837 yyextra->current->program <<
',';
4840 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4841 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4842 yyextra->memspecEntry = yyextra->current;
4843 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4846 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4848<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4850 int i=0,l=(int)yyleng,j;
4851 while (i<l && (!
isId(yytext[i]))) i++;
4853 j=yyextra->msName.
find(
"[");
4856 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4857 yyextra->msName=yyextra->msName.left(j);
4862 if (yyextra->firstTypedefEntry)
4864 if (yyextra->firstTypedefEntry->spec.isStruct())
4866 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4868 else if (yyextra->firstTypedefEntry->spec.isUnion())
4870 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4872 else if (yyextra->firstTypedefEntry->section.isEnum())
4874 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4878 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4884 yyextra->current->name = yyextra->msName;
4891 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4897 const Entry *p=yyextra->current.get();
4905 int pi = (i==-1) ? 0 : i+2;
4915 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4919 if (!yyextra->msName.isEmpty()
4925 if (typedefHidesStruct &&
4926 yyextra->isTypedef &&
4927 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4928 yyextra->msType.stripWhiteSpace().isEmpty() &&
4929 yyextra->memspecEntry)
4931 yyextra->memspecEntry->name=yyextra->msName;
4935 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4936 varEntry->lang = yyextra->language;
4937 varEntry->protection = yyextra->current->protection ;
4938 varEntry->mtype = yyextra->current->mtype;
4939 varEntry->virt = yyextra->current->virt;
4940 varEntry->isStatic = yyextra->current->isStatic;
4941 varEntry->section = EntryType::makeVariable();
4942 varEntry->name = yyextra->msName.stripWhiteSpace();
4943 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4944 varEntry->args = yyextra->msArgs;
4945 if (yyextra->isTypedef)
4947 varEntry->type.prepend(
"typedef ");
4950 if (typedefHidesStruct &&
4951 yyextra->isTypedef &&
4952 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4953 yyextra->memspecEntry
4956 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4960 varEntry->type+=yyextra->current->name+yyextra->msType;
4962 varEntry->fileName = yyextra->fileName;
4963 varEntry->startLine = yyextra->yyLineNr;
4964 varEntry->startColumn = yyextra->yyColNr;
4965 varEntry->doc = yyextra->current->doc;
4966 varEntry->brief = yyextra->current->brief;
4967 varEntry->mGrpId = yyextra->current->mGrpId;
4968 varEntry->initializer.str(yyextra->current->initializer.str());
4969 varEntry->groups = yyextra->current->groups;
4970 varEntry->sli = yyextra->current->sli;
4975 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4980 if (!yyextra->isTypedef && yyextra->msName.isEmpty() &&
4981 yyextra->memspecEntry && yyextra->current->section.isCompound())
4983 if (!yyextra->current->doc.isEmpty())
4985 yyextra->memspecEntry->doc += yyextra->current->doc;
4987 if (!yyextra->current->brief.isEmpty())
4989 yyextra->memspecEntry->brief += yyextra->current->brief;
4992 yyextra->msType.clear();
4993 yyextra->msName.clear();
4994 yyextra->msArgs.clear();
4995 yyextra->isTypedef=
FALSE;
4996 yyextra->firstTypedefEntry.reset();
4997 yyextra->memspecEntry.reset();
4998 yyextra->current->reset();
5000 BEGIN( FindMembers );
5004 yyextra->current->doc.clear();
5005 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
5010 yyextra->lastInitializerContext=YY_START;
5011 yyextra->sharpCount=0;
5012 yyextra->initBracketCount=0;
5013 yyextra->current->initializer.str(yytext);
5014 BEGIN(ReadInitializer);
5025<MemberSpecSkip>"," { BEGIN(MemberSpec); }
5026<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
5027<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5030<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5031 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5033 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5034 yyextra->insideObjC=
FALSE;
5035 BEGIN( FindMembers );
5037<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5038<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5040<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5041<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5042 if (yyextra->insidePHP)
5048 yyextra->current->bodyLine = yyextra->yyLineNr;
5049 yyextra->current->bodyColumn = yyextra->yyColNr;
5052 yyextra->funcPtrType=yytext;
5053 yyextra->roundCount=0;
5058<FuncPtr>{SCOPENAME} {
5059 yyextra->current->name = yytext;
5062 BEGIN( FuncPtrOperator );
5066 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5068 yyextra->funcPtrType += yyextra->current->name;
5072 BEGIN( EndFuncPtr );
5079<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5080 yyextra->current->name += yytext;
5081 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5084<FuncPtrOperator>\n {
5086 yyextra->current->name += *yytext;
5088<FuncPtrOperator>"(" {
5090 BEGIN( EndFuncPtr );
5093 yyextra->current->name += *yytext;
5095<EndFuncPtr>")"{BNopt}/";" {
5097 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5100<EndFuncPtr>")"{BNopt}/"(" {
5102 if (yyextra->funcPtrType!=
"(")
5104 yyextra->current->type+=yyextra->funcPtrType+
")";
5108<EndFuncPtr>")"{BNopt}/"[" {
5110 yyextra->current->type+=yyextra->funcPtrType;
5111 yyextra->current->args +=
")";
5116 yyextra->current->args += *yytext ;
5119 yyextra->current->bodyLine = yyextra->yyLineNr;
5120 yyextra->current->bodyColumn = yyextra->yyColNr;
5121 yyextra->currentArgumentContext = FuncFuncEnd;
5122 yyextra->fullArgString=yyextra->current->args;
5123 yyextra->copyArgString=&yyextra->current->args;
5124 BEGIN( ReadFuncArgType ) ;
5126<EndFuncPtr>"["[^\n\]]*"]" {
5127 yyextra->funcPtrType+=yytext;
5133 yyextra->current->args += *yytext ;
5134 ++yyextra->roundCount;
5137 yyextra->current->args += *yytext ;
5138 if ( yyextra->roundCount )
5139 --yyextra->roundCount;
5145<FuncFuncEnd>")"{BN}*"(" {
5147 yyextra->current->type+=yyextra->funcPtrType+
")(";
5148 BEGIN(FuncFuncType);
5150<FuncFuncEnd>")"{BNopt}/[;{] {
5152 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5155<FuncFuncEnd>")"{BNopt}/"[" {
5157 yyextra->current->type+=yyextra->funcPtrType;
5158 yyextra->current->args+=
")";
5159 BEGIN(FuncFuncArray);
5162 yyextra->current->args += *yytext;
5165 yyextra->current->type += *yytext;
5166 yyextra->roundCount++;
5169 yyextra->current->type += *yytext;
5170 if (yyextra->roundCount)
5171 --yyextra->roundCount;
5175<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5176<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5178 yyextra->current->type += *yytext;
5180<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5181 if (yyextra->current->type.startsWith(
"typedef") &&
5182 yyextra->current->bodyLine==-1)
5185 yyextra->current->bodyLine = yyextra->yyLineNr;
5186 yyextra->current->bodyColumn = yyextra->yyColNr;
5187 BEGIN( GetCallType );
5189 else if (!yyextra->current->name.isEmpty())
5191 yyextra->current->args = yytext;
5192 yyextra->current->bodyLine = yyextra->yyLineNr;
5193 yyextra->current->bodyColumn = yyextra->yyColNr;
5194 yyextra->currentArgumentContext = FuncQual;
5195 yyextra->fullArgString=yyextra->current->args;
5196 yyextra->copyArgString=&yyextra->current->args;
5197 BEGIN( ReadFuncArgType ) ;
5201<GetCallType>{BN}*{ID}{BN}*"*" {
5204 yyextra->funcPtrType=
"(";
5205 yyextra->funcPtrType+=yytext;
5206 yyextra->roundCount=0;
5210 if (!yyextra->current->name.isEmpty())
5212 yyextra->current->args = yytext;
5213 yyextra->current->bodyLine = yyextra->yyLineNr;
5214 yyextra->current->bodyColumn = yyextra->yyColNr;
5215 yyextra->currentArgumentContext = FuncQual;
5216 yyextra->fullArgString=yyextra->current->args;
5217 yyextra->copyArgString=&yyextra->current->args;
5218 BEGIN( ReadFuncArgType ) ;
5225<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5226 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5227 else yyextra->fullArgString+=yytext;
5229<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5230 yyextra->fullArgString+=yytext;
5232<CopyArgRound>[^\/\n\)\(\"\']+ {
5233 *yyextra->copyArgString+=yytext;
5234 yyextra->fullArgString+=yytext;
5236<CopyArgSquare>[^\/\n\]\[\"\']+ {
5237 *yyextra->copyArgString+=yytext;
5238 yyextra->fullArgString+=yytext;
5240<ReadFuncArgType,ReadTempArgs>{BN}* {
5241 *yyextra->copyArgString+=
" ";
5242 yyextra->fullArgString+=
" ";
5245<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5247 yyextra->lastRawStringContext = YY_START;
5248 yyextra->pCopyRawString = yyextra->copyArgString;
5249 *yyextra->pCopyRawString+=yytext;
5250 yyextra->fullArgString+=yytext;
5253<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5254 *yyextra->copyArgString+=*yytext;
5255 yyextra->fullArgString+=*yytext;
5256 yyextra->lastCopyArgStringContext = YY_START;
5257 BEGIN( CopyArgString );
5259<ReadFuncArgType>"[" {
5260 if (!yyextra->insidePHP) REJECT;
5261 *yyextra->copyArgString+=*yytext;
5262 yyextra->fullArgString+=*yytext;
5263 yyextra->argSquareCount=0;
5264 yyextra->lastCopyArgContext = YY_START;
5265 BEGIN( CopyArgSquare );
5267<ReadFuncArgType,ReadTempArgs>"(" {
5268 *yyextra->copyArgString+=*yytext;
5269 yyextra->fullArgString+=*yytext;
5270 yyextra->argRoundCount=0;
5271 yyextra->lastCopyArgContext = YY_START;
5272 BEGIN( CopyArgRound );
5274<ReadFuncArgType>")" {
5275 *yyextra->copyArgString+=*yytext;
5276 yyextra->fullArgString+=*yytext;
5278 if (yyextra->insideJS)
5289 yyextra->docBackup = yyextra->current->doc;
5290 yyextra->briefBackup = yyextra->current->brief;
5292 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5295<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5296 if (yyextra->currentArgumentContext==DefineEnd)
5300 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5306 BEGIN( yyextra->currentArgumentContext );
5312 yyextra->fullArgString+=yytext;
5313 yyextra->lastCopyArgChar=0;
5314 yyextra->lastCommentInArgContext=YY_START;
5316 BEGIN( CopyArgCommentLine );
5318 BEGIN( CopyArgComment );
5322<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5323<ReadFuncArgType,ReadTempArgs>{CCS} {
5324 yyextra->lastCContext = YY_START;
5325 BEGIN( SkipComment );
5327<ReadFuncArgType,ReadTempArgs>{CPPC} {
5328 yyextra->lastCContext = YY_START;
5329 BEGIN( SkipCxxComment );
5345<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5347 if (yyextra->currentArgumentContext==DefineEnd)
5351 int i;
for (i=(
int)yyleng-1;i>0;i--)
5355 *yyextra->copyArgString+=*yytext;
5356 yyextra->fullArgString+=*yytext;
5359 BEGIN( yyextra->currentArgumentContext );
5365 yyextra->lastCopyArgChar=*yytext;
5368 yyextra->lastCommentInArgContext=YY_START;
5369 yyextra->fullArgString+=text;
5370 if (text.
find(
"//")!=-1)
5371 BEGIN( CopyArgCommentLine );
5373 BEGIN( CopyArgComment );
5376<CopyArgComment>^{B}*"*"+/{BN}+
5377<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5378<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5379 if (yyextra->lastCopyArgChar!=0)
5380 unput(yyextra->lastCopyArgChar);
5381 BEGIN( yyextra->lastCommentInArgContext );
5383<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5385 if (yyextra->lastCopyArgChar!=0)
5386 unput(yyextra->lastCopyArgChar);
5387 BEGIN( yyextra->lastCommentInArgContext );
5389<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5390 yyextra->docBlockName=
"uml";
5391 yyextra->fullArgString+=yytext;
5392 BEGIN(CopyArgVerbatim);
5394<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5395 yyextra->docBlockName=&yytext[1];
5396 yyextra->fullArgString+=yytext;
5397 BEGIN(CopyArgVerbatim);
5399<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5400 yyextra->docBlockName=&yytext[1];
5401 if (yyextra->docBlockName.at(1)==
'[')
5403 yyextra->docBlockName.at(1)=
']';
5405 if (yyextra->docBlockName.at(1)==
'{')
5407 yyextra->docBlockName.at(1)=
'}';
5409 if (yyextra->docBlockName.at(1)==
'(')
5411 yyextra->docBlockName.at(1)=
')';
5413 yyextra->fullArgString+=yytext;
5414 BEGIN(CopyArgVerbatim);
5416<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5417 yyextra->fullArgString+=yytext;
5418 if (&yytext[4]==yyextra->docBlockName)
5420 yyextra->docBlockName=
"";
5421 BEGIN(CopyArgCommentLine);
5424<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5425 yyextra->fullArgString+=yytext;
5426 if (yyextra->docBlockName==&yytext[1])
5428 yyextra->docBlockName=
"";
5429 BEGIN(CopyArgCommentLine);
5432<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5433<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5434<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5435<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5436<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5437 warn(yyextra->fileName,yyextra->yyLineNr,
5438 "Ignoring {:c}brief command inside argument documentation",*yytext
5440 yyextra->fullArgString+=
' ';
5443 *yyextra->copyArgString+=*yytext;
5444 yyextra->fullArgString+=*yytext;
5445 yyextra->argSharpCount=1;
5446 BEGIN( CopyArgSharp );
5449 *yyextra->copyArgString+=*yytext;
5450 yyextra->fullArgString+=*yytext;
5452 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5454 BEGIN( yyextra->currentArgumentContext );
5457 yyextra->argRoundCount++;
5458 *yyextra->copyArgString+=*yytext;
5459 yyextra->fullArgString+=*yytext;
5462 *yyextra->copyArgString+=*yytext;
5463 yyextra->fullArgString+=*yytext;
5464 if (yyextra->argRoundCount>0)
5465 yyextra->argRoundCount--;
5467 BEGIN( yyextra->lastCopyArgContext );
5470 yyextra->argSquareCount++;
5471 *yyextra->copyArgString+=*yytext;
5472 yyextra->fullArgString+=*yytext;
5475 *yyextra->copyArgString+=*yytext;
5476 yyextra->fullArgString+=*yytext;
5477 if (yyextra->argSquareCount>0)
5478 yyextra->argSquareCount--;
5480 BEGIN( yyextra->lastCopyArgContext );
5483 *yyextra->copyArgString+=*yytext;
5484 yyextra->fullArgString+=*yytext;
5485 yyextra->argRoundCount=0;
5486 yyextra->lastCopyArgContext = YY_START;
5487 BEGIN( CopyArgRound );
5490 yyextra->argSharpCount++;
5492 *yyextra->copyArgString+=*yytext;
5493 yyextra->fullArgString+=*yytext;
5496 *yyextra->copyArgString+=*yytext;
5497 yyextra->fullArgString+=*yytext;
5498 yyextra->argSharpCount--;
5499 if (yyextra->argSharpCount>0)
5505 BEGIN( ReadTempArgs );
5509<CopyArgString,CopyArgPHPString>\\. {
5510 *yyextra->copyArgString+=yytext;
5511 yyextra->fullArgString+=yytext;
5514 *yyextra->copyArgString+=*yytext;
5515 yyextra->fullArgString+=*yytext;
5516 BEGIN( yyextra->lastCopyArgStringContext );
5518<CopyArgPHPString>\' {
5519 *yyextra->copyArgString+=*yytext;
5520 yyextra->fullArgString+=*yytext;
5521 BEGIN( yyextra->lastCopyArgStringContext );
5523<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5524 if (yyextra->insidePHP)
5530 *yyextra->copyArgString+=yytext;
5531 yyextra->fullArgString+=yytext;
5534<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5535 *yyextra->copyArgString+=yytext;
5536 yyextra->fullArgString+=yytext;
5537 if (yyextra->insidePHP)
5539 yyextra->lastCopyArgStringContext=YY_START;
5540 BEGIN(CopyArgPHPString);
5543<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5544 *yyextra->copyArgString+=yytext;
5545 yyextra->fullArgString+=yytext;
5547<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5549 *yyextra->copyArgString+=*yytext;
5550 yyextra->fullArgString+=*yytext;
5552<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5553 *yyextra->copyArgString+=yytext;
5554 yyextra->fullArgString+=yytext;
5556<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5557 *yyextra->copyArgString+=*yytext;
5558 yyextra->fullArgString+=*yytext;
5566<FuncRound>"(" { yyextra->current->args += *yytext ;
5567 ++yyextra->roundCount ;
5569<FuncRound>")" { yyextra->current->args += *yytext ;
5570 if ( yyextra->roundCount )
5571 --yyextra->roundCount ;
5583 if (
qstrcmp(yytext,
";")==0 &&
5584 ((yyextra->insideJS || yyextra->insidePHP) &&
5587 yyextra->current->reset();
5589 BEGIN( FindMembers );
5593 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5596<FuncQual>{BN}*"abstract"{BN}* {
5598 yyextra->current->virt = Specifier::Pure;
5599 yyextra->current->args +=
" override ";
5601<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5603 yyextra->current->spec.setOverride(
true);
5604 yyextra->current->args +=
" override ";
5605 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5608<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5610 yyextra->current->spec.setFinal(
true);
5611 yyextra->current->args +=
" final ";
5612 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5615<FuncQual>{BN}*"sealed"{BN}* {
5617 yyextra->current->spec.setSealed(
true);
5618 yyextra->current->args +=
" sealed ";
5620<FuncQual>{BN}*"new"{BN}* {
5622 yyextra->current->spec.setNew(
true);
5623 yyextra->current->args +=
" new ";
5625<FuncQual>{BN}*"const"{BN}* {
5627 yyextra->current->args +=
" const ";
5628 yyextra->current->argList.setConstSpecifier(
TRUE);
5630<FuncQual>{BN}*"volatile"{BN}* {
5632 yyextra->current->args +=
" volatile ";
5633 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5635<FuncQual>{BN}*"noexcept"{BN}* {
5637 yyextra->current->args +=
" noexcept ";
5638 yyextra->current->spec.setNoExcept(
true);
5640<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5642 yyextra->current->args +=
" noexcept(false)";
5644<FuncQual>{BN}*"noexcept"{BN}*"(" {
5646 yyextra->current->args +=
" noexcept(";
5647 yyextra->current->spec.setNoExcept(
true);
5648 yyextra->lastRoundContext=FuncQual;
5649 yyextra->pCopyRoundString=&yyextra->current->args;
5650 yyextra->roundCount=0;
5654 yyextra->current->args +=
" &";
5657<FuncQual>{BN}*"&&" {
5658 yyextra->current->args +=
" &&";
5662<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5664 yyextra->current->args +=
" = 0";
5665 yyextra->current->virt = Specifier::Pure;
5666 yyextra->current->argList.setPureSpecifier(
TRUE);
5667 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5670<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5672 yyextra->current->args +=
" = delete";
5673 yyextra->current->spec.setDelete(
true);
5674 yyextra->current->argList.setIsDeleted(
TRUE);
5675 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5678<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5680 yyextra->current->args +=
" = default";
5681 yyextra->current->spec.setDefault(
true);
5682 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5685<FuncQual>{BN}*"->"{BN}* {
5687 yyextra->current->argList.setTrailingReturnType(
" -> ");
5688 yyextra->current->args +=
" -> ";
5689 yyextra->roundCount=0;
5690 BEGIN(TrailingReturn);
5692<TrailingReturn>[{;] {
5693 if (yyextra->roundCount>0) REJECT;
5695 yyextra->current->argList.finishTrailingReturnType();
5698<TrailingReturn>"requires"{BN}+ {
5699 if (yyextra->insideJava) REJECT;
5700 yyextra->requiresContext = FuncQual;
5701 yyextra->current->req+=
' ';
5702 yyextra->current->argList.finishTrailingReturnType();
5703 BEGIN(RequiresClause);
5705<TrailingReturn>"(" {
5706 yyextra->roundCount++;
5707 yyextra->current->argList.appendTrailingReturnType(yytext);
5708 yyextra->current->args+=yytext;
5710<TrailingReturn>")" {
5711 if (yyextra->roundCount>0)
5713 yyextra->roundCount--;
5717 warn(yyextra->fileName,yyextra->yyLineNr,
5718 "Found ')' without opening '(' for trailing return type '{})...'",
5719 yyextra->current->argList.trailingReturnType());
5721 yyextra->current->argList.appendTrailingReturnType(yytext);
5722 yyextra->current->args+=yytext;
5725 yyextra->current->argList.appendTrailingReturnType(yytext);
5726 yyextra->current->args+=yytext;
5730 yyextra->current->argList.appendTrailingReturnType(yytext);
5731 yyextra->current->args+=
' ';
5733<FuncRound,FuncFunc>{BN}*","{BN}* {
5735 yyextra->current->args +=
", " ;
5737<FuncQual,FuncRound,FuncFunc>{BN}+ {
5739 yyextra->current->args +=
' ' ;
5741<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5743 yyextra->lastCPPContext = YY_START;
5747 if (!yyextra->insideCS)
5754 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5761 yyextra->lastInitializerContext=YY_START;
5762 yyextra->sharpCount=0;
5763 yyextra->initBracketCount=0;
5764 yyextra->current->initializer.str(yytext);
5765 BEGIN(ReadInitializer);
5768<ReadExpressionBody>";" {
5769 if (!yyextra->current->sli.empty() && yyextra->previous)
5771 yyextra->previous->sli = yyextra->current->sli;
5772 yyextra->current->sli.clear();
5774 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5789 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5792 yyextra->requiresContext = YY_START;
5793 if (!yyextra->current->req.isEmpty())
5795 yyextra->current->req+=
" && ";
5797 BEGIN(RequiresClause);
5799 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5802 yyextra->current->typeConstr.clear();
5803 yyextra->current->typeConstr.push_back(
Argument());
5804 yyextra->lastCSConstraint = YY_START;
5805 BEGIN( CSConstraintName );
5809 yyextra->current->args = yytext;
5810 yyextra->oldStyleArgType.clear();
5811 BEGIN(OldStyleArgs);
5815 yyextra->current->args += yytext;
5821 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5823 if (yyextra->current->doc!=yyextra->docBackup)
5825 doc=yyextra->current->doc;
5826 yyextra->current->doc=yyextra->docBackup;
5828 if (yyextra->current->brief!=yyextra->briefBackup)
5830 brief=yyextra->current->brief;
5831 yyextra->current->brief=yyextra->briefBackup;
5833 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5834 oldStyleArgName,brief,doc);
5835 yyextra->current->args.clear();
5836 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5838<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5840 if (yyextra->current->argList.empty())
5842 yyextra->current->argList.setNoParameters(
TRUE);
5848<OldStyleArgs>. { yyextra->current->args += *yytext; }
5849<FuncQual,FuncRound,FuncFunc>\" {
5850 if (yyextra->insideIDL && yyextra->insideCppQuote)
5856 yyextra->current->args += *yytext;
5859<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5860<FuncQual>{BN}*"try:" |
5861<FuncQual>{BN}*"try"{BN}+ {
5862 yyextra->insideTryBlock=
TRUE;
5864 if (yytext[yyleng-1]==
':')
5870<FuncQual>{BN}*"throw"{BN}*"(" {
5871 yyextra->current->exception =
" throw (" ;
5872 yyextra->roundCount=0;
5874 BEGIN( ExcpRound ) ;
5876<FuncQual>{BN}*"raises"{BN}*"(" {
5877 yyextra->current->exception =
" raises (" ;
5879 yyextra->roundCount=0;
5880 BEGIN( ExcpRound ) ;
5882<FuncQual>{BN}*"throws"{BN}+ {
5883 yyextra->current->exception =
" throws " ;
5887<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5888 ++yyextra->roundCount ;
5890<ExcpRound>")" { yyextra->current->exception += *yytext ;
5891 if ( yyextra->roundCount )
5892 --yyextra->roundCount ;
5897 yyextra->current->exception += *yytext;
5900 unput(
'{'); BEGIN( FuncQual );
5903 unput(
';'); BEGIN( FuncQual );
5906 yyextra->current->exception +=
' ';
5910 yyextra->current->exception += *yytext;
5912<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5913 yyextra->current->name = yyextra->current->args ;
5914 yyextra->current->args = yytext ;
5915 yyextra->roundCount=0;
5916 BEGIN( FuncRound ) ;
5919 if (!yyextra->insidePHP) BEGIN(SkipInits);
5925 yyextra->current->fileName = yyextra->fileName;
5926 yyextra->current->startLine = yyextra->yyBegLineNr;
5927 yyextra->current->startColumn = yyextra->yyBegColNr;
5928 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5930 std::string type = yyextra->current->type.str();
5934 ti = (int)
match.position();
5938 int di = yyextra->current->type.find(
"decltype(");
5939 if (di!=-1 && di<ti)
5944 int ts=yyextra->current->type.find(
'<');
5945 int te=yyextra->current->type.findRev(
'>');
5948 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5949 bool isFunction = ti==-1 ||
5950 (ts!=-1 && ts<te && ts<ti && ti<te);
5951 bool isVariable = !yyextra->current->type.isEmpty() &&
5952 (!isFunction || startsWithTypedef);
5957 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5962 if (yyextra->isTypedef && !startsWithTypedef)
5964 yyextra->current->type.prepend(
"typedef ");
5966 yyextra->current->section = EntryType::makeVariable() ;
5971 yyextra->current->section = EntryType::makeFunction() ;
5972 yyextra->current->proto = *yytext==
';';
5980 if (yyextra->isTypedef && !startsWithTypedef)
5982 yyextra->current->type.prepend(
"typedef ");
5985 yyextra->current->section = EntryType::makeVariable();
5990 yyextra->current->section = EntryType::makeFunction();
5991 yyextra->current->proto =
TRUE;
5995 if ( yyextra->insidePHP)
5999 yyextra->current->spec.setFinal(
true);
6003 yyextra->current->spec.setAbstract(
true);
6006 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
6009 if ( *yytext ==
'{' )
6011 yyextra->lastCurlyContext = FindMembers;
6012 yyextra->curlyCount=0;
6017 BEGIN( FindMembers );
6022 if ( yyextra->insidePHP)
6026 yyextra->previous = yyextra->current;
6027 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6030 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6032 yyextra->current->spec.setOptional(
true).setRequired(
true);
6034 yyextra->lastCurlyContext = FindMembers;
6035 if ( *yytext ==
',' )
6037 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6039 if ( *yytext ==
'{' )
6041 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6043 yyextra->previous->spec.setInline(
true);
6045 yyextra->curlyCount=0;
6046 BEGIN( SkipCurly ) ;
6048 else if ( *yytext ==
'=' )
6050 yyextra->previous->spec.setInline(
true);
6051 yyextra->curlyCount=0;
6052 BEGIN( ReadExpressionBody );
6056 if (!yyextra->previous->section.isVariable())
6057 yyextra->previous->bodyLine=-1;
6058 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...
6062<SkipInits>">"{BN}*"{" {
6064 yyextra->curlyCount=1;
6065 BEGIN(SkipC11Inits);
6067<SkipInits>{ID}{BN}*"{" {
6069 yyextra->curlyCount=1;
6070 BEGIN(SkipC11Inits);
6073 ++yyextra->curlyCount;
6076 if ( --yyextra->curlyCount<=0 )
6087 ++yyextra->curlyCount ;
6089<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6092 if( yyextra->curlyCount )
6094 --yyextra->curlyCount ;
6098 if (!yyextra->current->sli.empty() && yyextra->previous)
6100 yyextra->previous->sli = yyextra->current->sli;
6101 yyextra->current->sli.clear();
6103 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6104 BEGIN( yyextra->lastCurlyContext ) ;
6107<SkipCurly>"}"{BN}*{DCOMM}"<" {
6109 if ( yyextra->curlyCount )
6112 --yyextra->curlyCount ;
6116 yyextra->current->endBodyLine=yyextra->yyLineNr;
6117 yyextra->tempEntry = yyextra->current;
6118 yyextra->current = yyextra->previous;
6120 yyextra->docBlockContext = SkipCurlyEndDoc;
6121 yyextra->docBlockInBody =
FALSE;
6122 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6124 yyextra->docBlock.str(std::string());
6125 yyextra->docBlockTerm =
'}';
6126 if (yytext[yyleng-3]==
'/')
6138<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6139 yyextra->docBlockContext = SkipCurlyEndDoc;
6140 yyextra->docBlockInBody =
FALSE;
6141 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6143 yyextra->docBlock.str(std::string());
6144 yyextra->docBlockTerm =
'}';
6145 if (yytext[yyleng-3]==
'/')
6156<SkipCurlyEndDoc>"}" {
6158 if (yyextra->tempEntry)
6160 yyextra->current = yyextra->tempEntry;
6161 yyextra->tempEntry.reset();
6163 BEGIN( yyextra->lastCurlyContext );
6165<SkipCurly,ReadExpressionBody>\" {
6167 yyextra->lastStringContext=YY_START;
6168 BEGIN( SkipString );
6170<SkipCurly>^{B}*"#" {
6171 if (yyextra->insidePHP)
6174 BEGIN( SkipCurlyCpp );
6176<SkipCurly,SkipC11Inits,SkipInits,ReadExpressionBody>\n {
6180<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6181 if (!yyextra->insidePHP)
6187 yyextra->lastHereDocContext = YY_START;
6191<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6193 yyextra->lastRawStringContext = YY_START;
6194 yyextra->dummyRawString.clear();
6195 yyextra->pCopyRawString = &yyextra->dummyRawString;
6196 *yyextra->pCopyRawString += yytext;
6199<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6203<SkipCurly,SkipCurlyCpp>"\$" {}
6207 yyextra->lastCurlyContext = FindMembers;
6210<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6214<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CCS} {
6216 yyextra->lastCContext = YY_START;
6219<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CPPC} {
6221 yyextra->lastCContext = YY_START;
6222 BEGIN(SkipCxxComment);
6224<SkipInits,SkipC11Inits>"(" {
6225 yyextra->roundCount=0;
6226 yyextra->lastSkipRoundContext=YY_START;
6229<SkipInits,SkipC11Inits>\" {
6230 yyextra->lastStringContext=YY_START;
6231 BEGIN( SkipString );
6234 warn(yyextra->fileName,yyextra->yyLineNr,
6235 "Found ';' while parsing initializer list! "
6236 "(doxygen could be confused by a macro call without semicolon)"
6238 BEGIN( FindMembers );
6240<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6241 if (!yyextra->insidePHP)
6244 yyextra->lastCContext = YY_START;
6245 BEGIN(SkipCxxComment);
6247<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6248 if (!yyextra->insideCS) REJECT;
6251 yyextra->lastSkipVerbStringContext=YY_START;
6252 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6253 yyextra->dummyTextStream.clear();
6254 BEGIN(SkipVerbString);
6256<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6257 if (yyextra->insidePHP) REJECT;
6259<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6260 if (yyextra->insidePHP)
6262 yyextra->lastStringContext=YY_START;
6263 BEGIN(SkipPHPString);
6266<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>. { }
6267<SkipString,SkipPHPString>\\. { }
6269 BEGIN( yyextra->lastStringContext );
6272 BEGIN( yyextra->lastStringContext );
6274<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6275<SkipString,SkipPHPString>\n {
6279<SkipString,SkipPHPString>. { }
6285 yyextra->current->section = EntryType::makeEmpty() ;
6286 yyextra->current->type.clear() ;
6287 yyextra->current->name.clear() ;
6288 yyextra->current->args.clear() ;
6289 yyextra->current->argList.clear();
6290 BEGIN( FindMembers ) ;
6293 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6297 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6301 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6303 if (!yyextra->baseName.isEmpty())
6305 yyextra->current->extends.emplace_back(
6306 yyextra->baseName,Protection::Public,Specifier::Normal);
6307 yyextra->baseName.clear();
6309 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6314 yyextra->current->section = EntryType::makeEmpty() ;
6315 yyextra->current->type.clear() ;
6316 yyextra->current->name.clear() ;
6317 yyextra->current->args.clear() ;
6318 yyextra->current->argList.clear();
6320 BEGIN( FindMembers ) ;
6322<CompoundName>{SCOPENAME}/{BN}*"<" {
6323 yyextra->sharpCount = 0;
6324 yyextra->current->name = yytext ;
6326 if (yyextra->current->spec.isProtocol())
6328 yyextra->current->name+=
"-p";
6331 yyextra->lastClassTemplSpecContext = ClassVar;
6332 if (yyextra->insideObjC)
6334 BEGIN( ObjCProtocolList );
6336 else if (yyextra->insideCS)
6343 yyextra->roundCount=0;
6344 BEGIN( ClassTemplSpec );
6351 yyextra->current->tArgLists.
push_back(al);
6352 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6353 yyextra->templateStr=
"<";
6354 yyextra->current->name +=
"<";
6355 yyextra->fullArgString = yyextra->templateStr;
6356 yyextra->copyArgString = &yyextra->current->name;
6358 yyextra->currentArgumentContext = ClassVar;
6359 BEGIN( ReadTempArgs );
6361<ObjCProtocolList>"<" {
6362 yyextra->insideProtocolList=
TRUE;
6365<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6366 yyextra->current->name += yytext;
6368 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6371 if (yyextra->current->spec.isProtocol())
6378 BEGIN( yyextra->lastClassTemplSpecContext );
6382<ClassTemplSpec>"<" {
6383 yyextra->current->name += yytext;
6384 if (yyextra->roundCount==0) yyextra->sharpCount++;
6387 yyextra->current->name += yytext;
6389<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6390 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6394 yyextra->current->name =
substitute(yytext,
".",
"::");
6395 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6400 else if (!yyextra->current->tArgLists.empty())
6404 yyextra->current->name = yytext;
6405 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6408 QCString rn = yyextra->current_root->name;
6410 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6414 yyextra->current->spec.setForwardDecl(
true);
6415 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6417 else if (yyextra->insideIDL &&
6418 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6419 yyextra->current->spec.isInterface()) ||
6420 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6421 yyextra->current->spec.isService())
6429 yyextra->current->name = yytext;
6430 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6431 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6434 yyextra->current->spec.setInterface(
false).setService(
false);
6438 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6441 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6444 yyextra->current->reset();
6446 if (yyextra->insideObjC)
6448 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6449 yyextra->insideObjC =
FALSE;
6451 if (yyextra->isTypedef)
6453 yyextra->current->type.prepend(
"typedef");
6455 BEGIN( FindMembers );
Wrapper class for the Entry type.
6458<CompoundName>{SCOPENAME}/{BN}*"(" {
6459 yyextra->current->name = yytext ;
6462 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6464 yyextra->lastAlignAsContext = YY_START;
6469 if (yyextra->current->spec.isProtocol())
6471 yyextra->current->name +=
"-p";
6476<AlignAs>"(" { yyextra->roundCount=0;
6477 BEGIN( AlignAsEnd );
6481<AlignAsEnd>"(" { yyextra->roundCount++; }
6482<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6484 BEGIN( yyextra->lastAlignAsContext );
6490 yyextra->current->name = yytext ;
6494 yyextra->current->bodyLine = yyextra->yyLineNr;
6495 yyextra->current->bodyColumn = yyextra->yyColNr;
6496 yyextra->current->initializer.str(std::string());
6497 yyextra->lastInitializerContext = FindMembers;
6498 yyextra->sharpCount=0;
6499 yyextra->initBracketCount=0;
6500 BEGIN(ReadInitializer);
6502<CompoundName>{SCOPENAME}/{BN}*"," {
6504 yyextra->current->reset();
6507<CompoundName>{SCOPENAME} {
6508 yyextra->current->name = yytext ;
6511 if (yyextra->current->spec.isProtocol())
6513 yyextra->current->name +=
"-p";
6515 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6521<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6522 if (yyextra->current->section.isNamespace())
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6534<CompoundName>{CSSCOPENAME} {
6535 yyextra->current->name =
substitute(yytext,
".",
"::");
6539<ClassVar>{SCOPENAME}{BNopt}/"(" {
6540 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6543 yyextra->roundCount=0;
6544 BEGIN(SkipUnionSwitch);
6549 yyextra->yyBegColNr=yyextra->yyColNr;
6550 yyextra->yyBegLineNr=yyextra->yyLineNr;
6551 yyextra->current->name = yytext;
6552 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6555 BEGIN( FindMembers );
6559 if (yyextra->isTypedef)
6563 yyextra->current->type.prepend(
"typedef ");
6571<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6572 if (yyextra->insideCli)
6575 yyextra->current->spec.setSealedClass(
true);
6577 yyextra->current->spec.setAbstractClass(
true);
6585<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6586 yyextra->yyBegColNr=yyextra->yyColNr;
6587 yyextra->yyBegLineNr=yyextra->yyLineNr;
6590 if (yyextra->current->section.isEnum())
6592 yyextra->current->section = EntryType::makeVariable() ;
6594 yyextra->current->type +=
' ' ;
6595 yyextra->current->type += yyextra->current->name ;
6604 yyextra->yyBegColNr=yyextra->yyColNr;
6605 yyextra->yyBegLineNr=yyextra->yyLineNr;
6607 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6610 yyextra->roundCount=0;
6611 BEGIN(SkipUnionSwitch);
6613 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6615 yyextra->current->type.clear();
6616 yyextra->baseProt = Protection::Public;
6617 yyextra->baseVirt = Specifier::Normal;
6618 yyextra->baseName.clear();
6619 BEGIN( BasesProt ) ;
6621 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6623 yyextra->current->typeConstr.clear();
6624 yyextra->current->typeConstr.push_back(
Argument());
6625 yyextra->lastCSConstraint = YY_START;
6626 BEGIN( CSConstraintName );
6628 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6630 yyextra->current->spec.setAbstract(
true);
6632 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6634 yyextra->current->spec.setSealed(
true);
6636 else if (
qstrcmp(yytext,
"final")==0)
6638 yyextra->current->spec.setFinal(
true);
6642 if (yyextra->current->section.isEnum())
6644 yyextra->current->section = EntryType::makeVariable() ;
6646 yyextra->current->type +=
' ' ;
6647 yyextra->current->type += yyextra->current->name ;
6648 yyextra->current->name = yytext ;
6657 if (yyextra->insideObjC && *yytext==
'(')
6659 yyextra->current->name+=
'(';
6660 yyextra->current->spec.setCategory(
true);
6661 BEGIN( ClassCategory );
6663 else if (yyextra->insideCS && *yytext==
'(')
6665 yyextra->current->args=yytext;
6666 yyextra->currentArgumentContext = ClassVar;
6667 yyextra->fullArgString = yyextra->current->args;
6668 yyextra->copyArgString = &yyextra->current->args;
6669 BEGIN( ReadFuncArgType ) ;
6675 BEGIN( FindMembers );
6678<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6679<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6680 yyextra->fullArgString.clear();
6681 yyextra->lastCopyArgChar=
'#';
6682 yyextra->lastCommentInArgContext=YY_START;
6684 BEGIN( CopyArgCommentLine );
6686 BEGIN( CopyArgComment );
6688<CSConstraintType,CSConstraintName>"#" {
6689 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6691<CSConstraintType>"=>" {
6696 BEGIN( yyextra->lastCSConstraint );
6698<CSConstraintType>"{" {
6702 BEGIN( yyextra->lastCSConstraint );
6704<CSConstraintType,CSConstraintName>";" {
6707 BEGIN( yyextra->lastCSConstraint );
6709<CSConstraintName>":" {
6710 BEGIN( CSConstraintType );
6712<CSConstraintName>{ID} {
6714 yyextra->current->typeConstr.back().name=yytext;
6716<CSConstraintType>"where" {
6717 yyextra->current->typeConstr.push_back(
Argument());
6718 BEGIN( CSConstraintName );
6720<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6721 if (yyextra->current->typeConstr.back().type.isEmpty())
6724 yyextra->current->typeConstr.back().type=yytext;
6728 QCString name = yyextra->current->typeConstr.back().name;
6729 yyextra->current->typeConstr.push_back(
Argument());
6730 yyextra->current->typeConstr.back().name=name;
6731 yyextra->current->typeConstr.back().type=yytext;
6734<CSConstraintName,CSConstraintType>\n {
6737<CSConstraintName,CSConstraintType>. {
6739<ClassCategory>{ID} {
6740 yyextra->current->name+=yytext;
6742<ClassCategory>")"/{BN}*"{" {
6743 yyextra->current->name+=
')';
6746<ClassCategory>")"/{BN}*"<" {
6747 yyextra->current->name+=
')';
6748 BEGIN( ObjCProtocolList );
6751 yyextra->current->name+=
')';
6752 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6764 if (yyextra->current->section.isVariable())
6766 yyextra->current->bitfields+=
":";
6767 yyextra->current->args.clear();
6770 else if (yyextra->current->section.isEnum())
6773 yyextra->current->args.clear();
6774 BEGIN(EnumBaseType);
6778 yyextra->current->type.clear();
6779 if (yyextra->current->spec.isInterface() ||
6780 yyextra->current->spec.isStruct() ||
6781 yyextra->current->spec.isRef() ||
6782 yyextra->current->spec.isValue() ||
6783 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6786 yyextra->baseProt = Protection::Public;
6790 yyextra->baseProt = Protection::Private;
6792 yyextra->baseVirt = Specifier::Normal;
6793 yyextra->baseName.clear();
6794 BEGIN( BasesProt ) ;
6798 if (yyextra->isTypedef)
6800 yyextra->current->type.prepend(
"typedef");
6802 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6804 yyextra->current->section = EntryType::makeVariable() ;
6806 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6808 yyextra->current->reset();
6815 BEGIN( FindMembers );
6817<Bases,ClassVar>{CPPC}"/"/[^/] {
6818 if (!yyextra->insideObjC)
6825 yyextra->current->program << yytext;
6826 yyextra->current->fileName = yyextra->fileName ;
6827 yyextra->current->startLine = yyextra->yyLineNr ;
6828 yyextra->current->startColumn = yyextra->yyColNr;
6829 yyextra->curlyCount=0;
6830 BEGIN( ReadBodyIntf );
6833<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6834<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6835<Bases,ClassVar>{CPPC}"!" |
6836<Bases,ClassVar>[\-+]{BN}* {
6837 if (!yyextra->insideObjC)
6844 yyextra->current->program << yytext;
6845 yyextra->current->fileName = yyextra->fileName ;
6846 yyextra->current->startLine = yyextra->yyLineNr ;
6847 yyextra->current->startColumn = yyextra->yyColNr;
6848 yyextra->curlyCount=0;
6849 BEGIN( ReadBodyIntf );
6852<CompoundName,ClassVar>{B}*"{"{B}* {
6853 yyextra->current->program.str(std::string());
6854 yyextra->current->fileName = yyextra->fileName ;
6855 yyextra->current->bodyLine = yyextra->yyLineNr;
6856 yyextra->current->bodyColumn = yyextra->yyColNr;
6858 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6860 if (yyextra->current->section.isNamespace())
6864 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6876 yyextra->curlyCount=0;
6877 if (yyextra->current_root &&
6878 !yyextra->current_root->spec.isInterface() &&
6879 (yyextra->current->spec.isInterface() ||
6880 yyextra->current->spec.isProtocol() ||
6881 yyextra->current->spec.isCategory() ||
6882 yyextra->current->section.isObjcImpl()
6887 BEGIN( ReadBodyIntf );
6889 else if (yyextra->current->section.isNamespace())
6891 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6898<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6899<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6900<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6901<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6902<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6903<BasesProt>{BN} {
lineCount(yyscanner); }
6904<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6905<Bases>"decltype"{BN}*"(" {
6907 yyextra->roundCount=0;
6908 yyextra->lastSkipRoundContext=YY_START;
6911<Bases>("\\")?({ID}"\\")*{ID} {
6912 if (!yyextra->insidePHP)
6921 yyextra->baseName += bn;
6922 yyextra->current->args +=
' ';
6923 yyextra->current->args += yytext;
6926<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6932 yyextra->current->typeConstr.clear();
6933 yyextra->current->typeConstr.push_back(
Argument());
6934 yyextra->lastCSConstraint = YY_START;
6935 BEGIN( CSConstraintName );
6939 yyextra->baseName+=yytext;
6940 yyextra->current->args +=
' ';
6941 yyextra->current->args += yytext;
6944<Bases>{BN}*{ID}("."{ID})* {
6946 yyextra->baseName += name;
6947 yyextra->current->args +=
' ';
6948 yyextra->current->args += name;
6950<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6951 if (!yyextra->insideObjC)
6961<ClassVar,Bases>"@end" {
6969<ClassVar>"<" { yyextra->current->name += *yytext;
6970 yyextra->sharpCount=1;
6971 yyextra->roundCount=0;
6972 yyextra->lastSkipSharpContext = YY_START;
6973 yyextra->specName = &yyextra->current->name;
6974 BEGIN ( Specialization );
6978 yyextra->sharpCount=1;
6979 yyextra->roundCount=0;
6980 yyextra->lastSkipSharpContext = YY_START;
6981 if (yyextra->insideObjC)
6991 yyextra->templateStr = yytext;
6992 yyextra->specName = &yyextra->templateStr;
6993 BEGIN ( Specialization );
6996<Specialization>"<" { *yyextra->specName += *yytext;
6997 if (yyextra->roundCount==0) yyextra->sharpCount++;
6999<Specialization>">" {
7000 *yyextra->specName += *yytext;
7001 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
7004 BEGIN(yyextra->lastSkipSharpContext);
7007<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
7008<Specialization>"<<" { *yyextra->specName += yytext; }
7009<Specialization>">>"/{B}*"::" {
7014<Specialization>">>" {
7015 if (yyextra->insideCS)
7025 if (yyextra->roundCount>0)
7027 *yyextra->specName += yytext;
7037<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7038<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7039<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7041<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7042<Specialization>"\\'" { *yyextra->specName += *yytext;}
7043<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7044<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7045<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7046<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7047<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7048<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7049<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7050<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7051<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7054 *yyextra->specName += *yytext;
7056<SkipRound>"(" { ++yyextra->roundCount; }
7057<SkipRound>")" {
if (--yyextra->roundCount<0)
7058 BEGIN ( yyextra->lastSkipRoundContext );
7061 yyextra->lastStringContext=SkipRound;
7064<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7065 if (yyextra->insideProtocolList)
7067 yyextra->baseName+=
"-p";
7071 yyextra->current->args +=
',' ;
7074 if (!yyextra->baseName.isEmpty())
7076 yyextra->current->extends.emplace_back(
7077 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7080 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7081 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7082 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7084 yyextra->baseProt=Protection::Public;
7088 yyextra->baseProt=Protection::Private;
7090 yyextra->baseVirt=Specifier::Normal;
7091 yyextra->baseName.clear();
7094 yyextra->insideProtocolList=
FALSE;
7097 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7113 if (*yytext==
',' && yyextra->insideObjC)
7115 yyextra->insideProtocolList=
TRUE;
7121 yyextra->current->program.str(std::string());
7122 yyextra->current->fileName = yyextra->fileName ;
7123 yyextra->current->bodyLine = yyextra->yyLineNr;
7124 yyextra->current->bodyColumn = yyextra->yyColNr;
7126 if (!yyextra->baseName.isEmpty())
7128 yyextra->current->extends.emplace_back(
7129 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7131 yyextra->baseName.clear();
7133 yyextra->curlyCount=0;
7134 if (yyextra->insideObjC)
7136 BEGIN( ReadBodyIntf );
7143<SkipUnionSwitch>{B}*"(" {
7144 yyextra->roundCount++;
7146<SkipUnionSwitch>")" {
7147 if (--yyextra->roundCount==0)
7152<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7154<Comment>{BN}+ { yyextra->current->program << yytext ;
7157<Comment>{CCS} { yyextra->current->program << yytext ; }
7158<Comment>{CPPC} { yyextra->current->program << yytext ; }
7159<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7160 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7161 yyextra->current->program << yytext ;
7163<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7164 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7165 yyextra->current->program << yytext ;
7167<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7168<Comment>{CCE} { yyextra->current->program << yytext ;
7169 if (!yyextra->insideCode)
7171 yyextra->doxygenComment=
false;
7172 BEGIN( yyextra->lastContext );
7175<Comment>. { yyextra->current->program << *yytext ; }
7177<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7179 if (!yyextra->current->doc.isEmpty())
7181 yyextra->current->doc+=
"\n\n";
7185 yyextra->current->docLine = yyextra->yyLineNr;
7186 yyextra->current->docFile = yyextra->fileName;
7189 yyextra->lastDocContext = YY_START;
7190 if (yyextra->current_root->section.isScope())
7192 yyextra->current->inside = yyextra->current_root->name+
"::";
7194 yyextra->docBlockContext = YY_START;
7195 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7200 yyextra->docBlock.
str(indent.
str());
7202 if (yyextra->docBlockAutoBrief)
7204 yyextra->current->briefLine = yyextra->yyLineNr;
7205 yyextra->current->briefFile = yyextra->fileName;
7210<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7216 yyextra->lastDocContext = YY_START;
7219 if (yyextra->current_root->section.isScope())
7221 yyextra->current->inside = yyextra->current_root->name+
"::";
7223 yyextra->current->docLine = yyextra->yyLineNr;
7224 yyextra->current->docFile = yyextra->fileName;
7225 yyextra->docBlockContext = YY_START;
7226 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7228 yyextra->docBlockAutoBrief = javadocAutoBrief;
7232 yyextra->docBlock.
str(indent.
str());
7234 if (yyextra->docBlockAutoBrief)
7236 yyextra->current->briefLine = yyextra->yyLineNr;
7237 yyextra->current->briefFile = yyextra->fileName;
7244 yyextra->current->program << yytext ;
7245 yyextra->lastContext = YY_START ;
7246 yyextra->doxygenComment=
true;
7250<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7255<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7256 yyextra->lastDocContext = YY_START;
7259 if (yyextra->current_root->section.isScope())
7261 yyextra->current->inside = yyextra->current_root->name+
"::";
7263 yyextra->current->docLine = yyextra->yyLineNr;
7264 yyextra->current->docFile = yyextra->fileName;
7265 yyextra->docBlockContext = YY_START;
7266 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7268 yyextra->docBlockAutoBrief = javadocAutoBrief;
7272 yyextra->docBlock.
str(indent.
str());
7274 if (yyextra->docBlockAutoBrief)
7276 yyextra->current->briefLine = yyextra->yyLineNr;
7277 yyextra->current->briefFile = yyextra->fileName;
7282<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7283 yyextra->lastDocContext = YY_START;
7284 if (yyextra->current_root->section.isScope())
7286 yyextra->current->inside = yyextra->current_root->name+
"::";
7288 yyextra->docBlockContext = YY_START;
7289 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7290 yyextra->docBlockAutoBrief =
FALSE;
7294 yyextra->docBlock.
str(indent.
str());
7299<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7300 yyextra->lastDocContext = YY_START;
7301 if (yyextra->current_root->section.isScope())
7303 yyextra->current->inside = yyextra->current_root->name+
"::";
7305 yyextra->docBlockContext = YY_START;
7306 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7307 yyextra->docBlockAutoBrief =
FALSE;
7310 yyextra->docBlock.
str(indent.
str());
7314<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7316 yyextra->externLinkage=
TRUE;
7319 if (yyextra->externLinkage)
7321 yyextra->externLinkage=
FALSE;
7323 else if (yyextra->insideCS &&
7324 !yyextra->current->name.isEmpty() &&
7325 !yyextra->current->type.isEmpty())
7327 if (yyextra->current->mtype == MethodTypes::Event)
7329 yyextra->mtype = MethodTypes::Event;
7333 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7337 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7339 yyextra->current->bodyLine = yyextra->yyLineNr;
7340 yyextra->current->bodyColumn = yyextra->yyColNr;
7341 yyextra->curlyCount=0;
7342 BEGIN( CSAccessorDecl );
7344 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7348 yyextra->current->exception =
" {";
7349 BEGIN(UNOIDLAttributeBlock);
7353 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7354 yyextra->current->name.isEmpty()
7358 yyextra->needsSemi =
FALSE;
7359 if (yyextra->current->isStatic)
7361 yyextra->current->name=
"[static initializer]";
7362 yyextra->current->type.clear();
7366 yyextra->current->name=
"[instance initializer]";
7383 yyextra->current->bodyLine = yyextra->yyLineNr;
7384 yyextra->current->bodyColumn = yyextra->yyColNr;
7385 yyextra->current->initializer.str(yytext);
7386 yyextra->lastInitializerContext = YY_START;
7387 yyextra->sharpCount=0;
7388 yyextra->initBracketCount=1;
7389 BEGIN(ReadInitializer);
7393<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7394<CSAccessorDecl>"}"{B}*"=" {
7396 if (yyextra->curlyCount != 0) REJECT;
7397 yyextra->current->initializer.str(
"=");
7398 yyextra->current->endBodyLine=yyextra->yyLineNr;
7399 yyextra->lastInitializerContext = FindMembers;
7400 BEGIN(ReadInitializer);
7402<CSAccessorDecl>"}" {
7403 if (yyextra->curlyCount)
7405 yyextra->curlyCount--;
7409 yyextra->mtype = MethodTypes::Method;
7410 yyextra->virt = Specifier::Normal;
7412 yyextra->current->endBodyLine=yyextra->yyLineNr;
7417<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7418<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7419<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7420<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7421<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7422<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7423<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7424<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7425<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7426<CSAccessorDecl>{CHARLIT} {}
7427<CSAccessorDecl>"\"" { BEGIN(CSString);}
7428<CSAccessorDecl>"." {}
7429<CSAccessorDecl>\n {
lineCount(yyscanner); }
7430<CSString>"\"" { BEGIN(CSAccessorDecl);}
7438<SliceSequence>{SCOPENAME} {
7439 if (yyextra->current->spec.isLocal())
7441 yyextra->current->type =
"local ";
7443 yyextra->current->type +=
"sequence<";
7444 yyextra->current->type += yytext;
7445 yyextra->current->type +=
">";
7448<SliceSequence>{BN}*">"{BN}* {
7450 BEGIN(SliceSequenceName);
7453<SliceSequenceName>{ID}{BN}* {
7455 yyextra->current->name = yytext ;
7456 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7459<SliceSequenceName>";" {
7460 yyextra->current->section = EntryType::makeVariable();
7461 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7466<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7468 if (yyextra->current->spec.isLocal())
7470 yyextra->current->type =
"local ";
7472 yyextra->current->type +=
"dictionary<";
7473 yyextra->current->type += yytext;
7474 yyextra->current->type +=
">";
7475 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7478<SliceDictionary>{BN}*">"{BN}* {
7480 BEGIN(SliceDictionaryName);
7483<SliceDictionaryName>{ID}{BN}* {
7485 yyextra->current->name = yytext ;
7486 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7489<SliceDictionaryName>";" {
7490 yyextra->current->section = EntryType::makeVariable();
7491 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7501<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7502 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7503 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7506<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7507 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7508 BEGIN( yyextra->docBlockContext );
7510<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7511 yyextra->docBlock << yytext;
7512 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7513 BEGIN( yyextra->docBlockContext );
7515<DocLine>{NONLopt}/"\n" {
7516 yyextra->docBlock << yytext;
7517 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7518 BEGIN( yyextra->docBlockContext );
7523<DocBlock>"*"*{CCE} {
7525 BEGIN(yyextra->docBlockContext);
7527<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7530 yyextra->docBlock <<
"\\ilinebr " << indent;
7532<DocBlock>^{B}*"*"+/[^/] {
7535 yyextra->docBlock << indent;
7537<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7540 yyextra->docBlock << indent;
7542<DocBlock>^{B}*({CPPC}){B}* {
7545 yyextra->docBlock << yytext;
7549 yyextra->docBlock << yytext;
7551<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7552 yyextra->docBlock << yytext;
7554<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7555 yyextra->docBlock << yytext;
7556 char blockName[] =
"f$";
7558 if (c==
'[') blockName[1]=
']';
7559 else if (c==
'{') blockName[1]=
'}';
7560 else if (c==
'(') blockName[1]=
')';
7562 BEGIN(DocCopyBlock);
7564<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7565 yyextra->fileName = &yytext[6];
7566 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7567 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7568 yyextra->docBlock << yytext;
7570<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7571 yyextra->fileName = &yytext[6];
7572 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7573 yyextra->docBlock << yytext;
7575<DocBlock>{CMD}"iline"{LINENR}{B} {
7580 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7584 yyextra->yyLineNr = nr;
7586 yyextra->docBlock << yytext;
7588<DocBlock>{B}*"<"{PRE}">" {
7589 yyextra->docBlock << yytext;
7591 BEGIN(DocCopyBlock);
7593<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7594 yyextra->docBlock << yytext;
7596 BEGIN(DocCopyBlock);
7598<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7599 yyextra->docBlock << yytext;
7601 BEGIN(DocCopyBlock);
7603<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7604 yyextra->docBlock << yytext;
7606 BEGIN(DocCopyBlock);
7608<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7610 yyextra->docBlock <<
"\\ilinebr ";
7611 yyextra->docBlock << pat;
7613 BEGIN(DocCopyBlock);
7615<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7617 yyextra->docBlock << pat;
7619 BEGIN(DocCopyBlock);
7621<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7622<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7623<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7625 yyextra->docBlock <<
"\\ilinebr ";
7626 yyextra->docBlock << pat;
7628 BEGIN(DocCopyBlock);
7630<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7631<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7632<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7634 yyextra->docBlock << pat;
7636 BEGIN(DocCopyBlock);
7639 yyextra->docBlock <<
"```";
7642 yyextra->docBlock << yytext;
7645 yyextra->docBlock << yytext;
7647 BEGIN(DocCopyBlock);
7649<DocBlock>{B}*"<"{CODE}">" {
7650 if (yyextra->insideCS)
7652 yyextra->docBlock << yytext;
7654 BEGIN(DocCopyBlock);
7661<DocBlock>[^@*~`'\/\\\n]+ {
7662 yyextra->docBlock << yytext;
7666 yyextra->docBlock << *yytext;
7669 yyextra->docBlock << *yytext;
7674<DocCopyBlock>"</"{PRE}">" {
7679 yyextra->docBlock << yytext;
7681<DocCopyBlock>"</"{CODE}">" {
7686 yyextra->docBlock << yytext;
7688<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7693 yyextra->docBlock << yytext;
7695<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7700 yyextra->docBlock << yytext;
7702<DocCopyBlock>^{B}*"*"+/{BN}+ {
7703 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7711 yyextra->docBlock << indent;
7714<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7715 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7719 yyextra->docBlock << indent;
7726<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7727 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7731 yyextra->docBlock << indent+
"*";
7738<DocCopyBlock>^{B}*"*"+/{BN}* {
7739 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7742 if (yyextra->nestedComment>0)
7745 yyextra->docBlock << indent+
"*";
7750 yyextra->docBlock << indent;
7758<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7764 yyextra->docBlock << pat;
7766<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7772 yyextra->docBlock << pat;
7774<DocCopyBlock>"```" {
7775 if (yyextra->docBlockName==
"``")
7777 yyextra->docBlock <<
"`";
7779 yyextra->docBlock <<
"``";
7784 yyextra->docBlock << yytext;
7787<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7792 yyextra->docBlock << yytext;
7794<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7799 yyextra->docBlock << yytext;
7801<DocCopyBlock>"`"{1,2} {
7806 yyextra->docBlock << yytext;
7808<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7809 yyextra->docBlock << yytext;
7812 yyextra->docBlock << yytext;
7813 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7817 yyextra->lastStringContext=YY_START;
7818 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7819 yyextra->stopAtInvalidString=
true;
7823<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7826 yyextra->nestedComment++;
7828 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7830 yyextra->nestedComment--;
7832 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7834 warn(yyextra->fileName,yyextra->yyLineNr,
7835 "Found end of C comment inside a '{}' block without matching start of the comment!"
7836 " Maybe the end marker for the block is missing?",
7837 yyextra->docBlockName);
7840 yyextra->docBlock << yytext;
7843 yyextra->docBlock << *yytext;
7847 yyextra->docBlock << *yytext;
7849<DocCopyBlock><<EOF>> {
7850 warn(yyextra->fileName,yyextra->yyLineNr,
7851 "reached end of file while inside a '{}' block!"
7852 " The command that should end the block seems to be missing!",
7853 yyextra->docBlockName);
7860<Prototype>"operator"{B}*"("{B}*")" {
7861 yyextra->current->name+=yytext;
7864 yyextra->current->args+=*yytext;
7865 yyextra->currentArgumentContext = PrototypeQual;
7866 yyextra->fullArgString = yyextra->current->args;
7867 yyextra->copyArgString = &yyextra->current->args;
7868 BEGIN( ReadFuncArgType ) ;
7870<Prototype>"("({ID}"::")*({B}*[&*])+ {
7871 if (yyextra->insidePHP)
7877 yyextra->current->type+=yyextra->current->name+yytext;
7878 yyextra->current->name.clear();
7879 BEGIN( PrototypePtr );
7882<PrototypePtr>{SCOPENAME} {
7883 yyextra->current->name+=yytext;
7886 yyextra->current->args+=*yytext;
7887 yyextra->currentArgumentContext = PrototypeQual;
7888 yyextra->fullArgString = yyextra->current->args;
7889 yyextra->copyArgString = &yyextra->current->args;
7890 BEGIN( ReadFuncArgType ) ;
7893 yyextra->current->type+=
')';
7897 yyextra->current->name+=yytext;
7900 BEGIN( PrototypeSkipLine);
7902<PrototypeQual>{B}*"const"{B}* {
7903 yyextra->current->args +=
" const ";
7904 yyextra->current->argList.setConstSpecifier(
TRUE);
7906<PrototypeQual>{B}*"volatile"{B}* {
7907 yyextra->current->args +=
" volatile ";
7908 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7910<PrototypeQual>{B}*"="{B}*"0"{B}* {
7911 yyextra->current->args +=
" = 0";
7912 yyextra->current->virt = Specifier::Pure;
7913 yyextra->current->argList.setPureSpecifier(
TRUE);
7915<PrototypeQual>"throw"{B}*"(" {
7916 yyextra->current->exception =
"throw(";
7917 BEGIN(PrototypeExc);
7920 yyextra->current->exception +=
')';
7921 BEGIN(PrototypeQual);
7924 yyextra->current->exception += *yytext;
7927 yyextra->current->args += *yytext;
7930 yyextra->current->name += *yytext;
7932<PrototypeSkipLine>. {
7938<SkipCxxComment>.*"\\\n" {
7939 if (yyextra->insideCS)
7948<SkipCxxComment>{ANYopt}/\n {
7949 BEGIN( yyextra->lastCContext ) ;
7951<SkipComment>[^\*\n]+
7956 if (!yyextra->insideCpp) REJECT;
7957 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7958 yyextra->lastC11AttributeContext = YY_START;
7959 yyextra->pCopyC11AttributeString = &yyextra->current->attributes;
7960 BEGIN( CopyC11Attribute );
7965 if (yyextra->insideIDL && yyextra->insideCppQuote)
7969 else if (yyextra->insidePHP)
7971 yyextra->lastStringContext=YY_START;
7976 if (!yyextra->insidePHP)
7978 yyextra->lastCPPContext = YY_START;
7983 yyextra->lastCContext = YY_START ;
7984 BEGIN( SkipCxxComment ) ;
7988 if (!yyextra->insidePHP)
7990 yyextra->lastCContext = YY_START ;
7991 BEGIN( SkipCxxComment ) ;
7994 if (yyextra->insidePHP)
7996 yyextra->lastStringContext=YY_START;
7997 BEGIN(SkipPHPString);
8001 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
8003 if (yyextra->current->type.isEmpty())
8005 if (yyextra->current->name.isEmpty())
8006 yyextra->current->name=
"?";
8008 yyextra->current->name+=
"?";
8012 yyextra->current->type+=
"?";
8016<*>"}" { yyextra->exported=
false; }
8018<SkipComment>{CPPC}|{CCS}
8019<*>{CCS} { yyextra->lastCContext = YY_START ;
8020 BEGIN( SkipComment ) ;
8022<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8024 yyextra->lastCContext = YY_START ;
8025 BEGIN( SkipCxxComment ) ;
8028 if (yyextra->insideCS && yyextra->fakeNS)
8032 BEGIN ( ReadNSBody);
8044 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8046 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8048 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8058 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8059 yyextra->outerScopeEntries.clear();
8060 yyextra->baseName.clear();
8061 yyextra->protection = Protection::Public;
8062 yyextra->baseProt = Protection::Public;
8063 yyextra->sharpCount = 0;
8064 yyextra->roundCount = 0;
8065 yyextra->curlyCount = 0;
8066 yyextra->mtype = MethodTypes::Method;
8067 yyextra->isStatic =
FALSE;
8068 yyextra->virt = Specifier::Normal;
8069 yyextra->baseVirt = Specifier::Normal;
8070 yyextra->isTypedef =
FALSE;
8071 yyextra->insideTryBlock =
FALSE;
8072 yyextra->insideFormula =
FALSE;
8073 yyextra->insideCode=
FALSE;
8075 yyextra->previous = 0;
8076 yyextra->firstTypedefEntry.reset();
8077 yyextra->memspecEntry.reset();
8082 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8083 if (yyextra->insideJava)
8085 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8087 yyextra->current->protection = yyextra->protection;
8088 yyextra->current->exported = yyextra->exported ;
8089 yyextra->current->mtype = yyextra->mtype;
8090 yyextra->current->virt = yyextra->virt;
8091 yyextra->current->isStatic = yyextra->isStatic;
8092 yyextra->current->lang = yyextra->language;
8094 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8095 yyextra->isTypedef=
FALSE;
8103 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8104 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8106 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8112 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8115 for (p = yytext ; *p ; ++p )
8119 yyextra->yyLineNr++;
8125 yyextra->column+=tabSize - (yyextra->column%tabSize);
8138 int col=startIndent;
8144 if (c==
'\t') col+=tabSize-(col%tabSize);
8145 else if (c==
'\n') col=0;
8153 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8154 yyextra->current->
protection = yyextra->protection = prot;
8155 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8156 yyextra->current->type.clear();
8157 yyextra->current->name.clear();
8158 yyextra->current->args.clear();
8159 yyextra->current->argList.clear();
8165 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8166 size_t tl=yyextra->current->type.length();
8167 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8169 yyextra->current->type +=
' ' ;
8171 yyextra->current->type += yyextra->current->name;
8172 yyextra->current->name.clear() ;
8173 tl=yyextra->current->type.length();
8174 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8176 yyextra->current->type +=
' ' ;
8178 yyextra->current->type += yyextra->current->args ;
8179 yyextra->current->args.clear() ;
8180 yyextra->current->argList.clear();
8187 if (s==
nullptr || *s==0)
return name;
8189 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8201 bool funcPtr = i>0 && type[i-1]==
')';
8203 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8204 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8205 return type.
left(i);
8211 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8214 yyextra->docBlock <<
"\\iskip";
8216 yyextra->docBlockName=blockName;
8217 yyextra->fencedSize=fencedSize;
8218 yyextra->isCodeBlock=codeBlock;
8219 yyextra->nestedComment=0;
8225 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8226 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8230 yyextra->docBlock <<
"\\endiskip";
8232 yyextra->docBlockName=
"";
8252 int i=name.
find(
"operator");
8253 if (i==-1)
return FALSE;
8263 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8265 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8266 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8267 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8268 yyextra->insideD = yyextra->language==SrcLangExt::D;
8269 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8270 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8271 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8272 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8273 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8274 yyextra->language==SrcLangExt::Lex);
8285 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8286 if (yyextra->current_root->section.isScope())
8289 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8291 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8293 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8303 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8304 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8305 if (yyextra->current->argList.empty())
return FALSE;
8306 for (
const Argument &a : yyextra->current->argList)
8317 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8318 if (yyextra->insideJava)
8321 yyextra->current->protection = Protection::Public;
8322 if (text.
find(
"protected")!=-1)
8323 yyextra->current->protection = Protection::Protected;
8324 else if (text.
find(
"private")!=-1)
8325 yyextra->current->protection = Protection::Private;
8326 else if (text.
find(
"package")!=-1)
8327 yyextra->current->protection = Protection::Package;
8334 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8335 int si =
static_cast<int>(yyextra->current->args.length());
8336 if (yyextra->oldStyleArgType.isEmpty())
8338 std::string args = yyextra->current->args.str();
8339 static const reg::Ex re(R
"(\([^)]*\).*)");
8345 bi1=(int)match.position();
8346 size_t secondMatchStart = match.position()+match.length();
8349 bi2=(int)match.position();
8353 if (bi1!=-1 && bi2!=-1)
8356 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8358 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8359 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8361 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8362 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8363 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8368 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8371 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8372 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8374 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8375 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8381 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8384 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8388 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8389 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8402 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8405 oldStyleArgPtr=yyextra->current->args.
left(j);
8424 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8425 for (
Argument &a : yyextra->current->argList)
8434 a.
docs=brief+
"\n\n"+docs;
8466 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8469 yyextra->current->briefFile = yyextra->fileName;
8470 yyextra->current->briefLine = yyextra->yyLineNr;
8474 yyextra->current->docFile = yyextra->fileName;
8475 yyextra->current->docLine = yyextra->yyLineNr;
8483 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8484 if (yyextra->tempEntry==0)
8489 yyextra->previous = yyextra->current;
8490 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8494 yyextra->previous = yyextra->current;
8495 yyextra->current = yyextra->tempEntry;
8496 yyextra->tempEntry.reset();
8503 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8506 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8507 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8510 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8511 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8513 docEntry->inbodyFile = yyextra->fileName;
8514 docEntry->inbodyLine = lineNr;
8518 bool needsEntry=
FALSE;
8520 Markdown markdown(yyextra->fileName,lineNr);
8523 while (yyextra->commentScanner.parseCommentBlock(
8524 yyextra->thisParser,
8525 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8529 yyextra->docBlockInBody ?
FALSE : brief,
8530 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8531 yyextra->docBlockInBody,
8532 yyextra->protection,
8543 QCString docFile = yyextra->current->docFile;
8545 yyextra->current->docFile = docFile;
8546 yyextra->current->docLine = lineNr;
8554 if (yyextra->docBlockTerm)
8556 unput(yyextra->docBlockTerm);
8557 yyextra->docBlockTerm=0;
8564 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8575 QCString orgDoc = yyextra->current->doc;
8576 QCString orgBrief = yyextra->current->brief;
8577 int orgDocLine = yyextra->current->docLine;
8578 int orgBriefLine = yyextra->current->briefLine;
8580 yyextra->current->doc.
clear();
8581 yyextra->current->brief.clear();
8584 int lineNr = orgDocLine;
8586 Markdown markdown(yyextra->fileName,lineNr);
8589 while (yyextra->commentScanner.parseCommentBlock(
8590 yyextra->thisParser,
8591 yyextra->current.get(),
8598 yyextra->protection,
8607 if (needsEntry)
newEntry(yyscanner);
8613 a.
docs = yyextra->current->doc;
8616 yyextra->current->doc = orgDoc;
8617 yyextra->current->brief = orgBrief;
8618 yyextra->current->docLine = orgDocLine;
8619 yyextra->current->briefLine = orgBriefLine;
8630 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8631 for (
const auto &ce : rt->children())
8633 if (!ce->program.empty())
8637 yyextra->padCount=0;
8639 yyextra->programStr = ce->program.str();
8640 yyextra->inputString = yyextra->programStr.data();
8641 yyextra->inputPosition = 0;
8642 if (ce->section.isEnum() || ce->spec.isEnum())
8643 BEGIN( FindFields ) ;
8645 BEGIN( FindMembers ) ;
8646 yyextra->current_root = ce;
8647 yyextra->fileName = ce->fileName;
8649 yyextra->yyLineNr = ce->bodyLine;
8650 yyextra->yyColNr = ce->bodyColumn;
8651 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8653 yyextra->current = std::make_shared<Entry>();
8654 yyextra->isStatic =
FALSE;
8659 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8661 ce->groups = rt->groups;
8664 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8666 if ( ce->section.isClass() )
8668 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8670 yyextra->current->protection = yyextra->protection = Protection::Public ;
8672 else if (yyextra->insideJava)
8674 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8676 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8678 if (ce->lang==SrcLangExt::ObjC)
8680 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8684 yyextra->current->protection = yyextra->protection = Protection::Public ;
8689 yyextra->current->protection = yyextra->protection = Protection::Private ;
8692 else if (ce->section.isEnum() )
8694 yyextra->current->protection = yyextra->protection = ce->protection;
8696 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8698 if (ce->section.isNamespace() )
8700 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8702 yyextra->current->protection = yyextra->protection = ce->protection;
8703 yyextra->current->exported = yyextra->exported =
false;
8705 else if (ce->section.isNamespace() )
8707 yyextra->current->protection = yyextra->protection = Protection::Public ;
8708 yyextra->current->exported = yyextra->exported = ce->exported;
8712 yyextra->current->protection = yyextra->protection = Protection::Public ;
8713 yyextra->current->exported = yyextra->exported =
false;
8715 yyextra->mtype = MethodTypes::Method;
8716 yyextra->virt = Specifier::Normal;
8723 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8725 scannerYYlex(yyscanner);
8728 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8730 yyextra->programStr.clear();
8731 ce->program.str(std::string());
8745 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8746 for (
const auto &ce : rt->children())
8748 if (ce->section.isConcept())
8752 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8754 yyextra->padCount =0;
8756 yyextra->programStr = ce->initializer.str();
8757 yyextra->inputString = yyextra->programStr.data();
8758 yyextra->inputPosition = 0;
8759 yyextra->current_root = ce;
8760 yyextra->fileName = ce->fileName;
8761 yyextra->yyLineNr = ce->bodyLine;
8762 yyextra->yyColNr = ce->bodyColumn;
8763 yyextra->insideObjC =
false;
8764 yyextra->current = std::make_shared<Entry>();
8768 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8770 if (!ce->args.isEmpty())
8772 templArgs=indent+
"template"+ce->args+
"\n";
8774 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8776 yyextra->isStatic =
FALSE;
8778 yyextra->current->section = EntryType::makeConceptCodePart();
8779 yyextra->current->startLine = yyextra->yyLineNr;
8780 BEGIN( FindConceptParts );
8781 scannerYYlex(yyscanner);
8782 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8793 const char *fileBuf,
8794 const std::shared_ptr<Entry> &rt,
8798 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8801 yyextra->inputString = fileBuf;
8802 yyextra->inputPosition = 0;
8803 yyextra->column = 0;
8804 scannerYYrestart(
nullptr,yyscanner);
8807 yyextra->protection = Protection::Public;
8808 yyextra->mtype = MethodTypes::Method;
8809 yyextra->isStatic =
FALSE;
8810 yyextra->exported =
false;
8811 yyextra->virt = Specifier::Normal;
8812 yyextra->current_root = rt;
8813 yyextra->yyLineNr = 1 ;
8814 yyextra->yyBegLineNr = 1;
8815 yyextra->yyBegColNr = 0;
8816 yyextra->anonCount = 0;
8817 yyextra->anonNSCount = 0;
8818 yyextra->fileName = fileName;
8819 yyextra->clangParser = clangParser;
8821 rt->lang = yyextra->language;
8822 msg(
"Parsing file {}...\n",yyextra->fileName);
8824 yyextra->current_root = rt;
8826 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8827 yyextra->current = std::make_shared<Entry>();
8832 yyextra->current->name = yyextra->fileName;
8833 yyextra->current->section = sec;
8834 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8836 yyextra->current->reset();
8838 if ( yyextra->insidePHP )
8840 BEGIN( FindMembersPHP );
8842 else if ( yyextra->insideJava )
8844 yyextra->current->name=
"java::lang";
8845 yyextra->current->fileName = yyextra->fileName;
8846 yyextra->current->section = EntryType::makeUsingDir();
8847 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8849 BEGIN( FindMembers );
8853 BEGIN( FindMembers );
8856 scannerYYlex(yyscanner);
8858 if (YY_START==Comment)
8860 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8864 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8866 yyextra->programStr.clear();
8867 rt->program.str(std::string());
8872 yyextra->anonNSCount++;
8875 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8878 parent->moveToSubEntryAndKeep(child);
8880 yyextra->outerScopeEntries.clear();
8889 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8892 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8895 if (!yyextra->current)
8900 const char *orgInputString;
8901 int orgInputPosition;
8902 YY_BUFFER_STATE orgState;
8905 orgState = YY_CURRENT_BUFFER;
8906 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8907 orgInputString = yyextra->inputString;
8908 orgInputPosition = yyextra->inputPosition;
8911 yyextra->inputString = text.
data();
8912 yyextra->inputPosition = 0;
8913 yyextra->column = 0;
8914 scannerYYrestart(
nullptr, yyscanner);
8916 scannerYYlex(yyscanner);
8918 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8919 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8921 yyextra->current->section = EntryType::makeVariableDoc();
8925 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8926 yy_switch_to_buffer(orgState, yyscanner);
8927 yyextra->inputString = orgInputString;
8928 yyextra->inputPosition = orgInputPosition;
8944 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8952 scannerYYlex_destroy(
p->yyscanner);
8956 const char *fileBuf,
8957 const std::shared_ptr<Entry> &root,
8961 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8962 yyextra->thisParser =
this;
8966 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8974 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8975 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8976 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8987#include "scanner.l.h"
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
std::unique_ptr< Private > p
~COutlineParser() override
bool needsPreprocessing(const QCString &extension) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
static bool isFlagSet(const DebugMask mask)
Protection protection
class protection
Helper class to process markdown formatted text.
QCString process(const QCString &input, int &startNewlines, bool fromParseInput=false)
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
QCString trunc(const QCString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parsePrototype(yyscan_t yyscanner, const QCString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
const char * qPrint(const char *s)
static void parseConcepts(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
EntryType guessSection(const QCString &name)