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
227static inline int computeIndent(
const char *s,
int startIndent);
258#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for outline parsers.
This is an alternative implementation of QCString.
Text streaming class that buffers data.
#define lineCount(s, len)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void setContext(yyscan_t yyscanner)
static QCString stripQuotes(const char *s)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static void initParser(yyscan_t yyscanner)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static const char * stateToString(int state)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
void fixArgumentListForJavaScript(ArgumentList &al)
static int computeIndent(const char *s, int startIndent)
static bool startOfRequiresExpression(const QCString &req)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static const char * getLexerFILE()
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
static void addType(yyscan_t yyscanner)
static void initEntry(yyscan_t yyscanner)
Some helper functions for std::string.
TextStream * pSkipInterpString
EntryRelations outerScopeEntries
QCString * pCopyRoundString
int lastCopyArgStringContext
std::shared_ptr< Entry > firstTypedefEntry
int lastDeprecatedContext
bool insideJS
processing JavaScript code?
OutlineParserInterface * thisParser
std::shared_ptr< Entry > tempEntry
std::shared_ptr< Entry > memspecEntry
TextStream * pCopySquareGString
int lastInitializerContext
std::shared_ptr< Entry > previous
int lastPreLineCtrlContext
ClangTUParser * clangParser
bool insideCS
processing C# code?
ArgumentList * currentArgumentList
TextStream * pCopyCurlyGString
int lastCommentInArgContext
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
std::pair< Entry *, std::shared_ptr< Entry > > EntryRelation
int lastC11AttributeContext
QCString * pCopyQuotedString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
QCString * pCopyCurlyString
CommentScanner commentScanner
bool insideIDL
processing IDL code?
bool insideSlice
processing Slice code?
TextStream * pCopyHereDocGString
bool insideObjC
processing Objective C code?
bool insideCli
processing C++/CLI code?
int currentArgumentContext
int lastSkipVerbStringContext
QCString * pCopyRawString
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
QCString * pCopySharpString
std::vector< EntryRelation > EntryRelations
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
273NOTopt (("!"{BNopt})|("not"{BN}+))?
275HEXDIGIT ({DIGIT}|[a-f]|[A-F])
276ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
277SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
278TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
279CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
282CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
283PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
284PHPUSEKW ("public"|"private"|"protected")
285IDLATTR ("["[^\]]*"]"){BN}*
286TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
287RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
288RAWEND ")"[^ \t\(\)\\]{0,16}\"
289ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
290ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
291LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
292BITOP "&"|"|"|"^"|"<<"|">>"|"~"
293OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
294FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
295MODULE_ID ({ID}".")*{ID}
296LINENR {B}*[1-9][0-9]*
297FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
298FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
299FILECHARS {FILEICHAR}*{FILEECHAR}+
300HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
301VFILEMASK {FILECHARS}("."{FILECHARS})*
302FILEMASK {VFILEMASK}|{HFILEMASK}
313DCOMMC ("/\*!"|"/\**")
315DCOMMCPP ("/\/!"|"/\/\/")
317DCOMM {DCOMMC}|{DCOMMCPP}
389%x TryFunctionBlockEnd
404%x SkipInterpVerbString
419%x UNOIDLAttributeBlock
448%x SpecializationSingleQuote
449%x SpecializationDoubleQuote
482%x SliceDictionaryName
513<*>"DEPRECATED_ATTRIBUTE" {
514 if (!yyextra->insideObjC) REJECT;
516<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
517 if (!yyextra->insideObjC) REJECT;
518 yyextra->lastDeprecatedContext=YY_START;
519 yyextra->lastStringContext=Deprecated_round;
522<Deprecated_round>")" {
523 BEGIN(yyextra->lastDeprecatedContext);
525<Deprecated_round>{BNopt} {
528<Deprecated_round>. { }
530 yyextra->curlyCount=0;
531 yyextra->needsSemi =
TRUE;
532 BEGIN(SkipCurlyBlock);
535 yyextra->roundCount=0;
536 BEGIN(SkipRoundBlock);
539 ++yyextra->roundCount;
542 if (yyextra->roundCount )
543 --yyextra->roundCount ;
548 ++yyextra->curlyCount ;
551 if( yyextra->curlyCount )
553 --yyextra->curlyCount ;
555 else if (yyextra->needsSemi)
561 BEGIN( FindMembers );
565 if (yyextra->insidePHP)
567 yyextra->lastStringContext=NextSemi;
568 BEGIN(SkipPHPString);
571<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
573 yyextra->lastStringContext=NextSemi;
578 BEGIN( FindMembers );
582 BEGIN( FindMembers );
585 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
589<FindMembers>"<?php" {
590 yyextra->insidePHP =
TRUE;
592<FindMembersPHP>"<?"("php"?) {
593 BEGIN( FindMembers );
595<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
597 BEGIN( FindMembers );
599<FindMembers>"?>"|"</script>" {
600 if (yyextra->insidePHP)
601 BEGIN( FindMembersPHP );
605<FindMembersPHP>[^\n<]+ {
612<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
617<FindMembers>"%{"[^\n]* {
618 if (!yyextra->insideIDL)
622 if (!yyextra->insideIDL)
625<FindMembers>{B}*("properties"){BN}*":"{BN}* {
627 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
630<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
632 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
635<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
637 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
640<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
642 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
645<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
647 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
650<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
652 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
654<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
657<FindMembers>{B}*"internal"{BN}*":"{BN}* {
658 if (yyextra->insideCli)
667<FindMembers>{B}*"protected"{BN}*":"{BN}* {
670<FindMembers>{B}*"private"{BN}*":"{BN}* {
673<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
674 if (!yyextra->insideCpp) REJECT;
678<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
679 if (!yyextra->insideCpp) REJECT;
683<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
684 if (!yyextra->insideCpp) REJECT;
696<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
697<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
698 BEGIN( SkipComment ) ;
700<CppProt>("slots"|"Q_SLOTS") {
701 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
703<FindMembers>{B}*"event"{BN}+ {
704 if (yyextra->insideCli)
708 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
709 yyextra->current->bodyLine = yyextra->yyLineNr;
710 yyextra->current->bodyColumn = yyextra->yyColNr;
711 yyextra->curlyCount=0;
712 BEGIN( CliPropertyType );
714 else if (yyextra->insideCS)
717 yyextra->current->mtype = MethodTypes::Event;
718 yyextra->current->bodyLine = yyextra->yyLineNr;
719 yyextra->current->bodyColumn = yyextra->yyColNr;
726<FindMembers>{B}*"property"{BN}+ {
727 if (yyextra->insideCli)
731 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
732 yyextra->current->bodyLine = yyextra->yyLineNr;
733 yyextra->current->bodyColumn = yyextra->yyColNr;
734 yyextra->curlyCount=0;
735 BEGIN( CliPropertyType );
742<CliPropertyType>{ID} {
744 yyextra->current->name = yytext;
static void addType(yyscan_t yyscanner)
746<CliPropertyType>"[" {
747 yyextra->current->args =
"[";
748 BEGIN( CliPropertyIndex );
750<CliPropertyType>"{" {
751 yyextra->curlyCount=0;
753 BEGIN( CSAccessorDecl );
755<CliPropertyType>";" {
757 BEGIN( FindMembers );
762<CliPropertyType>{B}* {
766 yyextra->current->type += yytext;
768<CliPropertyIndex>"]" {
769 BEGIN( CliPropertyType );
770 yyextra->current->args+=yytext;
773 yyextra->current->args+=yytext;
788<FindMembers>{B}*"@private"{BN}+ {
791<FindMembers>{B}*"@protected"{BN}+ {
794<FindMembers>{B}*"@public"{BN}+ {
797<FindMembers>[\-+]{BN}* {
798 if (!yyextra->insideObjC)
804 yyextra->current->fileName = yyextra->fileName;
805 yyextra->current->startLine = yyextra->yyLineNr;
806 yyextra->current->startColumn = yyextra->yyColNr;
807 yyextra->current->bodyLine = yyextra->yyLineNr;
808 yyextra->current->bodyColumn = yyextra->yyColNr;
809 yyextra->current->section = EntryType::makeFunction();
810 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
811 yyextra->insideObjC =
TRUE;
812 yyextra->yyBegColNr = yyextra->yyColNr;
813 yyextra->yyBegLineNr = yyextra->yyLineNr;
814 yyextra->current->virt = Specifier::Virtual;
816 yyextra->current->isStatic=yytext[0]==
'+';
822 BEGIN( ObjCReturnType );
823 yyextra->current->type.clear();
824 yyextra->roundCount=0;
827 if (yyextra->current->type.isEmpty())
829 yyextra->current->type +=
"id";
831 yyextra->current->name = yytext;
835 yyextra->current->name +=
':';
837 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
840<ObjCReturnType>[^()]* {
841 yyextra->current->type += yytext;
843<ObjCReturnType>"(^)(" {
844 yyextra->current->type += yytext;
845 yyextra->roundCount++;
848 yyextra->current->type += yytext;
849 yyextra->roundCount++;
852 if (yyextra->roundCount<=0)
858 yyextra->current->type += yytext;
859 yyextra->roundCount--;
862<ObjCParams>({ID})?{BN}*":" {
867 yyextra->current->name +=
" :";
871 yyextra->current->name += keyw+
":";
873 if (yyextra->current->argList.back().type.isEmpty())
875 yyextra->current->argList.back().type=
"id";
879 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
881<ObjCParams>{ID}{BN}* {
885<ObjCParams>","{BN}*"..." {
892 yyextra->current->argList.push_back(a);
900 yyextra->roundCount=0;
901 yyextra->current->argList.back().type.clear();
902 BEGIN( ObjCParamType );
905 yyextra->roundCount++;
906 yyextra->current->argList.back().type+=yytext;
908<ObjCParamType>")"/{B}* {
909 if (yyextra->roundCount<=0)
915 yyextra->current->argList.back().type+=yytext;
916 yyextra->roundCount--;
919<ObjCParamType>[^()]* {
922<ObjCMethod,ObjCParams>";" {
923 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
925 yyextra->current->argList.back().type=
"id";
927 if (yyextra->current->argList.empty())
929 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
936<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
941 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
943 yyextra->current->argList.back().type=
"id";
945 if (yyextra->current->argList.empty())
947 yyextra->current->argList.setNoParameters(
TRUE);
953<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
954 if (yyextra->insideSlice)
957 yyextra->current->bodyLine = yyextra->yyLineNr;
958 yyextra->current->bodyColumn = yyextra->yyColNr;
959 yyextra->current->fileName = yyextra->fileName ;
960 yyextra->current->startLine = yyextra->yyLineNr ;
961 yyextra->current->startColumn = yyextra->yyColNr;
962 yyextra->current->args.clear();
963 yyextra->current->section = EntryType::makeTypedef();
964 yyextra->isTypedef =
TRUE;
965 BEGIN( SliceSequence );
970<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
971 if (yyextra->insideSlice)
974 yyextra->current->bodyLine = yyextra->yyLineNr;
975 yyextra->current->bodyColumn = yyextra->yyColNr;
976 yyextra->current->fileName = yyextra->fileName ;
977 yyextra->current->startLine = yyextra->yyLineNr ;
978 yyextra->current->startColumn = yyextra->yyColNr;
979 yyextra->current->args.clear();
980 yyextra->current->section = EntryType::makeTypedef() ;
981 yyextra->isTypedef =
TRUE;
982 BEGIN( SliceDictionary );
987<FindMembers>{BN}{1,80} {
990<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
991 if (yyextra->insideJava)
994 yyextra->lastSkipRoundContext = YY_START;
995 yyextra->roundCount=0;
1000 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1001 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1002 yyextra->current->protection = Protection::Public ;
1004 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
1011<ObjCPropAttr>"getter="{ID} {
1012 yyextra->current->read = yytext+7;
1014<ObjCPropAttr>"setter="{ID} {
1015 yyextra->current->write = yytext+7;
1017<ObjCPropAttr>"readonly" {
1018 yyextra->current->spec.setWritable(
false);
1020<ObjCPropAttr>"readwrite" {
1022<ObjCPropAttr>"assign" {
1024<ObjCPropAttr>"unsafe_unretained" {
1025 yyextra->current->spec.setAssign(
false);
1026 yyextra->current->spec.setUnretained(
true);
1028<ObjCPropAttr>"retain" {
1029 yyextra->current->spec.setAssign(
false);
1030 yyextra->current->spec.setRetain(
true);
1032<ObjCPropAttr>"copy" {
1033 yyextra->current->spec.setAssign(
false);
1034 yyextra->current->spec.setCopy(
true);
1036<ObjCPropAttr>"weak" {
1037 yyextra->current->spec.setAssign(
false);
1038 yyextra->current->spec.setWeak(
true);
1040<ObjCPropAttr>"strong" {
1041 yyextra->current->spec.setAssign(
false);
1042 yyextra->current->spec.setStrong(
true);
1044<ObjCPropAttr>"nonatomic" {
1045 yyextra->current->spec.setNonAtomic(
true);
1050<FindMembers>"@"{ID}("."{ID})+ {
1051 if (yyextra->insideJava)
1060<FindMembers>"@"{ID} {
1061 if (yyextra->insideJava)
1065 else if (
qstrcmp(yytext,
"@property")==0)
1067 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1068 yyextra->current->spec.setWritable(
true).setReadable(
true);
1069 yyextra->current->protection = Protection::Public ;
1071 else if (
qstrcmp(yytext,
"@synthesize")==0)
1073 BEGIN( ObjCSkipStatement );
1075 else if (
qstrcmp(yytext,
"@dynamic")==0)
1077 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1084<ObjCSkipStatement>";" {
1087<PackageName>{ID}(("."|"\\"){ID})* {
1088 yyextra->isTypedef=
FALSE;
1090 yyextra->current->name = yytext;
1091 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1092 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1093 yyextra->current->section = EntryType::makeNamespace();
1094 yyextra->current->type =
"namespace" ;
1095 yyextra->current->fileName = yyextra->fileName;
1096 yyextra->current->startLine = yyextra->yyLineNr;
1097 yyextra->current->startColumn = yyextra->yyColNr;
1098 yyextra->current->bodyLine = yyextra->yyLineNr;
1099 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
1103 std::shared_ptr<Entry> tmp = yyextra->current;
1104 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1105 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1110 yyextra->curlyCount=0;
1111 BEGIN( ReadNSBody );
1113<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1114 if (!yyextra->insideCpp) REJECT;
1116 yyextra->current->exported =
true;
1118 BEGIN( ModuleName );
1120<FindMembers>{B}*"module"{BN}*";" {
1121 if (!yyextra->insideCpp) REJECT;
1122 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1125 BEGIN( FindMembers );
1127<FindMembers>{B}*"module"{BN}+ {
1128 if (!yyextra->insideCpp) REJECT;
1130 yyextra->current->exported =
false;
1132 BEGIN( ModuleName );
1134<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1135 if (!yyextra->insideCpp) REJECT;
1136 yyextra->current->exported =
true;
1138 BEGIN( ModuleImport );
1140<FindMembers>{B}*"import"{BN}+ {
1141 if (!yyextra->insideCpp) REJECT;
1143 BEGIN( ModuleImport );
1145<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1147 int i = name.
find(
':');
1153 yyextra->current->exported,
1156 yyextra->current->section = EntryType::makeModuleDoc();
1157 yyextra->isTypedef=
FALSE;
1159 yyextra->current->type +=
" module";
1160 yyextra->current->fileName = yyextra->fileName;
1161 yyextra->current->startLine = yyextra->yyLineNr;
1162 yyextra->current->startColumn = yyextra->yyColNr;
1163 yyextra->current->bodyLine = yyextra->yyLineNr;
1164 yyextra->current->bodyColumn = yyextra->yyColNr;
1165 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
1168<ModuleName>{MODULE_ID} {
1172 yyextra->current->exported,
1174 yyextra->current->section = EntryType::makeModuleDoc();
1175 yyextra->isTypedef=
FALSE;
1177 yyextra->current->type +=
" module";
1178 yyextra->current->fileName = yyextra->fileName;
1179 yyextra->current->startLine = yyextra->yyLineNr;
1180 yyextra->current->startColumn = yyextra->yyColNr;
1181 yyextra->current->bodyLine = yyextra->yyLineNr;
1182 yyextra->current->bodyColumn = yyextra->yyColNr;
1183 yyextra->current->name = yytext;
1186<ModuleName>":"{BN}+"private" {
1187 yyextra->current->exported = yyextra->exported =
false;
1190<ModuleName>";" { unput(
';');
1195<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1201<ModuleImport>"<"[^>\n]*">" {
1207<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1209 int i = name.
find(
':');
1215 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1219<ModuleImport>{MODULE_ID} {
1223 yyextra->current->exported);
1226<ModuleImport>";" { BEGIN(FindMembers); }
1227<ModuleImport>\n {
lineCount(yyscanner); }
1229<FindMembers>{B}*"export"{BN}+"{" {
1230 yyextra->current->exported = yyextra->exported =
true;
1232<FindMembers>{B}*"export"{BN}+ {
1233 if (!yyextra->insideCpp) REJECT;
1234 yyextra->current->exported=
true;
1236<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1237 yyextra->current->type +=
" initonly ";
1238 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1241<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1242 yyextra->current->isStatic =
TRUE;
1245<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1246 yyextra->current->isStatic =
TRUE;
1249<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1250 yyextra->current->isStatic =
FALSE;
1251 yyextra->current->explicitExternal =
TRUE;
1254<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1256 yyextra->current->type +=
" const ";
1257 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1265<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1266 yyextra->current->type +=
" virtual ";
1267 yyextra->current->virt = Specifier::Virtual;
1270<FindMembers>{B}*"constexpr"{BN}+ {
1271 if (yyextra->insideCpp)
1273 yyextra->current->spec.setConstExpr(
true);
1277<FindMembers>{B}*"consteval"{BN}+ {
1278 if (yyextra->insideCpp)
1280 yyextra->current->spec.setConstEval(
true);
1284<FindMembers>{B}*"constinit"{BN}+ {
1285 if (yyextra->insideCpp)
1287 yyextra->current->spec.setConstInit(
true);
1291<FindMembers>{B}*"published"{BN}+ {
1292 if (yyextra->insideIDL)
1295 yyextra->current->spec.setPublished(
true);
1302<FindMembers>{B}*"sealed"{BN}+ {
1303 if (yyextra->insideCS)
1305 yyextra->current->spec.setSealed(
true);
1312<FindMembers>{B}*"abstract"{BN}+ {
1313 if (yyextra->insidePHP || yyextra->insideCS)
1315 yyextra->current->spec.setAbstract(
true);
1319 if (yyextra->insideCpp) REJECT;
1320 yyextra->current->type +=
" abstract ";
1321 if (!yyextra->insideJava)
1323 yyextra->current->virt = Specifier::Pure;
1327 yyextra->current->spec.setAbstract(
true);
1332<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1333 yyextra->current->spec.setInline(
true);
1336<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1337 yyextra->current->spec.setMutable(
true);
1340<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1341 yyextra->current->spec.setThreadLocal(
true);
1344<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1345 yyextra->current->spec.setExplicit(
true);
1348<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1349 yyextra->current->spec.setLocal(
true);
1352<FindMembers>{B}*"@required"{BN}+ {
1353 yyextra->current->spec.setOptional(
false).setRequired(
true);
1356<FindMembers>{B}*"@optional"{BN}+ {
1357 yyextra->current->spec.setRequired(
false).setOptional(
true);
1365<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1366<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1367 yyextra->isTypedef=
FALSE;
1368 yyextra->current->section = EntryType::makeNamespace();
1369 yyextra->current->type =
"namespace" ;
1370 yyextra->current->fileName = yyextra->fileName;
1371 yyextra->current->startLine = yyextra->yyLineNr;
1372 yyextra->current->startColumn = yyextra->yyColNr;
1373 yyextra->current->bodyLine = yyextra->yyLineNr;
1374 yyextra->current->bodyColumn = yyextra->yyColNr;
1376 if (yyextra->insidePHP)
1378 BEGIN( PackageName );
1382 BEGIN( CompoundName );
1385<FindMembers>{B}*"module"{BN}+ {
1387 if (yyextra->insideIDL || yyextra->insideSlice)
1389 yyextra->isTypedef=
FALSE;
1390 yyextra->current->section = EntryType::makeNamespace();
1391 yyextra->current->type =
"module" ;
1392 yyextra->current->fileName = yyextra->fileName;
1393 yyextra->current->startLine = yyextra->yyLineNr;
1394 yyextra->current->startColumn = yyextra->yyColNr;
1395 yyextra->current->bodyLine = yyextra->yyLineNr;
1396 yyextra->current->bodyColumn = yyextra->yyColNr;
1397 BEGIN( CompoundName );
1399 else if (yyextra->insideD)
1410<FindMembers>{B}*"library"{BN}+ {
1412 if (yyextra->insideIDL)
1414 yyextra->isTypedef=
FALSE;
1415 yyextra->current->section = EntryType::makeNamespace();
1416 yyextra->current->type =
"library" ;
1417 yyextra->current->fileName = yyextra->fileName;
1418 yyextra->current->startLine = yyextra->yyLineNr;
1419 yyextra->current->startColumn = yyextra->yyColNr;
1420 yyextra->current->bodyLine = yyextra->yyLineNr;
1421 yyextra->current->bodyColumn = yyextra->yyColNr;
1422 BEGIN( CompoundName );
1430<FindMembers>{B}*"constants"{BN}+ {
1432 if (yyextra->insideIDL)
1434 yyextra->isTypedef=
FALSE;
1435 yyextra->current->section = EntryType::makeNamespace();
1436 yyextra->current->type =
"constants";
1437 yyextra->current->fileName = yyextra->fileName;
1438 yyextra->current->startLine = yyextra->yyLineNr;
1439 yyextra->current->startColumn = yyextra->yyColNr;
1440 yyextra->current->bodyLine = yyextra->yyLineNr;
1441 yyextra->current->bodyColumn = yyextra->yyColNr;
1442 BEGIN( CompoundName );
1450<FindMembers>{BN}*("service"){BN}+ {
1452 if (yyextra->insideIDL)
1454 yyextra->isTypedef=
FALSE;
1455 yyextra->current->section = EntryType::makeClass();
1459 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1461 yyextra->current->type +=
" service " ;
1462 yyextra->current->fileName = yyextra->fileName;
1463 yyextra->current->startLine = yyextra->yyLineNr;
1464 yyextra->current->bodyLine = yyextra->yyLineNr;
1465 yyextra->current->bodyColumn = yyextra->yyColNr;
1466 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1474<FindMembers>{BN}*("singleton"){BN}+ {
1476 if (yyextra->insideIDL)
1478 yyextra->isTypedef=
FALSE;
1479 yyextra->current->section = EntryType::makeClass();
1481 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1482 setPublished(spec.isPublished());
1484 yyextra->current->type +=
" singleton " ;
1485 yyextra->current->fileName = yyextra->fileName;
1486 yyextra->current->startLine = yyextra->yyLineNr;
1487 yyextra->current->bodyLine = yyextra->yyLineNr;
1488 yyextra->current->bodyColumn = yyextra->yyColNr;
1489 BEGIN( CompoundName );
1497<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1499 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1501 yyextra->isTypedef=
FALSE;
1502 yyextra->current->section = EntryType::makeClass();
1504 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1506 setOptional(spec.isOptional()).
1507 setPublished(spec.isPublished()).
1508 setLocal(spec.isLocal());
1510 yyextra->current->type +=
" interface" ;
1511 yyextra->current->fileName = yyextra->fileName;
1512 yyextra->current->startLine = yyextra->yyLineNr;
1513 yyextra->current->startColumn = yyextra->yyColNr;
1514 yyextra->current->bodyLine = yyextra->yyLineNr;
1515 yyextra->current->bodyColumn = yyextra->yyColNr;
1517 BEGIN( CompoundName );
1525<FindMembers>{B}*"@implementation"{BN}+ {
1527 yyextra->isTypedef=
FALSE;
1528 yyextra->current->section = EntryType::makeObjcImpl();
1529 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1530 yyextra->insideObjC =
TRUE;
1531 yyextra->current->protection = yyextra->protection = Protection::Public ;
1533 yyextra->current->type +=
" implementation" ;
1534 yyextra->current->fileName = yyextra->fileName;
1535 yyextra->current->startLine = yyextra->yyLineNr;
1536 yyextra->current->bodyLine = yyextra->yyLineNr;
1537 yyextra->current->bodyColumn = yyextra->yyColNr;
1538 BEGIN( CompoundName );
1540<FindMembers>{B}*"@interface"{BN}+ {
1542 yyextra->isTypedef=
FALSE;
1543 yyextra->current->section = EntryType::makeClass();
1544 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1545 if (!yyextra->insideJava)
1547 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1548 yyextra->insideObjC =
TRUE;
1550 yyextra->current->protection = yyextra->protection = Protection::Public ;
1552 yyextra->current->type +=
" interface" ;
1553 yyextra->current->fileName = yyextra->fileName;
1554 yyextra->current->startLine = yyextra->yyLineNr;
1555 yyextra->current->startColumn = yyextra->yyColNr;
1556 yyextra->current->bodyLine = yyextra->yyLineNr;
1557 yyextra->current->bodyColumn = yyextra->yyColNr;
1558 BEGIN( CompoundName );
1560<FindMembers>{B}*"@protocol"{BN}+ {
1562 yyextra->isTypedef=
FALSE;
1563 yyextra->current->section = EntryType::makeClass();
1565 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1566 yyextra->insideObjC =
TRUE;
1567 yyextra->current->protection = yyextra->protection = Protection::Public ;
1569 yyextra->current->type +=
" protocol" ;
1570 yyextra->current->fileName = yyextra->fileName;
1571 yyextra->current->startLine = yyextra->yyLineNr;
1572 yyextra->current->startColumn = yyextra->yyColNr;
1573 yyextra->current->bodyLine = yyextra->yyLineNr;
1574 yyextra->current->bodyColumn = yyextra->yyColNr;
1575 BEGIN( CompoundName );
1577<FindMembers>{B}*"exception"{BN}+ {
1578 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1579 yyextra->isTypedef=
FALSE;
1580 yyextra->current->section = EntryType::makeClass();
1583 yyextra->current->spec =
TypeSpecifier().setException(
true).
1584 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1586 yyextra->current->type +=
" exception" ;
1587 yyextra->current->fileName = yyextra->fileName;
1588 yyextra->current->startLine = yyextra->yyLineNr;
1589 yyextra->current->startColumn = yyextra->yyColNr;
1590 yyextra->current->bodyLine = yyextra->yyLineNr;
1591 yyextra->current->bodyColumn = yyextra->yyColNr;
1593 BEGIN( CompoundName );
1595<FindMembers>"@class" |
1596<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1597<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1599 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1600 bool isConst=decl.
find(
"const")!=-1;
1601 bool isVolatile=decl.
find(
"volatile")!=-1;
1602 yyextra->current->section = EntryType::makeClass();
1604 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1607 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1609 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1611 yyextra->current->spec.setLocal(
true);
1615 yyextra->current->type +=
" const";
1617 else if (isVolatile)
1619 yyextra->current->type +=
" volatile";
1621 yyextra->current->type +=
" class" ;
1622 yyextra->current->fileName = yyextra->fileName;
1623 yyextra->current->startLine = yyextra->yyLineNr;
1624 yyextra->current->startColumn = yyextra->yyColNr;
1625 yyextra->current->bodyLine = yyextra->yyLineNr;
1626 yyextra->current->bodyColumn = yyextra->yyColNr;
1629 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1630 yyextra->insideObjC =
TRUE;
1633 if (yytext[yyleng-1]==
'{') unput(
'{');
1634 BEGIN( CompoundName ) ;
1636<FindMembers>{B}*"value class{" |
1637<FindMembers>{B}*"value class"{BN}+ {
1638 yyextra->isTypedef=
FALSE;
1639 yyextra->current->section = EntryType::makeClass();
1642 yyextra->current->type +=
" value class" ;
1643 yyextra->current->fileName = yyextra->fileName;
1644 yyextra->current->startLine = yyextra->yyLineNr;
1645 yyextra->current->startColumn = yyextra->yyColNr;
1646 yyextra->current->bodyLine = yyextra->yyLineNr;
1647 yyextra->current->bodyColumn = yyextra->yyColNr;
1649 if (yytext[yyleng-1]==
'{') unput(
'{');
1650 BEGIN( CompoundName ) ;
1652<FindMembers>{B}*"ref class{" |
1653<FindMembers>{B}*"ref class"{BN}+ {
1654 yyextra->isTypedef=
FALSE;
1655 yyextra->current->section = EntryType::makeClass();
1658 yyextra->current->type +=
" ref class" ;
1659 yyextra->current->fileName = yyextra->fileName;
1660 yyextra->current->startLine = yyextra->yyLineNr;
1661 yyextra->current->startColumn = yyextra->yyColNr;
1662 yyextra->current->bodyLine = yyextra->yyLineNr;
1663 yyextra->current->bodyColumn = yyextra->yyColNr;
1665 if (yytext[yyleng-1]==
'{') unput(
'{');
1666 BEGIN( CompoundName ) ;
1668<FindMembers>{B}*"interface class{" |
1669<FindMembers>{B}*"interface class"{BN}+ {
1670 yyextra->isTypedef=
FALSE;
1671 yyextra->current->section = EntryType::makeClass();
1672 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1674 yyextra->current->type +=
" interface class" ;
1675 yyextra->current->fileName = yyextra->fileName;
1676 yyextra->current->startLine = yyextra->yyLineNr;
1677 yyextra->current->startColumn = yyextra->yyColNr;
1678 yyextra->current->bodyLine = yyextra->yyLineNr;
1679 yyextra->current->bodyColumn = yyextra->yyColNr;
1681 if (yytext[yyleng-1]==
'{') unput(
'{');
1682 BEGIN( CompoundName ) ;
1684<FindMembers>{B}*"coclass"{BN}+ {
1685 if (yyextra->insideIDL)
1687 yyextra->isTypedef=
FALSE;
1688 yyextra->current->section = EntryType::makeClass();
1690 yyextra->current->type +=
" coclass" ;
1691 yyextra->current->fileName = yyextra->fileName;
1692 yyextra->current->startLine = yyextra->yyLineNr;
1693 yyextra->current->startColumn = yyextra->yyColNr;
1694 yyextra->current->bodyLine = yyextra->yyLineNr;
1695 yyextra->current->bodyColumn = yyextra->yyColNr;
1697 BEGIN( CompoundName ) ;
1702 yyextra->current->name = yytext;
1703 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1707<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1708<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1709 if (yyextra->insideJava) REJECT;
1711 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1712 bool isConst=decl.
find(
"const")!=-1;
1713 bool isVolatile=decl.
find(
"volatile")!=-1;
1714 yyextra->current->section = EntryType::makeClass() ;
1718 setPublished(spec.isPublished()).
1719 setInline(spec.isInline()).
1720 setLocal(spec.isLocal());
1726 yyextra->current->type +=
" const";
1728 else if (isVolatile)
1730 yyextra->current->type +=
" volatile";
1732 yyextra->current->type +=
" struct" ;
1733 yyextra->current->fileName = yyextra->fileName;
1734 yyextra->current->startLine = yyextra->yyLineNr;
1735 yyextra->current->startColumn = yyextra->yyColNr;
1736 yyextra->current->bodyLine = yyextra->yyLineNr;
1737 yyextra->current->bodyColumn = yyextra->yyColNr;
1739 if (yytext[yyleng-1]==
'{') unput(
'{');
1740 BEGIN( CompoundName ) ;
1742<FindMembers>{B}*"value struct{" |
1743<FindMembers>{B}*"value struct"{BN}+ {
1744 yyextra->isTypedef=
FALSE;
1745 yyextra->current->section = EntryType::makeClass();
1746 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1748 yyextra->current->type +=
" value struct" ;
1749 yyextra->current->fileName = yyextra->fileName;
1750 yyextra->current->startLine = yyextra->yyLineNr;
1751 yyextra->current->startColumn = yyextra->yyColNr;
1752 yyextra->current->bodyLine = yyextra->yyLineNr;
1753 yyextra->current->bodyColumn = yyextra->yyColNr;
1755 if (yytext[yyleng-1]==
'{') unput(
'{');
1756 BEGIN( CompoundName ) ;
1758<FindMembers>{B}*"ref struct{" |
1759<FindMembers>{B}*"ref struct"{BN}+ {
1760 yyextra->isTypedef=
FALSE;
1761 yyextra->current->section = EntryType::makeClass();
1762 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1764 yyextra->current->type +=
" ref struct" ;
1765 yyextra->current->fileName = yyextra->fileName;
1766 yyextra->current->startLine = yyextra->yyLineNr;
1767 yyextra->current->startColumn = yyextra->yyColNr;
1768 yyextra->current->bodyLine = yyextra->yyLineNr;
1769 yyextra->current->bodyColumn = yyextra->yyColNr;
1771 if (yytext[yyleng-1]==
'{') unput(
'{');
1772 BEGIN( CompoundName ) ;
1774<FindMembers>{B}*"interface struct{" |
1775<FindMembers>{B}*"interface struct"{BN}+ {
1776 yyextra->isTypedef=
FALSE;
1777 yyextra->current->section = EntryType::makeClass();
1778 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1780 yyextra->current->type +=
" interface struct";
1781 yyextra->current->fileName = yyextra->fileName;
1782 yyextra->current->startLine = yyextra->yyLineNr;
1783 yyextra->current->startColumn = yyextra->yyColNr;
1784 yyextra->current->bodyLine = yyextra->yyLineNr;
1785 yyextra->current->bodyColumn = yyextra->yyColNr;
1787 if (yytext[yyleng-1]==
'{') unput(
'{');
1788 BEGIN( CompoundName ) ;
1790<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1791<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1792 if (yyextra->insideJava) REJECT;
1794 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1795 bool isConst=decl.
find(
"const")!=-1;
1796 bool isVolatile=decl.
find(
"volatile")!=-1;
1797 yyextra->current->section = EntryType::makeClass();
1804 yyextra->current->type +=
" const";
1806 else if (isVolatile)
1808 yyextra->current->type +=
" volatile";
1810 yyextra->current->type +=
" union" ;
1811 yyextra->current->fileName = yyextra->fileName;
1812 yyextra->current->startLine = yyextra->yyLineNr;
1813 yyextra->current->startColumn = yyextra->yyColNr;
1814 yyextra->current->bodyLine = yyextra->yyLineNr;
1815 yyextra->current->bodyColumn = yyextra->yyColNr;
1817 if (yytext[yyleng-1]==
'{') unput(
'{');
1818 BEGIN( CompoundName ) ;
1820<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1821<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1823 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1824 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1825 bool isEnumSytruct = text.
find(
"struct")!=-1;
1826 if (yyextra->insideJava)
1828 yyextra->current->section = EntryType::makeClass();
1834 yyextra->current->section = EntryType::makeEnum() ;
1837 yyextra->current->type +=
" enum";
1840 yyextra->current->spec.setStrong(
true);
1844 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1846 yyextra->current->fileName = yyextra->fileName;
1847 yyextra->current->startLine = yyextra->yyLineNr;
1848 yyextra->current->startColumn = yyextra->yyColNr;
1849 yyextra->current->bodyLine = yyextra->yyLineNr;
1850 yyextra->current->bodyColumn = yyextra->yyColNr;
1852 if (yytext[yyleng-1]==
'{') unput(
'{');
1853 BEGIN( CompoundName ) ;
1855<FindMembers>{B}*"concept"{BN}+ {
1856 if (yyextra->insideJava) REJECT;
1857 yyextra->isTypedef=
FALSE;
1858 yyextra->current->section = EntryType::makeConcept();
1860 yyextra->current->type +=
" concept";
1861 yyextra->current->fileName = yyextra->fileName;
1862 yyextra->current->startLine = yyextra->yyLineNr;
1863 yyextra->current->startColumn = yyextra->yyColNr;
1864 yyextra->current->bodyLine = yyextra->yyLineNr;
1865 yyextra->current->bodyColumn = yyextra->yyColNr;
1866 yyextra->current->args = yyextra->fullArgString;
1867 yyextra->keepComment =
true;
1869 BEGIN( ConceptName ) ;
1871<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1873 yyextra->current->name +=
"()";
1874 BEGIN( FindMembers );
1876<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1878 yyextra->current->name += yytext ;
1879 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1880 BEGIN( FindMembers ) ;
1882<Operator>"("{BN}*")"{BNopt}/"(" {
1884 yyextra->current->name += yytext ;
1885 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1886 BEGIN( FindMembers ) ;
1890 BEGIN( FindMembers ) ;
1894 yyextra->current->name += *yytext ;
1896<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1897 if (!yyextra->current->type.startsWith(
"friend "))
1899 yyextra->current->name += yytext;
1903 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1905 BEGIN( FindMembers ) ;
1907<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1910 yyextra->current->tArgLists.
push_back(al);
1911 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1912 yyextra->templateStr=
"<";
1913 yyextra->fullArgString = yyextra->templateStr;
1914 yyextra->copyArgString = &yyextra->templateStr;
1915 yyextra->currentArgumentContext = FindMembers;
1916 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1918<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1919 if (yyextra->insideJava) REJECT;
1921 BEGIN( NSAliasName );
1924 yyextra->aliasName = yytext;
1925 BEGIN( NSAliasArg );
1927<NSAliasArg>({ID}"::")*{ID} {
1929 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1940 BEGIN( FindMembers );
1942<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1944 yyextra->aliasName=yytext;
1947<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1951 yyextra->current->fileName = yyextra->fileName;
1953 yyextra->current->section = EntryType::makeUsingDecl();
1954 yyextra->current_root->copyToSubEntry(yyextra->current);
1956 yyextra->current->section = EntryType::makeUsingDir();
1957 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1959 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1961<PHPUseAs>{BN}+"as"{BN}+ {
1964<PHPUseAs>{PHPUSEKW} {
1968 if (!yyextra->aliasName.isEmpty())
1973 yyextra->aliasName.clear();
const std::string & str() const
1975<PHPUse,PHPUseAs>[,;] {
1985<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1989 yyextra->current->fileName = yyextra->fileName;
1996 yyextra->current->section = EntryType::makeUsingDir();
1997 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)
2001<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2005 yyextra->current->fileName = yyextra->fileName;
2017 if (yyextra->insideD)
2019 yyextra->current->section = EntryType::makeUsingDir();
2024 yyextra->current->section = EntryType::makeUsingDecl();
2026 yyextra->previous = yyextra->current;
2027 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2031<IDLImport>"\""[^"]*"\"" {
2032 QCString fileName(&yytext[1],yyleng-2);
2048<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2049 if (yyextra->insideJava) REJECT;
2050 yyextra->current->startLine=yyextra->yyLineNr;
2051 yyextra->current->startColumn = yyextra->yyColNr;
2055<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2056<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2058 yyextra->current->name=yytext;
2059 yyextra->current->fileName = yyextra->fileName;
2060 yyextra->current->section = EntryType::makeUsingDecl();
2061 yyextra->current->startLine = yyextra->yyLineNr;
2062 yyextra->previous = yyextra->current;
2063 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2065 if (yyextra->insideCS)
2070 yyextra->current->name=yytext;
2071 yyextra->current->fileName = yyextra->fileName;
2072 yyextra->current->startLine = yyextra->yyLineNr;
2073 yyextra->current->startColumn = yyextra->yyColNr;
2074 yyextra->current->section = EntryType::makeUsingDir();
2075 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2080<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2082 yyextra->current->fileName = yyextra->fileName;
2083 yyextra->current->section = EntryType::makeUsingDecl();
2084 yyextra->current->startLine = yyextra->yyLineNr;
2085 yyextra->current->bodyLine = yyextra->yyLineNr;
2086 yyextra->current->bodyColumn = yyextra->yyColNr;
2087 yyextra->lastInitializerContext = UsingAlias;
2088 yyextra->sharpCount=0;
2089 yyextra->initBracketCount=0;
2091 BEGIN(ReadInitializer);
2094 yyextra->current->section = EntryType::makeVariable();
2096 init.stripPrefix(
"class ");
2097 init.stripPrefix(
"struct ");
2099 yyextra->current->type =
"typedef "+
init;
2100 yyextra->current->args.clear();
2101 yyextra->current->spec.setAlias(
true);
2102 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2107 yyextra->current->initializer << yytext;
2110 yyextra->current->initializer << yytext;
2114 yyextra->current->fileName = yyextra->fileName;
2115 yyextra->current->section = EntryType::makeUsingDir();
2116 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2120<Using>";" { BEGIN(FindMembers); }
2121<FindMembers>{SCOPENAME}{BN}*"<>" {
2126<FindMembers>{SCOPENAME}{BNopt}/"<" {
2128 if (yyextra->insideCpp && name==
"import") REJECT;
2129 yyextra->roundCount=0;
2130 yyextra->sharpCount=0;
2133 yyextra->current->name=name;
2139 BEGIN( EndTemplate );
2141<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2142 yyextra->sharpCount=0;
2143 yyextra->roundCount=0;
2151 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...
2154 if (!yyextra->insidePHP)
2160 yyextra->lastHereDocContext = YY_START;
2164<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2165 yyextra->current->name+=yytext;
2169 if (yyextra->roundCount==0)
2172 yyextra->sharpCount++;
2174 yyextra->current->name+=yytext;
2176<ClassTemplSpec,EndTemplate>">=" {
2177 yyextra->current->name+=yytext;
2179<ClassTemplSpec,EndTemplate>(">>") {
2180 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2188 yyextra->current->name+=yytext;
2193 yyextra->current->name+=
'>';
2195 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2197 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2202<EndTemplate>">"{BN}*"(" {
2204 yyextra->current->name+=
'>';
2206 if (yyextra->roundCount==0)
2208 --yyextra->sharpCount;
2210 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2212 yyextra->current->bodyLine = yyextra->yyLineNr;
2213 yyextra->current->bodyColumn = yyextra->yyColNr;
2214 yyextra->current->args =
"(";
2215 yyextra->currentArgumentContext = FuncQual;
2216 yyextra->fullArgString = yyextra->current->args;
2217 yyextra->copyArgString = &yyextra->current->args;
2219 BEGIN( ReadFuncArgType ) ;
2223 yyextra->current->name+=
"(";
2224 yyextra->roundCount++;
2227<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2229 yyextra->current->name+=
'>';
2230 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2235<EndTemplate>">"{BNopt}/"::" {
2237 yyextra->current->name+=
'>';
2239 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2241 BEGIN(FindMemberName);
2244<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2245 yyextra->roundCount++;
2247<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2248 if (yyextra->roundCount>0) yyextra->roundCount--;
2251 yyextra->current->name+=*yytext;
2254<FindMembers>"define"{BN}*"("{BN}*["'] {
2255 if (yyextra->insidePHP)
2257 yyextra->current->bodyLine = yyextra->yyLineNr;
2258 yyextra->current->bodyColumn = yyextra->yyColNr;
2265 yyextra->delimiter = yytext;
2266 *yyextra->pCopyHereDocGString << yytext;
2267 BEGIN(CopyHereDocEnd);
2269<CopyHereDoc>"\""{ID}/"\"" {
2270 yyextra->delimiter = &yytext[1];
2271 *yyextra->pCopyHereDocGString << yytext;
2272 BEGIN(CopyHereDocEnd);
2274<CopyHereDoc>"'"{ID}/"'" {
2275 yyextra->delimiter = &yytext[1];
2276 *yyextra->pCopyHereDocGString << yytext;
2277 BEGIN(CopyHereDocEnd);
2280 yyextra->delimiter = yytext;
2283<HereDoc>"\""{ID}/"\"" {
2284 yyextra->delimiter = &yytext[1];
2287<HereDoc>"'"{ID}/"'" {
2288 yyextra->delimiter = &yytext[1];
2291<HereDocEnd>^{Bopt}{ID} {
2294 BEGIN(yyextra->lastHereDocContext);
2298<CopyHereDocEnd>^{Bopt}{ID} {
2299 *yyextra->pCopyHereDocGString << yytext;
2302 BEGIN(yyextra->lastHereDocContext);
2307 *yyextra->pCopyHereDocGString << yytext;
2309<CopyHereDocEnd>{ID} {
2310 *yyextra->pCopyHereDocGString << yytext;
2313 *yyextra->pCopyHereDocGString << yytext;
2315<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2317<FindMembers>"Q_PROPERTY" {
2318 yyextra->yyBegLineNr = yyextra->yyLineNr;
2319 yyextra->yyBegColNr = yyextra->yyColNr;
2320 yyextra->current->protection = Protection::Public ;
2321 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2322 yyextra->current->type.clear();
2332 yyextra->current->name+=yytext;
2335 yyextra->current->type+= yyextra->current->name;
2336 yyextra->current->type+= yytext;
2337 yyextra->current->name=
"";
2339<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2340 yyextra->current->type+= yyextra->current->name;
2341 yyextra->current->name=yytext;
2343<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2344 yyextra->current->spec.setReadable(
true);
2347<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2348 yyextra->current->spec.setWritable(
true);
2351<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2352<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2353<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2354<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2355<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2356<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2357<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2358<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2359<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2360<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2364 yyextra->current->read = yytext;
2368 yyextra->current->write = yytext;
2371<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2372 yyextra->current->name=yytext;
2376<FindMembers>"requires" {
2377 if (yyextra->insideJava) REJECT;
2378 yyextra->current->req.clear();
2379 yyextra->requiresContext = YY_START;
2380 BEGIN(RequiresClause);
2382<RequiresClause>"requires"{BN}*/"{" {
2383 if (yyextra->insideJava) REJECT;
2385 yyextra->current->req+=yytext;
2386 BEGIN( RequiresExpression ) ;
2388<RequiresClause>"requires"{BN}*"(" {
2389 if (yyextra->insideJava) REJECT;
2391 yyextra->current->req+=yytext;
2392 yyextra->lastRoundContext=RequiresExpression;
2393 yyextra->pCopyRoundString=&yyextra->current->req;
2394 yyextra->roundCount=0;
2395 BEGIN( CopyRound ) ;
2397<RequiresExpression>"{" {
2398 yyextra->current->req+=yytext;
2399 yyextra->lastCurlyContext=RequiresClause;
2400 yyextra->pCopyCurlyString=&yyextra->current->req;
2401 yyextra->curlyCount=0;
2402 BEGIN( CopyCurly ) ;
2404<RequiresExpression>\n {
2405 yyextra->current->req+=
' ';
2408<RequiresExpression>. {
2409 yyextra->current->req+=yytext;
2411<RequiresClause>"(" {
2412 yyextra->current->req+=yytext;
2413 yyextra->lastRoundContext=RequiresClause;
2414 yyextra->pCopyRoundString=&yyextra->current->req;
2415 yyextra->roundCount=0;
2416 BEGIN( CopyRound ) ;
2418<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2422 yyextra->current->req+=yytext;
2423 yyextra->lastRoundContext=RequiresClause;
2424 yyextra->pCopyRoundString=&yyextra->current->req;
2425 yyextra->roundCount=0;
2433<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2437 yyextra->current->req+=yytext;
2438 yyextra->lastSharpContext=RequiresClause;
2439 yyextra->pCopySharpString=&yyextra->current->req;
2440 yyextra->sharpCount=0;
2448<RequiresClause>{NOTopt}{SCOPENAME} {
2452 yyextra->current->req=yytext;
2453 BEGIN(yyextra->requiresContext);
2460<RequiresClause>{NOTopt}"::"{ID} {
2462 yyextra->current->req+=yytext;
2464<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2466 yyextra->current->req+=yytext;
2468<RequiresClause>{BN}+ {
2469 yyextra->current->req+=
' ';
2474 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2475 BEGIN(yyextra->requiresContext);
2477<FindMembers,FindMemberName>{SCOPENAME} {
2479 yyextra->yyBegColNr=yyextra->yyColNr;
2480 yyextra->yyBegLineNr=yyextra->yyLineNr;
2482 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2486 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2488 if (yyextra->insideIDL)
2493 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2497 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2502 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2504 BEGIN(IDLUnionCase);
2506 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2508 yyextra->insideTryBlock=
FALSE;
2509 BEGIN(TryFunctionBlock);
2511 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2513 yyextra->lastAlignAsContext = YY_START;
2516 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2518 yyextra->current->type=
"var";
2520 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2522 yyextra->current->type=
"function";
2524 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2528 yyextra->current->name=
"this";
2531 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2534 BEGIN(StaticAssert);
2536 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2540 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2541 yyextra->current->type+=yytext;
2544 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2546 if (yyextra->current->type.isEmpty())
2548 yyextra->current->type =
"optional";
2552 yyextra->current->type +=
" optional";
2554 yyextra->lastModifierContext = YY_START;
2555 BEGIN(SliceOptional);
2559 if (YY_START==FindMembers)
2563 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2564 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2566 yyextra->current->protection = Protection::Public;
2568 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2570 yyextra->current->protection = Protection::Protected;
2572 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2574 yyextra->current->protection = Protection::Package;
2576 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2578 yyextra->current->protection = Protection::Private;
2580 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2582 if (YY_START==FindMembers)
2583 yyextra->current->name = yytext;
2585 yyextra->current->name += yytext;
2586 yyextra->current->isStatic =
TRUE;
2590 if (YY_START==FindMembers)
2591 yyextra->current->name = yytext;
2593 yyextra->current->name += yytext;
2594 if (yyextra->current->name.startsWith(
"static "))
2596 yyextra->current->isStatic =
TRUE;
2597 yyextra->current->name= yyextra->current->name.mid(7);
2599 else if (yyextra->current->name.startsWith(
"inline "))
2601 if (yyextra->current->type.isEmpty())
2603 yyextra->current->type=
"inline";
2607 yyextra->current->type+=
"inline ";
2609 yyextra->current->name= yyextra->current->name.mid(7);
2611 else if (yyextra->current->name.startsWith(
"constexpr "))
2613 if (yyextra->current->type.isEmpty())
2615 yyextra->current->type=
"constexpr";
2619 yyextra->current->type+=
"constexpr ";
2621 yyextra->current->name=yyextra->current->name.mid(10);
2623 else if (yyextra->current->name.startsWith(
"consteval "))
2625 if (yyextra->current->type.isEmpty())
2627 yyextra->current->type=
"consteval";
2631 yyextra->current->type+=
"consteval ";
2633 yyextra->current->name=yyextra->current->name.mid(10);
2635 else if (yyextra->current->name.startsWith(
"constinit "))
2637 if (yyextra->current->type.isEmpty())
2639 yyextra->current->type=
"constinit";
2643 yyextra->current->type+=
"constinit ";
2645 yyextra->current->name=yyextra->current->name.mid(10);
2647 else if (yyextra->current->name.startsWith(
"const "))
2649 if (yyextra->current->type.isEmpty())
2651 yyextra->current->type=
"const";
2655 yyextra->current->type+=
"const ";
2657 yyextra->current->name=yyextra->current->name.mid(6);
2659 else if (yyextra->current->name.startsWith(
"volatile "))
2661 if (yyextra->current->type.isEmpty())
2663 yyextra->current->type=
"volatile";
2667 yyextra->current->type+=
"volatile ";
2669 yyextra->current->name=yyextra->current->name.mid(9);
2671 else if (yyextra->current->name.startsWith(
"typedef "))
2673 if (yyextra->current->type.isEmpty())
2675 yyextra->current->type=
"typedef";
2679 yyextra->current->type+=
"typedef ";
2681 yyextra->current->name=yyextra->current->name.mid(8);
2691 yyextra->externLinkage=
FALSE;
2695 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2698 yyextra->lastSkipRoundContext = FindMembers;
2699 yyextra->roundCount=0;
2702<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2708 yyextra->current->type+=yytext;
2709 yyextra->lastRoundContext=FindMembers;
2710 yyextra->pCopyRoundString=&yyextra->current->type;
2711 yyextra->roundCount=0;
2714<DeclType>{BN}+ {
lineCount(yyscanner); }
2719<CSIndexer>"["[^\n\]]*"]" {
2723<FindMembers>[0-9]{ID} {
2726 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2728 yyextra->current->name+=
".";
2732 yyextra->current->name+=yytext;
2734<CppQuote>"("{B}*"\"" {
2735 yyextra->insideCppQuote=
TRUE;
2739<IDLUnionCase>":" { BEGIN(FindMembers); }
2740<IDLUnionCase>\n {
lineCount(yyscanner); }
2742<TryFunctionBlock>\n {
lineCount(yyscanner); }
2743<TryFunctionBlock>"{" {
2744 yyextra->curlyCount=0;
2745 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2749<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2751<TryFunctionBlockEnd>\n { unput(*yytext);
2752 BEGIN( FindMembers );
2754<TryFunctionBlockEnd>. { unput(*yytext);
2755 BEGIN( FindMembers );
2758 yyextra->insideCppQuote=
FALSE;
2761<FindConceptParts>[^\/\n]* {
2762 yyextra->current->initializer << yytext;
2764<FindConceptParts>. {
2765 yyextra->current->initializer << yytext;
2767<FindConceptParts>\n {
2768 yyextra->current->initializer << yytext;
2769 yyextra->yyLineNr++;
2771<FindConceptParts>{CCS} {
2772 yyextra->current->initializer << yytext;
2774<FindConceptParts>{CPPC} {
2775 yyextra->current->initializer << yytext;
2777<FindConceptParts>^[ \t]*{CCS}[!*] {
2779 int indent = text.
find(
'/');
2781 if (!yyextra->current->initializer.empty())
2783 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2786 yyextra->current->section = EntryType::makeConceptDocPart();
2787 yyextra->current->startLine = yyextra->yyLineNr;
2788 yyextra->current->startColumn = indent;
2789 yyextra->current->initializer.clear();
2790 BEGIN(FindConceptDocs);
2792<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2793 if (!yyextra->current->initializer.empty())
2795 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2799 int indent = line.find(
'/');
2800 yyextra->current->section = EntryType::makeConceptDocPart();
2801 yyextra->current->startLine = yyextra->yyLineNr;
2802 yyextra->current->startColumn = indent;
2803 yyextra->current->initializer.clear();
2804 yyextra->current->initializer << line.mid(indent+3);
2805 yyextra->yyLineNr++;
2806 BEGIN(FindConceptCxxDocs);
2808<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2810 int p = line.find(
'/');
2811 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2812 yyextra->current->initializer << line.mid(p+2);
2813 yyextra->yyLineNr++;
2815<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2816 yyextra->current->initializer << yytext;
2818<FindConceptCxxDocs>. {
2819 if (!yyextra->current->initializer.empty())
2823 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2827 yyextra->current->section = EntryType::makeConceptCodePart();
2828 yyextra->current->startLine = yyextra->yyLineNr;
2829 BEGIN(FindConceptParts);
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
2831<FindConceptDocs>^[ \t]*"*"+/[^/] {
2833<FindConceptDocs>[^\*\n]+ {
2834 yyextra->current->initializer << yytext;
2836<FindConceptDocs>\n {
2837 yyextra->current->initializer << yytext;
2838 yyextra->yyLineNr++;
2840<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2841 if (!yyextra->current->initializer.empty())
2845 yyextra->current->section = EntryType::makeConceptDocPart();
2846 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2850 yyextra->current->section = EntryType::makeConceptCodePart();
2851 yyextra->current->startLine = yyextra->yyLineNr;
2852 BEGIN(FindConceptParts);
2854<FindConceptDocs>"*"*{CCE} {
2855 if (!yyextra->current->initializer.empty())
2859 yyextra->current->section = EntryType::makeConceptDocPart();
2860 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2863 yyextra->current->section = EntryType::makeConceptCodePart();
2864 yyextra->current->startLine = yyextra->yyLineNr;
2865 BEGIN(FindConceptParts);
2867<FindConceptParts><<EOF>> {
2868 if (!yyextra->current->initializer.empty())
2870 if (!yyextra->current->section.isConceptCodePart())
2872 yyextra->current->section = EntryType::makeConceptDocPart();
2874 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2879<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2881 yyextra->lastCPPContext = YY_START;
2884<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2885<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2886 if (yyextra->insidePHP)
2888 yyextra->current->bodyLine = yyextra->yyLineNr;
2889 yyextra->current->bodyColumn = yyextra->yyColNr;
2890 yyextra->current->fileName = yyextra->fileName;
2891 yyextra->current->startLine = yyextra->yyLineNr;
2892 yyextra->current->startColumn = yyextra->yyColNr;
2893 yyextra->current->type.clear();
2894 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2895 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2896 yyextra->current->section = EntryType::makeDefine();
2897 yyextra->lastDefineContext = YY_START;
2900<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2901 yyextra->yyLineNr = atoi(&yytext[1]);
2903 yyextra->lastPreLineCtrlContext = YY_START;
2904 if (YY_START==ReadBody ||
2905 YY_START==ReadNSBody ||
2906 YY_START==ReadBodyIntf)
2908 yyextra->current->program << yytext;
2910 BEGIN( PreLineCtrl );
2912<PreLineCtrl>"\""[^\n\"]*"\"" {
2914 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2915 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2916 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2918 yyextra->current->program << yytext;
2922 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2923 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2924 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2926 yyextra->current->program << yytext;
2930 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2931 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2932 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2934 yyextra->current->program << yytext;
2937 BEGIN( yyextra->lastPreLineCtrlContext );
2940<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2941<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2942 BEGIN( yyextra->lastCPPContext) ;
2944<SDefine>{ID}{B}*"(" {
2945 yyextra->current->name = yytext;
2946 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2947 yyextra->current->args =
"(";
2948 yyextra->current->bodyLine = yyextra->yyLineNr;
2949 yyextra->current->bodyColumn = yyextra->yyColNr;
2950 yyextra->currentArgumentContext = DefineEnd;
2951 yyextra->fullArgString=yyextra->current->args;
2952 yyextra->copyArgString=&yyextra->current->args;
2953 BEGIN( ReadFuncArgType ) ;
2968 yyextra->current->bodyLine = yyextra->yyLineNr;
2969 yyextra->current->bodyColumn = yyextra->yyColNr;
2970 yyextra->current->name = yytext;
2977 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2979 BEGIN(yyextra->lastDefineContext);
2983 yyextra->current->fileName = yyextra->fileName;
2984 yyextra->current->startLine = yyextra->yyLineNr;
2985 yyextra->current->startColumn = yyextra->yyColNr;
2986 yyextra->current->type.clear();
2987 yyextra->current->type =
"const";
2991 yyextra->current->initializer.str(
init.str());
2992 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2993 yyextra->current->section = EntryType::makeVariable();
2994 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2999<DefineEnd>\\[\r]?\n {
3001 yyextra->current->endBodyLine = yyextra->yyLineNr;
3004 if (yyextra->insideIDL && yyextra->insideCppQuote)
3010 yyextra->lastStringContext=DefineEnd;
3015<DefinePHP>{ID}["']{BN}*","{BN}* {
3016 yyextra->current->name = yytext;
3017 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3018 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3019 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3020 yyextra->current->bodyLine = yyextra->yyLineNr;
3021 yyextra->current->bodyColumn = yyextra->yyColNr;
3022 yyextra->lastRoundContext = DefinePHPEnd;
3023 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3024 yyextra->roundCount = 0;
3025 BEGIN( GCopyRound );
3029 if (yyextra->insideCli)
3032 yyextra->current->name = yytext ;
3040 yyextra->current->name += yytext ;
3043<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3044 if (YY_START==ReadInitializer && yyextra->keepComment)
3050 if (yyextra->current->bodyLine==-1)
3052 yyextra->current->bodyLine=yyextra->yyLineNr;
3053 yyextra->current->bodyColumn = yyextra->yyColNr;
3055 yyextra->docBlockContext = YY_START;
3056 yyextra->docBlockInBody =
FALSE;
3057 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3062 yyextra->docBlock.
str(indent.
str());
3066 yyextra->docBlockTerm =
';';
3067 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3069 yyextra->current->bitfields =
":"+yyextra->current->args;
3070 yyextra->current->args.clear();
3071 yyextra->current->section = EntryType::makeVariable();
3073 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)
3085<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3086 if (YY_START==ReadInitializer && yyextra->keepComment)
3092 yyextra->docBlockContext = YY_START;
3093 yyextra->docBlockInBody =
FALSE;
3094 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3099 yyextra->docBlock.
str(indent.
str());
3102 yyextra->docBlockTerm =
',';
3103 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3105 yyextra->current->bitfields =
":"+yyextra->current->args;
3106 yyextra->current->args.clear();
3107 yyextra->current->section = EntryType::makeVariable();
3109 if (yytext[yyleng-3]==
'/')
3121<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3122 if (YY_START==ReadInitializer && yyextra->keepComment)
3128 if (yyextra->current->bodyLine==-1)
3130 yyextra->current->bodyLine=yyextra->yyLineNr;
3131 yyextra->current->bodyColumn = yyextra->yyColNr;
3133 yyextra->docBlockContext = YY_START;
3134 yyextra->docBlockInBody =
FALSE;
3135 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3139 yyextra->docBlock.
str(indent.
str());
3142 yyextra->docBlockTerm = 0;
3143 if (yytext[yyleng-3]==
'/')
3156<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3158 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3161 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3166 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3172 if (yytext[2]==
'!' || yytext[2]==
'/')
3174 yyextra->docBlockContext = YY_START;
3175 yyextra->docBlockInBody =
FALSE;
3176 yyextra->docBlockAutoBrief =
FALSE;
3177 yyextra->docBlock.str(std::string());
3178 yyextra->docBlockTerm = 0;
3184 yyextra->lastCContext=YY_START;
3185 BEGIN(SkipCxxComment);
3190 if (yytext[2]==
'!' || yytext[2]==
'*')
3192 yyextra->docBlockContext = YY_START;
3193 yyextra->docBlockInBody =
FALSE;
3194 yyextra->docBlock.str(std::string());
3195 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3197 yyextra->docBlockTerm = 0;
3203 yyextra->lastCContext=YY_START;
3208<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3209 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3210 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3214 if (!yyextra->insideCS) REJECT;
3215 yyextra->current->bodyLine = yyextra->yyLineNr;
3216 yyextra->current->bodyColumn = yyextra->yyColNr;
3217 yyextra->current->initializer.str(yytext);
3218 yyextra->lastInitializerContext = YY_START;
3219 yyextra->sharpCount=0;
3220 yyextra->initBracketCount=0;
3221 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3222 yyextra->current->spec.setGettable(
true);
3223 BEGIN(ReadInitializerPtr);
3226 yyextra->current->bodyLine = yyextra->yyLineNr;
3227 yyextra->current->bodyColumn = yyextra->yyColNr;
3228 yyextra->current->initializer.str(
" ");
3229 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3230 yyextra->current->initializer <<
" ";
3231 yyextra->current->initializer <<
"=";
3232 yyextra->lastInitializerContext = YY_START;
3233 yyextra->sharpCount=0;
3234 yyextra->initBracketCount=0;
3235 BEGIN(ReadInitializer);
3237<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3239 yyextra->current->exception +=
" ";
3242<UNOIDLAttributeBlock>"}" {
3243 yyextra->current->exception +=
" }";
3247<ReadInitializer,ReadInitializerPtr>"(" {
3248 yyextra->lastRoundContext=YY_START;
3249 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3250 yyextra->roundCount=0;
3251 yyextra->current->initializer << *yytext;
3254<ReadInitializer,ReadInitializerPtr>"[" {
3255 if (!yyextra->insidePHP) REJECT;
3256 yyextra->lastSquareContext=YY_START;
3257 yyextra->pCopySquareGString=&yyextra->current->initializer;
3258 yyextra->squareCount=0;
3259 yyextra->current->initializer << *yytext;
3262<ReadInitializer,ReadInitializerPtr>"{" {
3263 yyextra->lastCurlyContext=YY_START;
3264 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3265 yyextra->curlyCount=0;
3266 yyextra->current->initializer << *yytext;
3269<ReadInitializer,ReadInitializerPtr>[;,] {
3271 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3273 yyextra->current->fileName = yyextra->fileName;
3274 yyextra->current->startLine = yyextra->yyLineNr;
3275 yyextra->current->startColumn = yyextra->yyColNr;
3276 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3277 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3278 yyextra->current->section = EntryType::makeVariable();
3279 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3283 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3286 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3287 BEGIN(yyextra->lastInitializerContext);
3289 else if (*yytext==
',' && yyextra->initBracketCount==0)
3292 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3293 BEGIN(yyextra->lastInitializerContext);
3297 yyextra->current->initializer << *yytext;
3300<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3301 if (!yyextra->insideCpp)
3307 yyextra->current->initializer << yytext;
3309 yyextra->lastRawStringContext = YY_START;
3310 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3315<ReadInitializer>{CPPC}.* {
3316 if (yyextra->keepComment)
3318 yyextra->current->initializer << yytext;
3325<ReadInitializer>{CCS} {
3326 if (yyextra->keepComment)
3328 yyextra->current->initializer << yytext;
3329 BEGIN(InitCopyComment);
3336<InitCopyComment>{CCE} {
3337 yyextra->current->initializer << yytext;
3338 BEGIN(ReadInitializer);
3340<InitCopyComment>\n {
3342 yyextra->current->initializer << yytext;
3345 yyextra->current->initializer << yytext;
3347<InitCopyComment><<EOF>> {
3348 warn(yyextra->fileName,yyextra->yyLineNr,
3349 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3352<RawGString>{RAWEND} {
3355 *yyextra->pCopyRawGString << yytext;
3356 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3363<RawGString>[^)\n]+ {
3364 *yyextra->pCopyRawGString << yytext;
3367 *yyextra->pCopyRawGString << yytext;
3370 *yyextra->pCopyRawGString << yytext;
3373<RawString>{RAWEND} {
3374 *yyextra->pCopyRawString+=yytext;
3375 yyextra->fullArgString+=yytext;
3378 BEGIN(yyextra->lastRawStringContext);
3382 *yyextra->pCopyRawString += yytext;
3383 yyextra->fullArgString+=yytext;
3386 *yyextra->pCopyRawString += yytext;
3387 yyextra->fullArgString+=yytext;
3390 *yyextra->pCopyRawString += yytext;
3391 yyextra->fullArgString+=yytext;
3394<ReadInitializer,ReadInitializerPtr>\" {
3395 if (yyextra->insideIDL && yyextra->insideCppQuote)
3401 yyextra->lastStringContext=YY_START;
3402 yyextra->current->initializer << yytext;
3403 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3404 yyextra->stopAtInvalidString=
false;
3408<ReadInitializer,ReadInitializerPtr>"->" {
3409 yyextra->current->initializer << yytext;
3411<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3412 yyextra->current->initializer << yytext;
3414<ReadInitializer,ReadInitializerPtr>(">>") {
3415 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3418 yyextra->initBracketCount-=2;
3419 yyextra->sharpCount-=2;
3421 yyextra->current->initializer << yytext;
3423<ReadInitializer,ReadInitializerPtr>(">=") {
3424 yyextra->current->initializer << yytext;
3426<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3427 yyextra->initBracketCount++;
3428 yyextra->sharpCount++;
3429 yyextra->current->initializer << *yytext;
3431<ReadInitializer,ReadInitializerPtr>[>\]})] {
3432 yyextra->initBracketCount--;
3433 yyextra->sharpCount--;
3436 yyextra->current->endBodyLine=yyextra->yyLineNr;
3438 yyextra->current->initializer << *yytext;
3440<ReadInitializer,ReadInitializerPtr>\' {
3441 if (yyextra->insidePHP)
3443 yyextra->current->initializer << yytext;
3444 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3445 yyextra->lastStringContext=YY_START;
3446 BEGIN(CopyPHPGString);
3450 yyextra->current->initializer << yytext;
3453<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3454 if (yyextra->insidePHP)
3460 yyextra->current->initializer << yytext;
3463<ReadInitializer,ReadInitializerPtr>\n {
3464 yyextra->current->initializer << *yytext;
3467<ReadInitializer,ReadInitializerPtr>"@\"" {
3469 yyextra->current->initializer << yytext;
3470 if (!yyextra->insideCS && !yyextra->insideObjC)
3477 yyextra->lastSkipVerbStringContext=YY_START;
3478 yyextra->pSkipVerbString=&yyextra->current->initializer;
3479 BEGIN(SkipVerbString);
3482<SkipVerbString>[^\n"\\]+ {
3483 *yyextra->pSkipVerbString << yytext;
3485<SkipVerbString>"\\\\" {
3486 if (yyextra->insideCS) REJECT
3487 *yyextra->pSkipVerbString << yytext;
3489<SkipVerbString>"\\\"" {
3490 if (yyextra->insideCS) REJECT
3491 *yyextra->pSkipVerbString << yytext;
3493<SkipVerbString>"\"\"" {
3494 *yyextra->pSkipVerbString << yytext;
3496<SkipVerbString>"\"" {
3497 *yyextra->pSkipVerbString << *yytext;
3498 BEGIN(yyextra->lastSkipVerbStringContext);
3501 *yyextra->pSkipVerbString << *yytext;
3505 *yyextra->pSkipVerbString << *yytext;
3507<ReadInitializer,ReadInitializerPtr>"?>" {
3508 if (yyextra->insidePHP)
3509 BEGIN( FindMembersPHP );
3511 yyextra->current->initializer << yytext;
3513<ReadInitializer,ReadInitializerPtr>. {
3514 yyextra->current->initializer << *yytext;
3518<CopyString,CopyPHPString>\\. {
3519 *yyextra->pCopyQuotedString+=yytext;
3522 *yyextra->pCopyQuotedString+=*yytext;
3523 BEGIN( yyextra->lastStringContext );
3526 *yyextra->pCopyQuotedString+=*yytext;
3527 BEGIN( yyextra->lastStringContext );
3529<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3530 *yyextra->pCopyQuotedString+=yytext;
3532<CopyString,CopyPHPString>\n {
3533 *yyextra->pCopyQuotedString+=*yytext;
3536<CopyString,CopyPHPString>. {
3537 *yyextra->pCopyQuotedString+=*yytext;
3541<CopyGString,CopyPHPGString>\\. {
3542 *yyextra->pCopyQuotedGString << yytext;
3545 *yyextra->pCopyQuotedGString << *yytext;
3546 BEGIN( yyextra->lastStringContext );
3549 *yyextra->pCopyQuotedGString << *yytext;
3550 BEGIN( yyextra->lastStringContext );
3552<CopyGString,CopyPHPGString>"<?php" {
3553 *yyextra->pCopyQuotedGString << yytext;
3554 BEGIN( yyextra->lastStringContext );
3556<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3557 *yyextra->pCopyQuotedGString << yytext;
3559<CopyGString,CopyPHPGString>\n {
3560 *yyextra->pCopyQuotedGString << *yytext;
3561 if (yyextra->stopAtInvalidString)
3563 BEGIN( yyextra->lastStringContext );
3570<CopyGString,CopyPHPGString>. {
3571 *yyextra->pCopyQuotedGString << *yytext;
3576 *yyextra->pCopyRoundString += *yytext;
3577 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3578 yyextra->lastStringContext=YY_START;
3582 *yyextra->pCopyRoundString += *yytext;
3583 yyextra->roundCount++;
3586 *yyextra->pCopyRoundString += *yytext;
3587 if (--yyextra->roundCount<0)
3588 BEGIN(yyextra->lastRoundContext);
3592 *yyextra->pCopyRoundString += *yytext;
3595 if (yyextra->insidePHP)
3597 yyextra->current->initializer << yytext;
3598 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3599 yyextra->lastStringContext=YY_START;
3600 BEGIN(CopyPHPString);
3604 *yyextra->pCopyRoundString += yytext;
3607<CopyRound>{CHARLIT} {
3608 if (yyextra->insidePHP)
3614 *yyextra->pCopyRoundString+=yytext;
3617<CopyRound>[^"'()\n,]+ {
3618 *yyextra->pCopyRoundString+=yytext;
3621 *yyextra->pCopyRoundString+=*yytext;
3626 *yyextra->pCopySharpString += *yytext;
3627 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3628 yyextra->lastStringContext=YY_START;
3632 *yyextra->pCopySharpString += *yytext;
3633 yyextra->sharpCount++;
3636 *yyextra->pCopySharpString += *yytext;
3637 if (--yyextra->sharpCount<0)
3639 BEGIN(yyextra->lastSharpContext);
3644 *yyextra->pCopySharpString += *yytext;
3647 if (yyextra->insidePHP)
3649 yyextra->current->initializer << yytext;
3650 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3651 yyextra->lastStringContext=YY_START;
3652 BEGIN(CopyPHPString);
3656 *yyextra->pCopySharpString += yytext;
3659<CopySharp>{CHARLIT} {
3660 if (yyextra->insidePHP)
3666 *yyextra->pCopySharpString+=yytext;
3669<CopySharp>[^"'<>\n,]+ {
3670 *yyextra->pCopySharpString+=yytext;
3673 *yyextra->pCopySharpString+=*yytext;
3679 *yyextra->pCopyRoundGString << *yytext;
3680 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3681 yyextra->lastStringContext=YY_START;
3685 *yyextra->pCopyRoundGString << *yytext;
3686 yyextra->roundCount++;
3689 *yyextra->pCopyRoundGString << *yytext;
3690 if (--yyextra->roundCount<0)
3691 BEGIN(yyextra->lastRoundContext);
3695 *yyextra->pCopyRoundGString << *yytext;
3698 if (yyextra->insidePHP)
3700 yyextra->current->initializer << yytext;
3701 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3702 yyextra->lastStringContext=YY_START;
3703 BEGIN(CopyPHPGString);
3707 *yyextra->pCopyRoundGString << yytext;
3710<GCopyRound>{CHARLIT} {
3711 if (yyextra->insidePHP)
3717 *yyextra->pCopyRoundGString << yytext;
3721 if (!yyextra->insideCS) REJECT;
3722 *yyextra->pCopyRoundGString << yytext;
3723 yyextra->lastSkipVerbStringContext=YY_START;
3724 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3725 BEGIN(SkipVerbString);
3727<GCopyRound>[^"'()\n\/,R]+ {
3728 *yyextra->pCopyRoundGString << yytext;
3730<GCopyRound>{RAWBEGIN} {
3731 *yyextra->pCopyRoundGString << yytext;
3733 yyextra->lastRawStringContext = YY_START;
3734 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3738 *yyextra->pCopyRoundGString << *yytext;
3743 *yyextra->pCopySquareGString << *yytext;
3744 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3745 yyextra->lastStringContext=YY_START;
3749 *yyextra->pCopySquareGString << *yytext;
3750 if (yyextra->insidePHP)
3752 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3753 yyextra->lastStringContext=YY_START;
3754 BEGIN(CopyPHPGString);
3758 *yyextra->pCopySquareGString << *yytext;
3759 yyextra->squareCount++;
3762 *yyextra->pCopySquareGString << *yytext;
3763 if (--yyextra->squareCount<0)
3764 BEGIN(yyextra->lastSquareContext);
3768 *yyextra->pCopySquareGString << *yytext;
3771 if (yyextra->insidePHP)
3773 yyextra->current->initializer << yytext;
3774 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3775 yyextra->lastStringContext=YY_START;
3776 BEGIN(CopyPHPGString);
3780 *yyextra->pCopySquareGString << yytext;
3783<GCopySquare>{CHARLIT} {
3784 if (yyextra->insidePHP)
3790 *yyextra->pCopySquareGString << yytext;
3793<GCopySquare>[^"'\[\]\n\/,]+ {
3794 *yyextra->pCopySquareGString << yytext;
3797 *yyextra->pCopySquareGString << *yytext;
3802 *yyextra->pCopyCurlyString += *yytext;
3803 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3804 yyextra->lastStringContext=YY_START;
3805 yyextra->keepComment=
false;
3809 *yyextra->pCopyCurlyString += *yytext;
3810 if (yyextra->insidePHP)
3812 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3813 yyextra->lastStringContext=YY_START;
3814 yyextra->keepComment=
false;
3815 BEGIN(CopyPHPString);
3819 *yyextra->pCopyCurlyString += *yytext;
3820 yyextra->curlyCount++;
3823 *yyextra->pCopyCurlyString += *yytext;
3824 if (--yyextra->curlyCount<0)
3826 yyextra->keepComment=
false;
3827 BEGIN(yyextra->lastCurlyContext);
3830<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3836 *yyextra->pCopyCurlyString += yytext;
3839<CopyCurly>[^"'{}\/\n,]+ {
3840 *yyextra->pCopyCurlyString += yytext;
3842<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3845 *yyextra->pCopyCurlyString += *yytext;
3848 *yyextra->pCopyCurlyString += *yytext;
3850<CopyCurly>{CPPC}[^\n]* {
3851 if (yyextra->keepComment)
3853 *yyextra->pCopyCurlyString += yytext;
3861 if (yyextra->keepComment)
3863 *yyextra->pCopyCurlyString += yytext;
3872 *yyextra->pCopyCurlyString += yytext;
3877 *yyextra->pCopyCurlyString += *yytext;
3880 *yyextra->pCopyCurlyString += *yytext;
3882<CopyComment><<EOF>> {
3883 warn(yyextra->fileName,yyextra->yyLineNr,
3884 "reached end of file while inside a C style comment block!");
3889<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3891<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3893 int s = line.
find(
' ');
3894 int e = line.
find(
'"',s);
3895 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3896 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3903 *yyextra->pCopyCurlyGString << *yytext;
3904 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3905 yyextra->lastStringContext=YY_START;
3906 yyextra->keepComment =
false;
3910 *yyextra->pCopyCurlyGString << *yytext;
3911 if (yyextra->insidePHP)
3913 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3914 yyextra->lastStringContext=YY_START;
3915 yyextra->keepComment =
false;
3916 BEGIN(CopyPHPGString);
3920 *yyextra->pCopyCurlyGString << *yytext;
3921 yyextra->curlyCount++;
3924 *yyextra->pCopyCurlyGString << *yytext;
3925 if (--yyextra->curlyCount<0)
3927 yyextra->current->endBodyLine = yyextra->yyLineNr;
3928 yyextra->keepComment =
false;
3929 BEGIN(yyextra->lastCurlyContext);
3932<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3938 *yyextra->pCopyCurlyGString << yytext;
3941<GCopyCurly>[^"'{}\/\n,]+ {
3942 *yyextra->pCopyCurlyGString << yytext;
3945 *yyextra->pCopyCurlyGString << yytext;
3947<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3950 *yyextra->pCopyCurlyGString << *yytext;
3953 *yyextra->pCopyCurlyGString << *yytext;
3955<GCopyCurly>{CPPC}[^\n]* {
3956 if (yyextra->keepComment)
3958 *yyextra->pCopyCurlyGString << yytext;
3966 if (yyextra->keepComment)
3968 *yyextra->pCopyCurlyGString << yytext;
3969 BEGIN(GCopyComment);
3976<GCopyComment>{CCE} {
3977 *yyextra->pCopyCurlyGString << yytext;
3982 *yyextra->pCopyCurlyGString << *yytext;
3985 *yyextra->pCopyCurlyGString << *yytext;
3987<GCopyComment><<EOF>> {
3988 warn(yyextra->fileName,yyextra->yyLineNr,
3989 "reached end of file while inside a C style comment block!");
3997 if (yyextra->current->type.isEmpty() &&
3998 yyextra->current->name==
"enum")
4000 yyextra->current->section = EntryType::makeEnum();
4001 yyextra->current->name.clear();
4002 yyextra->current->args.clear();
4003 BEGIN(EnumBaseType);
4007 if (yyextra->current->type.isEmpty())
4010 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4013 yyextra->current->bitfields+=
":";
4017 yyextra->current->bitfields+=*yytext;
4020 yyextra->current->args+=*yytext;
4024 yyextra->current->args+=
' ';
4027 QCString oldType = yyextra->current->type;
4028 if (yyextra->current->bodyLine==-1)
4030 yyextra->current->bodyLine = yyextra->yyLineNr;
4031 yyextra->current->bodyColumn = yyextra->yyColNr;
4033 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4035 yyextra->current->type = yyextra->current->type.mid(3);
4037 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4039 yyextra->current->type.prepend(
"typedef ");
4041 bool isStatic = yyextra->current->isStatic;
4042 Protection prot = yyextra->current->protection;
4043 bool isConcept = yyextra->current->section.isConcept();
4044 bool isModule = yyextra->current->section.isModuleDoc();
4047 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4052 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4055 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4057 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4059 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4060 if (yyextra->current->section.isClass())
4064 yyextra->current->section = EntryType::makeVariable() ;
4065 yyextra->current->fileName = yyextra->fileName;
4066 yyextra->current->startLine = yyextra->yyBegLineNr;
4067 yyextra->current->startColumn = yyextra->yyBegColNr;
4068 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4071 if ( *yytext ==
',')
4073 yyextra->current->isStatic = isStatic;
4074 yyextra->current->protection = prot;
4075 yyextra->current->name.clear();
4076 yyextra->current->args.clear();
4077 yyextra->current->brief.clear();
4078 yyextra->current->doc.clear();
4079 yyextra->current->initializer.str(std::string());
4080 yyextra->current->bitfields.clear();
4085 yyextra->mtype = MethodTypes::Method;
4086 yyextra->virt = Specifier::Normal;
4087 yyextra->current->bodyLine = -1;
4088 yyextra->current->bodyColumn = 1;
4089 yyextra->current->groups.clear();
4095 if (yyextra->insideSlice)
4097 yyextra->squareCount=1;
4098 yyextra->lastSquareContext = YY_START;
4099 yyextra->current->metaData +=
"[";
4100 BEGIN( SliceMetadata );
4102 else if (!yyextra->insideCS &&
4103 (yyextra->current->name.isEmpty() ||
4104 yyextra->current->name==
"typedef"
4108 yyextra->squareCount=1;
4109 yyextra->lastSquareContext = YY_START;
4110 yyextra->idlAttr.clear();
4111 yyextra->idlProp.clear();
4112 yyextra->current->mtype = yyextra->mtype;
4115 yyextra->current->mtype == MethodTypes::Property)
4117 yyextra->odlProp =
true;
4118 yyextra->current->spec.setGettable(
true).setSettable(
true);
4121 BEGIN( IDLAttribute );
4123 else if (yyextra->insideCS &&
4124 yyextra->current->name.isEmpty())
4126 yyextra->squareCount=1;
4127 yyextra->lastSquareContext = YY_START;
4130 yyextra->current->args.clear();
4131 BEGIN( SkipSquare );
4135 yyextra->current->args += yytext ;
4136 yyextra->squareCount=1;
4137 yyextra->externLinkage=
FALSE;
4142 yyextra->squareCount++;
4143 yyextra->current->metaData +=
"[";
4145<SliceMetadata>{BN}* {
4148<SliceMetadata>\"[^\"]*\" {
4149 yyextra->current->metaData += yytext;
4152 yyextra->current->metaData += yytext;
4155 yyextra->current->metaData += yytext;
4156 if (--yyextra->squareCount<=0)
4158 BEGIN (yyextra->lastSquareContext);
4162 yyextra->current->type +=
"(";
4163 yyextra->roundCount++;
4165<SliceOptional>[0-9]+ {
4166 yyextra->current->type += yytext;
4169 yyextra->current->type +=
")";
4170 if(--yyextra->roundCount<=0)
4172 BEGIN (yyextra->lastModifierContext);
4177 if (--yyextra->squareCount<=0)
4180 if (yyextra->current->mtype == MethodTypes::Property)
4181 BEGIN( IDLPropName );
4183 BEGIN( yyextra->lastSquareContext );
4186<IDLAttribute>"propput" {
4189 yyextra->current->mtype = MethodTypes::Property;
4191 yyextra->current->spec.setSettable(
true);
4193<IDLAttribute>"propget" {
4196 yyextra->current->mtype = MethodTypes::Property;
4198 yyextra->current->spec.setGettable(
true);
4200<IDLAttribute>"property" {
4201 yyextra->current->spec.setProperty(
true);
4203<IDLAttribute>"attribute" {
4204 yyextra->current->spec.setAttribute(
true);
4206<IDLAttribute>"optional" {
4207 yyextra->current->spec.setOptional(
true);
4209<IDLAttribute>"readonly" {
4212 yyextra->current->spec.setSettable(
false);
4216 yyextra->current->spec.setReadonly(
true);
4219<IDLAttribute>"bound" {
4220 yyextra->current->spec.setBound(
true);
4222<IDLAttribute>"removable" {
4223 yyextra->current->spec.setRemovable(
true);
4225<IDLAttribute>"constrained" {
4226 yyextra->current->spec.setConstrained(
true);
4228<IDLAttribute>"transient" {
4229 yyextra->current->spec.setTransient(
true);
4231<IDLAttribute>"maybevoid" {
4232 yyextra->current->spec.setMaybeVoid(
true);
4234<IDLAttribute>"maybedefault" {
4235 yyextra->current->spec.setMaybeDefault(
true);
4237<IDLAttribute>"maybeambiguous" {
4238 yyextra->current->spec.setMaybeAmbiguous(
true);
4242<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4245 if (yyextra->odlProp)
4247 yyextra->idlProp = yytext;
4250<IDLPropName>{ID}{BN}*"(" {
4251 yyextra->current->name = yytext;
4252 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4253 yyextra->current->startLine = yyextra->yyLineNr;
4254 yyextra->current->startColumn = yyextra->yyColNr;
4257<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4258 if (yyextra->odlProp)
4260 yyextra->idlProp += yytext;
4263<IDLPropName>{ID}{BNopt}/";" {
4264 if (yyextra->odlProp)
4266 yyextra->current->name = yytext;
4267 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4268 yyextra->odlProp =
false;
4273<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4274 yyextra->idlAttr = yytext;
4275 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4278 yyextra->idlProp = yytext;
4280<IDLProp>{BN}*{ID}{BN}*"," {
4281 if (yyextra->current->args.isEmpty())
4282 yyextra->current->args =
"(";
4284 yyextra->current->args +=
", ";
4285 yyextra->current->args += yyextra->idlAttr;
4286 yyextra->current->args +=
" ";
4287 yyextra->current->args += yyextra->idlProp;
4288 yyextra->current->args +=
" ";
4289 yyextra->current->args += yytext;
4290 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4291 yyextra->idlProp.clear();
4292 yyextra->idlAttr.clear();
4295<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4299 yyextra->current->fileName = yyextra->fileName;
4300 yyextra->current->type = yyextra->idlProp;
4301 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4302 if (!yyextra->current->args.isEmpty())
4303 yyextra->current->args +=
")";
4304 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4305 yyextra->current->section = EntryType::makeVariable();
4306 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4308 BEGIN( FindMembers );
4313<Array>"]" { yyextra->current->args += *yytext ;
4314 if (--yyextra->squareCount<=0)
4315 BEGIN( FindMembers ) ;
4317<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4318 if (--yyextra->squareCount<=0)
4319 BEGIN( SFunction ) ;
4321<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4322 yyextra->squareCount++;
4324<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4325<SkipSquare>"[" { yyextra->squareCount++; }
4327 if (--yyextra->squareCount<=0)
4328 BEGIN( yyextra->lastSquareContext );
4331 yyextra->lastStringContext=YY_START;
4332 BEGIN( SkipString );
4334<SkipSquare>[^\n\[\]\"]+
4335<FindMembers>"<" {
addType(yyscanner);
4336 yyextra->current->type += yytext ;
4339<Sharp>">" { yyextra->current->type += *yytext ;
4340 if (--yyextra->sharpCount<=0)
4341 BEGIN( FindMembers ) ;
4343<Sharp>"<" { yyextra->current->type += *yytext ;
4344 yyextra->sharpCount++;
4347 yyextra->current->type +=
' ';
4350<Sharp>. { yyextra->current->type += *yytext ; }
4353 yyextra->current->bodyLine = yyextra->yyLineNr;
4354 yyextra->current->bodyColumn = yyextra->yyColNr;
4355 yyextra->current->name = yytext;
4360 yyextra->lastInitializerContext = YY_START;
4361 yyextra->sharpCount=0;
4362 yyextra->initBracketCount=0;
4363 yyextra->current->initializer.str(
"=");
4364 BEGIN(ReadInitializer);
4367 yyextra->lastInitializerContext = YY_START;
4368 yyextra->sharpCount=0;
4369 yyextra->initBracketCount=0;
4370 yyextra->current->initializer.str(yytext);
4371 BEGIN(ReadInitializer);
4374 if (yyextra->insideJava)
4376 if (!yyextra->current->name.isEmpty())
4378 yyextra->current->fileName = yyextra->fileName;
4379 yyextra->current->startLine = yyextra->yyLineNr;
4380 yyextra->current->startColumn = yyextra->yyColNr;
4381 if (!yyextra->current_root->spec.isEnum())
4383 yyextra->current->type =
"@";
4385 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4386 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4387 yyextra->current->section = EntryType::makeVariable();
4388 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4392 BEGIN( FindMembers );
4403 if (!yyextra->current->name.isEmpty())
4405 yyextra->current->fileName = yyextra->fileName;
4406 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4408 yyextra->current->startLine = yyextra->current->bodyLine;
4409 yyextra->current->startColumn = yyextra->current->bodyColumn;
4413 yyextra->current->startLine = yyextra->yyLineNr;
4414 yyextra->current->startColumn = yyextra->yyColNr;
4416 if (!yyextra->current_root->spec.isEnum())
4418 yyextra->current->type =
"@";
4420 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4421 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4422 yyextra->current->section = EntryType::makeVariable();
4424 if (!yyextra->insideCS && !yyextra->insideJava &&
4425 !yyextra->current_root->spec.isStrong())
4432 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4434 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4439 yyextra->current->reset();
4444 yyextra->squareCount=1;
4445 yyextra->lastSquareContext = YY_START;
4448<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4449<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4450<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4453 yyextra->current->program << yytext ;
4456<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4457 yyextra->current->program << yytext ;
4458 yyextra->pSkipInterpString = &yyextra->current->program;
4459 yyextra->lastSkipInterpStringContext=YY_START;
4460 yyextra->strCurlyCount = 0;
4461 BEGIN( SkipInterpString );
4463<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})* {
4464 *yyextra->pSkipInterpString << yytext;
4466<SkipInterpString>"{" {
4467 *yyextra->pSkipInterpString << *yytext;
4468 yyextra->strCurlyCount++;
4470<SkipInterpString>"}" {
4471 *yyextra->pSkipInterpString << *yytext;
4472 yyextra->strCurlyCount--;
4474<SkipInterpString>\" {
4475 *yyextra->pSkipInterpString << *yytext;
4476 if (yyextra->strCurlyCount==0)
4478 BEGIN( yyextra->lastSkipInterpStringContext );
4481<SkipInterpString>. {
4482 *yyextra->pSkipInterpString << *yytext;
4485<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4486 yyextra->current->program << yytext ;
4487 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4488 yyextra->lastSkipInterpVerbStringContext=YY_START;
4489 yyextra->strCurlyCount = 0;
4490 BEGIN( SkipInterpVerbString );
4492<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4493 *yyextra->pSkipInterpVerbString << yytext;
4495<SkipInterpVerbString>"{" {
4496 *yyextra->pSkipInterpVerbString << *yytext;
4497 yyextra->strCurlyCount++;
4499<SkipInterpVerbString>"}" {
4500 *yyextra->pSkipInterpVerbString << *yytext;
4501 yyextra->strCurlyCount--;
4503<SkipInterpVerbString>\" {
4504 *yyextra->pSkipInterpVerbString << *yytext;
4505 if (yyextra->strCurlyCount==0)
4507 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4510<SkipInterpVerbString>. {
4511 *yyextra->pSkipInterpVerbString << *yytext;
4513<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4514<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4515 yyextra->pSkipVerbString = &yyextra->current->program;
4516 yyextra->lastSkipVerbStringContext=YY_START;
4517 BEGIN( SkipVerbString );
4519<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4521 yyextra->current->program << yytext ;
4522 yyextra->pCopyHereDocGString = &yyextra->current->program;
4523 yyextra->lastHereDocContext=YY_START;
4524 BEGIN( CopyHereDoc );
4531<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4532 yyextra->current->program << yytext;
4534 yyextra->lastRawStringContext = YY_START;
4535 yyextra->pCopyRawGString = &yyextra->current->program;
4538<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4539 yyextra->pCopyQuotedGString = &yyextra->current->program;
4540 yyextra->lastStringContext=YY_START;
4541 yyextra->stopAtInvalidString=
false;
4542 BEGIN( CopyGString );
4544<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4545<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4546 yyextra->lastContext = YY_START ;
4549<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4550 ++yyextra->yyLineNr ;
4551 yyextra->lastContext = YY_START ;
4554<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4555 if (!yyextra->insidePHP)
4557 yyextra->current->program << yytext;
4561 yyextra->current->program << yytext;
4562 yyextra->pCopyQuotedGString = &yyextra->current->program;
4563 yyextra->lastStringContext=YY_START;
4564 BEGIN(CopyPHPGString);
4567<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4568 if (yyextra->insidePHP)
4575 yyextra->current->program << yytext;
4578<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4579 ++yyextra->curlyCount ;
4582 yyextra->current->program << yytext ;
4583 --yyextra->curlyCount ;
4585<ReadBody,ReadNSBody>"}" {
4586 if ( yyextra->curlyCount>0 )
4588 yyextra->current->program << yytext ;
4589 --yyextra->curlyCount ;
4593 yyextra->current->endBodyLine = yyextra->yyLineNr;
4594 std::shared_ptr<Entry> original_root = yyextra->current_root;
4595 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4599 QCString doc = yyextra->current->doc;
4600 int docLine = yyextra->current->docLine;
4601 QCString docFile = yyextra->current->docFile;
4602 QCString brief = yyextra->current->brief;
4603 int briefLine = yyextra->current->briefLine;
4604 QCString briefFile = yyextra->current->briefFile;
4606 yyextra->current->doc =
"";
4607 yyextra->current->docLine = 0;
4608 yyextra->current->docFile =
"";
4609 yyextra->current->brief =
"";
4610 yyextra->current->briefLine = 0;
4611 yyextra->current->briefFile =
"";
4612 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4614 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4615 yyextra->current->program.str(std::string());
4616 new_current->name = yyextra->current->name.mid(split_point + 2);
4617 yyextra->current->name = yyextra->current->name.left(split_point);
4618 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4620 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4621 yyextra->current_root = yyextra->current;
4622 yyextra->current = new_current;
4625 yyextra->current->doc = doc;
4626 yyextra->current->docLine = docLine;
4627 yyextra->current->docFile = docFile;
4628 yyextra->current->brief = brief;
4629 yyextra->current->briefLine = briefLine;
4630 yyextra->current->briefFile = briefFile;
4632 QCString &cn = yyextra->current->name;
4633 QCString rn = yyextra->current_root->name;
4639 if (yyextra->isTypedef && cn.
isEmpty())
4642 BEGIN( TypedefName );
4646 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4648 yyextra->current->program <<
',';
4653 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4654 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4656 if (yyextra->insideObjC &&
4657 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4660 BEGIN( ReadBodyIntf ) ;
4664 yyextra->memspecEntry = yyextra->current;
4665 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4666 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4667 if (yyextra->current->section.isNamespace() ||
4668 yyextra->current->spec.isInterface() ||
4669 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4670 yyextra->insideSlice
4673 yyextra->current->reset();
4674 yyextra->current_root = std::move(original_root);
4676 yyextra->memspecEntry.reset();
4677 BEGIN( FindMembers ) ;
4681 static const reg::Ex re(R
"(@\d+$)");
4682 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4683 !
reg::search(yyextra->memspecEntry->name.str(),re))
4686 yyextra->current->doc.clear();
4687 yyextra->current->brief.clear();
4689 BEGIN( MemberSpec ) ;
Class representing a regular expression.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
4695<ReadBody>"}"{BN}+"typedef"{BN}+ {
4697 if ( yyextra->curlyCount>0 )
4699 yyextra->current->program << yytext ;
4700 --yyextra->curlyCount ;
4704 yyextra->isTypedef =
TRUE;
4705 yyextra->current->endBodyLine = yyextra->yyLineNr;
4706 QCString &cn = yyextra->current->name;
4707 QCString rn = yyextra->current_root->name;
4712 BEGIN( TypedefName );
4715<TypedefName>("const"|"volatile"){BN} {
4717 yyextra->current->type.prepend(yytext);
4720 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4722 yyextra->current->program <<
",";
4724 yyextra->current->name=yytext;
4726 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4727 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4729 if (!yyextra->firstTypedefEntry)
4731 yyextra->firstTypedefEntry = yyextra->current;
4733 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4735 yyextra->isTypedef=
TRUE;
4736 BEGIN(MemberSpecSkip);
4740 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4742 yyextra->current->program <<
',';
4745 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4746 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4747 yyextra->memspecEntry = yyextra->current;
4748 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4751 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4753<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4755 int i=0,l=(int)yyleng,j;
4756 while (i<l && (!
isId(yytext[i]))) i++;
4758 j=yyextra->msName.
find(
"[");
4761 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4762 yyextra->msName=yyextra->msName.left(j);
4767 if (yyextra->firstTypedefEntry)
4769 if (yyextra->firstTypedefEntry->spec.isStruct())
4771 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4773 else if (yyextra->firstTypedefEntry->spec.isUnion())
4775 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4777 else if (yyextra->firstTypedefEntry->section.isEnum())
4779 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4783 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4789 yyextra->current->name = yyextra->msName;
4795 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4801 const Entry *p=yyextra->current.get();
4809 int pi = (i==-1) ? 0 : i+2;
4819 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4823 if (!yyextra->msName.isEmpty()
4829 if (typedefHidesStruct &&
4830 yyextra->isTypedef &&
4831 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4832 yyextra->msType.stripWhiteSpace().isEmpty() &&
4833 yyextra->memspecEntry)
4835 yyextra->memspecEntry->name=yyextra->msName;
4839 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4840 varEntry->lang = yyextra->language;
4841 varEntry->protection = yyextra->current->protection ;
4842 varEntry->mtype = yyextra->current->mtype;
4843 varEntry->virt = yyextra->current->virt;
4844 varEntry->isStatic = yyextra->current->isStatic;
4845 varEntry->section = EntryType::makeVariable();
4846 varEntry->name = yyextra->msName.stripWhiteSpace();
4847 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4848 varEntry->args = yyextra->msArgs;
4849 if (yyextra->isTypedef)
4851 varEntry->type.prepend(
"typedef ");
4854 if (typedefHidesStruct &&
4855 yyextra->isTypedef &&
4856 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4857 yyextra->memspecEntry
4860 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4864 varEntry->type+=yyextra->current->name+yyextra->msType;
4866 varEntry->fileName = yyextra->fileName;
4867 varEntry->startLine = yyextra->yyLineNr;
4868 varEntry->startColumn = yyextra->yyColNr;
4869 varEntry->doc = yyextra->current->doc;
4870 varEntry->brief = yyextra->current->brief;
4871 varEntry->mGrpId = yyextra->current->mGrpId;
4872 varEntry->initializer.str(yyextra->current->initializer.str());
4873 varEntry->groups = yyextra->current->groups;
4874 varEntry->sli = yyextra->current->sli;
4879 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4884 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4886 if (!yyextra->current->doc.isEmpty())
4888 yyextra->memspecEntry->doc += yyextra->current->doc;
4890 if (!yyextra->current->brief.isEmpty())
4892 yyextra->memspecEntry->brief += yyextra->current->brief;
4895 yyextra->msType.clear();
4896 yyextra->msName.clear();
4897 yyextra->msArgs.clear();
4898 yyextra->isTypedef=
FALSE;
4899 yyextra->firstTypedefEntry.reset();
4900 yyextra->memspecEntry.reset();
4901 yyextra->current->reset();
4903 BEGIN( FindMembers );
4907 yyextra->current->doc.clear();
4908 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
4913 yyextra->lastInitializerContext=YY_START;
4914 yyextra->sharpCount=0;
4915 yyextra->initBracketCount=0;
4916 yyextra->current->initializer.str(yytext);
4917 BEGIN(ReadInitializer);
4928<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4929<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4930<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4933<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4934 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4936 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4937 yyextra->insideObjC=
FALSE;
4938 BEGIN( FindMembers );
4940<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4941<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4943<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4944<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4945 if (yyextra->insidePHP)
4951 yyextra->current->bodyLine = yyextra->yyLineNr;
4952 yyextra->current->bodyColumn = yyextra->yyColNr;
4955 yyextra->funcPtrType=yytext;
4956 yyextra->roundCount=0;
4961<FuncPtr>{SCOPENAME} {
4962 yyextra->current->name = yytext;
4965 BEGIN( FuncPtrOperator );
4969 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4971 yyextra->funcPtrType += yyextra->current->name;
4975 BEGIN( EndFuncPtr );
4982<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4983 yyextra->current->name += yytext;
4984 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4987<FuncPtrOperator>\n {
4989 yyextra->current->name += *yytext;
4991<FuncPtrOperator>"(" {
4993 BEGIN( EndFuncPtr );
4996 yyextra->current->name += *yytext;
4998<EndFuncPtr>")"{BNopt}/";" {
5000 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5003<EndFuncPtr>")"{BNopt}/"(" {
5005 if (yyextra->funcPtrType!=
"(")
5007 yyextra->current->type+=yyextra->funcPtrType+
")";
5011<EndFuncPtr>")"{BNopt}/"[" {
5013 yyextra->current->type+=yyextra->funcPtrType;
5014 yyextra->current->args +=
")";
5019 yyextra->current->args += *yytext ;
5022 yyextra->current->bodyLine = yyextra->yyLineNr;
5023 yyextra->current->bodyColumn = yyextra->yyColNr;
5024 yyextra->currentArgumentContext = FuncFuncEnd;
5025 yyextra->fullArgString=yyextra->current->args;
5026 yyextra->copyArgString=&yyextra->current->args;
5027 BEGIN( ReadFuncArgType ) ;
5029<EndFuncPtr>"["[^\n\]]*"]" {
5030 yyextra->funcPtrType+=yytext;
5036 yyextra->current->args += *yytext ;
5037 ++yyextra->roundCount;
5040 yyextra->current->args += *yytext ;
5041 if ( yyextra->roundCount )
5042 --yyextra->roundCount;
5048<FuncFuncEnd>")"{BN}*"(" {
5050 yyextra->current->type+=yyextra->funcPtrType+
")(";
5051 BEGIN(FuncFuncType);
5053<FuncFuncEnd>")"{BNopt}/[;{] {
5055 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5058<FuncFuncEnd>")"{BNopt}/"[" {
5060 yyextra->current->type+=yyextra->funcPtrType;
5061 yyextra->current->args+=
")";
5062 BEGIN(FuncFuncArray);
5065 yyextra->current->args += *yytext;
5068 yyextra->current->type += *yytext;
5069 yyextra->roundCount++;
5072 yyextra->current->type += *yytext;
5073 if (yyextra->roundCount)
5074 --yyextra->roundCount;
5078<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5079<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5081 yyextra->current->type += *yytext;
5083<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5084 if (yyextra->current->type.startsWith(
"typedef") &&
5085 yyextra->current->bodyLine==-1)
5088 yyextra->current->bodyLine = yyextra->yyLineNr;
5089 yyextra->current->bodyColumn = yyextra->yyColNr;
5090 BEGIN( GetCallType );
5092 else if (!yyextra->current->name.isEmpty())
5094 yyextra->current->args = yytext;
5095 yyextra->current->bodyLine = yyextra->yyLineNr;
5096 yyextra->current->bodyColumn = yyextra->yyColNr;
5097 yyextra->currentArgumentContext = FuncQual;
5098 yyextra->fullArgString=yyextra->current->args;
5099 yyextra->copyArgString=&yyextra->current->args;
5100 BEGIN( ReadFuncArgType ) ;
5104<GetCallType>{BN}*{ID}{BN}*"*" {
5107 yyextra->funcPtrType=
"(";
5108 yyextra->funcPtrType+=yytext;
5109 yyextra->roundCount=0;
5113 if (!yyextra->current->name.isEmpty())
5115 yyextra->current->args = yytext;
5116 yyextra->current->bodyLine = yyextra->yyLineNr;
5117 yyextra->current->bodyColumn = yyextra->yyColNr;
5118 yyextra->currentArgumentContext = FuncQual;
5119 yyextra->fullArgString=yyextra->current->args;
5120 yyextra->copyArgString=&yyextra->current->args;
5121 BEGIN( ReadFuncArgType ) ;
5128<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5129 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5130 else yyextra->fullArgString+=yytext;
5132<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5133 yyextra->fullArgString+=yytext;
5135<CopyArgRound>[^\/\n\)\(\"\']+ {
5136 *yyextra->copyArgString+=yytext;
5137 yyextra->fullArgString+=yytext;
5139<CopyArgSquare>[^\/\n\]\[\"\']+ {
5140 *yyextra->copyArgString+=yytext;
5141 yyextra->fullArgString+=yytext;
5143<ReadFuncArgType,ReadTempArgs>{BN}* {
5144 *yyextra->copyArgString+=
" ";
5145 yyextra->fullArgString+=
" ";
5148<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5150 yyextra->lastRawStringContext = YY_START;
5151 yyextra->pCopyRawString = yyextra->copyArgString;
5152 *yyextra->pCopyRawString+=yytext;
5153 yyextra->fullArgString+=yytext;
5156<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5157 *yyextra->copyArgString+=*yytext;
5158 yyextra->fullArgString+=*yytext;
5159 yyextra->lastCopyArgStringContext = YY_START;
5160 BEGIN( CopyArgString );
5162<ReadFuncArgType>"[" {
5163 if (!yyextra->insidePHP) REJECT;
5164 *yyextra->copyArgString+=*yytext;
5165 yyextra->fullArgString+=*yytext;
5166 yyextra->argSquareCount=0;
5167 yyextra->lastCopyArgContext = YY_START;
5168 BEGIN( CopyArgSquare );
5170<ReadFuncArgType,ReadTempArgs>"(" {
5171 *yyextra->copyArgString+=*yytext;
5172 yyextra->fullArgString+=*yytext;
5173 yyextra->argRoundCount=0;
5174 yyextra->lastCopyArgContext = YY_START;
5175 BEGIN( CopyArgRound );
5177<ReadFuncArgType>")" {
5178 *yyextra->copyArgString+=*yytext;
5179 yyextra->fullArgString+=*yytext;
5181 if (yyextra->insideJS)
5192 yyextra->docBackup = yyextra->current->doc;
5193 yyextra->briefBackup = yyextra->current->brief;
5195 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5198<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5199 if (yyextra->currentArgumentContext==DefineEnd)
5203 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5209 BEGIN( yyextra->currentArgumentContext );
5215 yyextra->fullArgString+=yytext;
5216 yyextra->lastCopyArgChar=0;
5217 yyextra->lastCommentInArgContext=YY_START;
5219 BEGIN( CopyArgCommentLine );
5221 BEGIN( CopyArgComment );
5225<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5226<ReadFuncArgType,ReadTempArgs>{CCS} {
5227 yyextra->lastCContext = YY_START;
5228 BEGIN( SkipComment );
5230<ReadFuncArgType,ReadTempArgs>{CPPC} {
5231 yyextra->lastCContext = YY_START;
5232 BEGIN( SkipCxxComment );
5248<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5250 if (yyextra->currentArgumentContext==DefineEnd)
5254 int i;
for (i=(
int)yyleng-1;i>0;i--)
5258 *yyextra->copyArgString+=*yytext;
5259 yyextra->fullArgString+=*yytext;
5262 BEGIN( yyextra->currentArgumentContext );
5268 yyextra->lastCopyArgChar=*yytext;
5271 yyextra->lastCommentInArgContext=YY_START;
5272 yyextra->fullArgString+=text;
5273 if (text.
find(
"//")!=-1)
5274 BEGIN( CopyArgCommentLine );
5276 BEGIN( CopyArgComment );
5279<CopyArgComment>^{B}*"*"+/{BN}+
5280<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5281<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5282 if (yyextra->lastCopyArgChar!=0)
5283 unput(yyextra->lastCopyArgChar);
5284 BEGIN( yyextra->lastCommentInArgContext );
5286<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5288 if (yyextra->lastCopyArgChar!=0)
5289 unput(yyextra->lastCopyArgChar);
5290 BEGIN( yyextra->lastCommentInArgContext );
5292<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5293 yyextra->docBlockName=
"uml";
5294 yyextra->fullArgString+=yytext;
5295 BEGIN(CopyArgVerbatim);
5297<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5298 yyextra->docBlockName=&yytext[1];
5299 yyextra->fullArgString+=yytext;
5300 BEGIN(CopyArgVerbatim);
5302<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5303 yyextra->docBlockName=&yytext[1];
5304 if (yyextra->docBlockName.at(1)==
'[')
5306 yyextra->docBlockName.at(1)=
']';
5308 if (yyextra->docBlockName.at(1)==
'{')
5310 yyextra->docBlockName.at(1)=
'}';
5312 if (yyextra->docBlockName.at(1)==
'(')
5314 yyextra->docBlockName.at(1)=
')';
5316 yyextra->fullArgString+=yytext;
5317 BEGIN(CopyArgVerbatim);
5319<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5320 yyextra->fullArgString+=yytext;
5321 if (&yytext[4]==yyextra->docBlockName)
5323 yyextra->docBlockName=
"";
5324 BEGIN(CopyArgCommentLine);
5327<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5328 yyextra->fullArgString+=yytext;
5329 if (yyextra->docBlockName==&yytext[1])
5331 yyextra->docBlockName=
"";
5332 BEGIN(CopyArgCommentLine);
5335<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5336<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5337<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5338<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5339<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5340 warn(yyextra->fileName,yyextra->yyLineNr,
5341 "Ignoring {:c}brief command inside argument documentation",*yytext
5343 yyextra->fullArgString+=
' ';
5346 *yyextra->copyArgString+=*yytext;
5347 yyextra->fullArgString+=*yytext;
5348 yyextra->argSharpCount=1;
5349 BEGIN( CopyArgSharp );
5352 *yyextra->copyArgString+=*yytext;
5353 yyextra->fullArgString+=*yytext;
5355 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5357 BEGIN( yyextra->currentArgumentContext );
5360 yyextra->argRoundCount++;
5361 *yyextra->copyArgString+=*yytext;
5362 yyextra->fullArgString+=*yytext;
5365 *yyextra->copyArgString+=*yytext;
5366 yyextra->fullArgString+=*yytext;
5367 if (yyextra->argRoundCount>0)
5368 yyextra->argRoundCount--;
5370 BEGIN( yyextra->lastCopyArgContext );
5373 yyextra->argSquareCount++;
5374 *yyextra->copyArgString+=*yytext;
5375 yyextra->fullArgString+=*yytext;
5378 *yyextra->copyArgString+=*yytext;
5379 yyextra->fullArgString+=*yytext;
5380 if (yyextra->argSquareCount>0)
5381 yyextra->argSquareCount--;
5383 BEGIN( yyextra->lastCopyArgContext );
5386 *yyextra->copyArgString+=*yytext;
5387 yyextra->fullArgString+=*yytext;
5388 yyextra->argRoundCount=0;
5389 yyextra->lastCopyArgContext = YY_START;
5390 BEGIN( CopyArgRound );
5393 yyextra->argSharpCount++;
5395 *yyextra->copyArgString+=*yytext;
5396 yyextra->fullArgString+=*yytext;
5399 *yyextra->copyArgString+=*yytext;
5400 yyextra->fullArgString+=*yytext;
5401 yyextra->argSharpCount--;
5402 if (yyextra->argSharpCount>0)
5408 BEGIN( ReadTempArgs );
5412<CopyArgString,CopyArgPHPString>\\. {
5413 *yyextra->copyArgString+=yytext;
5414 yyextra->fullArgString+=yytext;
5417 *yyextra->copyArgString+=*yytext;
5418 yyextra->fullArgString+=*yytext;
5419 BEGIN( yyextra->lastCopyArgStringContext );
5421<CopyArgPHPString>\' {
5422 *yyextra->copyArgString+=*yytext;
5423 yyextra->fullArgString+=*yytext;
5424 BEGIN( yyextra->lastCopyArgStringContext );
5426<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5427 if (yyextra->insidePHP)
5433 *yyextra->copyArgString+=yytext;
5434 yyextra->fullArgString+=yytext;
5437<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5438 *yyextra->copyArgString+=yytext;
5439 yyextra->fullArgString+=yytext;
5440 if (yyextra->insidePHP)
5442 yyextra->lastCopyArgStringContext=YY_START;
5443 BEGIN(CopyArgPHPString);
5446<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5447 *yyextra->copyArgString+=yytext;
5448 yyextra->fullArgString+=yytext;
5450<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5452 *yyextra->copyArgString+=*yytext;
5453 yyextra->fullArgString+=*yytext;
5455<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5456 *yyextra->copyArgString+=yytext;
5457 yyextra->fullArgString+=yytext;
5459<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5460 *yyextra->copyArgString+=*yytext;
5461 yyextra->fullArgString+=*yytext;
5469<FuncRound>"(" { yyextra->current->args += *yytext ;
5470 ++yyextra->roundCount ;
5472<FuncRound>")" { yyextra->current->args += *yytext ;
5473 if ( yyextra->roundCount )
5474 --yyextra->roundCount ;
5486 if (
qstrcmp(yytext,
";")==0 &&
5487 ((yyextra->insideJS || yyextra->insidePHP) &&
5490 yyextra->current->reset();
5492 BEGIN( FindMembers );
5496 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5499<FuncQual>{BN}*"abstract"{BN}* {
5501 yyextra->current->virt = Specifier::Pure;
5502 yyextra->current->args +=
" override ";
5504<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5506 yyextra->current->spec.setOverride(
true);
5507 yyextra->current->args +=
" override ";
5508 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5511<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5513 yyextra->current->spec.setFinal(
true);
5514 yyextra->current->args +=
" final ";
5515 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5518<FuncQual>{BN}*"sealed"{BN}* {
5520 yyextra->current->spec.setSealed(
true);
5521 yyextra->current->args +=
" sealed ";
5523<FuncQual>{BN}*"new"{BN}* {
5525 yyextra->current->spec.setNew(
true);
5526 yyextra->current->args +=
" new ";
5528<FuncQual>{BN}*"const"{BN}* {
5530 yyextra->current->args +=
" const ";
5531 yyextra->current->argList.setConstSpecifier(
TRUE);
5533<FuncQual>{BN}*"volatile"{BN}* {
5535 yyextra->current->args +=
" volatile ";
5536 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5538<FuncQual>{BN}*"noexcept"{BN}* {
5540 yyextra->current->args +=
" noexcept ";
5541 yyextra->current->spec.setNoExcept(
true);
5543<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5545 yyextra->current->args +=
" noexcept(false)";
5547<FuncQual>{BN}*"noexcept"{BN}*"(" {
5549 yyextra->current->args +=
" noexcept(";
5550 yyextra->current->spec.setNoExcept(
true);
5551 yyextra->lastRoundContext=FuncQual;
5552 yyextra->pCopyRoundString=&yyextra->current->args;
5553 yyextra->roundCount=0;
5557 yyextra->current->args +=
" &";
5560<FuncQual>{BN}*"&&" {
5561 yyextra->current->args +=
" &&";
5565<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5567 yyextra->current->args +=
" = 0";
5568 yyextra->current->virt = Specifier::Pure;
5569 yyextra->current->argList.setPureSpecifier(
TRUE);
5570 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5573<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5575 yyextra->current->args +=
" = delete";
5576 yyextra->current->spec.setDelete(
true);
5577 yyextra->current->argList.setIsDeleted(
TRUE);
5578 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5581<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5583 yyextra->current->args +=
" = default";
5584 yyextra->current->spec.setDefault(
true);
5585 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5588<FuncQual>{BN}*"->"{BN}* {
5590 yyextra->current->argList.setTrailingReturnType(
" -> ");
5591 yyextra->current->args +=
" -> ";
5592 yyextra->roundCount=0;
5593 BEGIN(TrailingReturn);
5595<TrailingReturn>[{;] {
5596 if (yyextra->roundCount>0) REJECT;
5598 yyextra->current->argList.finishTrailingReturnType();
5601<TrailingReturn>"requires"{BN}+ {
5602 if (yyextra->insideJava) REJECT;
5603 yyextra->requiresContext = FuncQual;
5604 yyextra->current->req+=
' ';
5605 yyextra->current->argList.finishTrailingReturnType();
5606 BEGIN(RequiresClause);
5608<TrailingReturn>"(" {
5609 yyextra->roundCount++;
5610 yyextra->current->argList.appendTrailingReturnType(yytext);
5611 yyextra->current->args+=yytext;
5613<TrailingReturn>")" {
5614 if (yyextra->roundCount>0)
5616 yyextra->roundCount--;
5620 warn(yyextra->fileName,yyextra->yyLineNr,
5621 "Found ')' without opening '(' for trailing return type '{})...'",
5622 yyextra->current->argList.trailingReturnType());
5624 yyextra->current->argList.appendTrailingReturnType(yytext);
5625 yyextra->current->args+=yytext;
5628 yyextra->current->argList.appendTrailingReturnType(yytext);
5629 yyextra->current->args+=yytext;
5633 yyextra->current->argList.appendTrailingReturnType(yytext);
5634 yyextra->current->args+=
' ';
5636<FuncRound,FuncFunc>{BN}*","{BN}* {
5638 yyextra->current->args +=
", " ;
5640<FuncQual,FuncRound,FuncFunc>{BN}+ {
5642 yyextra->current->args +=
' ' ;
5644<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5646 yyextra->lastCPPContext = YY_START;
5650 if (!yyextra->insideCS)
5657 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5664 yyextra->lastInitializerContext=YY_START;
5665 yyextra->sharpCount=0;
5666 yyextra->initBracketCount=0;
5667 yyextra->current->initializer.str(yytext);
5668 BEGIN(ReadInitializer);
5671<ReadExpressionBody>";" {
5672 if (!yyextra->current->sli.empty() && yyextra->previous)
5674 yyextra->previous->sli = yyextra->current->sli;
5675 yyextra->current->sli.clear();
5677 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5692 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5695 yyextra->requiresContext = YY_START;
5696 if (!yyextra->current->req.isEmpty())
5698 yyextra->current->req+=
" && ";
5700 BEGIN(RequiresClause);
5702 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5705 yyextra->current->typeConstr.clear();
5706 yyextra->current->typeConstr.push_back(
Argument());
5707 yyextra->lastCSConstraint = YY_START;
5708 BEGIN( CSConstraintName );
5712 yyextra->current->args = yytext;
5713 yyextra->oldStyleArgType.clear();
5714 BEGIN(OldStyleArgs);
5718 yyextra->current->args += yytext;
5724 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5726 if (yyextra->current->doc!=yyextra->docBackup)
5728 doc=yyextra->current->doc;
5729 yyextra->current->doc=yyextra->docBackup;
5731 if (yyextra->current->brief!=yyextra->briefBackup)
5733 brief=yyextra->current->brief;
5734 yyextra->current->brief=yyextra->briefBackup;
5736 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5737 oldStyleArgName,brief,doc);
5738 yyextra->current->args.clear();
5739 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5741<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5743 if (yyextra->current->argList.empty())
5745 yyextra->current->argList.setNoParameters(
TRUE);
5751<OldStyleArgs>. { yyextra->current->args += *yytext; }
5752<FuncQual,FuncRound,FuncFunc>\" {
5753 if (yyextra->insideIDL && yyextra->insideCppQuote)
5759 yyextra->current->args += *yytext;
5762<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5763<FuncQual>{BN}*"try:" |
5764<FuncQual>{BN}*"try"{BN}+ {
5765 yyextra->insideTryBlock=
TRUE;
5767 if (yytext[yyleng-1]==
':')
5773<FuncQual>{BN}*"throw"{BN}*"(" {
5774 yyextra->current->exception =
" throw (" ;
5775 yyextra->roundCount=0;
5777 BEGIN( ExcpRound ) ;
5779<FuncQual>{BN}*"raises"{BN}*"(" {
5780 yyextra->current->exception =
" raises (" ;
5782 yyextra->roundCount=0;
5783 BEGIN( ExcpRound ) ;
5785<FuncQual>{BN}*"throws"{BN}+ {
5786 yyextra->current->exception =
" throws " ;
5790<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5791 ++yyextra->roundCount ;
5793<ExcpRound>")" { yyextra->current->exception += *yytext ;
5794 if ( yyextra->roundCount )
5795 --yyextra->roundCount ;
5800 yyextra->current->exception += *yytext;
5803 unput(
'{'); BEGIN( FuncQual );
5806 unput(
';'); BEGIN( FuncQual );
5809 yyextra->current->exception +=
' ';
5813 yyextra->current->exception += *yytext;
5815<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5816 yyextra->current->name = yyextra->current->args ;
5817 yyextra->current->args = yytext ;
5818 yyextra->roundCount=0;
5819 BEGIN( FuncRound ) ;
5822 if (!yyextra->insidePHP) BEGIN(SkipInits);
5828 yyextra->current->fileName = yyextra->fileName;
5829 yyextra->current->startLine = yyextra->yyBegLineNr;
5830 yyextra->current->startColumn = yyextra->yyBegColNr;
5831 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5833 std::string type = yyextra->current->type.str();
5837 ti = (int)
match.position();
5841 int di = yyextra->current->type.find(
"decltype(");
5842 if (di!=-1 && di<ti)
5847 int ts=yyextra->current->type.find(
'<');
5848 int te=yyextra->current->type.findRev(
'>');
5851 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5852 bool isFunction = ti==-1 ||
5853 (ts!=-1 && ts<te && ts<ti && ti<te);
5854 bool isVariable = !yyextra->current->type.isEmpty() &&
5855 (!isFunction || startsWithTypedef);
5860 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5865 if (yyextra->isTypedef && !startsWithTypedef)
5867 yyextra->current->type.prepend(
"typedef ");
5869 yyextra->current->section = EntryType::makeVariable() ;
5874 yyextra->current->section = EntryType::makeFunction() ;
5875 yyextra->current->proto = *yytext==
';';
5883 if (yyextra->isTypedef && !startsWithTypedef)
5885 yyextra->current->type.prepend(
"typedef ");
5888 yyextra->current->section = EntryType::makeVariable();
5893 yyextra->current->section = EntryType::makeFunction();
5894 yyextra->current->proto =
TRUE;
5898 if ( yyextra->insidePHP)
5902 yyextra->current->spec.setFinal(
true);
5906 yyextra->current->spec.setAbstract(
true);
5909 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5912 if ( *yytext ==
'{' )
5914 yyextra->lastCurlyContext = FindMembers;
5915 yyextra->curlyCount=0;
5920 BEGIN( FindMembers );
5925 if ( yyextra->insidePHP)
5929 yyextra->previous = yyextra->current;
5930 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5933 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5935 yyextra->current->spec.setOptional(
true).setRequired(
true);
5937 yyextra->lastCurlyContext = FindMembers;
5938 if ( *yytext ==
',' )
5940 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5942 if ( *yytext ==
'{' )
5944 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5946 yyextra->previous->spec.setInline(
true);
5948 yyextra->curlyCount=0;
5949 BEGIN( SkipCurly ) ;
5951 else if ( *yytext ==
'=' )
5953 yyextra->previous->spec.setInline(
true);
5954 yyextra->curlyCount=0;
5955 BEGIN( ReadExpressionBody );
5959 if (!yyextra->previous->section.isVariable())
5960 yyextra->previous->bodyLine=-1;
5961 BEGIN( FindMembers ) ;
Object representing the matching results.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
5965<SkipInits>">"{BN}*"{" {
5967 yyextra->curlyCount=1;
5968 BEGIN(SkipC11Inits);
5970<SkipInits>{ID}{BN}*"{" {
5972 yyextra->curlyCount=1;
5973 BEGIN(SkipC11Inits);
5976 ++yyextra->curlyCount;
5979 if ( --yyextra->curlyCount<=0 )
5984<SkipC11Attribute>"]]" {
5985 BEGIN(yyextra->lastC11AttributeContext);
5993 ++yyextra->curlyCount ;
5995<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5998 if( yyextra->curlyCount )
6000 --yyextra->curlyCount ;
6004 if (!yyextra->current->sli.empty() && yyextra->previous)
6006 yyextra->previous->sli = yyextra->current->sli;
6007 yyextra->current->sli.clear();
6009 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6010 BEGIN( yyextra->lastCurlyContext ) ;
6013<SkipCurly>"}"{BN}*{DCOMM}"<" {
6015 if ( yyextra->curlyCount )
6018 --yyextra->curlyCount ;
6022 yyextra->current->endBodyLine=yyextra->yyLineNr;
6023 yyextra->tempEntry = yyextra->current;
6024 yyextra->current = yyextra->previous;
6026 yyextra->docBlockContext = SkipCurlyEndDoc;
6027 yyextra->docBlockInBody =
FALSE;
6028 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6030 yyextra->docBlock.str(std::string());
6031 yyextra->docBlockTerm =
'}';
6032 if (yytext[yyleng-3]==
'/')
6044<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6045 yyextra->docBlockContext = SkipCurlyEndDoc;
6046 yyextra->docBlockInBody =
FALSE;
6047 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6049 yyextra->docBlock.str(std::string());
6050 yyextra->docBlockTerm =
'}';
6051 if (yytext[yyleng-3]==
'/')
6062<SkipCurlyEndDoc>"}" {
6064 if (yyextra->tempEntry)
6066 yyextra->current = yyextra->tempEntry;
6067 yyextra->tempEntry.reset();
6069 BEGIN( yyextra->lastCurlyContext );
6071<SkipCurly,ReadExpressionBody>\" {
6073 yyextra->lastStringContext=YY_START;
6074 BEGIN( SkipString );
6076<SkipCurly>^{B}*"#" {
6077 if (yyextra->insidePHP)
6080 BEGIN( SkipCurlyCpp );
6082<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6086<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6087 if (!yyextra->insidePHP)
6093 yyextra->lastHereDocContext = YY_START;
6097<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6099 yyextra->lastRawStringContext = YY_START;
6100 yyextra->dummyRawString.clear();
6101 yyextra->pCopyRawString = &yyextra->dummyRawString;
6102 *yyextra->pCopyRawString += yytext;
6105<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6109<SkipCurly,SkipCurlyCpp>"\$" {}
6113 yyextra->lastCurlyContext = FindMembers;
6116<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6120<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6122 yyextra->lastCContext = YY_START;
6125<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6127 yyextra->lastCContext = YY_START;
6128 BEGIN(SkipCxxComment);
6130<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6131 yyextra->roundCount=0;
6132 yyextra->lastSkipRoundContext=YY_START;
6135<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6136 yyextra->lastStringContext=YY_START;
6137 BEGIN( SkipString );
6140 warn(yyextra->fileName,yyextra->yyLineNr,
6141 "Found ';' while parsing initializer list! "
6142 "(doxygen could be confused by a macro call without semicolon)"
6144 BEGIN( FindMembers );
6146<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6147 if (!yyextra->insidePHP)
6150 yyextra->lastCContext = YY_START;
6151 BEGIN(SkipCxxComment);
6153<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6154 if (!yyextra->insideCS) REJECT;
6157 yyextra->lastSkipVerbStringContext=YY_START;
6158 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6159 yyextra->dummyTextStream.clear();
6160 BEGIN(SkipVerbString);
6162<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6163 if (yyextra->insidePHP) REJECT;
6165<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6166 if (yyextra->insidePHP)
6168 yyextra->lastStringContext=YY_START;
6169 BEGIN(SkipPHPString);
6172<SkipC11Attribute>{ID} {
6175 yyextra->current->spec.setNoDiscard(
true);
6178<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6179<SkipString,SkipPHPString>\\. { }
6181 BEGIN( yyextra->lastStringContext );
6184 BEGIN( yyextra->lastStringContext );
6186<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6187<SkipString,SkipPHPString>\n {
6191<SkipString,SkipPHPString>. { }
6197 yyextra->current->section = EntryType::makeEmpty() ;
6198 yyextra->current->type.clear() ;
6199 yyextra->current->name.clear() ;
6200 yyextra->current->args.clear() ;
6201 yyextra->current->argList.clear();
6202 BEGIN( FindMembers ) ;
6205 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6209 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6213 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6215 if (!yyextra->baseName.isEmpty())
6217 yyextra->current->extends.emplace_back(
6218 yyextra->baseName,Protection::Public,Specifier::Normal);
6219 yyextra->baseName.clear();
6221 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6226 yyextra->current->section = EntryType::makeEmpty() ;
6227 yyextra->current->type.clear() ;
6228 yyextra->current->name.clear() ;
6229 yyextra->current->args.clear() ;
6230 yyextra->current->argList.clear();
6232 BEGIN( FindMembers ) ;
6234<CompoundName>{SCOPENAME}/{BN}*"<" {
6235 yyextra->sharpCount = 0;
6236 yyextra->current->name = yytext ;
6238 if (yyextra->current->spec.isProtocol())
6240 yyextra->current->name+=
"-p";
6243 yyextra->lastClassTemplSpecContext = ClassVar;
6244 if (yyextra->insideObjC)
6246 BEGIN( ObjCProtocolList );
6248 else if (yyextra->insideCS)
6255 yyextra->roundCount=0;
6256 BEGIN( ClassTemplSpec );
6263 yyextra->current->tArgLists.
push_back(al);
6264 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6265 yyextra->templateStr=
"<";
6266 yyextra->current->name +=
"<";
6267 yyextra->fullArgString = yyextra->templateStr;
6268 yyextra->copyArgString = &yyextra->current->name;
6270 yyextra->currentArgumentContext = ClassVar;
6271 BEGIN( ReadTempArgs );
6273<ObjCProtocolList>"<" {
6274 yyextra->insideProtocolList=
TRUE;
6277<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6278 yyextra->current->name += yytext;
6280 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6283 if (yyextra->current->spec.isProtocol())
6290 BEGIN( yyextra->lastClassTemplSpecContext );
6294<ClassTemplSpec>"<" {
6295 yyextra->current->name += yytext;
6296 if (yyextra->roundCount==0) yyextra->sharpCount++;
6299 yyextra->current->name += yytext;
6301<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6302 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6306 yyextra->current->name =
substitute(yytext,
".",
"::");
6307 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6312 else if (!yyextra->current->tArgLists.empty())
6316 yyextra->current->name = yytext;
6317 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6320 QCString rn = yyextra->current_root->name;
6322 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6326 yyextra->current->spec.setForwardDecl(
true);
6327 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6329 else if (yyextra->insideIDL &&
6330 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6331 yyextra->current->spec.isInterface()) ||
6332 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6333 yyextra->current->spec.isService())
6341 yyextra->current->name = yytext;
6342 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6343 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6346 yyextra->current->spec.setInterface(
false).setService(
false);
6350 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6353 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6356 yyextra->current->reset();
6358 if (yyextra->insideObjC)
6360 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6361 yyextra->insideObjC =
FALSE;
6363 if (yyextra->isTypedef)
6365 yyextra->current->type.prepend(
"typedef");
6367 BEGIN( FindMembers );
Wrapper class for the Entry type.
6370<CompoundName>{SCOPENAME}/{BN}*"(" {
6371 yyextra->current->name = yytext ;
6374 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6376 yyextra->lastAlignAsContext = YY_START;
6381 if (yyextra->current->spec.isProtocol())
6383 yyextra->current->name +=
"-p";
6388<AlignAs>"(" { yyextra->roundCount=0;
6389 BEGIN( AlignAsEnd );
6393<AlignAsEnd>"(" { yyextra->roundCount++; }
6394<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6396 BEGIN( yyextra->lastAlignAsContext );
6402 yyextra->current->name = yytext ;
6406 yyextra->current->bodyLine = yyextra->yyLineNr;
6407 yyextra->current->bodyColumn = yyextra->yyColNr;
6408 yyextra->current->initializer.str(std::string());
6409 yyextra->lastInitializerContext = FindMembers;
6410 yyextra->sharpCount=0;
6411 yyextra->initBracketCount=0;
6412 BEGIN(ReadInitializer);
6414<CompoundName>{SCOPENAME}/{BN}*"," {
6416 yyextra->current->reset();
6419<CompoundName>{SCOPENAME} {
6420 yyextra->current->name = yytext ;
6423 if (yyextra->current->spec.isProtocol())
6425 yyextra->current->name +=
"-p";
6427 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6433<CompoundName>{CSSCOPENAME} {
6434 yyextra->current->name =
substitute(yytext,
".",
"::");
6438<ClassVar>{SCOPENAME}{BNopt}/"(" {
6439 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6442 yyextra->roundCount=0;
6443 BEGIN(SkipUnionSwitch);
6448 yyextra->yyBegColNr=yyextra->yyColNr;
6449 yyextra->yyBegLineNr=yyextra->yyLineNr;
6450 yyextra->current->name = yytext;
6451 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6454 BEGIN( FindMembers );
6458 if (yyextra->isTypedef)
6462 yyextra->current->type.prepend(
"typedef ");
6470<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6471 if (yyextra->insideCli)
6474 yyextra->current->spec.setSealedClass(
true);
6476 yyextra->current->spec.setAbstractClass(
true);
6484<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6485 yyextra->yyBegColNr=yyextra->yyColNr;
6486 yyextra->yyBegLineNr=yyextra->yyLineNr;
6489 if (yyextra->current->section.isEnum())
6491 yyextra->current->section = EntryType::makeVariable() ;
6493 yyextra->current->type +=
' ' ;
6494 yyextra->current->type += yyextra->current->name ;
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
6503 yyextra->yyBegColNr=yyextra->yyColNr;
6504 yyextra->yyBegLineNr=yyextra->yyLineNr;
6506 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6509 yyextra->roundCount=0;
6510 BEGIN(SkipUnionSwitch);
6512 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6514 yyextra->current->type.clear();
6515 yyextra->baseProt = Protection::Public;
6516 yyextra->baseVirt = Specifier::Normal;
6517 yyextra->baseName.clear();
6518 BEGIN( BasesProt ) ;
6520 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6522 yyextra->current->typeConstr.clear();
6523 yyextra->current->typeConstr.push_back(
Argument());
6524 yyextra->lastCSConstraint = YY_START;
6525 BEGIN( CSConstraintName );
6527 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6529 yyextra->current->spec.setAbstract(
true);
6531 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6533 yyextra->current->spec.setSealed(
true);
6535 else if (
qstrcmp(yytext,
"final")==0)
6537 yyextra->current->spec.setFinal(
true);
6541 if (yyextra->current->section.isEnum())
6543 yyextra->current->section = EntryType::makeVariable() ;
6545 yyextra->current->type +=
' ' ;
6546 yyextra->current->type += yyextra->current->name ;
6547 yyextra->current->name = yytext ;
6556 if (yyextra->insideObjC && *yytext==
'(')
6558 yyextra->current->name+=
'(';
6559 yyextra->current->spec.setCategory(
true);
6560 BEGIN( ClassCategory );
6562 else if (yyextra->insideCS && *yytext==
'(')
6564 yyextra->current->args=yytext;
6565 yyextra->currentArgumentContext = ClassVar;
6566 yyextra->fullArgString = yyextra->current->args;
6567 yyextra->copyArgString = &yyextra->current->args;
6568 BEGIN( ReadFuncArgType ) ;
6574 BEGIN( FindMembers );
6577<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6578<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6579 yyextra->fullArgString.clear();
6580 yyextra->lastCopyArgChar=
'#';
6581 yyextra->lastCommentInArgContext=YY_START;
6583 BEGIN( CopyArgCommentLine );
6585 BEGIN( CopyArgComment );
6587<CSConstraintType,CSConstraintName>"#" {
6588 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6590<CSConstraintType>"=>" {
6595 BEGIN( yyextra->lastCSConstraint );
6597<CSConstraintType>"{" {
6601 BEGIN( yyextra->lastCSConstraint );
6603<CSConstraintType,CSConstraintName>";" {
6606 BEGIN( yyextra->lastCSConstraint );
6608<CSConstraintName>":" {
6609 BEGIN( CSConstraintType );
6611<CSConstraintName>{ID} {
6613 yyextra->current->typeConstr.back().name=yytext;
6615<CSConstraintType>"where" {
6616 yyextra->current->typeConstr.push_back(
Argument());
6617 BEGIN( CSConstraintName );
6619<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6620 if (yyextra->current->typeConstr.back().type.isEmpty())
6623 yyextra->current->typeConstr.back().type=yytext;
6627 QCString name = yyextra->current->typeConstr.back().name;
6628 yyextra->current->typeConstr.push_back(
Argument());
6629 yyextra->current->typeConstr.back().name=name;
6630 yyextra->current->typeConstr.back().type=yytext;
6633<CSConstraintName,CSConstraintType>\n {
6636<CSConstraintName,CSConstraintType>. {
6638<ClassCategory>{ID} {
6639 yyextra->current->name+=yytext;
6641<ClassCategory>")"/{BN}*"{" {
6642 yyextra->current->name+=
')';
6645<ClassCategory>")"/{BN}*"<" {
6646 yyextra->current->name+=
')';
6647 BEGIN( ObjCProtocolList );
6650 yyextra->current->name+=
')';
6651 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6663 if (yyextra->current->section.isVariable())
6665 yyextra->current->bitfields+=
":";
6666 yyextra->current->args.clear();
6669 else if (yyextra->current->section.isEnum())
6672 yyextra->current->args.clear();
6673 BEGIN(EnumBaseType);
6677 yyextra->current->type.clear();
6678 if (yyextra->current->spec.isInterface() ||
6679 yyextra->current->spec.isStruct() ||
6680 yyextra->current->spec.isRef() ||
6681 yyextra->current->spec.isValue() ||
6682 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6685 yyextra->baseProt = Protection::Public;
6689 yyextra->baseProt = Protection::Private;
6691 yyextra->baseVirt = Specifier::Normal;
6692 yyextra->baseName.clear();
6693 BEGIN( BasesProt ) ;
6697 if (yyextra->isTypedef)
6699 yyextra->current->type.prepend(
"typedef");
6701 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6703 yyextra->current->section = EntryType::makeVariable() ;
6705 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6707 yyextra->current->reset();
6714 BEGIN( FindMembers );
6716<Bases,ClassVar>{CPPC}"/"/[^/] {
6717 if (!yyextra->insideObjC)
6724 yyextra->current->program << yytext;
6725 yyextra->current->fileName = yyextra->fileName ;
6726 yyextra->current->startLine = yyextra->yyLineNr ;
6727 yyextra->current->startColumn = yyextra->yyColNr;
6728 yyextra->curlyCount=0;
6729 BEGIN( ReadBodyIntf );
6732<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6733<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6734<Bases,ClassVar>{CPPC}"!" |
6735<Bases,ClassVar>[\-+]{BN}* {
6736 if (!yyextra->insideObjC)
6743 yyextra->current->program << yytext;
6744 yyextra->current->fileName = yyextra->fileName ;
6745 yyextra->current->startLine = yyextra->yyLineNr ;
6746 yyextra->current->startColumn = yyextra->yyColNr;
6747 yyextra->curlyCount=0;
6748 BEGIN( ReadBodyIntf );
6751<CompoundName,ClassVar>{B}*"{"{B}* {
6752 yyextra->current->program.str(std::string());
6753 yyextra->current->fileName = yyextra->fileName ;
6754 yyextra->current->bodyLine = yyextra->yyLineNr;
6755 yyextra->current->bodyColumn = yyextra->yyColNr;
6757 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6759 if (yyextra->current->section.isNamespace())
6763 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6775 yyextra->curlyCount=0;
6776 if (yyextra->current_root &&
6777 !yyextra->current_root->spec.isInterface() &&
6778 (yyextra->current->spec.isInterface() ||
6779 yyextra->current->spec.isProtocol() ||
6780 yyextra->current->spec.isCategory() ||
6781 yyextra->current->section.isObjcImpl()
6786 BEGIN( ReadBodyIntf );
6788 else if (yyextra->current->section.isNamespace())
6790 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6797<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6798<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6799<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6800<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6801<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6802<BasesProt>{BN} {
lineCount(yyscanner); }
6803<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6804<Bases>"decltype"{BN}*"(" {
6806 yyextra->roundCount=0;
6807 yyextra->lastSkipRoundContext=YY_START;
6810<Bases>("\\")?({ID}"\\")*{ID} {
6811 if (!yyextra->insidePHP)
6820 yyextra->baseName += bn;
6821 yyextra->current->args +=
' ';
6822 yyextra->current->args += yytext;
6825<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6831 yyextra->current->typeConstr.clear();
6832 yyextra->current->typeConstr.push_back(
Argument());
6833 yyextra->lastCSConstraint = YY_START;
6834 BEGIN( CSConstraintName );
6838 yyextra->baseName+=yytext;
6839 yyextra->current->args +=
' ';
6840 yyextra->current->args += yytext;
6843<Bases>{BN}*{ID}("."{ID})* {
6845 yyextra->baseName += name;
6846 yyextra->current->args +=
' ';
6847 yyextra->current->args += name;
6849<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6850 if (!yyextra->insideObjC)
6860<ClassVar,Bases>"@end" {
6868<ClassVar>"<" { yyextra->current->name += *yytext;
6869 yyextra->sharpCount=1;
6870 yyextra->roundCount=0;
6871 yyextra->lastSkipSharpContext = YY_START;
6872 yyextra->specName = &yyextra->current->name;
6873 BEGIN ( Specialization );
6877 yyextra->sharpCount=1;
6878 yyextra->roundCount=0;
6879 yyextra->lastSkipSharpContext = YY_START;
6880 if (yyextra->insideObjC)
6890 yyextra->templateStr = yytext;
6891 yyextra->specName = &yyextra->templateStr;
6892 BEGIN ( Specialization );
6895<Specialization>"<" { *yyextra->specName += *yytext;
6896 if (yyextra->roundCount==0) yyextra->sharpCount++;
6898<Specialization>">" {
6899 *yyextra->specName += *yytext;
6900 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6903 BEGIN(yyextra->lastSkipSharpContext);
6906<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6907<Specialization>"<<" { *yyextra->specName += yytext; }
6908<Specialization>">>"/{B}*"::" {
6913<Specialization>">>" {
6914 if (yyextra->insideCS)
6924 if (yyextra->roundCount>0)
6926 *yyextra->specName += yytext;
6936<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6937<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6938<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6940<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6941<Specialization>"\\'" { *yyextra->specName += *yytext;}
6942<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6943<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6944<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6945<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6946<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6947<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6948<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6949<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6950<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6953 *yyextra->specName += *yytext;
6955<SkipRound>"(" { ++yyextra->roundCount; }
6956<SkipRound>")" {
if (--yyextra->roundCount<0)
6957 BEGIN ( yyextra->lastSkipRoundContext );
6960 yyextra->lastStringContext=SkipRound;
6963<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6964 if (yyextra->insideProtocolList)
6966 yyextra->baseName+=
"-p";
6970 yyextra->current->args +=
',' ;
6973 if (!yyextra->baseName.isEmpty())
6975 yyextra->current->extends.emplace_back(
6976 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6979 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6980 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6981 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6983 yyextra->baseProt=Protection::Public;
6987 yyextra->baseProt=Protection::Private;
6989 yyextra->baseVirt=Specifier::Normal;
6990 yyextra->baseName.clear();
6993 yyextra->insideProtocolList=
FALSE;
6996 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7012 if (*yytext==
',' && yyextra->insideObjC)
7014 yyextra->insideProtocolList=
TRUE;
7020 yyextra->current->program.str(std::string());
7021 yyextra->current->fileName = yyextra->fileName ;
7022 yyextra->current->bodyLine = yyextra->yyLineNr;
7023 yyextra->current->bodyColumn = yyextra->yyColNr;
7025 if (!yyextra->baseName.isEmpty())
7027 yyextra->current->extends.emplace_back(
7028 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7030 yyextra->baseName.clear();
7032 yyextra->curlyCount=0;
7033 if (yyextra->insideObjC)
7035 BEGIN( ReadBodyIntf );
7042<SkipUnionSwitch>{B}*"(" {
7043 yyextra->roundCount++;
7045<SkipUnionSwitch>")" {
7046 if (--yyextra->roundCount==0)
7051<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7053<Comment>{BN}+ { yyextra->current->program << yytext ;
7056<Comment>{CCS} { yyextra->current->program << yytext ; }
7057<Comment>{CPPC} { yyextra->current->program << yytext ; }
7058<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7059 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7060 yyextra->current->program << yytext ;
7062<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7063 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7064 yyextra->current->program << yytext ;
7066<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7067<Comment>{CCE} { yyextra->current->program << yytext ;
7068 if (!yyextra->insideCode)
7070 yyextra->doxygenComment=
false;
7071 BEGIN( yyextra->lastContext );
7074<Comment>. { yyextra->current->program << *yytext ; }
7076<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7078 if (!yyextra->current->doc.isEmpty())
7080 yyextra->current->doc+=
"\n\n";
7084 yyextra->current->docLine = yyextra->yyLineNr;
7085 yyextra->current->docFile = yyextra->fileName;
7088 yyextra->lastDocContext = YY_START;
7089 if (yyextra->current_root->section.isScope())
7091 yyextra->current->inside = yyextra->current_root->name+
"::";
7093 yyextra->docBlockContext = YY_START;
7094 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7099 yyextra->docBlock.
str(indent.
str());
7101 if (yyextra->docBlockAutoBrief)
7103 yyextra->current->briefLine = yyextra->yyLineNr;
7104 yyextra->current->briefFile = yyextra->fileName;
7109<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7115 yyextra->lastDocContext = YY_START;
7118 if (yyextra->current_root->section.isScope())
7120 yyextra->current->inside = yyextra->current_root->name+
"::";
7122 yyextra->current->docLine = yyextra->yyLineNr;
7123 yyextra->current->docFile = yyextra->fileName;
7124 yyextra->docBlockContext = YY_START;
7125 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7127 yyextra->docBlockAutoBrief = javadocAutoBrief;
7131 yyextra->docBlock.
str(indent.
str());
7133 if (yyextra->docBlockAutoBrief)
7135 yyextra->current->briefLine = yyextra->yyLineNr;
7136 yyextra->current->briefFile = yyextra->fileName;
7143 yyextra->current->program << yytext ;
7144 yyextra->lastContext = YY_START ;
7145 yyextra->doxygenComment=
true;
7149<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7154<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7155 yyextra->lastDocContext = YY_START;
7158 if (yyextra->current_root->section.isScope())
7160 yyextra->current->inside = yyextra->current_root->name+
"::";
7162 yyextra->current->docLine = yyextra->yyLineNr;
7163 yyextra->current->docFile = yyextra->fileName;
7164 yyextra->docBlockContext = YY_START;
7165 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7167 yyextra->docBlockAutoBrief = javadocAutoBrief;
7171 yyextra->docBlock.
str(indent.
str());
7173 if (yyextra->docBlockAutoBrief)
7175 yyextra->current->briefLine = yyextra->yyLineNr;
7176 yyextra->current->briefFile = yyextra->fileName;
7181<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7182 yyextra->lastDocContext = YY_START;
7183 if (yyextra->current_root->section.isScope())
7185 yyextra->current->inside = yyextra->current_root->name+
"::";
7187 yyextra->docBlockContext = YY_START;
7188 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7189 yyextra->docBlockAutoBrief =
FALSE;
7193 yyextra->docBlock.
str(indent.
str());
7198<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7199 yyextra->lastDocContext = YY_START;
7200 if (yyextra->current_root->section.isScope())
7202 yyextra->current->inside = yyextra->current_root->name+
"::";
7204 yyextra->docBlockContext = YY_START;
7205 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7206 yyextra->docBlockAutoBrief =
FALSE;
7209 yyextra->docBlock.
str(indent.
str());
7213<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7215 yyextra->externLinkage=
TRUE;
7218 if (yyextra->externLinkage)
7220 yyextra->externLinkage=
FALSE;
7222 else if (yyextra->insideCS &&
7223 !yyextra->current->name.isEmpty() &&
7224 !yyextra->current->type.isEmpty())
7226 if (yyextra->current->mtype == MethodTypes::Event)
7228 yyextra->mtype = MethodTypes::Event;
7232 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7236 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7238 yyextra->current->bodyLine = yyextra->yyLineNr;
7239 yyextra->current->bodyColumn = yyextra->yyColNr;
7240 yyextra->curlyCount=0;
7241 BEGIN( CSAccessorDecl );
7243 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7247 yyextra->current->exception =
" {";
7248 BEGIN(UNOIDLAttributeBlock);
7252 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7253 yyextra->current->name.isEmpty()
7257 yyextra->needsSemi =
FALSE;
7258 if (yyextra->current->isStatic)
7260 yyextra->current->name=
"[static initializer]";
7261 yyextra->current->type.clear();
7265 yyextra->current->name=
"[instance initializer]";
7282 yyextra->current->bodyLine = yyextra->yyLineNr;
7283 yyextra->current->bodyColumn = yyextra->yyColNr;
7284 yyextra->current->initializer.str(yytext);
7285 yyextra->lastInitializerContext = YY_START;
7286 yyextra->sharpCount=0;
7287 yyextra->initBracketCount=1;
7288 BEGIN(ReadInitializer);
7292<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7293<CSAccessorDecl>"}"{B}*"=" {
7295 if (yyextra->curlyCount != 0) REJECT;
7296 yyextra->current->initializer.str(
"=");
7297 yyextra->current->endBodyLine=yyextra->yyLineNr;
7298 yyextra->lastInitializerContext = FindMembers;
7299 BEGIN(ReadInitializer);
7301<CSAccessorDecl>"}" {
7302 if (yyextra->curlyCount)
7304 yyextra->curlyCount--;
7308 yyextra->mtype = MethodTypes::Method;
7309 yyextra->virt = Specifier::Normal;
7311 yyextra->current->endBodyLine=yyextra->yyLineNr;
7316<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7317<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7318<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7319<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7320<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7321<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7322<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7323<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7324<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7325<CSAccessorDecl>{CHARLIT} {}
7326<CSAccessorDecl>"\"" { BEGIN(CSString);}
7327<CSAccessorDecl>"." {}
7328<CSAccessorDecl>\n {
lineCount(yyscanner); }
7329<CSString>"\"" { BEGIN(CSAccessorDecl);}
7337<SliceSequence>{SCOPENAME} {
7338 if (yyextra->current->spec.isLocal())
7340 yyextra->current->type =
"local ";
7342 yyextra->current->type +=
"sequence<";
7343 yyextra->current->type += yytext;
7344 yyextra->current->type +=
">";
7347<SliceSequence>{BN}*">"{BN}* {
7349 BEGIN(SliceSequenceName);
7352<SliceSequenceName>{ID}{BN}* {
7354 yyextra->current->name = yytext ;
7355 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7358<SliceSequenceName>";" {
7359 yyextra->current->section = EntryType::makeVariable();
7360 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7365<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7367 if (yyextra->current->spec.isLocal())
7369 yyextra->current->type =
"local ";
7371 yyextra->current->type +=
"dictionary<";
7372 yyextra->current->type += yytext;
7373 yyextra->current->type +=
">";
7374 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7377<SliceDictionary>{BN}*">"{BN}* {
7379 BEGIN(SliceDictionaryName);
7382<SliceDictionaryName>{ID}{BN}* {
7384 yyextra->current->name = yytext ;
7385 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7388<SliceDictionaryName>";" {
7389 yyextra->current->section = EntryType::makeVariable();
7390 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7400<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7401 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7402 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7405<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7406 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7407 BEGIN( yyextra->docBlockContext );
7409<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7410 yyextra->docBlock << yytext;
7411 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7412 BEGIN( yyextra->docBlockContext );
7414<DocLine>{NONLopt}/"\n" {
7415 yyextra->docBlock << yytext;
7416 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7417 BEGIN( yyextra->docBlockContext );
7422<DocBlock>"*"*{CCE} {
7424 BEGIN(yyextra->docBlockContext);
7426<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7429 yyextra->docBlock <<
"\\ilinebr " << indent;
7431<DocBlock>^{B}*"*"+/[^/] {
7434 yyextra->docBlock << indent;
7436<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7439 yyextra->docBlock << indent;
7441<DocBlock>^{B}*({CPPC}){B}* {
7444 yyextra->docBlock << yytext;
7448 yyextra->docBlock << yytext;
7450<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7451 yyextra->docBlock << yytext;
7453<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7454 yyextra->docBlock << yytext;
7455 char blockName[] =
"f$";
7457 if (c==
'[') blockName[1]=
']';
7458 else if (c==
'{') blockName[1]=
'}';
7459 else if (c==
'(') blockName[1]=
')';
7461 BEGIN(DocCopyBlock);
7463<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7464 yyextra->fileName = &yytext[6];
7465 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7466 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7467 yyextra->docBlock << yytext;
7469<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7470 yyextra->fileName = &yytext[6];
7471 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7472 yyextra->docBlock << yytext;
7474<DocBlock>{CMD}"iline"{LINENR}{B} {
7479 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7483 yyextra->yyLineNr = nr;
7485 yyextra->docBlock << yytext;
7487<DocBlock>{B}*"<"{PRE}">" {
7488 yyextra->docBlock << yytext;
7490 BEGIN(DocCopyBlock);
7492<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7493 yyextra->docBlock << yytext;
7495 BEGIN(DocCopyBlock);
7497<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7498 yyextra->docBlock << yytext;
7500 BEGIN(DocCopyBlock);
7502<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7503 yyextra->docBlock << yytext;
7505 BEGIN(DocCopyBlock);
7507<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7509 yyextra->docBlock <<
"\\ilinebr ";
7510 yyextra->docBlock << pat;
7512 BEGIN(DocCopyBlock);
7514<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7516 yyextra->docBlock << pat;
7518 BEGIN(DocCopyBlock);
7520<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7521<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7522<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7524 yyextra->docBlock <<
"\\ilinebr ";
7525 yyextra->docBlock << pat;
7527 BEGIN(DocCopyBlock);
7529<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7530<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7531<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7533 yyextra->docBlock << pat;
7535 BEGIN(DocCopyBlock);
7538 yyextra->docBlock <<
"```";
7541 yyextra->docBlock << yytext;
7544 yyextra->docBlock << yytext;
7546 BEGIN(DocCopyBlock);
7548<DocBlock>{B}*"<"{CODE}">" {
7549 if (yyextra->insideCS)
7551 yyextra->docBlock << yytext;
7553 BEGIN(DocCopyBlock);
7560<DocBlock>[^@*~`'\/\\\n]+ {
7561 yyextra->docBlock << yytext;
7565 yyextra->docBlock << *yytext;
7568 yyextra->docBlock << *yytext;
7573<DocCopyBlock>"</"{PRE}">" {
7578 yyextra->docBlock << yytext;
7580<DocCopyBlock>"</"{CODE}">" {
7585 yyextra->docBlock << yytext;
7587<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7592 yyextra->docBlock << yytext;
7594<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7599 yyextra->docBlock << yytext;
7601<DocCopyBlock>^{B}*"*"+/{BN}+ {
7602 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7610 yyextra->docBlock << indent;
7613<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7614 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7618 yyextra->docBlock << indent;
7625<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7626 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7630 yyextra->docBlock << indent+
"*";
7637<DocCopyBlock>^{B}*"*"+/{BN}* {
7638 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7641 if (yyextra->nestedComment>0)
7644 yyextra->docBlock << indent+
"*";
7649 yyextra->docBlock << indent;
7657<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7663 yyextra->docBlock << pat;
7665<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7671 yyextra->docBlock << pat;
7673<DocCopyBlock>"```" {
7674 if (yyextra->docBlockName==
"``")
7676 yyextra->docBlock <<
"`";
7678 yyextra->docBlock <<
"``";
7683 yyextra->docBlock << yytext;
7686<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7691 yyextra->docBlock << yytext;
7693<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7698 yyextra->docBlock << yytext;
7700<DocCopyBlock>"`"{1,2} {
7705 yyextra->docBlock << yytext;
7707<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7708 yyextra->docBlock << yytext;
7711 yyextra->docBlock << yytext;
7712 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7716 yyextra->lastStringContext=YY_START;
7717 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7718 yyextra->stopAtInvalidString=
true;
7722<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7725 yyextra->nestedComment++;
7727 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7729 yyextra->nestedComment--;
7731 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7733 warn(yyextra->fileName,yyextra->yyLineNr,
7734 "Found end of C comment inside a '{}' block without matching start of the comment!"
7735 " Maybe the end marker for the block is missing?",
7736 yyextra->docBlockName);
7739 yyextra->docBlock << yytext;
7742 yyextra->docBlock << *yytext;
7746 yyextra->docBlock << *yytext;
7748<DocCopyBlock><<EOF>> {
7749 warn(yyextra->fileName,yyextra->yyLineNr,
7750 "reached end of file while inside a '{}' block!"
7751 " The command that should end the block seems to be missing!",
7752 yyextra->docBlockName);
7759<Prototype>"operator"{B}*"("{B}*")" {
7760 yyextra->current->name+=yytext;
7763 yyextra->current->args+=*yytext;
7764 yyextra->currentArgumentContext = PrototypeQual;
7765 yyextra->fullArgString = yyextra->current->args;
7766 yyextra->copyArgString = &yyextra->current->args;
7767 BEGIN( ReadFuncArgType ) ;
7769<Prototype>"("({ID}"::")*({B}*[&*])+ {
7770 if (yyextra->insidePHP)
7776 yyextra->current->type+=yyextra->current->name+yytext;
7777 yyextra->current->name.clear();
7778 BEGIN( PrototypePtr );
7781<PrototypePtr>{SCOPENAME} {
7782 yyextra->current->name+=yytext;
7785 yyextra->current->args+=*yytext;
7786 yyextra->currentArgumentContext = PrototypeQual;
7787 yyextra->fullArgString = yyextra->current->args;
7788 yyextra->copyArgString = &yyextra->current->args;
7789 BEGIN( ReadFuncArgType ) ;
7792 yyextra->current->type+=
')';
7796 yyextra->current->name+=yytext;
7799 BEGIN( PrototypeSkipLine);
7801<PrototypeQual>{B}*"const"{B}* {
7802 yyextra->current->args +=
" const ";
7803 yyextra->current->argList.setConstSpecifier(
TRUE);
7805<PrototypeQual>{B}*"volatile"{B}* {
7806 yyextra->current->args +=
" volatile ";
7807 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7809<PrototypeQual>{B}*"="{B}*"0"{B}* {
7810 yyextra->current->args +=
" = 0";
7811 yyextra->current->virt = Specifier::Pure;
7812 yyextra->current->argList.setPureSpecifier(
TRUE);
7814<PrototypeQual>"throw"{B}*"(" {
7815 yyextra->current->exception =
"throw(";
7816 BEGIN(PrototypeExc);
7819 yyextra->current->exception +=
')';
7820 BEGIN(PrototypeQual);
7823 yyextra->current->exception += *yytext;
7826 yyextra->current->args += *yytext;
7829 yyextra->current->name += *yytext;
7831<PrototypeSkipLine>. {
7837<SkipCxxComment>.*"\\\n" {
7838 if (yyextra->insideCS)
7847<SkipCxxComment>{ANYopt}/\n {
7848 BEGIN( yyextra->lastCContext ) ;
7850<SkipComment>[^\*\n]+
7855 if (!yyextra->insideCpp) REJECT;
7856 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7857 yyextra->lastC11AttributeContext = YY_START;
7858 BEGIN( SkipC11Attribute );
7863 if (yyextra->insideIDL && yyextra->insideCppQuote)
7867 else if (yyextra->insidePHP)
7869 yyextra->lastStringContext=YY_START;
7874 if (!yyextra->insidePHP)
7876 yyextra->lastCPPContext = YY_START;
7881 yyextra->lastCContext = YY_START ;
7882 BEGIN( SkipCxxComment ) ;
7886 if (!yyextra->insidePHP)
7888 yyextra->lastCContext = YY_START ;
7889 BEGIN( SkipCxxComment ) ;
7892 if (yyextra->insidePHP)
7894 yyextra->lastStringContext=YY_START;
7895 BEGIN(SkipPHPString);
7899 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7901 if (yyextra->current->type.isEmpty())
7903 if (yyextra->current->name.isEmpty())
7904 yyextra->current->name=
"?";
7906 yyextra->current->name+=
"?";
7910 yyextra->current->type+=
"?";
7914<*>"}" { yyextra->exported=
false; }
7916<SkipComment>{CPPC}|{CCS}
7917<*>{CCS} { yyextra->lastCContext = YY_START ;
7918 BEGIN( SkipComment ) ;
7920<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7922 yyextra->lastCContext = YY_START ;
7923 BEGIN( SkipCxxComment ) ;
7926 if (yyextra->insideCS && yyextra->fakeNS)
7930 BEGIN ( ReadNSBody);
7942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7944 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7946 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7956 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7957 yyextra->outerScopeEntries.clear();
7958 yyextra->baseName.clear();
7959 yyextra->protection = Protection::Public;
7960 yyextra->baseProt = Protection::Public;
7961 yyextra->sharpCount = 0;
7962 yyextra->roundCount = 0;
7963 yyextra->curlyCount = 0;
7964 yyextra->mtype = MethodTypes::Method;
7965 yyextra->isStatic =
FALSE;
7966 yyextra->virt = Specifier::Normal;
7967 yyextra->baseVirt = Specifier::Normal;
7968 yyextra->isTypedef =
FALSE;
7969 yyextra->insideTryBlock =
FALSE;
7970 yyextra->insideFormula =
FALSE;
7971 yyextra->insideCode=
FALSE;
7973 yyextra->previous = 0;
7974 yyextra->firstTypedefEntry.reset();
7975 yyextra->memspecEntry.reset();
7980 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7981 if (yyextra->insideJava)
7983 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7985 yyextra->current->protection = yyextra->protection;
7986 yyextra->current->exported = yyextra->exported ;
7987 yyextra->current->mtype = yyextra->mtype;
7988 yyextra->current->virt = yyextra->virt;
7989 yyextra->current->isStatic = yyextra->isStatic;
7990 yyextra->current->lang = yyextra->language;
7992 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7993 yyextra->isTypedef=
FALSE;
8001 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8002 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8004 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8010 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8013 for (p = yytext ; *p ; ++p )
8017 yyextra->yyLineNr++;
8023 yyextra->column+=tabSize - (yyextra->column%tabSize);
8036 int col=startIndent;
8042 if (c==
'\t') col+=tabSize-(col%tabSize);
8043 else if (c==
'\n') col=0;
8051 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8052 yyextra->current->
protection = yyextra->protection = prot;
8053 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8054 yyextra->current->type.clear();
8055 yyextra->current->name.clear();
8056 yyextra->current->args.clear();
8057 yyextra->current->argList.clear();
8063 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8064 size_t tl=yyextra->current->type.length();
8065 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8067 yyextra->current->type +=
' ' ;
8069 yyextra->current->type += yyextra->current->name;
8070 yyextra->current->name.clear() ;
8071 tl=yyextra->current->type.length();
8072 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8074 yyextra->current->type +=
' ' ;
8076 yyextra->current->type += yyextra->current->args ;
8077 yyextra->current->args.clear() ;
8078 yyextra->current->argList.clear();
8085 if (s==
nullptr || *s==0)
return name;
8087 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8099 bool funcPtr = i>0 && type[i-1]==
')';
8101 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8102 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8103 return type.
left(i);
8109 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8112 yyextra->docBlock <<
"\\iskip";
8114 yyextra->docBlockName=blockName;
8115 yyextra->fencedSize=fencedSize;
8116 yyextra->isCodeBlock=codeBlock;
8117 yyextra->nestedComment=0;
8123 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8124 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8128 yyextra->docBlock <<
"\\endiskip";
8130 yyextra->docBlockName=
"";
8150 int i=name.
find(
"operator");
8151 if (i==-1)
return FALSE;
8161 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8163 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8164 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8165 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8166 yyextra->insideD = yyextra->language==SrcLangExt::D;
8167 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8168 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8169 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8170 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8171 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8172 yyextra->language==SrcLangExt::Lex);
8183 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8184 if (yyextra->current_root->section.isScope())
8187 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8189 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8191 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8201 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8202 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8203 if (yyextra->current->argList.empty())
return FALSE;
8204 for (
const Argument &a : yyextra->current->argList)
8215 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8216 if (yyextra->insideJava)
8219 yyextra->current->protection = Protection::Public;
8220 if (text.
find(
"protected")!=-1)
8221 yyextra->current->protection = Protection::Protected;
8222 else if (text.
find(
"private")!=-1)
8223 yyextra->current->protection = Protection::Private;
8224 else if (text.
find(
"package")!=-1)
8225 yyextra->current->protection = Protection::Package;
8232 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8233 int si =
static_cast<int>(yyextra->current->args.length());
8234 if (yyextra->oldStyleArgType.isEmpty())
8236 std::string args = yyextra->current->args.str();
8237 static const reg::Ex re(R
"(\([^)]*\).*)");
8243 bi1=(int)match.position();
8244 size_t secondMatchStart = match.position()+match.length();
8247 bi2=(int)match.position();
8251 if (bi1!=-1 && bi2!=-1)
8254 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8256 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8257 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8259 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8260 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8261 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8266 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8269 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8270 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8272 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8273 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8279 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8282 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8286 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8287 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8300 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8303 oldStyleArgPtr=yyextra->current->args.
left(j);
8322 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8323 for (
Argument &a : yyextra->current->argList)
8332 a.
docs=brief+
"\n\n"+docs;
8364 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8367 yyextra->current->briefFile = yyextra->fileName;
8368 yyextra->current->briefLine = yyextra->yyLineNr;
8372 yyextra->current->docFile = yyextra->fileName;
8373 yyextra->current->docLine = yyextra->yyLineNr;
8381 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8382 if (yyextra->tempEntry==0)
8387 yyextra->previous = yyextra->current;
8388 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8392 yyextra->previous = yyextra->current;
8393 yyextra->current = yyextra->tempEntry;
8394 yyextra->tempEntry.reset();
8401 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8404 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8405 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8408 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8409 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8411 docEntry->inbodyFile = yyextra->fileName;
8412 docEntry->inbodyLine = lineNr;
8416 bool needsEntry=
FALSE;
8418 Markdown markdown(yyextra->fileName,lineNr);
8421 while (yyextra->commentScanner.parseCommentBlock(
8422 yyextra->thisParser,
8423 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8427 yyextra->docBlockInBody ?
FALSE : brief,
8428 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8429 yyextra->docBlockInBody,
8430 yyextra->protection,
8441 QCString docFile = yyextra->current->docFile;
8443 yyextra->current->docFile = docFile;
8444 yyextra->current->docLine = lineNr;
8452 if (yyextra->docBlockTerm)
8454 unput(yyextra->docBlockTerm);
8455 yyextra->docBlockTerm=0;
8462 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8473 QCString orgDoc = yyextra->current->doc;
8474 QCString orgBrief = yyextra->current->brief;
8475 int orgDocLine = yyextra->current->docLine;
8476 int orgBriefLine = yyextra->current->briefLine;
8478 yyextra->current->doc.
clear();
8479 yyextra->current->brief.clear();
8482 int lineNr = orgDocLine;
8484 Markdown markdown(yyextra->fileName,lineNr);
8487 while (yyextra->commentScanner.parseCommentBlock(
8488 yyextra->thisParser,
8489 yyextra->current.get(),
8496 yyextra->protection,
8505 if (needsEntry)
newEntry(yyscanner);
8511 a.
docs = yyextra->current->doc;
8514 yyextra->current->doc = orgDoc;
8515 yyextra->current->brief = orgBrief;
8516 yyextra->current->docLine = orgDocLine;
8517 yyextra->current->briefLine = orgBriefLine;
8528 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8529 for (
const auto &ce : rt->children())
8531 if (!ce->program.empty())
8535 yyextra->padCount=0;
8537 yyextra->programStr = ce->program.str();
8538 yyextra->inputString = yyextra->programStr.data();
8539 yyextra->inputPosition = 0;
8540 if (ce->section.isEnum() || ce->spec.isEnum())
8541 BEGIN( FindFields ) ;
8543 BEGIN( FindMembers ) ;
8544 yyextra->current_root = ce;
8545 yyextra->fileName = ce->fileName;
8547 yyextra->yyLineNr = ce->bodyLine;
8548 yyextra->yyColNr = ce->bodyColumn;
8549 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8551 yyextra->current = std::make_shared<Entry>();
8552 yyextra->isStatic =
FALSE;
8557 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8559 ce->groups = rt->groups;
8562 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8564 if ( ce->section.isClass() )
8566 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8568 yyextra->current->protection = yyextra->protection = Protection::Public ;
8570 else if (yyextra->insideJava)
8572 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8574 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8576 if (ce->lang==SrcLangExt::ObjC)
8578 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8582 yyextra->current->protection = yyextra->protection = Protection::Public ;
8587 yyextra->current->protection = yyextra->protection = Protection::Private ;
8590 else if (ce->section.isEnum() )
8592 yyextra->current->protection = yyextra->protection = ce->protection;
8594 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8596 if (ce->section.isNamespace() )
8598 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8600 yyextra->current->protection = yyextra->protection = ce->protection;
8601 yyextra->current->exported = yyextra->exported =
false;
8603 else if (ce->section.isNamespace() )
8605 yyextra->current->protection = yyextra->protection = Protection::Public ;
8606 yyextra->current->exported = yyextra->exported = ce->exported;
8610 yyextra->current->protection = yyextra->protection = Protection::Public ;
8611 yyextra->current->exported = yyextra->exported =
false;
8613 yyextra->mtype = MethodTypes::Method;
8614 yyextra->virt = Specifier::Normal;
8621 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8623 scannerYYlex(yyscanner);
8626 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8628 yyextra->programStr.clear();
8629 ce->program.str(std::string());
8643 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8644 for (
const auto &ce : rt->children())
8646 if (ce->section.isConcept())
8650 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8652 yyextra->padCount =0;
8654 yyextra->programStr = ce->initializer.str();
8655 yyextra->inputString = yyextra->programStr.data();
8656 yyextra->inputPosition = 0;
8657 yyextra->current_root = ce;
8658 yyextra->fileName = ce->fileName;
8659 yyextra->yyLineNr = ce->bodyLine;
8660 yyextra->yyColNr = ce->bodyColumn;
8661 yyextra->insideObjC =
false;
8662 yyextra->current = std::make_shared<Entry>();
8666 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8668 if (!ce->args.isEmpty())
8670 templArgs=indent+
"template"+ce->args+
"\n";
8672 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8674 yyextra->isStatic =
FALSE;
8676 yyextra->current->section = EntryType::makeConceptCodePart();
8677 yyextra->current->startLine = yyextra->yyLineNr;
8678 BEGIN( FindConceptParts );
8679 scannerYYlex(yyscanner);
8680 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8691 const char *fileBuf,
8692 const std::shared_ptr<Entry> &rt,
8696 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8699 yyextra->inputString = fileBuf;
8700 yyextra->inputPosition = 0;
8701 yyextra->column = 0;
8702 scannerYYrestart(
nullptr,yyscanner);
8705 yyextra->protection = Protection::Public;
8706 yyextra->mtype = MethodTypes::Method;
8707 yyextra->isStatic =
FALSE;
8708 yyextra->exported =
false;
8709 yyextra->virt = Specifier::Normal;
8710 yyextra->current_root = rt;
8711 yyextra->yyLineNr = 1 ;
8712 yyextra->yyBegLineNr = 1;
8713 yyextra->yyBegColNr = 0;
8714 yyextra->anonCount = 0;
8715 yyextra->anonNSCount = 0;
8716 yyextra->fileName = fileName;
8717 yyextra->clangParser = clangParser;
8719 rt->lang = yyextra->language;
8720 msg(
"Parsing file {}...\n",yyextra->fileName);
8722 yyextra->current_root = rt;
8724 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8725 yyextra->current = std::make_shared<Entry>();
8730 yyextra->current->name = yyextra->fileName;
8731 yyextra->current->section = sec;
8732 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8734 yyextra->current->reset();
8736 if ( yyextra->insidePHP )
8738 BEGIN( FindMembersPHP );
8740 else if ( yyextra->insideJava )
8742 yyextra->current->name=
"java::lang";
8743 yyextra->current->fileName = yyextra->fileName;
8744 yyextra->current->section = EntryType::makeUsingDir();
8745 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8747 BEGIN( FindMembers );
8751 BEGIN( FindMembers );
8754 scannerYYlex(yyscanner);
8756 if (YY_START==Comment)
8758 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8762 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8764 yyextra->programStr.clear();
8765 rt->program.str(std::string());
8770 yyextra->anonNSCount++;
8773 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8776 parent->moveToSubEntryAndKeep(child);
8778 yyextra->outerScopeEntries.clear();
8787 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8790 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8793 if (!yyextra->current)
8798 const char *orgInputString;
8799 int orgInputPosition;
8800 YY_BUFFER_STATE orgState;
8803 orgState = YY_CURRENT_BUFFER;
8804 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8805 orgInputString = yyextra->inputString;
8806 orgInputPosition = yyextra->inputPosition;
8809 yyextra->inputString = text.
data();
8810 yyextra->inputPosition = 0;
8811 yyextra->column = 0;
8812 scannerYYrestart(
nullptr, yyscanner);
8814 scannerYYlex(yyscanner);
8816 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8817 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8819 yyextra->current->section = EntryType::makeVariableDoc();
8823 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8824 yy_switch_to_buffer(orgState, yyscanner);
8825 yyextra->inputString = orgInputString;
8826 yyextra->inputPosition = orgInputPosition;
8842 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8850 scannerYYlex_destroy(
p->yyscanner);
8854 const char *fileBuf,
8855 const std::shared_ptr<Entry> &root,
8859 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8860 yyextra->thisParser =
this;
8864 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8872 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8873 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8874 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8885#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)