13%option never-interactive
14%option prefix="scannerYY"
16%option extra-type="struct scannerYY_state *"
20#define YY_TYPEDEF_YY_SCANNER_T
60#define YY_NO_UNISTD_H 1
225static inline int computeIndent(
const char *s,
int startIndent);
256#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
259static inline const char *
getLexerFILE() {
return __FILE__;}
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.
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static const char * getLexerFILE()
static void addType(yyscan_t yyscanner)
#define lineCount(s, len)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void handleCommentBlock(yyscan_t yyscanner, const QCString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
static QCString stripFuncPtr(const QCString &type)
static void storeClangId(yyscan_t yyscanner, const char *id)
static void setContext(yyscan_t yyscanner)
static void addKnRArgInfo(yyscan_t yyscanner, const QCString &type, const QCString &name, const QCString &brief, const QCString &docs)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void startVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0, bool codeBlock=false)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static bool endVerbatimBlock(yyscan_t yyscanner, const QCString &blockName, size_t fencedSize=0)
void fixArgumentListForJavaScript(ArgumentList &al)
static bool startOfRequiresExpression(const QCString &req)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static bool nameIsOperator(QCString &name)
static void setJavaProtection(yyscan_t yyscanner)
static void splitKnRArg(yyscan_t yyscanner, QCString &oldStyleArgPtr, QCString &oldStyleArgName)
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.
271NOTopt (("!"{BNopt})|("not"{BN}+))?
273HEXDIGIT ({DIGIT}|[a-f]|[A-F])
274ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
275SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
276TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
277CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
280CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
281PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
282PHPUSEKW ("public"|"private"|"protected")
283IDLATTR ("["[^\]]*"]"){BN}*
284TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
285RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
286RAWEND ")"[^ \t\(\)\\]{0,16}\"
287ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
288ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
289LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
290BITOP "&"|"|"|"^"|"<<"|">>"|"~"
291OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
292FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
293MODULE_ID ({ID}".")*{ID}
294LINENR {B}*[1-9][0-9]*
295FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
296FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
297FILECHARS {FILEICHAR}*{FILEECHAR}+
298HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
299VFILEMASK {FILECHARS}("."{FILECHARS})*
300FILEMASK {VFILEMASK}|{HFILEMASK}
311DCOMMC ("/\*!"|"/\**")
313DCOMMCPP ("/\/!"|"/\/\/")
315DCOMM {DCOMMC}|{DCOMMCPP}
387%x TryFunctionBlockEnd
402%x SkipInterpVerbString
417%x UNOIDLAttributeBlock
446%x SpecializationSingleQuote
447%x SpecializationDoubleQuote
480%x SliceDictionaryName
511<*>"DEPRECATED_ATTRIBUTE" {
512 if (!yyextra->insideObjC) REJECT;
514<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
515 if (!yyextra->insideObjC) REJECT;
516 yyextra->lastDeprecatedContext=YY_START;
517 yyextra->lastStringContext=Deprecated_round;
520<Deprecated_round>")" {
521 BEGIN(yyextra->lastDeprecatedContext);
523<Deprecated_round>{BNopt} {
526<Deprecated_round>. { }
528 yyextra->curlyCount=0;
529 yyextra->needsSemi =
TRUE;
530 BEGIN(SkipCurlyBlock);
533 yyextra->roundCount=0;
534 BEGIN(SkipRoundBlock);
537 ++yyextra->roundCount;
540 if (yyextra->roundCount )
541 --yyextra->roundCount ;
546 ++yyextra->curlyCount ;
549 if( yyextra->curlyCount )
551 --yyextra->curlyCount ;
553 else if (yyextra->needsSemi)
559 BEGIN( FindMembers );
563 if (yyextra->insidePHP)
565 yyextra->lastStringContext=NextSemi;
566 BEGIN(SkipPHPString);
569<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
571 yyextra->lastStringContext=NextSemi;
576 BEGIN( FindMembers );
580 BEGIN( FindMembers );
583 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
587<FindMembers>"<?php" {
588 yyextra->insidePHP =
TRUE;
590<FindMembersPHP>"<?"("php"?) {
591 BEGIN( FindMembers );
593<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
595 BEGIN( FindMembers );
597<FindMembers>"?>"|"</script>" {
598 if (yyextra->insidePHP)
599 BEGIN( FindMembersPHP );
603<FindMembersPHP>[^\n<]+ {
610<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
615<FindMembers>"%{"[^\n]* {
616 if (!yyextra->insideIDL)
620 if (!yyextra->insideIDL)
623<FindMembers>{B}*("properties"){BN}*":"{BN}* {
625 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
628<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
630 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
633<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
635 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
638<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
643<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
645 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
648<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
650 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
652<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
655<FindMembers>{B}*"internal"{BN}*":"{BN}* {
656 if (yyextra->insideCli)
665<FindMembers>{B}*"protected"{BN}*":"{BN}* {
668<FindMembers>{B}*"private"{BN}*":"{BN}* {
671<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
672 if (!yyextra->insideCpp) REJECT;
676<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
677 if (!yyextra->insideCpp) REJECT;
681<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
682 if (!yyextra->insideCpp) REJECT;
694<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
695<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
696 BEGIN( SkipComment ) ;
698<CppProt>("slots"|"Q_SLOTS") {
699 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
701<FindMembers>{B}*"event"{BN}+ {
702 if (yyextra->insideCli)
706 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
707 yyextra->current->bodyLine = yyextra->yyLineNr;
708 yyextra->current->bodyColumn = yyextra->yyColNr;
709 yyextra->curlyCount=0;
710 BEGIN( CliPropertyType );
712 else if (yyextra->insideCS)
715 yyextra->current->mtype = MethodTypes::Event;
716 yyextra->current->bodyLine = yyextra->yyLineNr;
717 yyextra->current->bodyColumn = yyextra->yyColNr;
724<FindMembers>{B}*"property"{BN}+ {
725 if (yyextra->insideCli)
729 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
730 yyextra->current->bodyLine = yyextra->yyLineNr;
731 yyextra->current->bodyColumn = yyextra->yyColNr;
732 yyextra->curlyCount=0;
733 BEGIN( CliPropertyType );
740<CliPropertyType>{ID} {
742 yyextra->current->name = yytext;
744<CliPropertyType>"[" {
745 yyextra->current->args =
"[";
746 BEGIN( CliPropertyIndex );
748<CliPropertyType>"{" {
749 yyextra->curlyCount=0;
751 BEGIN( CSAccessorDecl );
753<CliPropertyType>";" {
755 BEGIN( FindMembers );
760<CliPropertyType>{B}* {
764 yyextra->current->type += yytext;
766<CliPropertyIndex>"]" {
767 BEGIN( CliPropertyType );
768 yyextra->current->args+=yytext;
771 yyextra->current->args+=yytext;
786<FindMembers>{B}*"@private"{BN}+ {
789<FindMembers>{B}*"@protected"{BN}+ {
792<FindMembers>{B}*"@public"{BN}+ {
795<FindMembers>[\-+]{BN}* {
796 if (!yyextra->insideObjC)
802 yyextra->current->fileName = yyextra->fileName;
803 yyextra->current->startLine = yyextra->yyLineNr;
804 yyextra->current->startColumn = yyextra->yyColNr;
805 yyextra->current->bodyLine = yyextra->yyLineNr;
806 yyextra->current->bodyColumn = yyextra->yyColNr;
807 yyextra->current->section = EntryType::makeFunction();
808 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
809 yyextra->insideObjC =
TRUE;
810 yyextra->yyBegColNr = yyextra->yyColNr;
811 yyextra->yyBegLineNr = yyextra->yyLineNr;
812 yyextra->current->virt = Specifier::Virtual;
814 yyextra->current->isStatic=yytext[0]==
'+';
820 BEGIN( ObjCReturnType );
821 yyextra->current->type.clear();
822 yyextra->roundCount=0;
825 if (yyextra->current->type.isEmpty())
827 yyextra->current->type +=
"id";
829 yyextra->current->name = yytext;
833 yyextra->current->name +=
':';
835 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
838<ObjCReturnType>[^()]* {
839 yyextra->current->type += yytext;
841<ObjCReturnType>"(^)(" {
842 yyextra->current->type += yytext;
843 yyextra->roundCount++;
846 yyextra->current->type += yytext;
847 yyextra->roundCount++;
850 if (yyextra->roundCount<=0)
856 yyextra->current->type += yytext;
857 yyextra->roundCount--;
860<ObjCParams>({ID})?{BN}*":" {
865 yyextra->current->name +=
" :";
869 yyextra->current->name += keyw+
":";
871 if (yyextra->current->argList.back().type.isEmpty())
873 yyextra->current->argList.back().type=
"id";
877 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
879<ObjCParams>{ID}{BN}* {
883<ObjCParams>","{BN}*"..." {
890 yyextra->current->argList.push_back(a);
898 yyextra->roundCount=0;
899 yyextra->current->argList.back().type.clear();
900 BEGIN( ObjCParamType );
903 yyextra->roundCount++;
904 yyextra->current->argList.back().type+=yytext;
906<ObjCParamType>")"/{B}* {
907 if (yyextra->roundCount<=0)
913 yyextra->current->argList.back().type+=yytext;
914 yyextra->roundCount--;
917<ObjCParamType>[^()]* {
920<ObjCMethod,ObjCParams>";" {
921 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
923 yyextra->current->argList.back().type=
"id";
925 if (yyextra->current->argList.empty())
927 yyextra->current->argList.setNoParameters(
TRUE);
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
934<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
939 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
941 yyextra->current->argList.back().type=
"id";
943 if (yyextra->current->argList.empty())
945 yyextra->current->argList.setNoParameters(
TRUE);
951<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
952 if (yyextra->insideSlice)
955 yyextra->current->bodyLine = yyextra->yyLineNr;
956 yyextra->current->bodyColumn = yyextra->yyColNr;
957 yyextra->current->fileName = yyextra->fileName ;
958 yyextra->current->startLine = yyextra->yyLineNr ;
959 yyextra->current->startColumn = yyextra->yyColNr;
960 yyextra->current->args.clear();
961 yyextra->current->section = EntryType::makeTypedef();
962 yyextra->isTypedef =
TRUE;
963 BEGIN( SliceSequence );
968<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
969 if (yyextra->insideSlice)
972 yyextra->current->bodyLine = yyextra->yyLineNr;
973 yyextra->current->bodyColumn = yyextra->yyColNr;
974 yyextra->current->fileName = yyextra->fileName ;
975 yyextra->current->startLine = yyextra->yyLineNr ;
976 yyextra->current->startColumn = yyextra->yyColNr;
977 yyextra->current->args.clear();
978 yyextra->current->section = EntryType::makeTypedef() ;
979 yyextra->isTypedef =
TRUE;
980 BEGIN( SliceDictionary );
985<FindMembers>{BN}{1,80} {
988<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
989 if (yyextra->insideJava)
992 yyextra->lastSkipRoundContext = YY_START;
993 yyextra->roundCount=0;
998 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
999 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1000 yyextra->current->protection = Protection::Public ;
1002 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
1009<ObjCPropAttr>"getter="{ID} {
1010 yyextra->current->read = yytext+7;
1012<ObjCPropAttr>"setter="{ID} {
1013 yyextra->current->write = yytext+7;
1015<ObjCPropAttr>"readonly" {
1016 yyextra->current->spec.setWritable(
false);
1018<ObjCPropAttr>"readwrite" {
1020<ObjCPropAttr>"assign" {
1022<ObjCPropAttr>"unsafe_unretained" {
1023 yyextra->current->spec.setAssign(
false);
1024 yyextra->current->spec.setUnretained(
true);
1026<ObjCPropAttr>"retain" {
1027 yyextra->current->spec.setAssign(
false);
1028 yyextra->current->spec.setRetain(
true);
1030<ObjCPropAttr>"copy" {
1031 yyextra->current->spec.setAssign(
false);
1032 yyextra->current->spec.setCopy(
true);
1034<ObjCPropAttr>"weak" {
1035 yyextra->current->spec.setAssign(
false);
1036 yyextra->current->spec.setWeak(
true);
1038<ObjCPropAttr>"strong" {
1039 yyextra->current->spec.setAssign(
false);
1040 yyextra->current->spec.setStrong(
true);
1042<ObjCPropAttr>"nonatomic" {
1043 yyextra->current->spec.setNonAtomic(
true);
1048<FindMembers>"@"{ID}("."{ID})+ {
1049 if (yyextra->insideJava)
1058<FindMembers>"@"{ID} {
1059 if (yyextra->insideJava)
1063 else if (
qstrcmp(yytext,
"@property")==0)
1065 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1066 yyextra->current->spec.setWritable(
true).setReadable(
true);
1067 yyextra->current->protection = Protection::Public ;
1069 else if (
qstrcmp(yytext,
"@synthesize")==0)
1071 BEGIN( ObjCSkipStatement );
1073 else if (
qstrcmp(yytext,
"@dynamic")==0)
1075 BEGIN( ObjCSkipStatement );
int qstrcmp(const char *str1, const char *str2)
1082<ObjCSkipStatement>";" {
1085<PackageName>{ID}(("."|"\\"){ID})* {
1086 yyextra->isTypedef=
FALSE;
1088 yyextra->current->name = yytext;
1089 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1090 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1091 yyextra->current->section = EntryType::makeNamespace();
1092 yyextra->current->type =
"namespace" ;
1093 yyextra->current->fileName = yyextra->fileName;
1094 yyextra->current->startLine = yyextra->yyLineNr;
1095 yyextra->current->startColumn = yyextra->yyColNr;
1096 yyextra->current->bodyLine = yyextra->yyLineNr;
1097 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
1101 std::shared_ptr<Entry> tmp = yyextra->current;
1102 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1103 yyextra->current_root = std::move(tmp);
1108 yyextra->curlyCount=0;
1109 BEGIN( ReadNSBody );
1111<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1112 if (!yyextra->insideCpp) REJECT;
1114 yyextra->current->exported =
true;
1116 BEGIN( ModuleName );
1118<FindMembers>{B}*"module"{BN}*";" {
1119 if (!yyextra->insideCpp) REJECT;
1120 if (!yyextra->current->type.isEmpty() || !yyextra->current->name.isEmpty()) REJECT;
1123 BEGIN( FindMembers );
1125<FindMembers>{B}*"module"{BN}+ {
1126 if (!yyextra->insideCpp) REJECT;
1128 yyextra->current->exported =
false;
1130 BEGIN( ModuleName );
1132<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1133 if (!yyextra->insideCpp) REJECT;
1134 yyextra->current->exported =
true;
1136 BEGIN( ModuleImport );
1138<FindMembers>{B}*"import"{BN}+ {
1139 if (!yyextra->insideCpp) REJECT;
1141 BEGIN( ModuleImport );
1143<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1145 int i = name.
find(
':');
1151 yyextra->current->exported,
1154 yyextra->current->section = EntryType::makeModuleDoc();
1155 yyextra->isTypedef=
FALSE;
1157 yyextra->current->type +=
" module";
1158 yyextra->current->fileName = yyextra->fileName;
1159 yyextra->current->startLine = yyextra->yyLineNr;
1160 yyextra->current->startColumn = yyextra->yyColNr;
1161 yyextra->current->bodyLine = yyextra->yyLineNr;
1162 yyextra->current->bodyColumn = yyextra->yyColNr;
1163 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
1166<ModuleName>{MODULE_ID} {
1170 yyextra->current->exported,
1172 yyextra->current->section = EntryType::makeModuleDoc();
1173 yyextra->isTypedef=
FALSE;
1175 yyextra->current->type +=
" module";
1176 yyextra->current->fileName = yyextra->fileName;
1177 yyextra->current->startLine = yyextra->yyLineNr;
1178 yyextra->current->startColumn = yyextra->yyColNr;
1179 yyextra->current->bodyLine = yyextra->yyLineNr;
1180 yyextra->current->bodyColumn = yyextra->yyColNr;
1181 yyextra->current->name = yytext;
1184<ModuleName>":"{BN}+"private" {
1185 yyextra->current->exported = yyextra->exported =
false;
1188<ModuleName>";" { unput(
';');
1193<ModuleImport>"\""[^"\n]*"\"" {
void addHeader(const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
1199<ModuleImport>"<"[^>\n]*">" {
1205<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1207 int i = name.
find(
':');
1213 yyextra->current->exported,
void addImport(const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
1217<ModuleImport>{MODULE_ID} {
1221 yyextra->current->exported);
1224<ModuleImport>";" { BEGIN(FindMembers); }
1225<ModuleImport>\n {
lineCount(yyscanner); }
1227<FindMembers>{B}*"export"{BN}+"{" {
1228 yyextra->current->exported = yyextra->exported =
true;
1230<FindMembers>{B}*"export"{BN}+ {
1231 if (!yyextra->insideCpp) REJECT;
1232 yyextra->current->exported=
true;
1234<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1235 yyextra->current->type +=
" initonly ";
1236 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1239<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1240 yyextra->current->isStatic =
TRUE;
1243<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1244 yyextra->current->isStatic =
TRUE;
1247<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1248 yyextra->current->isStatic =
FALSE;
1249 yyextra->current->explicitExternal =
TRUE;
1252<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1254 yyextra->current->type +=
" const ";
1255 if (yyextra->insideCS) yyextra->current->isStatic =
TRUE;
1263<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1264 yyextra->current->type +=
" virtual ";
1265 yyextra->current->virt = Specifier::Virtual;
1268<FindMembers>{B}*"constexpr"{BN}+ {
1269 if (yyextra->insideCpp)
1271 yyextra->current->spec.setConstExpr(
true);
1275<FindMembers>{B}*"consteval"{BN}+ {
1276 if (yyextra->insideCpp)
1278 yyextra->current->spec.setConstEval(
true);
1282<FindMembers>{B}*"constinit"{BN}+ {
1283 if (yyextra->insideCpp)
1285 yyextra->current->spec.setConstInit(
true);
1289<FindMembers>{B}*"published"{BN}+ {
1290 if (yyextra->insideIDL)
1293 yyextra->current->spec.setPublished(
true);
1300<FindMembers>{B}*"sealed"{BN}+ {
1301 if (yyextra->insideCS)
1303 yyextra->current->spec.setSealed(
true);
1310<FindMembers>{B}*"abstract"{BN}+ {
1311 if (yyextra->insidePHP || yyextra->insideCS)
1313 yyextra->current->spec.setAbstract(
true);
1317 if (yyextra->insideCpp) REJECT;
1318 yyextra->current->type +=
" abstract ";
1319 if (!yyextra->insideJava)
1321 yyextra->current->virt = Specifier::Pure;
1325 yyextra->current->spec.setAbstract(
true);
1330<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1331 yyextra->current->spec.setInline(
true);
1334<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1335 yyextra->current->spec.setMutable(
true);
1338<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1339 yyextra->current->spec.setThreadLocal(
true);
1342<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1343 yyextra->current->spec.setExplicit(
true);
1346<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1347 yyextra->current->spec.setLocal(
true);
1350<FindMembers>{B}*"@required"{BN}+ {
1351 yyextra->current->spec.setOptional(
false).setRequired(
true);
1354<FindMembers>{B}*"@optional"{BN}+ {
1355 yyextra->current->spec.setRequired(
false).setOptional(
true);
1363<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1364<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1365 yyextra->isTypedef=
FALSE;
1366 yyextra->current->section = EntryType::makeNamespace();
1367 yyextra->current->type =
"namespace" ;
1368 yyextra->current->fileName = yyextra->fileName;
1369 yyextra->current->startLine = yyextra->yyLineNr;
1370 yyextra->current->startColumn = yyextra->yyColNr;
1371 yyextra->current->bodyLine = yyextra->yyLineNr;
1372 yyextra->current->bodyColumn = yyextra->yyColNr;
1374 if (yyextra->insidePHP)
1376 BEGIN( PackageName );
1380 BEGIN( CompoundName );
1383<FindMembers>{B}*"module"{BN}+ {
1385 if (yyextra->insideIDL || yyextra->insideSlice)
1387 yyextra->isTypedef=
FALSE;
1388 yyextra->current->section = EntryType::makeNamespace();
1389 yyextra->current->type =
"module" ;
1390 yyextra->current->fileName = yyextra->fileName;
1391 yyextra->current->startLine = yyextra->yyLineNr;
1392 yyextra->current->startColumn = yyextra->yyColNr;
1393 yyextra->current->bodyLine = yyextra->yyLineNr;
1394 yyextra->current->bodyColumn = yyextra->yyColNr;
1395 BEGIN( CompoundName );
1397 else if (yyextra->insideD)
1408<FindMembers>{B}*"library"{BN}+ {
1410 if (yyextra->insideIDL)
1412 yyextra->isTypedef=
FALSE;
1413 yyextra->current->section = EntryType::makeNamespace();
1414 yyextra->current->type =
"library" ;
1415 yyextra->current->fileName = yyextra->fileName;
1416 yyextra->current->startLine = yyextra->yyLineNr;
1417 yyextra->current->startColumn = yyextra->yyColNr;
1418 yyextra->current->bodyLine = yyextra->yyLineNr;
1419 yyextra->current->bodyColumn = yyextra->yyColNr;
1420 BEGIN( CompoundName );
1428<FindMembers>{B}*"constants"{BN}+ {
1430 if (yyextra->insideIDL)
1432 yyextra->isTypedef=
FALSE;
1433 yyextra->current->section = EntryType::makeNamespace();
1434 yyextra->current->type =
"constants";
1435 yyextra->current->fileName = yyextra->fileName;
1436 yyextra->current->startLine = yyextra->yyLineNr;
1437 yyextra->current->startColumn = yyextra->yyColNr;
1438 yyextra->current->bodyLine = yyextra->yyLineNr;
1439 yyextra->current->bodyColumn = yyextra->yyColNr;
1440 BEGIN( CompoundName );
1448<FindMembers>{BN}*("service"){BN}+ {
1450 if (yyextra->insideIDL)
1452 yyextra->isTypedef=
FALSE;
1453 yyextra->current->section = EntryType::makeClass();
1457 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1459 yyextra->current->type +=
" service " ;
1460 yyextra->current->fileName = yyextra->fileName;
1461 yyextra->current->startLine = yyextra->yyLineNr;
1462 yyextra->current->bodyLine = yyextra->yyLineNr;
1463 yyextra->current->bodyColumn = yyextra->yyColNr;
1464 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1472<FindMembers>{BN}*("singleton"){BN}+ {
1474 if (yyextra->insideIDL)
1476 yyextra->isTypedef=
FALSE;
1477 yyextra->current->section = EntryType::makeClass();
1479 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1480 setPublished(spec.isPublished());
1482 yyextra->current->type +=
" singleton " ;
1483 yyextra->current->fileName = yyextra->fileName;
1484 yyextra->current->startLine = yyextra->yyLineNr;
1485 yyextra->current->bodyLine = yyextra->yyLineNr;
1486 yyextra->current->bodyColumn = yyextra->yyColNr;
1487 BEGIN( CompoundName );
1495<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1497 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1499 yyextra->isTypedef=
FALSE;
1500 yyextra->current->section = EntryType::makeClass();
1502 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1504 setOptional(spec.isOptional()).
1505 setPublished(spec.isPublished()).
1506 setLocal(spec.isLocal());
1508 yyextra->current->type +=
" interface" ;
1509 yyextra->current->fileName = yyextra->fileName;
1510 yyextra->current->startLine = yyextra->yyLineNr;
1511 yyextra->current->startColumn = yyextra->yyColNr;
1512 yyextra->current->bodyLine = yyextra->yyLineNr;
1513 yyextra->current->bodyColumn = yyextra->yyColNr;
1515 BEGIN( CompoundName );
1523<FindMembers>{B}*"@implementation"{BN}+ {
1525 yyextra->isTypedef=
FALSE;
1526 yyextra->current->section = EntryType::makeObjcImpl();
1527 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1528 yyextra->insideObjC =
TRUE;
1529 yyextra->current->protection = yyextra->protection = Protection::Public ;
1531 yyextra->current->type +=
" implementation" ;
1532 yyextra->current->fileName = yyextra->fileName;
1533 yyextra->current->startLine = yyextra->yyLineNr;
1534 yyextra->current->bodyLine = yyextra->yyLineNr;
1535 yyextra->current->bodyColumn = yyextra->yyColNr;
1536 BEGIN( CompoundName );
1538<FindMembers>{B}*"@interface"{BN}+ {
1540 yyextra->isTypedef=
FALSE;
1541 yyextra->current->section = EntryType::makeClass();
1542 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1543 if (!yyextra->insideJava)
1545 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1546 yyextra->insideObjC =
TRUE;
1548 yyextra->current->protection = yyextra->protection = Protection::Public ;
1550 yyextra->current->type +=
" interface" ;
1551 yyextra->current->fileName = yyextra->fileName;
1552 yyextra->current->startLine = yyextra->yyLineNr;
1553 yyextra->current->startColumn = yyextra->yyColNr;
1554 yyextra->current->bodyLine = yyextra->yyLineNr;
1555 yyextra->current->bodyColumn = yyextra->yyColNr;
1556 BEGIN( CompoundName );
1558<FindMembers>{B}*"@protocol"{BN}+ {
1560 yyextra->isTypedef=
FALSE;
1561 yyextra->current->section = EntryType::makeClass();
1563 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1564 yyextra->insideObjC =
TRUE;
1565 yyextra->current->protection = yyextra->protection = Protection::Public ;
1567 yyextra->current->type +=
" protocol" ;
1568 yyextra->current->fileName = yyextra->fileName;
1569 yyextra->current->startLine = yyextra->yyLineNr;
1570 yyextra->current->startColumn = yyextra->yyColNr;
1571 yyextra->current->bodyLine = yyextra->yyLineNr;
1572 yyextra->current->bodyColumn = yyextra->yyColNr;
1573 BEGIN( CompoundName );
1575<FindMembers>{B}*"exception"{BN}+ {
1576 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1577 yyextra->isTypedef=
FALSE;
1578 yyextra->current->section = EntryType::makeClass();
1581 yyextra->current->spec =
TypeSpecifier().setException(
true).
1582 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1584 yyextra->current->type +=
" exception" ;
1585 yyextra->current->fileName = yyextra->fileName;
1586 yyextra->current->startLine = yyextra->yyLineNr;
1587 yyextra->current->startColumn = yyextra->yyColNr;
1588 yyextra->current->bodyLine = yyextra->yyLineNr;
1589 yyextra->current->bodyColumn = yyextra->yyColNr;
1591 BEGIN( CompoundName );
1593<FindMembers>"@class" |
1594<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1595<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1597 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1598 bool isConst=decl.
find(
"const")!=-1;
1599 bool isVolatile=decl.
find(
"volatile")!=-1;
1600 yyextra->current->section = EntryType::makeClass();
1602 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1605 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1607 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1609 yyextra->current->spec.setLocal(
true);
1613 yyextra->current->type +=
" const";
1615 else if (isVolatile)
1617 yyextra->current->type +=
" volatile";
1619 yyextra->current->type +=
" class" ;
1620 yyextra->current->fileName = yyextra->fileName;
1621 yyextra->current->startLine = yyextra->yyLineNr;
1622 yyextra->current->startColumn = yyextra->yyColNr;
1623 yyextra->current->bodyLine = yyextra->yyLineNr;
1624 yyextra->current->bodyColumn = yyextra->yyColNr;
1627 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1628 yyextra->insideObjC =
TRUE;
1631 if (yytext[yyleng-1]==
'{') unput(
'{');
1632 BEGIN( CompoundName ) ;
1634<FindMembers>{B}*"value class{" |
1635<FindMembers>{B}*"value class"{BN}+ {
1636 yyextra->isTypedef=
FALSE;
1637 yyextra->current->section = EntryType::makeClass();
1640 yyextra->current->type +=
" value class" ;
1641 yyextra->current->fileName = yyextra->fileName;
1642 yyextra->current->startLine = yyextra->yyLineNr;
1643 yyextra->current->startColumn = yyextra->yyColNr;
1644 yyextra->current->bodyLine = yyextra->yyLineNr;
1645 yyextra->current->bodyColumn = yyextra->yyColNr;
1647 if (yytext[yyleng-1]==
'{') unput(
'{');
1648 BEGIN( CompoundName ) ;
1650<FindMembers>{B}*"ref class{" |
1651<FindMembers>{B}*"ref class"{BN}+ {
1652 yyextra->isTypedef=
FALSE;
1653 yyextra->current->section = EntryType::makeClass();
1656 yyextra->current->type +=
" ref class" ;
1657 yyextra->current->fileName = yyextra->fileName;
1658 yyextra->current->startLine = yyextra->yyLineNr;
1659 yyextra->current->startColumn = yyextra->yyColNr;
1660 yyextra->current->bodyLine = yyextra->yyLineNr;
1661 yyextra->current->bodyColumn = yyextra->yyColNr;
1663 if (yytext[yyleng-1]==
'{') unput(
'{');
1664 BEGIN( CompoundName ) ;
1666<FindMembers>{B}*"interface class{" |
1667<FindMembers>{B}*"interface class"{BN}+ {
1668 yyextra->isTypedef=
FALSE;
1669 yyextra->current->section = EntryType::makeClass();
1670 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1672 yyextra->current->type +=
" interface class" ;
1673 yyextra->current->fileName = yyextra->fileName;
1674 yyextra->current->startLine = yyextra->yyLineNr;
1675 yyextra->current->startColumn = yyextra->yyColNr;
1676 yyextra->current->bodyLine = yyextra->yyLineNr;
1677 yyextra->current->bodyColumn = yyextra->yyColNr;
1679 if (yytext[yyleng-1]==
'{') unput(
'{');
1680 BEGIN( CompoundName ) ;
1682<FindMembers>{B}*"coclass"{BN}+ {
1683 if (yyextra->insideIDL)
1685 yyextra->isTypedef=
FALSE;
1686 yyextra->current->section = EntryType::makeClass();
1688 yyextra->current->type +=
" coclass" ;
1689 yyextra->current->fileName = yyextra->fileName;
1690 yyextra->current->startLine = yyextra->yyLineNr;
1691 yyextra->current->startColumn = yyextra->yyColNr;
1692 yyextra->current->bodyLine = yyextra->yyLineNr;
1693 yyextra->current->bodyColumn = yyextra->yyColNr;
1695 BEGIN( CompoundName ) ;
1700 yyextra->current->name = yytext;
1701 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1705<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1706<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1707 if (yyextra->insideJava) REJECT;
1709 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1710 bool isConst=decl.
find(
"const")!=-1;
1711 bool isVolatile=decl.
find(
"volatile")!=-1;
1712 yyextra->current->section = EntryType::makeClass() ;
1716 setPublished(spec.isPublished()).
1717 setInline(spec.isInline()).
1718 setLocal(spec.isLocal());
1724 yyextra->current->type +=
" const";
1726 else if (isVolatile)
1728 yyextra->current->type +=
" volatile";
1730 yyextra->current->type +=
" struct" ;
1731 yyextra->current->fileName = yyextra->fileName;
1732 yyextra->current->startLine = yyextra->yyLineNr;
1733 yyextra->current->startColumn = yyextra->yyColNr;
1734 yyextra->current->bodyLine = yyextra->yyLineNr;
1735 yyextra->current->bodyColumn = yyextra->yyColNr;
1737 if (yytext[yyleng-1]==
'{') unput(
'{');
1738 BEGIN( CompoundName ) ;
1740<FindMembers>{B}*"value struct{" |
1741<FindMembers>{B}*"value struct"{BN}+ {
1742 yyextra->isTypedef=
FALSE;
1743 yyextra->current->section = EntryType::makeClass();
1744 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1746 yyextra->current->type +=
" value struct" ;
1747 yyextra->current->fileName = yyextra->fileName;
1748 yyextra->current->startLine = yyextra->yyLineNr;
1749 yyextra->current->startColumn = yyextra->yyColNr;
1750 yyextra->current->bodyLine = yyextra->yyLineNr;
1751 yyextra->current->bodyColumn = yyextra->yyColNr;
1753 if (yytext[yyleng-1]==
'{') unput(
'{');
1754 BEGIN( CompoundName ) ;
1756<FindMembers>{B}*"ref struct{" |
1757<FindMembers>{B}*"ref struct"{BN}+ {
1758 yyextra->isTypedef=
FALSE;
1759 yyextra->current->section = EntryType::makeClass();
1760 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1762 yyextra->current->type +=
" ref struct" ;
1763 yyextra->current->fileName = yyextra->fileName;
1764 yyextra->current->startLine = yyextra->yyLineNr;
1765 yyextra->current->startColumn = yyextra->yyColNr;
1766 yyextra->current->bodyLine = yyextra->yyLineNr;
1767 yyextra->current->bodyColumn = yyextra->yyColNr;
1769 if (yytext[yyleng-1]==
'{') unput(
'{');
1770 BEGIN( CompoundName ) ;
1772<FindMembers>{B}*"interface struct{" |
1773<FindMembers>{B}*"interface struct"{BN}+ {
1774 yyextra->isTypedef=
FALSE;
1775 yyextra->current->section = EntryType::makeClass();
1776 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1778 yyextra->current->type +=
" interface struct";
1779 yyextra->current->fileName = yyextra->fileName;
1780 yyextra->current->startLine = yyextra->yyLineNr;
1781 yyextra->current->startColumn = yyextra->yyColNr;
1782 yyextra->current->bodyLine = yyextra->yyLineNr;
1783 yyextra->current->bodyColumn = yyextra->yyColNr;
1785 if (yytext[yyleng-1]==
'{') unput(
'{');
1786 BEGIN( CompoundName ) ;
1788<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1789<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1790 if (yyextra->insideJava) REJECT;
1792 yyextra->isTypedef=decl.
find(
"typedef")!=-1;
1793 bool isConst=decl.
find(
"const")!=-1;
1794 bool isVolatile=decl.
find(
"volatile")!=-1;
1795 yyextra->current->section = EntryType::makeClass();
1802 yyextra->current->type +=
" const";
1804 else if (isVolatile)
1806 yyextra->current->type +=
" volatile";
1808 yyextra->current->type +=
" union" ;
1809 yyextra->current->fileName = yyextra->fileName;
1810 yyextra->current->startLine = yyextra->yyLineNr;
1811 yyextra->current->startColumn = yyextra->yyColNr;
1812 yyextra->current->bodyLine = yyextra->yyLineNr;
1813 yyextra->current->bodyColumn = yyextra->yyColNr;
1815 if (yytext[yyleng-1]==
'{') unput(
'{');
1816 BEGIN( CompoundName ) ;
1818<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1819<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1821 yyextra->isTypedef = text.
find(
"typedef")!=-1;
1822 bool isStrongEnum = text.
find(
"class")!=-1 || yyextra->insideCS;
1823 bool isEnumSytruct = text.
find(
"struct")!=-1;
1824 if (yyextra->insideJava)
1826 yyextra->current->section = EntryType::makeClass();
1832 yyextra->current->section = EntryType::makeEnum() ;
1835 yyextra->current->type +=
" enum";
1838 yyextra->current->spec.setStrong(
true);
1842 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1844 yyextra->current->fileName = yyextra->fileName;
1845 yyextra->current->startLine = yyextra->yyLineNr;
1846 yyextra->current->startColumn = yyextra->yyColNr;
1847 yyextra->current->bodyLine = yyextra->yyLineNr;
1848 yyextra->current->bodyColumn = yyextra->yyColNr;
1850 if (yytext[yyleng-1]==
'{') unput(
'{');
1851 BEGIN( CompoundName ) ;
1853<FindMembers>{B}*"concept"{BN}+ {
1854 if (yyextra->insideJava) REJECT;
1855 yyextra->isTypedef=
FALSE;
1856 yyextra->current->section = EntryType::makeConcept();
1858 yyextra->current->type +=
" concept";
1859 yyextra->current->fileName = yyextra->fileName;
1860 yyextra->current->startLine = yyextra->yyLineNr;
1861 yyextra->current->startColumn = yyextra->yyColNr;
1862 yyextra->current->bodyLine = yyextra->yyLineNr;
1863 yyextra->current->bodyColumn = yyextra->yyColNr;
1864 yyextra->current->args = yyextra->fullArgString;
1865 yyextra->keepComment =
true;
1867 BEGIN( ConceptName ) ;
1869<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1871 yyextra->current->name +=
"()";
1872 BEGIN( FindMembers );
1874<Operator>"("{BN}*")"{BNopt}/"(" {
1876 yyextra->current->name += yytext ;
1877 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1878 BEGIN( FindMembers ) ;
1882 BEGIN( FindMembers ) ;
1886 yyextra->current->name += *yytext ;
1888<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1889 if (!yyextra->current->type.startsWith(
"friend "))
1891 yyextra->current->name += yytext;
1895 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1897 BEGIN( FindMembers ) ;
1899<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1902 yyextra->current->tArgLists.
push_back(al);
1903 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1904 yyextra->templateStr=
"<";
1905 yyextra->fullArgString = yyextra->templateStr;
1906 yyextra->copyArgString = &yyextra->templateStr;
1907 yyextra->currentArgumentContext = FindMembers;
1908 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1910<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1911 if (yyextra->insideJava) REJECT;
1913 BEGIN( NSAliasName );
1916 yyextra->aliasName = yytext;
1917 BEGIN( NSAliasArg );
1919<NSAliasArg>({ID}"::")*{ID} {
1921 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1932 BEGIN( FindMembers );
1934<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1936 yyextra->aliasName=yytext;
1939<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1943 yyextra->current->fileName = yyextra->fileName;
1945 yyextra->current->section = EntryType::makeUsingDecl();
1946 yyextra->current_root->copyToSubEntry(yyextra->current);
1948 yyextra->current->section = EntryType::makeUsingDir();
1949 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1951 yyextra->aliasName.clear();
QCString removeRedundantWhiteSpace(const QCString &s)
1953<PHPUseAs>{BN}+"as"{BN}+ {
1956<PHPUseAs>{PHPUSEKW} {
1960 if (!yyextra->aliasName.isEmpty())
1965 yyextra->aliasName.clear();
const std::string & str() const
1967<PHPUse,PHPUseAs>[,;] {
1977<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1981 yyextra->current->fileName = yyextra->fileName;
1988 yyextra->current->section = EntryType::makeUsingDir();
1989 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)
1993<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
1997 yyextra->current->fileName = yyextra->fileName;
2009 if (yyextra->insideD)
2011 yyextra->current->section = EntryType::makeUsingDir();
2016 yyextra->current->section = EntryType::makeUsingDecl();
2018 yyextra->previous = yyextra->current;
2019 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual void addIncludedByDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual const QCString & docName() const =0
2023<IDLImport>"\""[^"]*"\"" {
2024 QCString fileName(&yytext[1],yyleng-2);
2040<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2041 if (yyextra->insideJava) REJECT;
2042 yyextra->current->startLine=yyextra->yyLineNr;
2043 yyextra->current->startColumn = yyextra->yyColNr;
2047<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2048<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2050 yyextra->current->name=yytext;
2051 yyextra->current->fileName = yyextra->fileName;
2052 yyextra->current->section = EntryType::makeUsingDecl();
2053 yyextra->current->startLine = yyextra->yyLineNr;
2054 yyextra->previous = yyextra->current;
2055 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2057 if (yyextra->insideCS)
2062 yyextra->current->name=yytext;
2063 yyextra->current->fileName = yyextra->fileName;
2064 yyextra->current->startLine = yyextra->yyLineNr;
2065 yyextra->current->startColumn = yyextra->yyColNr;
2066 yyextra->current->section = EntryType::makeUsingDir();
2067 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2072<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2074 yyextra->current->fileName = yyextra->fileName;
2075 yyextra->current->section = EntryType::makeUsingDecl();
2076 yyextra->current->startLine = yyextra->yyLineNr;
2077 yyextra->current->bodyLine = yyextra->yyLineNr;
2078 yyextra->current->bodyColumn = yyextra->yyColNr;
2079 yyextra->lastInitializerContext = UsingAlias;
2080 yyextra->sharpCount=0;
2081 yyextra->initBracketCount=0;
2083 BEGIN(ReadInitializer);
2086 yyextra->current->section = EntryType::makeVariable();
2088 init.stripPrefix(
"class ");
2089 init.stripPrefix(
"struct ");
2091 yyextra->current->type =
"typedef "+
init;
2092 yyextra->current->args.clear();
2093 yyextra->current->spec.setAlias(
true);
2094 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2099 yyextra->current->initializer << yytext;
2102 yyextra->current->initializer << yytext;
2106 yyextra->current->fileName = yyextra->fileName;
2107 yyextra->current->section = EntryType::makeUsingDir();
2108 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2112<Using>";" { BEGIN(FindMembers); }
2113<FindMembers>{SCOPENAME}{BN}*"<>" {
2118<FindMembers>{SCOPENAME}{BNopt}/"<" {
2120 if (yyextra->insideCpp && name==
"import") REJECT;
2121 yyextra->roundCount=0;
2122 yyextra->sharpCount=0;
2125 yyextra->current->name=name;
2131 BEGIN( EndTemplate );
2133<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2134 yyextra->sharpCount=0;
2135 yyextra->roundCount=0;
2143 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...
2146 if (!yyextra->insidePHP)
2152 yyextra->lastHereDocContext = YY_START;
2156<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2157 yyextra->current->name+=yytext;
2161 if (yyextra->roundCount==0)
2164 yyextra->sharpCount++;
2166 yyextra->current->name+=yytext;
2168<ClassTemplSpec,EndTemplate>">=" {
2169 yyextra->current->name+=yytext;
2171<ClassTemplSpec,EndTemplate>(">>") {
2172 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2180 yyextra->current->name+=yytext;
2185 yyextra->current->name+=
'>';
2187 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2189 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2194<EndTemplate>">"{BN}*"(" {
2196 yyextra->current->name+=
'>';
2198 if (yyextra->roundCount==0)
2200 --yyextra->sharpCount;
2202 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2204 yyextra->current->bodyLine = yyextra->yyLineNr;
2205 yyextra->current->bodyColumn = yyextra->yyColNr;
2206 yyextra->current->args =
"(";
2207 yyextra->currentArgumentContext = FuncQual;
2208 yyextra->fullArgString = yyextra->current->args;
2209 yyextra->copyArgString = &yyextra->current->args;
2211 BEGIN( ReadFuncArgType ) ;
2215 yyextra->current->name+=
"(";
2216 yyextra->roundCount++;
2219<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2221 yyextra->current->name+=
'>';
2222 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2227<EndTemplate>">"{BNopt}/"::" {
2229 yyextra->current->name+=
'>';
2231 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2233 BEGIN(FindMemberName);
2236<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2237 yyextra->roundCount++;
2239<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2240 if (yyextra->roundCount>0) yyextra->roundCount--;
2243 yyextra->current->name+=*yytext;
2246<FindMembers>"define"{BN}*"("{BN}*["'] {
2247 if (yyextra->insidePHP)
2249 yyextra->current->bodyLine = yyextra->yyLineNr;
2250 yyextra->current->bodyColumn = yyextra->yyColNr;
2257 yyextra->delimiter = yytext;
2258 *yyextra->pCopyHereDocGString << yytext;
2259 BEGIN(CopyHereDocEnd);
2261<CopyHereDoc>"\""{ID}/"\"" {
2262 yyextra->delimiter = &yytext[1];
2263 *yyextra->pCopyHereDocGString << yytext;
2264 BEGIN(CopyHereDocEnd);
2266<CopyHereDoc>"'"{ID}/"'" {
2267 yyextra->delimiter = &yytext[1];
2268 *yyextra->pCopyHereDocGString << yytext;
2269 BEGIN(CopyHereDocEnd);
2272 yyextra->delimiter = yytext;
2275<HereDoc>"\""{ID}/"\"" {
2276 yyextra->delimiter = &yytext[1];
2279<HereDoc>"'"{ID}/"'" {
2280 yyextra->delimiter = &yytext[1];
2283<HereDocEnd>^{Bopt}{ID} {
2286 BEGIN(yyextra->lastHereDocContext);
2290<CopyHereDocEnd>^{Bopt}{ID} {
2291 *yyextra->pCopyHereDocGString << yytext;
2294 BEGIN(yyextra->lastHereDocContext);
2299 *yyextra->pCopyHereDocGString << yytext;
2301<CopyHereDocEnd>{ID} {
2302 *yyextra->pCopyHereDocGString << yytext;
2305 *yyextra->pCopyHereDocGString << yytext;
2307<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2309<FindMembers>"Q_PROPERTY" {
2310 yyextra->yyBegLineNr = yyextra->yyLineNr;
2311 yyextra->yyBegColNr = yyextra->yyColNr;
2312 yyextra->current->protection = Protection::Public ;
2313 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2314 yyextra->current->type.clear();
2324 yyextra->current->name+=yytext;
2327 yyextra->current->type+= yyextra->current->name;
2328 yyextra->current->type+= yytext;
2329 yyextra->current->name=
"";
2331<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2332 yyextra->current->type+= yyextra->current->name;
2333 yyextra->current->name=yytext;
2335<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2336 yyextra->current->spec.setReadable(
true);
2339<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2340 yyextra->current->spec.setWritable(
true);
2343<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2344<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2345<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2346<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2347<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2348<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2349<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2350<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2351<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2352<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2356 yyextra->current->read = yytext;
2360 yyextra->current->write = yytext;
2363<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2364 yyextra->current->name=yytext;
2368<FindMembers>"requires" {
2369 if (yyextra->insideJava) REJECT;
2370 yyextra->current->req.clear();
2371 yyextra->requiresContext = YY_START;
2372 BEGIN(RequiresClause);
2374<RequiresClause>"requires"{BN}*/"{" {
2375 if (yyextra->insideJava) REJECT;
2377 yyextra->current->req+=yytext;
2378 BEGIN( RequiresExpression ) ;
2380<RequiresClause>"requires"{BN}*"(" {
2381 if (yyextra->insideJava) REJECT;
2383 yyextra->current->req+=yytext;
2384 yyextra->lastRoundContext=RequiresExpression;
2385 yyextra->pCopyRoundString=&yyextra->current->req;
2386 yyextra->roundCount=0;
2387 BEGIN( CopyRound ) ;
2389<RequiresExpression>"{" {
2390 yyextra->current->req+=yytext;
2391 yyextra->lastCurlyContext=RequiresClause;
2392 yyextra->pCopyCurlyString=&yyextra->current->req;
2393 yyextra->curlyCount=0;
2394 BEGIN( CopyCurly ) ;
2396<RequiresExpression>\n {
2397 yyextra->current->req+=
' ';
2400<RequiresExpression>. {
2401 yyextra->current->req+=yytext;
2403<RequiresClause>"(" {
2404 yyextra->current->req+=yytext;
2405 yyextra->lastRoundContext=RequiresClause;
2406 yyextra->pCopyRoundString=&yyextra->current->req;
2407 yyextra->roundCount=0;
2408 BEGIN( CopyRound ) ;
2410<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2414 yyextra->current->req+=yytext;
2415 yyextra->lastRoundContext=RequiresClause;
2416 yyextra->pCopyRoundString=&yyextra->current->req;
2417 yyextra->roundCount=0;
2425<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2429 yyextra->current->req+=yytext;
2430 yyextra->lastSharpContext=RequiresClause;
2431 yyextra->pCopySharpString=&yyextra->current->req;
2432 yyextra->sharpCount=0;
2440<RequiresClause>{NOTopt}{SCOPENAME} {
2444 yyextra->current->req=yytext;
2445 BEGIN(yyextra->requiresContext);
2452<RequiresClause>{NOTopt}"::"{ID} {
2454 yyextra->current->req+=yytext;
2456<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2458 yyextra->current->req+=yytext;
2460<RequiresClause>{BN}+ {
2461 yyextra->current->req+=
' ';
2466 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2467 BEGIN(yyextra->requiresContext);
2469<FindMembers,FindMemberName>{SCOPENAME} {
2471 yyextra->yyBegColNr=yyextra->yyColNr;
2472 yyextra->yyBegLineNr=yyextra->yyLineNr;
2474 if (yyextra->insideIDL && yyleng==9 &&
qstrcmp(yytext,
"cpp_quote")==0)
2478 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
qstrcmp(yytext,
"import")==0)
2480 if (yyextra->insideIDL)
2485 else if (yyextra->insidePHP &&
qstrcmp(yytext,
"use")==0)
2489 else if (yyextra->insideJava &&
qstrcmp(yytext,
"package")==0)
2494 else if (yyextra->insideIDL &&
qstrcmp(yytext,
"case")==0)
2496 BEGIN(IDLUnionCase);
2498 else if (yyextra->insideTryBlock &&
qstrcmp(yytext,
"catch")==0)
2500 yyextra->insideTryBlock=
FALSE;
2501 BEGIN(TryFunctionBlock);
2503 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"alignas")==0)
2505 yyextra->lastAlignAsContext = YY_START;
2508 else if (yyextra->insideJS &&
qstrcmp(yytext,
"var")==0)
2510 yyextra->current->type=
"var";
2512 else if (yyextra->insideJS &&
qstrcmp(yytext,
"function")==0)
2514 yyextra->current->type=
"function";
2516 else if (yyextra->insideCS &&
qstrcmp(yytext,
"this")==0)
2520 yyextra->current->name=
"this";
2523 else if (yyextra->insideCpp && (
qstrcmp(yytext,
"static_assert")==0 ||
qstrcmp(yytext,
"_Static_assert")==0))
2526 BEGIN(StaticAssert);
2528 else if (yyextra->insideCpp &&
qstrcmp(yytext,
"decltype")==0)
2532 if (!yyextra->current->type.isEmpty()) yyextra->current->type+=
' ';
2533 yyextra->current->type+=yytext;
2536 else if (yyextra->insideSlice &&
qstrcmp(yytext,
"optional")==0)
2538 if (yyextra->current->type.isEmpty())
2540 yyextra->current->type =
"optional";
2544 yyextra->current->type +=
" optional";
2546 yyextra->lastModifierContext = YY_START;
2547 BEGIN(SliceOptional);
2551 if (YY_START==FindMembers)
2555 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2556 if (javaLike &&
qstrcmp(yytext,
"public")==0)
2558 yyextra->current->protection = Protection::Public;
2560 else if (javaLike &&
qstrcmp(yytext,
"protected")==0)
2562 yyextra->current->protection = Protection::Protected;
2564 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
qstrcmp(yytext,
"internal")==0)
2566 yyextra->current->protection = Protection::Package;
2568 else if (javaLike &&
qstrcmp(yytext,
"private")==0)
2570 yyextra->current->protection = Protection::Private;
2572 else if (javaLike &&
qstrcmp(yytext,
"static")==0)
2574 if (YY_START==FindMembers)
2575 yyextra->current->name = yytext;
2577 yyextra->current->name += yytext;
2578 yyextra->current->isStatic =
TRUE;
2582 if (YY_START==FindMembers)
2583 yyextra->current->name = yytext;
2585 yyextra->current->name += yytext;
2586 if (yyextra->current->name.startsWith(
"static "))
2588 yyextra->current->isStatic =
TRUE;
2589 yyextra->current->name= yyextra->current->name.mid(7);
2591 else if (yyextra->current->name.startsWith(
"inline "))
2593 if (yyextra->current->type.isEmpty())
2595 yyextra->current->type=
"inline";
2599 yyextra->current->type+=
"inline ";
2601 yyextra->current->name= yyextra->current->name.mid(7);
2603 else if (yyextra->current->name.startsWith(
"constexpr "))
2605 if (yyextra->current->type.isEmpty())
2607 yyextra->current->type=
"constexpr";
2611 yyextra->current->type+=
"constexpr ";
2613 yyextra->current->name=yyextra->current->name.mid(10);
2615 else if (yyextra->current->name.startsWith(
"consteval "))
2617 if (yyextra->current->type.isEmpty())
2619 yyextra->current->type=
"consteval";
2623 yyextra->current->type+=
"consteval ";
2625 yyextra->current->name=yyextra->current->name.mid(10);
2627 else if (yyextra->current->name.startsWith(
"constinit "))
2629 if (yyextra->current->type.isEmpty())
2631 yyextra->current->type=
"constinit";
2635 yyextra->current->type+=
"constinit ";
2637 yyextra->current->name=yyextra->current->name.mid(10);
2639 else if (yyextra->current->name.startsWith(
"const "))
2641 if (yyextra->current->type.isEmpty())
2643 yyextra->current->type=
"const";
2647 yyextra->current->type+=
"const ";
2649 yyextra->current->name=yyextra->current->name.mid(6);
2651 else if (yyextra->current->name.startsWith(
"volatile "))
2653 if (yyextra->current->type.isEmpty())
2655 yyextra->current->type=
"volatile";
2659 yyextra->current->type+=
"volatile ";
2661 yyextra->current->name=yyextra->current->name.mid(9);
2663 else if (yyextra->current->name.startsWith(
"typedef "))
2665 if (yyextra->current->type.isEmpty())
2667 yyextra->current->type=
"typedef";
2671 yyextra->current->type+=
"typedef ";
2673 yyextra->current->name=yyextra->current->name.mid(8);
2683 yyextra->externLinkage=
FALSE;
2687 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2690 yyextra->lastSkipRoundContext = FindMembers;
2691 yyextra->roundCount=0;
2694<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2700 yyextra->current->type+=yytext;
2701 yyextra->lastRoundContext=FindMembers;
2702 yyextra->pCopyRoundString=&yyextra->current->type;
2703 yyextra->roundCount=0;
2706<DeclType>{BN}+ {
lineCount(yyscanner); }
2711<CSIndexer>"["[^\n\]]*"]" {
2715<FindMembers>[0-9]{ID} {
2718 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2720 yyextra->current->name+=
".";
2724 yyextra->current->name+=yytext;
2726<CppQuote>"("{B}*"\"" {
2727 yyextra->insideCppQuote=
TRUE;
2731<IDLUnionCase>":" { BEGIN(FindMembers); }
2732<IDLUnionCase>\n {
lineCount(yyscanner); }
2734<TryFunctionBlock>\n {
lineCount(yyscanner); }
2735<TryFunctionBlock>"{" {
2736 yyextra->curlyCount=0;
2737 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2741<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2743<TryFunctionBlockEnd>\n { unput(*yytext);
2744 BEGIN( FindMembers );
2746<TryFunctionBlockEnd>. { unput(*yytext);
2747 BEGIN( FindMembers );
2750 yyextra->insideCppQuote=
FALSE;
2753<FindConceptParts>[^\/\n]* {
2754 yyextra->current->initializer << yytext;
2756<FindConceptParts>. {
2757 yyextra->current->initializer << yytext;
2759<FindConceptParts>\n {
2760 yyextra->current->initializer << yytext;
2761 yyextra->yyLineNr++;
2763<FindConceptParts>{CCS} {
2764 yyextra->current->initializer << yytext;
2766<FindConceptParts>{CPPC} {
2767 yyextra->current->initializer << yytext;
2769<FindConceptParts>^[ \t]*{CCS}[!*] {
2771 int indent = text.
find(
'/');
2773 if (!yyextra->current->initializer.empty())
2775 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2778 yyextra->current->section = EntryType::makeConceptDocPart();
2779 yyextra->current->startLine = yyextra->yyLineNr;
2780 yyextra->current->startColumn = indent;
2781 yyextra->current->initializer.clear();
2782 BEGIN(FindConceptDocs);
2784<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2785 if (!yyextra->current->initializer.empty())
2787 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2791 int indent = line.find(
'/');
2792 yyextra->current->section = EntryType::makeConceptDocPart();
2793 yyextra->current->startLine = yyextra->yyLineNr;
2794 yyextra->current->startColumn = indent;
2795 yyextra->current->initializer.clear();
2796 yyextra->current->initializer << line.mid(indent+3);
2797 yyextra->yyLineNr++;
2798 BEGIN(FindConceptCxxDocs);
2800<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2802 int p = line.find(
'/');
2803 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2804 yyextra->current->initializer << line.mid(p+2);
2805 yyextra->yyLineNr++;
2807<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2808 yyextra->current->initializer << yytext;
2810<FindConceptCxxDocs>. {
2811 if (!yyextra->current->initializer.empty())
2815 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2819 yyextra->current->section = EntryType::makeConceptCodePart();
2820 yyextra->current->startLine = yyextra->yyLineNr;
2821 BEGIN(FindConceptParts);
2823<FindConceptDocs>^[ \t]*"*"+/[^/] {
2825<FindConceptDocs>[^\*\n]+ {
2826 yyextra->current->initializer << yytext;
2828<FindConceptDocs>\n {
2829 yyextra->current->initializer << yytext;
2830 yyextra->yyLineNr++;
2832<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2833 if (!yyextra->current->initializer.empty())
2837 yyextra->current->section = EntryType::makeConceptDocPart();
2838 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2842 yyextra->current->section = EntryType::makeConceptCodePart();
2843 yyextra->current->startLine = yyextra->yyLineNr;
2844 BEGIN(FindConceptParts);
2846<FindConceptDocs>"*"*{CCE} {
2847 if (!yyextra->current->initializer.empty())
2851 yyextra->current->section = EntryType::makeConceptDocPart();
2852 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2855 yyextra->current->section = EntryType::makeConceptCodePart();
2856 yyextra->current->startLine = yyextra->yyLineNr;
2857 BEGIN(FindConceptParts);
2859<FindConceptParts><<EOF>> {
2860 if (!yyextra->current->initializer.empty())
2862 if (!yyextra->current->section.isConceptCodePart())
2864 yyextra->current->section = EntryType::makeConceptDocPart();
2866 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2871<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2873 yyextra->lastCPPContext = YY_START;
2876<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2877<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2878 if (yyextra->insidePHP)
2880 yyextra->current->bodyLine = yyextra->yyLineNr;
2881 yyextra->current->bodyColumn = yyextra->yyColNr;
2882 yyextra->current->fileName = yyextra->fileName;
2883 yyextra->current->startLine = yyextra->yyLineNr;
2884 yyextra->current->startColumn = yyextra->yyColNr;
2885 yyextra->current->type.clear();
2886 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2887 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2888 yyextra->current->section = EntryType::makeDefine();
2889 yyextra->lastDefineContext = YY_START;
2892<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2893 yyextra->yyLineNr = atoi(&yytext[1]);
2895 yyextra->lastPreLineCtrlContext = YY_START;
2896 if (YY_START==ReadBody ||
2897 YY_START==ReadNSBody ||
2898 YY_START==ReadBodyIntf)
2900 yyextra->current->program << yytext;
2902 BEGIN( PreLineCtrl );
2904<PreLineCtrl>"\""[^\n\"]*"\"" {
2906 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2907 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2908 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2910 yyextra->current->program << yytext;
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;
2929 BEGIN( yyextra->lastPreLineCtrlContext );
2932<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2933<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2934 BEGIN( yyextra->lastCPPContext) ;
2936<SDefine>{ID}{B}*"(" {
2937 yyextra->current->name = yytext;
2938 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2939 yyextra->current->args =
"(";
2940 yyextra->current->bodyLine = yyextra->yyLineNr;
2941 yyextra->current->bodyColumn = yyextra->yyColNr;
2942 yyextra->currentArgumentContext = DefineEnd;
2943 yyextra->fullArgString=yyextra->current->args;
2944 yyextra->copyArgString=&yyextra->current->args;
2945 BEGIN( ReadFuncArgType ) ;
2960 yyextra->current->bodyLine = yyextra->yyLineNr;
2961 yyextra->current->bodyColumn = yyextra->yyColNr;
2962 yyextra->current->name = yytext;
2969 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2971 BEGIN(yyextra->lastDefineContext);
2975 yyextra->current->fileName = yyextra->fileName;
2976 yyextra->current->startLine = yyextra->yyLineNr;
2977 yyextra->current->startColumn = yyextra->yyColNr;
2978 yyextra->current->type.clear();
2979 yyextra->current->type =
"const";
2983 yyextra->current->initializer.str(
init.str());
2984 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2985 yyextra->current->section = EntryType::makeVariable();
2986 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2991<DefineEnd>\\[\r]?\n {
2993 yyextra->current->endBodyLine = yyextra->yyLineNr;
2996 if (yyextra->insideIDL && yyextra->insideCppQuote)
3002 yyextra->lastStringContext=DefineEnd;
3007<DefinePHP>{ID}["']{BN}*","{BN}* {
3008 yyextra->current->name = yytext;
3009 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3010 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3011 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3012 yyextra->current->bodyLine = yyextra->yyLineNr;
3013 yyextra->current->bodyColumn = yyextra->yyColNr;
3014 yyextra->lastRoundContext = DefinePHPEnd;
3015 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3016 yyextra->roundCount = 0;
3017 BEGIN( GCopyRound );
3021 if (yyextra->insideCli)
3024 yyextra->current->name = yytext ;
3032 yyextra->current->name += yytext ;
3035<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3036 if (YY_START==ReadInitializer && yyextra->keepComment)
3042 if (yyextra->current->bodyLine==-1)
3044 yyextra->current->bodyLine=yyextra->yyLineNr;
3045 yyextra->current->bodyColumn = yyextra->yyColNr;
3047 yyextra->docBlockContext = YY_START;
3048 yyextra->docBlockInBody =
FALSE;
3049 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3054 yyextra->docBlock.
str(indent.
str());
3058 yyextra->docBlockTerm =
';';
3059 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3061 yyextra->current->bitfields =
":"+yyextra->current->args;
3062 yyextra->current->args.clear();
3063 yyextra->current->section = EntryType::makeVariable();
3065 if (yytext[yyleng-3]==
'/')
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
3077<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3078 if (YY_START==ReadInitializer && yyextra->keepComment)
3084 yyextra->docBlockContext = YY_START;
3085 yyextra->docBlockInBody =
FALSE;
3086 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3091 yyextra->docBlock.
str(indent.
str());
3094 yyextra->docBlockTerm =
',';
3095 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3097 yyextra->current->bitfields =
":"+yyextra->current->args;
3098 yyextra->current->args.clear();
3099 yyextra->current->section = EntryType::makeVariable();
3101 if (yytext[yyleng-3]==
'/')
3113<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3114 if (YY_START==ReadInitializer && yyextra->keepComment)
3120 if (yyextra->current->bodyLine==-1)
3122 yyextra->current->bodyLine=yyextra->yyLineNr;
3123 yyextra->current->bodyColumn = yyextra->yyColNr;
3125 yyextra->docBlockContext = YY_START;
3126 yyextra->docBlockInBody =
FALSE;
3127 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3131 yyextra->docBlock.
str(indent.
str());
3134 yyextra->docBlockTerm = 0;
3135 if (yytext[yyleng-3]==
'/')
3148<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3150 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3153 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3158 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3164 if (yytext[2]==
'!' || yytext[2]==
'/')
3166 yyextra->docBlockContext = YY_START;
3167 yyextra->docBlockInBody =
FALSE;
3168 yyextra->docBlockAutoBrief =
FALSE;
3169 yyextra->docBlock.str(std::string());
3170 yyextra->docBlockTerm = 0;
3176 yyextra->lastCContext=YY_START;
3177 BEGIN(SkipCxxComment);
3182 if (yytext[2]==
'!' || yytext[2]==
'*')
3184 yyextra->docBlockContext = YY_START;
3185 yyextra->docBlockInBody =
FALSE;
3186 yyextra->docBlock.str(std::string());
3187 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3189 yyextra->docBlockTerm = 0;
3195 yyextra->lastCContext=YY_START;
3200<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3201 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3202 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3206 if (!yyextra->insideCS) REJECT;
3207 yyextra->current->bodyLine = yyextra->yyLineNr;
3208 yyextra->current->bodyColumn = yyextra->yyColNr;
3209 yyextra->current->initializer.str(yytext);
3210 yyextra->lastInitializerContext = YY_START;
3211 yyextra->sharpCount=0;
3212 yyextra->initBracketCount=0;
3213 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3214 yyextra->current->spec.setGettable(
true);
3215 BEGIN(ReadInitializerPtr);
3218 yyextra->current->bodyLine = yyextra->yyLineNr;
3219 yyextra->current->bodyColumn = yyextra->yyColNr;
3220 yyextra->current->initializer.str(
" ");
3221 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3222 yyextra->current->initializer <<
" ";
3223 yyextra->current->initializer <<
"=";
3224 yyextra->lastInitializerContext = YY_START;
3225 yyextra->sharpCount=0;
3226 yyextra->initBracketCount=0;
3227 BEGIN(ReadInitializer);
3229<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3231 yyextra->current->exception +=
" ";
3234<UNOIDLAttributeBlock>"}" {
3235 yyextra->current->exception +=
" }";
3239<ReadInitializer,ReadInitializerPtr>"(" {
3240 yyextra->lastRoundContext=YY_START;
3241 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3242 yyextra->roundCount=0;
3243 yyextra->current->initializer << *yytext;
3246<ReadInitializer,ReadInitializerPtr>"[" {
3247 if (!yyextra->insidePHP) REJECT;
3248 yyextra->lastSquareContext=YY_START;
3249 yyextra->pCopySquareGString=&yyextra->current->initializer;
3250 yyextra->squareCount=0;
3251 yyextra->current->initializer << *yytext;
3254<ReadInitializer,ReadInitializerPtr>"{" {
3255 yyextra->lastCurlyContext=YY_START;
3256 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3257 yyextra->curlyCount=0;
3258 yyextra->current->initializer << *yytext;
3261<ReadInitializer,ReadInitializerPtr>[;,] {
3263 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3265 yyextra->current->fileName = yyextra->fileName;
3266 yyextra->current->startLine = yyextra->yyLineNr;
3267 yyextra->current->startColumn = yyextra->yyColNr;
3268 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3269 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3270 yyextra->current->section = EntryType::makeVariable();
3271 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3275 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3278 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3279 BEGIN(yyextra->lastInitializerContext);
3281 else if (*yytext==
',' && yyextra->initBracketCount==0)
3284 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3285 BEGIN(yyextra->lastInitializerContext);
3289 yyextra->current->initializer << *yytext;
3292<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3293 if (!yyextra->insideCpp)
3299 yyextra->current->initializer << yytext;
3301 yyextra->lastRawStringContext = YY_START;
3302 yyextra->pCopyRawGString = &yyextra->current->initializer;
QCString extractBeginRawStringDelimiter(const char *rawStart)
3307<ReadInitializer>{CPPC}.* {
3308 if (yyextra->keepComment)
3310 yyextra->current->initializer << yytext;
3317<ReadInitializer>{CCS} {
3318 if (yyextra->keepComment)
3320 yyextra->current->initializer << yytext;
3321 BEGIN(InitCopyComment);
3328<InitCopyComment>{CCE} {
3329 yyextra->current->initializer << yytext;
3330 BEGIN(ReadInitializer);
3332<InitCopyComment>\n {
3334 yyextra->current->initializer << yytext;
3337 yyextra->current->initializer << yytext;
3339<InitCopyComment><<EOF>> {
3340 warn(yyextra->fileName,yyextra->yyLineNr,
3341 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3344<RawGString>{RAWEND} {
3347 *yyextra->pCopyRawGString << yytext;
3348 BEGIN(yyextra->lastRawStringContext);
QCString extractEndRawStringDelimiter(const char *rawEnd)
3355<RawGString>[^)\n]+ {
3356 *yyextra->pCopyRawGString << yytext;
3359 *yyextra->pCopyRawGString << yytext;
3362 *yyextra->pCopyRawGString << yytext;
3365<RawString>{RAWEND} {
3366 *yyextra->pCopyRawString+=yytext;
3367 yyextra->fullArgString+=yytext;
3370 BEGIN(yyextra->lastRawStringContext);
3374 *yyextra->pCopyRawString += yytext;
3375 yyextra->fullArgString+=yytext;
3378 *yyextra->pCopyRawString += yytext;
3379 yyextra->fullArgString+=yytext;
3382 *yyextra->pCopyRawString += yytext;
3383 yyextra->fullArgString+=yytext;
3386<ReadInitializer,ReadInitializerPtr>\" {
3387 if (yyextra->insideIDL && yyextra->insideCppQuote)
3393 yyextra->lastStringContext=YY_START;
3394 yyextra->current->initializer << yytext;
3395 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3396 yyextra->stopAtInvalidString=
false;
3400<ReadInitializer,ReadInitializerPtr>"->" {
3401 yyextra->current->initializer << yytext;
3403<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3404 yyextra->current->initializer << yytext;
3406<ReadInitializer,ReadInitializerPtr>(">>") {
3407 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3410 yyextra->initBracketCount-=2;
3411 yyextra->sharpCount-=2;
3413 yyextra->current->initializer << yytext;
3415<ReadInitializer,ReadInitializerPtr>(">=") {
3416 yyextra->current->initializer << yytext;
3418<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3419 yyextra->initBracketCount++;
3420 yyextra->sharpCount++;
3421 yyextra->current->initializer << *yytext;
3423<ReadInitializer,ReadInitializerPtr>[>\]})] {
3424 yyextra->initBracketCount--;
3425 yyextra->sharpCount--;
3428 yyextra->current->endBodyLine=yyextra->yyLineNr;
3430 yyextra->current->initializer << *yytext;
3432<ReadInitializer,ReadInitializerPtr>\' {
3433 if (yyextra->insidePHP)
3435 yyextra->current->initializer << yytext;
3436 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3437 yyextra->lastStringContext=YY_START;
3438 BEGIN(CopyPHPGString);
3442 yyextra->current->initializer << yytext;
3445<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3446 if (yyextra->insidePHP)
3452 yyextra->current->initializer << yytext;
3455<ReadInitializer,ReadInitializerPtr>\n {
3456 yyextra->current->initializer << *yytext;
3459<ReadInitializer,ReadInitializerPtr>"@\"" {
3461 yyextra->current->initializer << yytext;
3462 if (!yyextra->insideCS && !yyextra->insideObjC)
3469 yyextra->lastSkipVerbStringContext=YY_START;
3470 yyextra->pSkipVerbString=&yyextra->current->initializer;
3471 BEGIN(SkipVerbString);
3474<SkipVerbString>[^\n"\\]+ {
3475 *yyextra->pSkipVerbString << yytext;
3477<SkipVerbString>"\\\\" {
3478 if (yyextra->insideCS) REJECT
3479 *yyextra->pSkipVerbString << yytext;
3481<SkipVerbString>"\\\"" {
3482 if (yyextra->insideCS) REJECT
3483 *yyextra->pSkipVerbString << yytext;
3485<SkipVerbString>"\"\"" {
3486 *yyextra->pSkipVerbString << yytext;
3488<SkipVerbString>"\"" {
3489 *yyextra->pSkipVerbString << *yytext;
3490 BEGIN(yyextra->lastSkipVerbStringContext);
3493 *yyextra->pSkipVerbString << *yytext;
3497 *yyextra->pSkipVerbString << *yytext;
3499<ReadInitializer,ReadInitializerPtr>"?>" {
3500 if (yyextra->insidePHP)
3501 BEGIN( FindMembersPHP );
3503 yyextra->current->initializer << yytext;
3505<ReadInitializer,ReadInitializerPtr>. {
3506 yyextra->current->initializer << *yytext;
3510<CopyString,CopyPHPString>\\. {
3511 *yyextra->pCopyQuotedString+=yytext;
3514 *yyextra->pCopyQuotedString+=*yytext;
3515 BEGIN( yyextra->lastStringContext );
3518 *yyextra->pCopyQuotedString+=*yytext;
3519 BEGIN( yyextra->lastStringContext );
3521<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3522 *yyextra->pCopyQuotedString+=yytext;
3524<CopyString,CopyPHPString>\n {
3525 *yyextra->pCopyQuotedString+=*yytext;
3528<CopyString,CopyPHPString>. {
3529 *yyextra->pCopyQuotedString+=*yytext;
3533<CopyGString,CopyPHPGString>\\. {
3534 *yyextra->pCopyQuotedGString << yytext;
3537 *yyextra->pCopyQuotedGString << *yytext;
3538 BEGIN( yyextra->lastStringContext );
3541 *yyextra->pCopyQuotedGString << *yytext;
3542 BEGIN( yyextra->lastStringContext );
3544<CopyGString,CopyPHPGString>"<?php" {
3545 *yyextra->pCopyQuotedGString << yytext;
3546 BEGIN( yyextra->lastStringContext );
3548<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3549 *yyextra->pCopyQuotedGString << yytext;
3551<CopyGString,CopyPHPGString>\n {
3552 *yyextra->pCopyQuotedGString << *yytext;
3553 if (yyextra->stopAtInvalidString)
3555 BEGIN( yyextra->lastStringContext );
3562<CopyGString,CopyPHPGString>. {
3563 *yyextra->pCopyQuotedGString << *yytext;
3568 *yyextra->pCopyRoundString += *yytext;
3569 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3570 yyextra->lastStringContext=YY_START;
3574 *yyextra->pCopyRoundString += *yytext;
3575 yyextra->roundCount++;
3578 *yyextra->pCopyRoundString += *yytext;
3579 if (--yyextra->roundCount<0)
3580 BEGIN(yyextra->lastRoundContext);
3584 *yyextra->pCopyRoundString += *yytext;
3587 if (yyextra->insidePHP)
3589 yyextra->current->initializer << yytext;
3590 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3591 yyextra->lastStringContext=YY_START;
3592 BEGIN(CopyPHPString);
3596 *yyextra->pCopyRoundString += yytext;
3599<CopyRound>{CHARLIT} {
3600 if (yyextra->insidePHP)
3606 *yyextra->pCopyRoundString+=yytext;
3609<CopyRound>[^"'()\n,]+ {
3610 *yyextra->pCopyRoundString+=yytext;
3613 *yyextra->pCopyRoundString+=*yytext;
3618 *yyextra->pCopySharpString += *yytext;
3619 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3620 yyextra->lastStringContext=YY_START;
3624 *yyextra->pCopySharpString += *yytext;
3625 yyextra->sharpCount++;
3628 *yyextra->pCopySharpString += *yytext;
3629 if (--yyextra->sharpCount<0)
3631 BEGIN(yyextra->lastSharpContext);
3636 *yyextra->pCopySharpString += *yytext;
3639 if (yyextra->insidePHP)
3641 yyextra->current->initializer << yytext;
3642 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3643 yyextra->lastStringContext=YY_START;
3644 BEGIN(CopyPHPString);
3648 *yyextra->pCopySharpString += yytext;
3651<CopySharp>{CHARLIT} {
3652 if (yyextra->insidePHP)
3658 *yyextra->pCopySharpString+=yytext;
3661<CopySharp>[^"'<>\n,]+ {
3662 *yyextra->pCopySharpString+=yytext;
3665 *yyextra->pCopySharpString+=*yytext;
3671 *yyextra->pCopyRoundGString << *yytext;
3672 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3673 yyextra->lastStringContext=YY_START;
3677 *yyextra->pCopyRoundGString << *yytext;
3678 yyextra->roundCount++;
3681 *yyextra->pCopyRoundGString << *yytext;
3682 if (--yyextra->roundCount<0)
3683 BEGIN(yyextra->lastRoundContext);
3687 *yyextra->pCopyRoundGString << *yytext;
3690 if (yyextra->insidePHP)
3692 yyextra->current->initializer << yytext;
3693 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3694 yyextra->lastStringContext=YY_START;
3695 BEGIN(CopyPHPGString);
3699 *yyextra->pCopyRoundGString << yytext;
3702<GCopyRound>{CHARLIT} {
3703 if (yyextra->insidePHP)
3709 *yyextra->pCopyRoundGString << yytext;
3713 if (!yyextra->insideCS) REJECT;
3714 *yyextra->pCopyRoundGString << yytext;
3715 yyextra->lastSkipVerbStringContext=YY_START;
3716 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3717 BEGIN(SkipVerbString);
3719<GCopyRound>[^"'()\n\/,R]+ {
3720 *yyextra->pCopyRoundGString << yytext;
3722<GCopyRound>{RAWBEGIN} {
3723 *yyextra->pCopyRoundGString << yytext;
3725 yyextra->lastRawStringContext = YY_START;
3726 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3730 *yyextra->pCopyRoundGString << *yytext;
3735 *yyextra->pCopySquareGString << *yytext;
3736 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3737 yyextra->lastStringContext=YY_START;
3741 *yyextra->pCopySquareGString << *yytext;
3742 if (yyextra->insidePHP)
3744 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3745 yyextra->lastStringContext=YY_START;
3746 BEGIN(CopyPHPGString);
3750 *yyextra->pCopySquareGString << *yytext;
3751 yyextra->squareCount++;
3754 *yyextra->pCopySquareGString << *yytext;
3755 if (--yyextra->squareCount<0)
3756 BEGIN(yyextra->lastSquareContext);
3760 *yyextra->pCopySquareGString << *yytext;
3763 if (yyextra->insidePHP)
3765 yyextra->current->initializer << yytext;
3766 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3767 yyextra->lastStringContext=YY_START;
3768 BEGIN(CopyPHPGString);
3772 *yyextra->pCopySquareGString << yytext;
3775<GCopySquare>{CHARLIT} {
3776 if (yyextra->insidePHP)
3782 *yyextra->pCopySquareGString << yytext;
3785<GCopySquare>[^"'\[\]\n\/,]+ {
3786 *yyextra->pCopySquareGString << yytext;
3789 *yyextra->pCopySquareGString << *yytext;
3794 *yyextra->pCopyCurlyString += *yytext;
3795 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3796 yyextra->lastStringContext=YY_START;
3797 yyextra->keepComment=
false;
3801 *yyextra->pCopyCurlyString += *yytext;
3802 if (yyextra->insidePHP)
3804 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3805 yyextra->lastStringContext=YY_START;
3806 yyextra->keepComment=
false;
3807 BEGIN(CopyPHPString);
3811 *yyextra->pCopyCurlyString += *yytext;
3812 yyextra->curlyCount++;
3815 *yyextra->pCopyCurlyString += *yytext;
3816 if (--yyextra->curlyCount<0)
3818 yyextra->keepComment=
false;
3819 BEGIN(yyextra->lastCurlyContext);
3822<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3828 *yyextra->pCopyCurlyString += yytext;
3831<CopyCurly>[^"'{}\/\n,]+ {
3832 *yyextra->pCopyCurlyString += yytext;
3834<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3837 *yyextra->pCopyCurlyString += *yytext;
3840 *yyextra->pCopyCurlyString += *yytext;
3842<CopyCurly>{CPPC}[^\n]* {
3843 if (yyextra->keepComment)
3845 *yyextra->pCopyCurlyString += yytext;
3853 if (yyextra->keepComment)
3855 *yyextra->pCopyCurlyString += yytext;
3864 *yyextra->pCopyCurlyString += yytext;
3869 *yyextra->pCopyCurlyString += *yytext;
3872 *yyextra->pCopyCurlyString += *yytext;
3874<CopyComment><<EOF>> {
3875 warn(yyextra->fileName,yyextra->yyLineNr,
3876 "reached end of file while inside a C style comment block!");
3881<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3883<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3885 int s = line.
find(
' ');
3886 int e = line.
find(
'"',s);
3887 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3888 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3895 *yyextra->pCopyCurlyGString << *yytext;
3896 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3897 yyextra->lastStringContext=YY_START;
3898 yyextra->keepComment =
false;
3902 *yyextra->pCopyCurlyGString << *yytext;
3903 if (yyextra->insidePHP)
3905 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3906 yyextra->lastStringContext=YY_START;
3907 yyextra->keepComment =
false;
3908 BEGIN(CopyPHPGString);
3912 *yyextra->pCopyCurlyGString << *yytext;
3913 yyextra->curlyCount++;
3916 *yyextra->pCopyCurlyGString << *yytext;
3917 if (--yyextra->curlyCount<0)
3919 yyextra->current->endBodyLine = yyextra->yyLineNr;
3920 yyextra->keepComment =
false;
3921 BEGIN(yyextra->lastCurlyContext);
3924<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3930 *yyextra->pCopyCurlyGString << yytext;
3933<GCopyCurly>[^"'{}\/\n,]+ {
3934 *yyextra->pCopyCurlyGString << yytext;
3937 *yyextra->pCopyCurlyGString << yytext;
3939<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
3942 *yyextra->pCopyCurlyGString << *yytext;
3945 *yyextra->pCopyCurlyGString << *yytext;
3947<GCopyCurly>{CPPC}[^\n]* {
3948 if (yyextra->keepComment)
3950 *yyextra->pCopyCurlyGString << yytext;
3958 if (yyextra->keepComment)
3960 *yyextra->pCopyCurlyGString << yytext;
3961 BEGIN(GCopyComment);
3968<GCopyComment>{CCE} {
3969 *yyextra->pCopyCurlyGString << yytext;
3974 *yyextra->pCopyCurlyGString << *yytext;
3977 *yyextra->pCopyCurlyGString << *yytext;
3979<GCopyComment><<EOF>> {
3980 warn(yyextra->fileName,yyextra->yyLineNr,
3981 "reached end of file while inside a C style comment block!");
3989 if (yyextra->current->type.isEmpty() &&
3990 yyextra->current->name==
"enum")
3992 yyextra->current->section = EntryType::makeEnum();
3993 yyextra->current->name.clear();
3994 yyextra->current->args.clear();
3995 BEGIN(EnumBaseType);
3999 if (yyextra->current->type.isEmpty())
4002 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4005 yyextra->current->bitfields+=
":";
4009 yyextra->current->bitfields+=*yytext;
4012 yyextra->current->args+=*yytext;
4016 yyextra->current->args+=
' ';
4019 QCString oldType = yyextra->current->type;
4020 if (yyextra->current->bodyLine==-1)
4022 yyextra->current->bodyLine = yyextra->yyLineNr;
4023 yyextra->current->bodyColumn = yyextra->yyColNr;
4025 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4027 yyextra->current->type = yyextra->current->type.mid(3);
4029 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4031 yyextra->current->type.prepend(
"typedef ");
4033 bool isStatic = yyextra->current->isStatic;
4034 Protection prot = yyextra->current->protection;
4035 bool isConcept = yyextra->current->section.isConcept();
4036 bool isModule = yyextra->current->section.isModuleDoc();
4039 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4044 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4047 else if (!yyextra->current->name.isEmpty() && !yyextra->current->section.isEnum())
4049 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4051 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4052 if (yyextra->current->section.isClass())
4056 yyextra->current->section = EntryType::makeVariable() ;
4057 yyextra->current->fileName = yyextra->fileName;
4058 yyextra->current->startLine = yyextra->yyBegLineNr;
4059 yyextra->current->startColumn = yyextra->yyBegColNr;
4060 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4063 if ( *yytext ==
',')
4065 yyextra->current->isStatic = isStatic;
4066 yyextra->current->protection = prot;
4067 yyextra->current->name.clear();
4068 yyextra->current->args.clear();
4069 yyextra->current->brief.clear();
4070 yyextra->current->doc.clear();
4071 yyextra->current->initializer.str(std::string());
4072 yyextra->current->bitfields.clear();
4077 yyextra->mtype = MethodTypes::Method;
4078 yyextra->virt = Specifier::Normal;
4079 yyextra->current->bodyLine = -1;
4080 yyextra->current->bodyColumn = 1;
4081 yyextra->current->groups.clear();
4087 if (yyextra->insideSlice)
4089 yyextra->squareCount=1;
4090 yyextra->lastSquareContext = YY_START;
4091 yyextra->current->metaData +=
"[";
4092 BEGIN( SliceMetadata );
4094 else if (!yyextra->insideCS &&
4095 (yyextra->current->name.isEmpty() ||
4096 yyextra->current->name==
"typedef"
4100 yyextra->squareCount=1;
4101 yyextra->lastSquareContext = YY_START;
4102 yyextra->idlAttr.clear();
4103 yyextra->idlProp.clear();
4104 yyextra->current->mtype = yyextra->mtype;
4107 yyextra->current->mtype == MethodTypes::Property)
4109 yyextra->odlProp =
true;
4110 yyextra->current->spec.setGettable(
true).setSettable(
true);
4113 BEGIN( IDLAttribute );
4115 else if (yyextra->insideCS &&
4116 yyextra->current->name.isEmpty())
4118 yyextra->squareCount=1;
4119 yyextra->lastSquareContext = YY_START;
4122 yyextra->current->args.clear();
4123 BEGIN( SkipSquare );
4127 yyextra->current->args += yytext ;
4128 yyextra->squareCount=1;
4129 yyextra->externLinkage=
FALSE;
4134 yyextra->squareCount++;
4135 yyextra->current->metaData +=
"[";
4137<SliceMetadata>{BN}* {
4140<SliceMetadata>\"[^\"]*\" {
4141 yyextra->current->metaData += yytext;
4144 yyextra->current->metaData += yytext;
4147 yyextra->current->metaData += yytext;
4148 if (--yyextra->squareCount<=0)
4150 BEGIN (yyextra->lastSquareContext);
4154 yyextra->current->type +=
"(";
4155 yyextra->roundCount++;
4157<SliceOptional>[0-9]+ {
4158 yyextra->current->type += yytext;
4161 yyextra->current->type +=
")";
4162 if(--yyextra->roundCount<=0)
4164 BEGIN (yyextra->lastModifierContext);
4169 if (--yyextra->squareCount<=0)
4172 if (yyextra->current->mtype == MethodTypes::Property)
4173 BEGIN( IDLPropName );
4175 BEGIN( yyextra->lastSquareContext );
4178<IDLAttribute>"propput" {
4181 yyextra->current->mtype = MethodTypes::Property;
4183 yyextra->current->spec.setSettable(
true);
4185<IDLAttribute>"propget" {
4188 yyextra->current->mtype = MethodTypes::Property;
4190 yyextra->current->spec.setGettable(
true);
4192<IDLAttribute>"property" {
4193 yyextra->current->spec.setProperty(
true);
4195<IDLAttribute>"attribute" {
4196 yyextra->current->spec.setAttribute(
true);
4198<IDLAttribute>"optional" {
4199 yyextra->current->spec.setOptional(
true);
4201<IDLAttribute>"readonly" {
4204 yyextra->current->spec.setSettable(
false);
4208 yyextra->current->spec.setReadonly(
true);
4211<IDLAttribute>"bound" {
4212 yyextra->current->spec.setBound(
true);
4214<IDLAttribute>"removable" {
4215 yyextra->current->spec.setRemovable(
true);
4217<IDLAttribute>"constrained" {
4218 yyextra->current->spec.setConstrained(
true);
4220<IDLAttribute>"transient" {
4221 yyextra->current->spec.setTransient(
true);
4223<IDLAttribute>"maybevoid" {
4224 yyextra->current->spec.setMaybeVoid(
true);
4226<IDLAttribute>"maybedefault" {
4227 yyextra->current->spec.setMaybeDefault(
true);
4229<IDLAttribute>"maybeambiguous" {
4230 yyextra->current->spec.setMaybeAmbiguous(
true);
4234<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4237 if (yyextra->odlProp)
4239 yyextra->idlProp = yytext;
4242<IDLPropName>{ID}{BN}*"(" {
4243 yyextra->current->name = yytext;
4244 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4245 yyextra->current->startLine = yyextra->yyLineNr;
4246 yyextra->current->startColumn = yyextra->yyColNr;
4249<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4250 if (yyextra->odlProp)
4252 yyextra->idlProp += yytext;
4255<IDLPropName>{ID}{BNopt}/";" {
4256 if (yyextra->odlProp)
4258 yyextra->current->name = yytext;
4259 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4260 yyextra->odlProp =
false;
4265<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4266 yyextra->idlAttr = yytext;
4267 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4270 yyextra->idlProp = yytext;
4272<IDLProp>{BN}*{ID}{BN}*"," {
4273 if (yyextra->current->args.isEmpty())
4274 yyextra->current->args =
"(";
4276 yyextra->current->args +=
", ";
4277 yyextra->current->args += yyextra->idlAttr;
4278 yyextra->current->args +=
" ";
4279 yyextra->current->args += yyextra->idlProp;
4280 yyextra->current->args +=
" ";
4281 yyextra->current->args += yytext;
4282 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4283 yyextra->idlProp.clear();
4284 yyextra->idlAttr.clear();
4287<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4291 yyextra->current->fileName = yyextra->fileName;
4292 yyextra->current->type = yyextra->idlProp;
4293 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4294 if (!yyextra->current->args.isEmpty())
4295 yyextra->current->args +=
")";
4296 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4297 yyextra->current->section = EntryType::makeVariable();
4298 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4300 BEGIN( FindMembers );
4305<Array>"]" { yyextra->current->args += *yytext ;
4306 if (--yyextra->squareCount<=0)
4307 BEGIN( FindMembers ) ;
4309<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4310 if (--yyextra->squareCount<=0)
4311 BEGIN( SFunction ) ;
4313<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4314 yyextra->squareCount++;
4316<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4317<SkipSquare>"[" { yyextra->squareCount++; }
4319 if (--yyextra->squareCount<=0)
4320 BEGIN( yyextra->lastSquareContext );
4323 yyextra->lastStringContext=YY_START;
4324 BEGIN( SkipString );
4326<SkipSquare>[^\n\[\]\"]+
4327<FindMembers>"<" {
addType(yyscanner);
4328 yyextra->current->type += yytext ;
4331<Sharp>">" { yyextra->current->type += *yytext ;
4332 if (--yyextra->sharpCount<=0)
4333 BEGIN( FindMembers ) ;
4335<Sharp>"<" { yyextra->current->type += *yytext ;
4336 yyextra->sharpCount++;
4339 yyextra->current->type +=
' ';
4342<Sharp>. { yyextra->current->type += *yytext ; }
4345 yyextra->current->bodyLine = yyextra->yyLineNr;
4346 yyextra->current->bodyColumn = yyextra->yyColNr;
4347 yyextra->current->name = yytext;
4352 yyextra->lastInitializerContext = YY_START;
4353 yyextra->sharpCount=0;
4354 yyextra->initBracketCount=0;
4355 yyextra->current->initializer.str(
"=");
4356 BEGIN(ReadInitializer);
4359 yyextra->lastInitializerContext = YY_START;
4360 yyextra->sharpCount=0;
4361 yyextra->initBracketCount=0;
4362 yyextra->current->initializer.str(yytext);
4363 BEGIN(ReadInitializer);
4366 if (yyextra->insideJava)
4368 if (!yyextra->current->name.isEmpty())
4370 yyextra->current->fileName = yyextra->fileName;
4371 yyextra->current->startLine = yyextra->yyLineNr;
4372 yyextra->current->startColumn = yyextra->yyColNr;
4373 if (!yyextra->current_root->spec.isEnum())
4375 yyextra->current->type =
"@";
4377 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4378 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4379 yyextra->current->section = EntryType::makeVariable();
4380 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4384 BEGIN( FindMembers );
4395 if (!yyextra->current->name.isEmpty())
4397 yyextra->current->fileName = yyextra->fileName;
4398 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4400 yyextra->current->startLine = yyextra->current->bodyLine;
4401 yyextra->current->startColumn = yyextra->current->bodyColumn;
4405 yyextra->current->startLine = yyextra->yyLineNr;
4406 yyextra->current->startColumn = yyextra->yyColNr;
4408 if (!yyextra->current_root->spec.isEnum())
4410 yyextra->current->type =
"@";
4412 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4413 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4414 yyextra->current->section = EntryType::makeVariable();
4416 if (!yyextra->insideCS && !yyextra->insideJava &&
4417 !yyextra->current_root->spec.isStrong())
4424 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4426 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4431 yyextra->current->reset();
4436 yyextra->squareCount=1;
4437 yyextra->lastSquareContext = YY_START;
4440<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4441<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4442<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4445 yyextra->current->program << yytext ;
4448<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4449 yyextra->current->program << yytext ;
4450 yyextra->pSkipInterpString = &yyextra->current->program;
4451 yyextra->lastSkipInterpStringContext=YY_START;
4452 yyextra->strCurlyCount = 0;
4453 BEGIN( SkipInterpString );
4455<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})* {
4456 *yyextra->pSkipInterpString << yytext;
4458<SkipInterpString>"{" {
4459 *yyextra->pSkipInterpString << *yytext;
4460 yyextra->strCurlyCount++;
4462<SkipInterpString>"}" {
4463 *yyextra->pSkipInterpString << *yytext;
4464 yyextra->strCurlyCount--;
4466<SkipInterpString>\" {
4467 *yyextra->pSkipInterpString << *yytext;
4468 if (yyextra->strCurlyCount==0)
4470 BEGIN( yyextra->lastSkipInterpStringContext );
4473<SkipInterpString>. {
4474 *yyextra->pSkipInterpString << *yytext;
4477<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4478 yyextra->current->program << yytext ;
4479 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4480 yyextra->lastSkipInterpVerbStringContext=YY_START;
4481 yyextra->strCurlyCount = 0;
4482 BEGIN( SkipInterpVerbString );
4484<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4485 *yyextra->pSkipInterpVerbString << yytext;
4487<SkipInterpVerbString>"{" {
4488 *yyextra->pSkipInterpVerbString << *yytext;
4489 yyextra->strCurlyCount++;
4491<SkipInterpVerbString>"}" {
4492 *yyextra->pSkipInterpVerbString << *yytext;
4493 yyextra->strCurlyCount--;
4495<SkipInterpVerbString>\" {
4496 *yyextra->pSkipInterpVerbString << *yytext;
4497 if (yyextra->strCurlyCount==0)
4499 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4502<SkipInterpVerbString>. {
4503 *yyextra->pSkipInterpVerbString << *yytext;
4505<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4506<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4507 yyextra->pSkipVerbString = &yyextra->current->program;
4508 yyextra->lastSkipVerbStringContext=YY_START;
4509 BEGIN( SkipVerbString );
4511<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4513 yyextra->current->program << yytext ;
4514 yyextra->pCopyHereDocGString = &yyextra->current->program;
4515 yyextra->lastHereDocContext=YY_START;
4516 BEGIN( CopyHereDoc );
4523<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4524 yyextra->current->program << yytext;
4526 yyextra->lastRawStringContext = YY_START;
4527 yyextra->pCopyRawGString = &yyextra->current->program;
4530<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4531 yyextra->pCopyQuotedGString = &yyextra->current->program;
4532 yyextra->lastStringContext=YY_START;
4533 yyextra->stopAtInvalidString=
false;
4534 BEGIN( CopyGString );
4536<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4537<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4538 yyextra->lastContext = YY_START ;
4541<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4542 ++yyextra->yyLineNr ;
4543 yyextra->lastContext = YY_START ;
4546<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4547 if (!yyextra->insidePHP)
4549 yyextra->current->program << yytext;
4553 yyextra->current->program << yytext;
4554 yyextra->pCopyQuotedGString = &yyextra->current->program;
4555 yyextra->lastStringContext=YY_START;
4556 BEGIN(CopyPHPGString);
4559<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4560 if (yyextra->insidePHP)
4567 yyextra->current->program << yytext;
4570<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4571 ++yyextra->curlyCount ;
4574 yyextra->current->program << yytext ;
4575 --yyextra->curlyCount ;
4577<ReadBody,ReadNSBody>"}" {
4578 if ( yyextra->curlyCount>0 )
4580 yyextra->current->program << yytext ;
4581 --yyextra->curlyCount ;
4585 yyextra->current->endBodyLine = yyextra->yyLineNr;
4586 std::shared_ptr<Entry> original_root = yyextra->current_root;
4587 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4591 QCString doc = yyextra->current->doc;
4592 int docLine = yyextra->current->docLine;
4593 QCString docFile = yyextra->current->docFile;
4594 QCString brief = yyextra->current->brief;
4595 int briefLine = yyextra->current->briefLine;
4596 QCString briefFile = yyextra->current->briefFile;
4598 yyextra->current->doc =
"";
4599 yyextra->current->docLine = 0;
4600 yyextra->current->docFile =
"";
4601 yyextra->current->brief =
"";
4602 yyextra->current->briefLine = 0;
4603 yyextra->current->briefFile =
"";
4604 while ((split_point = yyextra->current->name.find(
"::")) != -1)
4606 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4607 yyextra->current->program.str(std::string());
4608 new_current->name = yyextra->current->name.mid(split_point + 2);
4609 yyextra->current->name = yyextra->current->name.left(split_point);
4610 if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4612 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4613 yyextra->current_root = yyextra->current;
4614 yyextra->current = new_current;
4617 yyextra->current->doc = doc;
4618 yyextra->current->docLine = docLine;
4619 yyextra->current->docFile = docFile;
4620 yyextra->current->brief = brief;
4621 yyextra->current->briefLine = briefLine;
4622 yyextra->current->briefFile = briefFile;
4624 QCString &cn = yyextra->current->name;
4625 QCString rn = yyextra->current_root->name;
4631 if (yyextra->isTypedef && cn.
isEmpty())
4634 BEGIN( TypedefName );
4638 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4640 yyextra->current->program <<
',';
4645 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4646 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4648 if (yyextra->insideObjC &&
4649 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4652 BEGIN( ReadBodyIntf ) ;
4656 yyextra->memspecEntry = yyextra->current;
4657 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4658 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4659 if (yyextra->current->section.isNamespace() ||
4660 yyextra->current->spec.isInterface() ||
4661 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4662 yyextra->insideSlice
4665 yyextra->current->reset();
4666 yyextra->current_root = std::move(original_root);
4668 yyextra->memspecEntry.reset();
4669 BEGIN( FindMembers ) ;
4673 static const reg::Ex re(R
"(@\d+$)");
4674 if (!yyextra->isTypedef && yyextra->memspecEntry &&
4675 !
reg::search(yyextra->memspecEntry->name.str(),re))
4678 yyextra->current->doc.clear();
4679 yyextra->current->brief.clear();
4681 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.
4687<ReadBody>"}"{BN}+"typedef"{BN}+ {
4689 if ( yyextra->curlyCount>0 )
4691 yyextra->current->program << yytext ;
4692 --yyextra->curlyCount ;
4696 yyextra->isTypedef =
TRUE;
4697 yyextra->current->endBodyLine = yyextra->yyLineNr;
4698 QCString &cn = yyextra->current->name;
4699 QCString rn = yyextra->current_root->name;
4704 BEGIN( TypedefName );
4707<TypedefName>("const"|"volatile"){BN} {
4709 yyextra->current->type.prepend(yytext);
4712 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4714 yyextra->current->program <<
",";
4716 yyextra->current->name=yytext;
4718 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4719 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4721 if (!yyextra->firstTypedefEntry)
4723 yyextra->firstTypedefEntry = yyextra->current;
4725 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4727 yyextra->isTypedef=
TRUE;
4728 BEGIN(MemberSpecSkip);
4732 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4734 yyextra->current->program <<
',';
4737 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4738 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4739 yyextra->memspecEntry = yyextra->current;
4740 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4743 BEGIN( MemberSpec ) ;
QCString generateAnonymousAnchor(const QCString &fileName, int count)
4745<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4747 int i=0,l=(int)yyleng,j;
4748 while (i<l && (!
isId(yytext[i]))) i++;
4750 j=yyextra->msName.
find(
"[");
4753 yyextra->msArgs=yyextra->msName.right(yyextra->msName.length()-j);
4754 yyextra->msName=yyextra->msName.left(j);
4759 if (yyextra->firstTypedefEntry)
4761 if (yyextra->firstTypedefEntry->spec.isStruct())
4763 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4765 else if (yyextra->firstTypedefEntry->spec.isUnion())
4767 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4769 else if (yyextra->firstTypedefEntry->section.isEnum())
4771 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4775 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
QCString right(size_t len) const
4781 yyextra->current->name = yyextra->msName;
4787 if (yyextra->msName.isEmpty() && !yyextra->current->name.isEmpty())
4793 const Entry *p=yyextra->current.get();
4801 int pi = (i==-1) ? 0 : i+2;
4811 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4815 if (!yyextra->msName.isEmpty()
4821 if (typedefHidesStruct &&
4822 yyextra->isTypedef &&
4823 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4824 yyextra->msType.stripWhiteSpace().isEmpty() &&
4825 yyextra->memspecEntry)
4827 yyextra->memspecEntry->name=yyextra->msName;
4831 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4832 varEntry->lang = yyextra->language;
4833 varEntry->protection = yyextra->current->protection ;
4834 varEntry->mtype = yyextra->current->mtype;
4835 varEntry->virt = yyextra->current->virt;
4836 varEntry->isStatic = yyextra->current->isStatic;
4837 varEntry->section = EntryType::makeVariable();
4838 varEntry->name = yyextra->msName.stripWhiteSpace();
4839 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4840 varEntry->args = yyextra->msArgs;
4841 if (yyextra->isTypedef)
4843 varEntry->type.prepend(
"typedef ");
4846 if (typedefHidesStruct &&
4847 yyextra->isTypedef &&
4848 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4849 yyextra->memspecEntry
4852 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4856 varEntry->type+=yyextra->current->name+yyextra->msType;
4858 varEntry->fileName = yyextra->fileName;
4859 varEntry->startLine = yyextra->yyLineNr;
4860 varEntry->startColumn = yyextra->yyColNr;
4861 varEntry->doc = yyextra->current->doc;
4862 varEntry->brief = yyextra->current->brief;
4863 varEntry->mGrpId = yyextra->current->mGrpId;
4864 varEntry->initializer.str(yyextra->current->initializer.str());
4865 varEntry->groups = yyextra->current->groups;
4866 varEntry->sli = yyextra->current->sli;
4871 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4876 if (!yyextra->isTypedef && yyextra->msName.isEmpty() && yyextra->memspecEntry && yyextra->current->section.isCompound())
4878 if (!yyextra->current->doc.isEmpty())
4880 yyextra->memspecEntry->doc += yyextra->current->doc;
4882 if (!yyextra->current->brief.isEmpty())
4884 yyextra->memspecEntry->brief += yyextra->current->brief;
4887 yyextra->msType.clear();
4888 yyextra->msName.clear();
4889 yyextra->msArgs.clear();
4890 yyextra->isTypedef=
FALSE;
4891 yyextra->firstTypedefEntry.reset();
4892 yyextra->memspecEntry.reset();
4893 yyextra->current->reset();
4895 BEGIN( FindMembers );
4899 yyextra->current->doc.clear();
4900 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
4905 yyextra->lastInitializerContext=YY_START;
4906 yyextra->sharpCount=0;
4907 yyextra->initBracketCount=0;
4908 yyextra->current->initializer.str(yytext);
4909 BEGIN(ReadInitializer);
4920<MemberSpecSkip>"," { BEGIN(MemberSpec); }
4921<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
4922<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
4925<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
4926 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4928 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
4929 yyextra->insideObjC=
FALSE;
4930 BEGIN( FindMembers );
4932<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
4933<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
4935<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
4936<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
4937 if (yyextra->insidePHP)
4943 yyextra->current->bodyLine = yyextra->yyLineNr;
4944 yyextra->current->bodyColumn = yyextra->yyColNr;
4947 yyextra->funcPtrType=yytext;
4948 yyextra->roundCount=0;
4953<FuncPtr>{SCOPENAME} {
4954 yyextra->current->name = yytext;
4957 BEGIN( FuncPtrOperator );
4961 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
4963 yyextra->funcPtrType += yyextra->current->name;
4967 BEGIN( EndFuncPtr );
4974<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
4975 yyextra->current->name += yytext;
4976 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
4979<FuncPtrOperator>\n {
4981 yyextra->current->name += *yytext;
4983<FuncPtrOperator>"(" {
4985 BEGIN( EndFuncPtr );
4988 yyextra->current->name += *yytext;
4990<EndFuncPtr>")"{BNopt}/";" {
4992 yyextra->current->type+=yyextra->funcPtrType.mid(1);
4995<EndFuncPtr>")"{BNopt}/"(" {
4997 if (yyextra->funcPtrType!=
"(")
4999 yyextra->current->type+=yyextra->funcPtrType+
")";
5003<EndFuncPtr>")"{BNopt}/"[" {
5005 yyextra->current->type+=yyextra->funcPtrType;
5006 yyextra->current->args +=
")";
5011 yyextra->current->args += *yytext ;
5014 yyextra->current->bodyLine = yyextra->yyLineNr;
5015 yyextra->current->bodyColumn = yyextra->yyColNr;
5016 yyextra->currentArgumentContext = FuncFuncEnd;
5017 yyextra->fullArgString=yyextra->current->args;
5018 yyextra->copyArgString=&yyextra->current->args;
5019 BEGIN( ReadFuncArgType ) ;
5021<EndFuncPtr>"["[^\n\]]*"]" {
5022 yyextra->funcPtrType+=yytext;
5028 yyextra->current->args += *yytext ;
5029 ++yyextra->roundCount;
5032 yyextra->current->args += *yytext ;
5033 if ( yyextra->roundCount )
5034 --yyextra->roundCount;
5040<FuncFuncEnd>")"{BN}*"(" {
5042 yyextra->current->type+=yyextra->funcPtrType+
")(";
5043 BEGIN(FuncFuncType);
5045<FuncFuncEnd>")"{BNopt}/[;{] {
5047 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5050<FuncFuncEnd>")"{BNopt}/"[" {
5052 yyextra->current->type+=yyextra->funcPtrType;
5053 yyextra->current->args+=
")";
5054 BEGIN(FuncFuncArray);
5057 yyextra->current->args += *yytext;
5060 yyextra->current->type += *yytext;
5061 yyextra->roundCount++;
5064 yyextra->current->type += *yytext;
5065 if (yyextra->roundCount)
5066 --yyextra->roundCount;
5070<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5071<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5073 yyextra->current->type += *yytext;
5075<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5076 if (yyextra->current->type.startsWith(
"typedef") &&
5077 yyextra->current->bodyLine==-1)
5080 yyextra->current->bodyLine = yyextra->yyLineNr;
5081 yyextra->current->bodyColumn = yyextra->yyColNr;
5082 BEGIN( GetCallType );
5084 else if (!yyextra->current->name.isEmpty())
5086 yyextra->current->args = yytext;
5087 yyextra->current->bodyLine = yyextra->yyLineNr;
5088 yyextra->current->bodyColumn = yyextra->yyColNr;
5089 yyextra->currentArgumentContext = FuncQual;
5090 yyextra->fullArgString=yyextra->current->args;
5091 yyextra->copyArgString=&yyextra->current->args;
5092 BEGIN( ReadFuncArgType ) ;
5096<GetCallType>{BN}*{ID}{BN}*"*" {
5099 yyextra->funcPtrType=
"(";
5100 yyextra->funcPtrType+=yytext;
5101 yyextra->roundCount=0;
5105 if (!yyextra->current->name.isEmpty())
5107 yyextra->current->args = yytext;
5108 yyextra->current->bodyLine = yyextra->yyLineNr;
5109 yyextra->current->bodyColumn = yyextra->yyColNr;
5110 yyextra->currentArgumentContext = FuncQual;
5111 yyextra->fullArgString=yyextra->current->args;
5112 yyextra->copyArgString=&yyextra->current->args;
5113 BEGIN( ReadFuncArgType ) ;
5120<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5121 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5122 else yyextra->fullArgString+=yytext;
5124<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5125 yyextra->fullArgString+=yytext;
5127<CopyArgRound>[^\/\n\)\(\"\']+ {
5128 *yyextra->copyArgString+=yytext;
5129 yyextra->fullArgString+=yytext;
5131<CopyArgSquare>[^\/\n\]\[\"\']+ {
5132 *yyextra->copyArgString+=yytext;
5133 yyextra->fullArgString+=yytext;
5135<ReadFuncArgType,ReadTempArgs>{BN}* {
5136 *yyextra->copyArgString+=
" ";
5137 yyextra->fullArgString+=
" ";
5140<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5142 yyextra->lastRawStringContext = YY_START;
5143 yyextra->pCopyRawString = yyextra->copyArgString;
5144 *yyextra->pCopyRawString+=yytext;
5145 yyextra->fullArgString+=yytext;
5148<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5149 *yyextra->copyArgString+=*yytext;
5150 yyextra->fullArgString+=*yytext;
5151 yyextra->lastCopyArgStringContext = YY_START;
5152 BEGIN( CopyArgString );
5154<ReadFuncArgType>"[" {
5155 if (!yyextra->insidePHP) REJECT;
5156 *yyextra->copyArgString+=*yytext;
5157 yyextra->fullArgString+=*yytext;
5158 yyextra->argSquareCount=0;
5159 yyextra->lastCopyArgContext = YY_START;
5160 BEGIN( CopyArgSquare );
5162<ReadFuncArgType,ReadTempArgs>"(" {
5163 *yyextra->copyArgString+=*yytext;
5164 yyextra->fullArgString+=*yytext;
5165 yyextra->argRoundCount=0;
5166 yyextra->lastCopyArgContext = YY_START;
5167 BEGIN( CopyArgRound );
5169<ReadFuncArgType>")" {
5170 *yyextra->copyArgString+=*yytext;
5171 yyextra->fullArgString+=*yytext;
5173 if (yyextra->insideJS)
5184 yyextra->docBackup = yyextra->current->doc;
5185 yyextra->briefBackup = yyextra->current->brief;
5187 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
5190<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5191 if (yyextra->currentArgumentContext==DefineEnd)
5195 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5201 BEGIN( yyextra->currentArgumentContext );
5207 yyextra->fullArgString+=yytext;
5208 yyextra->lastCopyArgChar=0;
5209 yyextra->lastCommentInArgContext=YY_START;
5211 BEGIN( CopyArgCommentLine );
5213 BEGIN( CopyArgComment );
5217<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5218<ReadFuncArgType,ReadTempArgs>{CCS} {
5219 yyextra->lastCContext = YY_START;
5220 BEGIN( SkipComment );
5222<ReadFuncArgType,ReadTempArgs>{CPPC} {
5223 yyextra->lastCContext = YY_START;
5224 BEGIN( SkipCxxComment );
5240<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5242 if (yyextra->currentArgumentContext==DefineEnd)
5246 int i;
for (i=(
int)yyleng-1;i>0;i--)
5250 *yyextra->copyArgString+=*yytext;
5251 yyextra->fullArgString+=*yytext;
5254 BEGIN( yyextra->currentArgumentContext );
5260 yyextra->lastCopyArgChar=*yytext;
5263 yyextra->lastCommentInArgContext=YY_START;
5264 yyextra->fullArgString+=text;
5265 if (text.
find(
"//")!=-1)
5266 BEGIN( CopyArgCommentLine );
5268 BEGIN( CopyArgComment );
5271<CopyArgComment>^{B}*"*"+/{BN}+
5272<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5273<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5274 if (yyextra->lastCopyArgChar!=0)
5275 unput(yyextra->lastCopyArgChar);
5276 BEGIN( yyextra->lastCommentInArgContext );
5278<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5280 if (yyextra->lastCopyArgChar!=0)
5281 unput(yyextra->lastCopyArgChar);
5282 BEGIN( yyextra->lastCommentInArgContext );
5284<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5285 yyextra->docBlockName=
"uml";
5286 yyextra->fullArgString+=yytext;
5287 BEGIN(CopyArgVerbatim);
5289<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] {
5290 yyextra->docBlockName=&yytext[1];
5291 yyextra->fullArgString+=yytext;
5292 BEGIN(CopyArgVerbatim);
5294<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5295 yyextra->docBlockName=&yytext[1];
5296 if (yyextra->docBlockName.at(1)==
'[')
5298 yyextra->docBlockName.at(1)=
']';
5300 if (yyextra->docBlockName.at(1)==
'{')
5302 yyextra->docBlockName.at(1)=
'}';
5304 if (yyextra->docBlockName.at(1)==
'(')
5306 yyextra->docBlockName.at(1)=
')';
5308 yyextra->fullArgString+=yytext;
5309 BEGIN(CopyArgVerbatim);
5311<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5312 yyextra->fullArgString+=yytext;
5313 if (&yytext[4]==yyextra->docBlockName)
5315 yyextra->docBlockName=
"";
5316 BEGIN(CopyArgCommentLine);
5319<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5320 yyextra->fullArgString+=yytext;
5321 if (yyextra->docBlockName==&yytext[1])
5323 yyextra->docBlockName=
"";
5324 BEGIN(CopyArgCommentLine);
5327<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5328<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5329<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5330<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5331<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5332 warn(yyextra->fileName,yyextra->yyLineNr,
5333 "Ignoring {:c}brief command inside argument documentation",*yytext
5335 yyextra->fullArgString+=
' ';
5338 *yyextra->copyArgString+=*yytext;
5339 yyextra->fullArgString+=*yytext;
5340 yyextra->argSharpCount=1;
5341 BEGIN( CopyArgSharp );
5344 *yyextra->copyArgString+=*yytext;
5345 yyextra->fullArgString+=*yytext;
5347 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5349 BEGIN( yyextra->currentArgumentContext );
5352 yyextra->argRoundCount++;
5353 *yyextra->copyArgString+=*yytext;
5354 yyextra->fullArgString+=*yytext;
5357 *yyextra->copyArgString+=*yytext;
5358 yyextra->fullArgString+=*yytext;
5359 if (yyextra->argRoundCount>0)
5360 yyextra->argRoundCount--;
5362 BEGIN( yyextra->lastCopyArgContext );
5365 yyextra->argSquareCount++;
5366 *yyextra->copyArgString+=*yytext;
5367 yyextra->fullArgString+=*yytext;
5370 *yyextra->copyArgString+=*yytext;
5371 yyextra->fullArgString+=*yytext;
5372 if (yyextra->argSquareCount>0)
5373 yyextra->argSquareCount--;
5375 BEGIN( yyextra->lastCopyArgContext );
5378 *yyextra->copyArgString+=*yytext;
5379 yyextra->fullArgString+=*yytext;
5380 yyextra->argRoundCount=0;
5381 yyextra->lastCopyArgContext = YY_START;
5382 BEGIN( CopyArgRound );
5385 yyextra->argSharpCount++;
5387 *yyextra->copyArgString+=*yytext;
5388 yyextra->fullArgString+=*yytext;
5391 *yyextra->copyArgString+=*yytext;
5392 yyextra->fullArgString+=*yytext;
5393 yyextra->argSharpCount--;
5394 if (yyextra->argSharpCount>0)
5400 BEGIN( ReadTempArgs );
5404<CopyArgString,CopyArgPHPString>\\. {
5405 *yyextra->copyArgString+=yytext;
5406 yyextra->fullArgString+=yytext;
5409 *yyextra->copyArgString+=*yytext;
5410 yyextra->fullArgString+=*yytext;
5411 BEGIN( yyextra->lastCopyArgStringContext );
5413<CopyArgPHPString>\' {
5414 *yyextra->copyArgString+=*yytext;
5415 yyextra->fullArgString+=*yytext;
5416 BEGIN( yyextra->lastCopyArgStringContext );
5418<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5419 if (yyextra->insidePHP)
5425 *yyextra->copyArgString+=yytext;
5426 yyextra->fullArgString+=yytext;
5429<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5430 *yyextra->copyArgString+=yytext;
5431 yyextra->fullArgString+=yytext;
5432 if (yyextra->insidePHP)
5434 yyextra->lastCopyArgStringContext=YY_START;
5435 BEGIN(CopyArgPHPString);
5438<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5439 *yyextra->copyArgString+=yytext;
5440 yyextra->fullArgString+=yytext;
5442<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5444 *yyextra->copyArgString+=*yytext;
5445 yyextra->fullArgString+=*yytext;
5447<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5448 *yyextra->copyArgString+=yytext;
5449 yyextra->fullArgString+=yytext;
5451<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5452 *yyextra->copyArgString+=*yytext;
5453 yyextra->fullArgString+=*yytext;
5461<FuncRound>"(" { yyextra->current->args += *yytext ;
5462 ++yyextra->roundCount ;
5464<FuncRound>")" { yyextra->current->args += *yytext ;
5465 if ( yyextra->roundCount )
5466 --yyextra->roundCount ;
5478 if (
qstrcmp(yytext,
";")==0 &&
5479 ((yyextra->insideJS || yyextra->insidePHP) &&
5482 yyextra->current->reset();
5484 BEGIN( FindMembers );
5488 unput(*yytext); BEGIN( SFunction );
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
5491<FuncQual>{BN}*"abstract"{BN}* {
5493 yyextra->current->virt = Specifier::Pure;
5494 yyextra->current->args +=
" override ";
5496<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5498 yyextra->current->spec.setOverride(
true);
5499 yyextra->current->args +=
" override ";
5500 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5503<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5505 yyextra->current->spec.setFinal(
true);
5506 yyextra->current->args +=
" final ";
5507 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5510<FuncQual>{BN}*"sealed"{BN}* {
5512 yyextra->current->spec.setSealed(
true);
5513 yyextra->current->args +=
" sealed ";
5515<FuncQual>{BN}*"new"{BN}* {
5517 yyextra->current->spec.setNew(
true);
5518 yyextra->current->args +=
" new ";
5520<FuncQual>{BN}*"const"{BN}* {
5522 yyextra->current->args +=
" const ";
5523 yyextra->current->argList.setConstSpecifier(
TRUE);
5525<FuncQual>{BN}*"volatile"{BN}* {
5527 yyextra->current->args +=
" volatile ";
5528 yyextra->current->argList.setVolatileSpecifier(
TRUE);
5530<FuncQual>{BN}*"noexcept"{BN}* {
5532 yyextra->current->args +=
" noexcept ";
5533 yyextra->current->spec.setNoExcept(
true);
5535<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5537 yyextra->current->args +=
" noexcept(false)";
5539<FuncQual>{BN}*"noexcept"{BN}*"(" {
5541 yyextra->current->args +=
" noexcept(";
5542 yyextra->current->spec.setNoExcept(
true);
5543 yyextra->lastRoundContext=FuncQual;
5544 yyextra->pCopyRoundString=&yyextra->current->args;
5545 yyextra->roundCount=0;
5549 yyextra->current->args +=
" &";
5552<FuncQual>{BN}*"&&" {
5553 yyextra->current->args +=
" &&";
5557<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5559 yyextra->current->args +=
" = 0";
5560 yyextra->current->virt = Specifier::Pure;
5561 yyextra->current->argList.setPureSpecifier(
TRUE);
5562 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5565<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5567 yyextra->current->args +=
" = delete";
5568 yyextra->current->spec.setDelete(
true);
5569 yyextra->current->argList.setIsDeleted(
TRUE);
5570 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5573<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5575 yyextra->current->args +=
" = default";
5576 yyextra->current->spec.setDefault(
true);
5577 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5580<FuncQual>{BN}*"->"{BN}* {
5582 yyextra->current->argList.setTrailingReturnType(
" -> ");
5583 yyextra->current->args +=
" -> ";
5584 yyextra->roundCount=0;
5585 BEGIN(TrailingReturn);
5587<TrailingReturn>[{;] {
5588 if (yyextra->roundCount>0) REJECT;
5590 yyextra->current->argList.finishTrailingReturnType();
5593<TrailingReturn>"requires"{BN}+ {
5594 if (yyextra->insideJava) REJECT;
5595 yyextra->requiresContext = FuncQual;
5596 yyextra->current->req+=
' ';
5597 yyextra->current->argList.finishTrailingReturnType();
5598 BEGIN(RequiresClause);
5600<TrailingReturn>"(" {
5601 yyextra->roundCount++;
5602 yyextra->current->argList.appendTrailingReturnType(yytext);
5603 yyextra->current->args+=yytext;
5605<TrailingReturn>")" {
5606 if (yyextra->roundCount>0)
5608 yyextra->roundCount--;
5612 warn(yyextra->fileName,yyextra->yyLineNr,
5613 "Found ')' without opening '(' for trailing return type '{})...'",
5614 yyextra->current->argList.trailingReturnType());
5616 yyextra->current->argList.appendTrailingReturnType(yytext);
5617 yyextra->current->args+=yytext;
5620 yyextra->current->argList.appendTrailingReturnType(yytext);
5621 yyextra->current->args+=yytext;
5625 yyextra->current->argList.appendTrailingReturnType(yytext);
5626 yyextra->current->args+=
' ';
5628<FuncRound,FuncFunc>{BN}*","{BN}* {
5630 yyextra->current->args +=
", " ;
5632<FuncQual,FuncRound,FuncFunc>{BN}+ {
5634 yyextra->current->args +=
' ' ;
5636<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5638 yyextra->lastCPPContext = YY_START;
5642 if (!yyextra->insideCS)
5649 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5656 yyextra->lastInitializerContext=YY_START;
5657 yyextra->sharpCount=0;
5658 yyextra->initBracketCount=0;
5659 yyextra->current->initializer.str(yytext);
5660 BEGIN(ReadInitializer);
5663<ReadExpressionBody>";" {
5664 if (!yyextra->current->sli.empty() && yyextra->previous)
5666 yyextra->previous->sli = yyextra->current->sli;
5667 yyextra->current->sli.clear();
5669 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5684 if (yyextra->insideCpp &&
qstrcmp(yytext,
"requires")==0)
5687 yyextra->requiresContext = YY_START;
5688 if (!yyextra->current->req.isEmpty())
5690 yyextra->current->req+=
" && ";
5692 BEGIN(RequiresClause);
5694 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
5697 yyextra->current->typeConstr.clear();
5698 yyextra->current->typeConstr.push_back(
Argument());
5699 yyextra->lastCSConstraint = YY_START;
5700 BEGIN( CSConstraintName );
5704 yyextra->current->args = yytext;
5705 yyextra->oldStyleArgType.clear();
5706 BEGIN(OldStyleArgs);
5710 yyextra->current->args += yytext;
5716 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5718 if (yyextra->current->doc!=yyextra->docBackup)
5720 doc=yyextra->current->doc;
5721 yyextra->current->doc=yyextra->docBackup;
5723 if (yyextra->current->brief!=yyextra->briefBackup)
5725 brief=yyextra->current->brief;
5726 yyextra->current->brief=yyextra->briefBackup;
5728 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5729 oldStyleArgName,brief,doc);
5730 yyextra->current->args.clear();
5731 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5733<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5735 if (yyextra->current->argList.empty())
5737 yyextra->current->argList.setNoParameters(
TRUE);
5743<OldStyleArgs>. { yyextra->current->args += *yytext; }
5744<FuncQual,FuncRound,FuncFunc>\" {
5745 if (yyextra->insideIDL && yyextra->insideCppQuote)
5751 yyextra->current->args += *yytext;
5754<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5755<FuncQual>{BN}*"try:" |
5756<FuncQual>{BN}*"try"{BN}+ {
5757 yyextra->insideTryBlock=
TRUE;
5759 if (yytext[yyleng-1]==
':')
5765<FuncQual>{BN}*"throw"{BN}*"(" {
5766 yyextra->current->exception =
" throw (" ;
5767 yyextra->roundCount=0;
5769 BEGIN( ExcpRound ) ;
5771<FuncQual>{BN}*"raises"{BN}*"(" {
5772 yyextra->current->exception =
" raises (" ;
5774 yyextra->roundCount=0;
5775 BEGIN( ExcpRound ) ;
5777<FuncQual>{BN}*"throws"{BN}+ {
5778 yyextra->current->exception =
" throws " ;
5782<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5783 ++yyextra->roundCount ;
5785<ExcpRound>")" { yyextra->current->exception += *yytext ;
5786 if ( yyextra->roundCount )
5787 --yyextra->roundCount ;
5792 yyextra->current->exception += *yytext;
5795 unput(
'{'); BEGIN( FuncQual );
5798 unput(
';'); BEGIN( FuncQual );
5801 yyextra->current->exception +=
' ';
5805 yyextra->current->exception += *yytext;
5807<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5808 yyextra->current->name = yyextra->current->args ;
5809 yyextra->current->args = yytext ;
5810 yyextra->roundCount=0;
5811 BEGIN( FuncRound ) ;
5814 if (!yyextra->insidePHP) BEGIN(SkipInits);
5820 yyextra->current->fileName = yyextra->fileName;
5821 yyextra->current->startLine = yyextra->yyBegLineNr;
5822 yyextra->current->startColumn = yyextra->yyBegColNr;
5823 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5825 std::string type = yyextra->current->type.str();
5829 ti = (int)
match.position();
5833 int di = yyextra->current->type.find(
"decltype(");
5834 if (di!=-1 && di<ti)
5839 int ts=yyextra->current->type.find(
'<');
5840 int te=yyextra->current->type.findRev(
'>');
5843 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5844 bool isFunction = ti==-1 ||
5845 (ts!=-1 && ts<te && ts<ti && ti<te);
5846 bool isVariable = !yyextra->current->type.isEmpty() &&
5847 (!isFunction || startsWithTypedef);
5852 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5857 if (yyextra->isTypedef && !startsWithTypedef)
5859 yyextra->current->type.prepend(
"typedef ");
5861 yyextra->current->section = EntryType::makeVariable() ;
5866 yyextra->current->section = EntryType::makeFunction() ;
5867 yyextra->current->proto = *yytext==
';';
5875 if (yyextra->isTypedef && !startsWithTypedef)
5877 yyextra->current->type.prepend(
"typedef ");
5880 yyextra->current->section = EntryType::makeVariable();
5885 yyextra->current->section = EntryType::makeFunction();
5886 yyextra->current->proto =
TRUE;
5890 if ( yyextra->insidePHP)
5894 yyextra->current->spec.setFinal(
true);
5898 yyextra->current->spec.setAbstract(
true);
5901 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
5904 if ( *yytext ==
'{' )
5906 yyextra->lastCurlyContext = FindMembers;
5907 yyextra->curlyCount=0;
5912 BEGIN( FindMembers );
5917 if ( yyextra->insidePHP)
5921 yyextra->previous = yyextra->current;
5922 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
5925 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
5927 yyextra->current->spec.setOptional(
true).setRequired(
true);
5929 yyextra->lastCurlyContext = FindMembers;
5930 if ( *yytext ==
',' )
5932 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
5934 if ( *yytext ==
'{' )
5936 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
5938 yyextra->previous->spec.setInline(
true);
5940 yyextra->curlyCount=0;
5941 BEGIN( SkipCurly ) ;
5943 else if ( *yytext ==
'=' )
5945 yyextra->previous->spec.setInline(
true);
5946 yyextra->curlyCount=0;
5947 BEGIN( ReadExpressionBody );
5951 if (!yyextra->previous->section.isVariable())
5952 yyextra->previous->bodyLine=-1;
5953 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...
5957<SkipInits>">"{BN}*"{" {
5959 yyextra->curlyCount=1;
5960 BEGIN(SkipC11Inits);
5962<SkipInits>{ID}{BN}*"{" {
5964 yyextra->curlyCount=1;
5965 BEGIN(SkipC11Inits);
5968 ++yyextra->curlyCount;
5971 if ( --yyextra->curlyCount<=0 )
5976<SkipC11Attribute>"]]" {
5977 BEGIN(yyextra->lastC11AttributeContext);
5985 ++yyextra->curlyCount ;
5987<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
5990 if( yyextra->curlyCount )
5992 --yyextra->curlyCount ;
5996 if (!yyextra->current->sli.empty() && yyextra->previous)
5998 yyextra->previous->sli = yyextra->current->sli;
5999 yyextra->current->sli.clear();
6001 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6002 BEGIN( yyextra->lastCurlyContext ) ;
6005<SkipCurly>"}"{BN}*{DCOMM}"<" {
6007 if ( yyextra->curlyCount )
6010 --yyextra->curlyCount ;
6014 yyextra->current->endBodyLine=yyextra->yyLineNr;
6015 yyextra->tempEntry = yyextra->current;
6016 yyextra->current = yyextra->previous;
6018 yyextra->docBlockContext = SkipCurlyEndDoc;
6019 yyextra->docBlockInBody =
FALSE;
6020 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6022 yyextra->docBlock.str(std::string());
6023 yyextra->docBlockTerm =
'}';
6024 if (yytext[yyleng-3]==
'/')
6036<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6037 yyextra->docBlockContext = SkipCurlyEndDoc;
6038 yyextra->docBlockInBody =
FALSE;
6039 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6041 yyextra->docBlock.str(std::string());
6042 yyextra->docBlockTerm =
'}';
6043 if (yytext[yyleng-3]==
'/')
6054<SkipCurlyEndDoc>"}" {
6056 if (yyextra->tempEntry)
6058 yyextra->current = yyextra->tempEntry;
6059 yyextra->tempEntry.reset();
6061 BEGIN( yyextra->lastCurlyContext );
6063<SkipCurly,ReadExpressionBody>\" {
6065 yyextra->lastStringContext=YY_START;
6066 BEGIN( SkipString );
6068<SkipCurly>^{B}*"#" {
6069 if (yyextra->insidePHP)
6072 BEGIN( SkipCurlyCpp );
6074<SkipCurly,SkipC11Inits,SkipInits,SkipC11Attribute,ReadExpressionBody>\n {
6078<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6079 if (!yyextra->insidePHP)
6085 yyextra->lastHereDocContext = YY_START;
6089<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6091 yyextra->lastRawStringContext = YY_START;
6092 yyextra->dummyRawString.clear();
6093 yyextra->pCopyRawString = &yyextra->dummyRawString;
6094 *yyextra->pCopyRawString += yytext;
6097<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6101<SkipCurly,SkipCurlyCpp>"\$" {}
6105 yyextra->lastCurlyContext = FindMembers;
6108<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6112<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CCS} {
6114 yyextra->lastCContext = YY_START;
6117<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>{CPPC} {
6119 yyextra->lastCContext = YY_START;
6120 BEGIN(SkipCxxComment);
6122<SkipInits,SkipC11Inits,SkipC11Attribute>"(" {
6123 yyextra->roundCount=0;
6124 yyextra->lastSkipRoundContext=YY_START;
6127<SkipInits,SkipC11Inits,SkipC11Attribute>\" {
6128 yyextra->lastStringContext=YY_START;
6129 BEGIN( SkipString );
6132 warn(yyextra->fileName,yyextra->yyLineNr,
6133 "Found ';' while parsing initializer list! "
6134 "(doxygen could be confused by a macro call without semicolon)"
6136 BEGIN( FindMembers );
6138<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6139 if (!yyextra->insidePHP)
6142 yyextra->lastCContext = YY_START;
6143 BEGIN(SkipCxxComment);
6145<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6146 if (!yyextra->insideCS) REJECT;
6149 yyextra->lastSkipVerbStringContext=YY_START;
6150 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6151 yyextra->dummyTextStream.clear();
6152 BEGIN(SkipVerbString);
6154<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6155 if (yyextra->insidePHP) REJECT;
6157<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6158 if (yyextra->insidePHP)
6160 yyextra->lastStringContext=YY_START;
6161 BEGIN(SkipPHPString);
6164<SkipC11Attribute>{ID} {
6167 yyextra->current->spec.setNoDiscard(
true);
6170<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,SkipC11Attribute,ReadExpressionBody>. { }
6171<SkipString,SkipPHPString>\\. { }
6173 BEGIN( yyextra->lastStringContext );
6176 BEGIN( yyextra->lastStringContext );
6178<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6179<SkipString,SkipPHPString>\n {
6183<SkipString,SkipPHPString>. { }
6189 yyextra->current->section = EntryType::makeEmpty() ;
6190 yyextra->current->type.clear() ;
6191 yyextra->current->name.clear() ;
6192 yyextra->current->args.clear() ;
6193 yyextra->current->argList.clear();
6194 BEGIN( FindMembers ) ;
6197 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6201 if (!yyextra->current->name.isEmpty() && !yyextra->current_root->name.isEmpty())
6205 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6207 if (!yyextra->baseName.isEmpty())
6209 yyextra->current->extends.emplace_back(
6210 yyextra->baseName,Protection::Public,Specifier::Normal);
6211 yyextra->baseName.clear();
6213 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6218 yyextra->current->section = EntryType::makeEmpty() ;
6219 yyextra->current->type.clear() ;
6220 yyextra->current->name.clear() ;
6221 yyextra->current->args.clear() ;
6222 yyextra->current->argList.clear();
6224 BEGIN( FindMembers ) ;
6226<CompoundName>{SCOPENAME}/{BN}*"<" {
6227 yyextra->sharpCount = 0;
6228 yyextra->current->name = yytext ;
6230 if (yyextra->current->spec.isProtocol())
6232 yyextra->current->name+=
"-p";
6235 yyextra->lastClassTemplSpecContext = ClassVar;
6236 if (yyextra->insideObjC)
6238 BEGIN( ObjCProtocolList );
6240 else if (yyextra->insideCS)
6247 yyextra->roundCount=0;
6248 BEGIN( ClassTemplSpec );
6255 yyextra->current->tArgLists.
push_back(al);
6256 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6257 yyextra->templateStr=
"<";
6258 yyextra->current->name +=
"<";
6259 yyextra->fullArgString = yyextra->templateStr;
6260 yyextra->copyArgString = &yyextra->current->name;
6262 yyextra->currentArgumentContext = ClassVar;
6263 BEGIN( ReadTempArgs );
6265<ObjCProtocolList>"<" {
6266 yyextra->insideProtocolList=
TRUE;
6269<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6270 yyextra->current->name += yytext;
6272 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6275 if (yyextra->current->spec.isProtocol())
6282 BEGIN( yyextra->lastClassTemplSpecContext );
6286<ClassTemplSpec>"<" {
6287 yyextra->current->name += yytext;
6288 if (yyextra->roundCount==0) yyextra->sharpCount++;
6291 yyextra->current->name += yytext;
6293<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6294 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6298 yyextra->current->name =
substitute(yytext,
".",
"::");
6299 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6304 else if (!yyextra->current->tArgLists.empty())
6308 yyextra->current->name = yytext;
6309 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6312 QCString rn = yyextra->current_root->name;
6314 if (!yyextra->current->name.isEmpty() && !rn.
isEmpty())
6318 yyextra->current->spec.setForwardDecl(
true);
6319 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6321 else if (yyextra->insideIDL &&
6322 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6323 yyextra->current->spec.isInterface()) ||
6324 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6325 yyextra->current->spec.isService())
6333 yyextra->current->name = yytext;
6334 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6335 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6338 yyextra->current->spec.setInterface(
false).setService(
false);
6342 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6345 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6348 yyextra->current->reset();
6350 if (yyextra->insideObjC)
6352 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6353 yyextra->insideObjC =
FALSE;
6355 if (yyextra->isTypedef)
6357 yyextra->current->type.prepend(
"typedef");
6359 BEGIN( FindMembers );
Wrapper class for the Entry type.
6362<CompoundName>{SCOPENAME}/{BN}*"(" {
6363 yyextra->current->name = yytext ;
6366 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6368 yyextra->lastAlignAsContext = YY_START;
6373 if (yyextra->current->spec.isProtocol())
6375 yyextra->current->name +=
"-p";
6380<AlignAs>"(" { yyextra->roundCount=0;
6381 BEGIN( AlignAsEnd );
6385<AlignAsEnd>"(" { yyextra->roundCount++; }
6386<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6388 BEGIN( yyextra->lastAlignAsContext );
6394 yyextra->current->name = yytext ;
6398 yyextra->current->bodyLine = yyextra->yyLineNr;
6399 yyextra->current->bodyColumn = yyextra->yyColNr;
6400 yyextra->current->initializer.str(std::string());
6401 yyextra->lastInitializerContext = FindMembers;
6402 yyextra->sharpCount=0;
6403 yyextra->initBracketCount=0;
6404 BEGIN(ReadInitializer);
6406<CompoundName>{SCOPENAME}/{BN}*"," {
6408 yyextra->current->reset();
6411<CompoundName>{SCOPENAME} {
6412 yyextra->current->name = yytext ;
6415 if (yyextra->current->spec.isProtocol())
6417 yyextra->current->name +=
"-p";
6419 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6425<CompoundName>{CSSCOPENAME} {
6426 yyextra->current->name =
substitute(yytext,
".",
"::");
6430<ClassVar>{SCOPENAME}{BNopt}/"(" {
6431 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6434 yyextra->roundCount=0;
6435 BEGIN(SkipUnionSwitch);
6440 yyextra->yyBegColNr=yyextra->yyColNr;
6441 yyextra->yyBegLineNr=yyextra->yyLineNr;
6442 yyextra->current->name = yytext;
6443 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6446 BEGIN( FindMembers );
6450 if (yyextra->isTypedef)
6454 yyextra->current->type.prepend(
"typedef ");
6462<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6463 if (yyextra->insideCli)
6466 yyextra->current->spec.setSealedClass(
true);
6468 yyextra->current->spec.setAbstractClass(
true);
6476<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6477 yyextra->yyBegColNr=yyextra->yyColNr;
6478 yyextra->yyBegLineNr=yyextra->yyLineNr;
6481 if (yyextra->current->section.isEnum())
6483 yyextra->current->section = EntryType::makeVariable() ;
6485 yyextra->current->type +=
' ' ;
6486 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...
6495 yyextra->yyBegColNr=yyextra->yyColNr;
6496 yyextra->yyBegLineNr=yyextra->yyLineNr;
6498 if (yyextra->insideIDL &&
qstrcmp(yytext,
"switch")==0)
6501 yyextra->roundCount=0;
6502 BEGIN(SkipUnionSwitch);
6504 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
qstrcmp(yytext,
"implements")==0 ||
qstrcmp(yytext,
"extends")==0))
6506 yyextra->current->type.clear();
6507 yyextra->baseProt = Protection::Public;
6508 yyextra->baseVirt = Specifier::Normal;
6509 yyextra->baseName.clear();
6510 BEGIN( BasesProt ) ;
6512 else if (yyextra->insideCS &&
qstrcmp(yytext,
"where")==0)
6514 yyextra->current->typeConstr.clear();
6515 yyextra->current->typeConstr.push_back(
Argument());
6516 yyextra->lastCSConstraint = YY_START;
6517 BEGIN( CSConstraintName );
6519 else if (yyextra->insideCli &&
qstrcmp(yytext,
"abstract")==0)
6521 yyextra->current->spec.setAbstract(
true);
6523 else if (yyextra->insideCli &&
qstrcmp(yytext,
"sealed")==0)
6525 yyextra->current->spec.setSealed(
true);
6527 else if (
qstrcmp(yytext,
"final")==0)
6529 yyextra->current->spec.setFinal(
true);
6533 if (yyextra->current->section.isEnum())
6535 yyextra->current->section = EntryType::makeVariable() ;
6537 yyextra->current->type +=
' ' ;
6538 yyextra->current->type += yyextra->current->name ;
6539 yyextra->current->name = yytext ;
6548 if (yyextra->insideObjC && *yytext==
'(')
6550 yyextra->current->name+=
'(';
6551 yyextra->current->spec.setCategory(
true);
6552 BEGIN( ClassCategory );
6554 else if (yyextra->insideCS && *yytext==
'(')
6556 yyextra->current->args=yytext;
6557 yyextra->currentArgumentContext = ClassVar;
6558 yyextra->fullArgString = yyextra->current->args;
6559 yyextra->copyArgString = &yyextra->current->args;
6560 BEGIN( ReadFuncArgType ) ;
6566 BEGIN( FindMembers );
6569<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6570<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6571 yyextra->fullArgString.clear();
6572 yyextra->lastCopyArgChar=
'#';
6573 yyextra->lastCommentInArgContext=YY_START;
6575 BEGIN( CopyArgCommentLine );
6577 BEGIN( CopyArgComment );
6579<CSConstraintType,CSConstraintName>"#" {
6580 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6582<CSConstraintType>"=>" {
6587 BEGIN( yyextra->lastCSConstraint );
6589<CSConstraintType>"{" {
6593 BEGIN( yyextra->lastCSConstraint );
6595<CSConstraintType,CSConstraintName>";" {
6598 BEGIN( yyextra->lastCSConstraint );
6600<CSConstraintName>":" {
6601 BEGIN( CSConstraintType );
6603<CSConstraintName>{ID} {
6605 yyextra->current->typeConstr.back().name=yytext;
6607<CSConstraintType>"where" {
6608 yyextra->current->typeConstr.push_back(
Argument());
6609 BEGIN( CSConstraintName );
6611<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6612 if (yyextra->current->typeConstr.back().type.isEmpty())
6615 yyextra->current->typeConstr.back().type=yytext;
6619 QCString name = yyextra->current->typeConstr.back().name;
6620 yyextra->current->typeConstr.push_back(
Argument());
6621 yyextra->current->typeConstr.back().name=name;
6622 yyextra->current->typeConstr.back().type=yytext;
6625<CSConstraintName,CSConstraintType>\n {
6628<CSConstraintName,CSConstraintType>. {
6630<ClassCategory>{ID} {
6631 yyextra->current->name+=yytext;
6633<ClassCategory>")"/{BN}*"{" {
6634 yyextra->current->name+=
')';
6637<ClassCategory>")"/{BN}*"<" {
6638 yyextra->current->name+=
')';
6639 BEGIN( ObjCProtocolList );
6642 yyextra->current->name+=
')';
6643 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6655 if (yyextra->current->section.isVariable())
6657 yyextra->current->bitfields+=
":";
6658 yyextra->current->args.clear();
6661 else if (yyextra->current->section.isEnum())
6664 yyextra->current->args.clear();
6665 BEGIN(EnumBaseType);
6669 yyextra->current->type.clear();
6670 if (yyextra->current->spec.isInterface() ||
6671 yyextra->current->spec.isStruct() ||
6672 yyextra->current->spec.isRef() ||
6673 yyextra->current->spec.isValue() ||
6674 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6677 yyextra->baseProt = Protection::Public;
6681 yyextra->baseProt = Protection::Private;
6683 yyextra->baseVirt = Specifier::Normal;
6684 yyextra->baseName.clear();
6685 BEGIN( BasesProt ) ;
6689 if (yyextra->isTypedef)
6691 yyextra->current->type.prepend(
"typedef");
6693 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6695 yyextra->current->section = EntryType::makeVariable() ;
6697 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6699 yyextra->current->reset();
6706 BEGIN( FindMembers );
6708<Bases,ClassVar>{CPPC}"/"/[^/] {
6709 if (!yyextra->insideObjC)
6716 yyextra->current->program << yytext;
6717 yyextra->current->fileName = yyextra->fileName ;
6718 yyextra->current->startLine = yyextra->yyLineNr ;
6719 yyextra->current->startColumn = yyextra->yyColNr;
6720 yyextra->curlyCount=0;
6721 BEGIN( ReadBodyIntf );
6724<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6725<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6726<Bases,ClassVar>{CPPC}"!" |
6727<Bases,ClassVar>[\-+]{BN}* {
6728 if (!yyextra->insideObjC)
6735 yyextra->current->program << yytext;
6736 yyextra->current->fileName = yyextra->fileName ;
6737 yyextra->current->startLine = yyextra->yyLineNr ;
6738 yyextra->current->startColumn = yyextra->yyColNr;
6739 yyextra->curlyCount=0;
6740 BEGIN( ReadBodyIntf );
6743<CompoundName,ClassVar>{B}*"{"{B}* {
6744 yyextra->current->program.str(std::string());
6745 yyextra->current->fileName = yyextra->fileName ;
6746 yyextra->current->bodyLine = yyextra->yyLineNr;
6747 yyextra->current->bodyColumn = yyextra->yyColNr;
6749 if (yyextra->current->name.isEmpty() && !yyextra->isTypedef)
6751 if (yyextra->current->section.isNamespace())
6755 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6767 yyextra->curlyCount=0;
6768 if (yyextra->current_root &&
6769 !yyextra->current_root->spec.isInterface() &&
6770 (yyextra->current->spec.isInterface() ||
6771 yyextra->current->spec.isProtocol() ||
6772 yyextra->current->spec.isCategory() ||
6773 yyextra->current->section.isObjcImpl()
6778 BEGIN( ReadBodyIntf );
6780 else if (yyextra->current->section.isNamespace())
6782 BEGIN( ReadNSBody );
QCString stripPath(const QCString &s)
6789<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6790<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6791<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6792<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6793<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6794<BasesProt>{BN} {
lineCount(yyscanner); }
6795<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6796<Bases>"decltype"{BN}*"(" {
6798 yyextra->roundCount=0;
6799 yyextra->lastSkipRoundContext=YY_START;
6802<Bases>("\\")?({ID}"\\")*{ID} {
6803 if (!yyextra->insidePHP)
6812 yyextra->baseName += bn;
6813 yyextra->current->args +=
' ';
6814 yyextra->current->args += yytext;
6817<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6823 yyextra->current->typeConstr.clear();
6824 yyextra->current->typeConstr.push_back(
Argument());
6825 yyextra->lastCSConstraint = YY_START;
6826 BEGIN( CSConstraintName );
6830 yyextra->baseName+=yytext;
6831 yyextra->current->args +=
' ';
6832 yyextra->current->args += yytext;
6835<Bases>{BN}*{ID}("."{ID})* {
6837 yyextra->baseName += name;
6838 yyextra->current->args +=
' ';
6839 yyextra->current->args += name;
6841<ClassVar,Bases>\n/{BN}*[^{, \t\n] {
6842 if (!yyextra->insideObjC)
6852<ClassVar,Bases>"@end" {
6860<ClassVar>"<" { yyextra->current->name += *yytext;
6861 yyextra->sharpCount=1;
6862 yyextra->roundCount=0;
6863 yyextra->lastSkipSharpContext = YY_START;
6864 yyextra->specName = &yyextra->current->name;
6865 BEGIN ( Specialization );
6869 yyextra->sharpCount=1;
6870 yyextra->roundCount=0;
6871 yyextra->lastSkipSharpContext = YY_START;
6872 if (yyextra->insideObjC)
6882 yyextra->templateStr = yytext;
6883 yyextra->specName = &yyextra->templateStr;
6884 BEGIN ( Specialization );
6887<Specialization>"<" { *yyextra->specName += *yytext;
6888 if (yyextra->roundCount==0) yyextra->sharpCount++;
6890<Specialization>">" {
6891 *yyextra->specName += *yytext;
6892 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6895 BEGIN(yyextra->lastSkipSharpContext);
6898<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
6899<Specialization>"<<" { *yyextra->specName += yytext; }
6900<Specialization>">>"/{B}*"::" {
6905<Specialization>">>" {
6906 if (yyextra->insideCS)
6916 if (yyextra->roundCount>0)
6918 *yyextra->specName += yytext;
6928<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
6929<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
6930<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
6932<Specialization>"\\\\" { *yyextra->specName += *yytext;}
6933<Specialization>"\\'" { *yyextra->specName += *yytext;}
6934<Specialization>"\\\"" { *yyextra->specName += *yytext;}
6935<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
6936<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
6937<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
6938<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
6939<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6940<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
6941<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
6942<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
6945 *yyextra->specName += *yytext;
6947<SkipRound>"(" { ++yyextra->roundCount; }
6948<SkipRound>")" {
if (--yyextra->roundCount<0)
6949 BEGIN ( yyextra->lastSkipRoundContext );
6952 yyextra->lastStringContext=SkipRound;
6955<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
6956 if (yyextra->insideProtocolList)
6958 yyextra->baseName+=
"-p";
6962 yyextra->current->args +=
',' ;
6965 if (!yyextra->baseName.isEmpty())
6967 yyextra->current->extends.emplace_back(
6968 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
6971 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
6972 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
6973 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
6975 yyextra->baseProt=Protection::Public;
6979 yyextra->baseProt=Protection::Private;
6981 yyextra->baseVirt=Specifier::Normal;
6982 yyextra->baseName.clear();
6985 yyextra->insideProtocolList=
FALSE;
6997 if (*yytext==
',' && yyextra->insideObjC)
6999 yyextra->insideProtocolList=
TRUE;
7005 yyextra->current->program.str(std::string());
7006 yyextra->current->fileName = yyextra->fileName ;
7007 yyextra->current->bodyLine = yyextra->yyLineNr;
7008 yyextra->current->bodyColumn = yyextra->yyColNr;
7010 if (!yyextra->baseName.isEmpty())
7012 yyextra->current->extends.emplace_back(
7013 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7015 yyextra->baseName.clear();
7017 yyextra->curlyCount=0;
7018 if (yyextra->insideObjC)
7020 BEGIN( ReadBodyIntf );
7027<SkipUnionSwitch>{B}*"(" {
7028 yyextra->roundCount++;
7030<SkipUnionSwitch>")" {
7031 if (--yyextra->roundCount==0)
7036<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7038<Comment>{BN}+ { yyextra->current->program << yytext ;
7041<Comment>{CCS} { yyextra->current->program << yytext ; }
7042<Comment>{CPPC} { yyextra->current->program << yytext ; }
7043<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7044 if (yyextra->doxygenComment) yyextra->insideCode=
TRUE;
7045 yyextra->current->program << yytext ;
7047<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7048 if (yyextra->doxygenComment) yyextra->insideCode=
FALSE;
7049 yyextra->current->program << yytext ;
7051<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7052<Comment>{CCE} { yyextra->current->program << yytext ;
7053 if (!yyextra->insideCode)
7055 yyextra->doxygenComment=
false;
7056 BEGIN( yyextra->lastContext );
7059<Comment>. { yyextra->current->program << *yytext ; }
7061<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7063 if (!yyextra->current->doc.isEmpty())
7065 yyextra->current->doc+=
"\n\n";
7069 yyextra->current->docLine = yyextra->yyLineNr;
7070 yyextra->current->docFile = yyextra->fileName;
7073 yyextra->lastDocContext = YY_START;
7074 if (yyextra->current_root->section.isScope())
7076 yyextra->current->inside = yyextra->current_root->name+
"::";
7078 yyextra->docBlockContext = YY_START;
7079 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7084 yyextra->docBlock.
str(indent.
str());
7086 if (yyextra->docBlockAutoBrief)
7088 yyextra->current->briefLine = yyextra->yyLineNr;
7089 yyextra->current->briefFile = yyextra->fileName;
7094<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7100 yyextra->lastDocContext = YY_START;
7103 if (yyextra->current_root->section.isScope())
7105 yyextra->current->inside = yyextra->current_root->name+
"::";
7107 yyextra->current->docLine = yyextra->yyLineNr;
7108 yyextra->current->docFile = yyextra->fileName;
7109 yyextra->docBlockContext = YY_START;
7110 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7112 yyextra->docBlockAutoBrief = javadocAutoBrief;
7116 yyextra->docBlock.
str(indent.
str());
7118 if (yyextra->docBlockAutoBrief)
7120 yyextra->current->briefLine = yyextra->yyLineNr;
7121 yyextra->current->briefFile = yyextra->fileName;
7128 yyextra->current->program << yytext ;
7129 yyextra->lastContext = YY_START ;
7130 yyextra->doxygenComment=
true;
7134<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7139<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7140 yyextra->lastDocContext = YY_START;
7143 if (yyextra->current_root->section.isScope())
7145 yyextra->current->inside = yyextra->current_root->name+
"::";
7147 yyextra->current->docLine = yyextra->yyLineNr;
7148 yyextra->current->docFile = yyextra->fileName;
7149 yyextra->docBlockContext = YY_START;
7150 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7152 yyextra->docBlockAutoBrief = javadocAutoBrief;
7156 yyextra->docBlock.
str(indent.
str());
7158 if (yyextra->docBlockAutoBrief)
7160 yyextra->current->briefLine = yyextra->yyLineNr;
7161 yyextra->current->briefFile = yyextra->fileName;
7166<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7167 yyextra->lastDocContext = YY_START;
7168 if (yyextra->current_root->section.isScope())
7170 yyextra->current->inside = yyextra->current_root->name+
"::";
7172 yyextra->docBlockContext = YY_START;
7173 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7174 yyextra->docBlockAutoBrief =
FALSE;
7178 yyextra->docBlock.
str(indent.
str());
7183<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7184 yyextra->lastDocContext = YY_START;
7185 if (yyextra->current_root->section.isScope())
7187 yyextra->current->inside = yyextra->current_root->name+
"::";
7189 yyextra->docBlockContext = YY_START;
7190 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7191 yyextra->docBlockAutoBrief =
FALSE;
7194 yyextra->docBlock.
str(indent.
str());
7198<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7200 yyextra->externLinkage=
TRUE;
7203 if (yyextra->externLinkage)
7205 yyextra->externLinkage=
FALSE;
7207 else if (yyextra->insideCS &&
7208 !yyextra->current->name.isEmpty() &&
7209 !yyextra->current->type.isEmpty())
7211 if (yyextra->current->mtype == MethodTypes::Event)
7213 yyextra->mtype = MethodTypes::Event;
7217 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7221 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7223 yyextra->current->bodyLine = yyextra->yyLineNr;
7224 yyextra->current->bodyColumn = yyextra->yyColNr;
7225 yyextra->curlyCount=0;
7226 BEGIN( CSAccessorDecl );
7228 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7232 yyextra->current->exception =
" {";
7233 BEGIN(UNOIDLAttributeBlock);
7237 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7238 yyextra->current->name.isEmpty()
7242 yyextra->needsSemi =
FALSE;
7243 if (yyextra->current->isStatic)
7245 yyextra->current->name=
"[static initializer]";
7246 yyextra->current->type.clear();
7250 yyextra->current->name=
"[instance initializer]";
7267 yyextra->current->bodyLine = yyextra->yyLineNr;
7268 yyextra->current->bodyColumn = yyextra->yyColNr;
7269 yyextra->current->initializer.str(yytext);
7270 yyextra->lastInitializerContext = YY_START;
7271 yyextra->sharpCount=0;
7272 yyextra->initBracketCount=1;
7273 BEGIN(ReadInitializer);
7277<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7278<CSAccessorDecl>"}"{B}*"=" {
7280 if (yyextra->curlyCount != 0) REJECT;
7281 yyextra->current->initializer.str(
"=");
7282 yyextra->current->endBodyLine=yyextra->yyLineNr;
7283 yyextra->lastInitializerContext = FindMembers;
7284 BEGIN(ReadInitializer);
7286<CSAccessorDecl>"}" {
7287 if (yyextra->curlyCount)
7289 yyextra->curlyCount--;
7293 yyextra->mtype = MethodTypes::Method;
7294 yyextra->virt = Specifier::Normal;
7296 yyextra->current->endBodyLine=yyextra->yyLineNr;
7301<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7302<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7303<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7304<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7305<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7306<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7307<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7308<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7309<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7310<CSAccessorDecl>{CHARLIT} {}
7311<CSAccessorDecl>"\"" { BEGIN(CSString);}
7312<CSAccessorDecl>"." {}
7313<CSAccessorDecl>\n {
lineCount(yyscanner); }
7314<CSString>"\"" { BEGIN(CSAccessorDecl);}
7322<SliceSequence>{SCOPENAME} {
7323 if (yyextra->current->spec.isLocal())
7325 yyextra->current->type =
"local ";
7327 yyextra->current->type +=
"sequence<";
7328 yyextra->current->type += yytext;
7329 yyextra->current->type +=
">";
7332<SliceSequence>{BN}*">"{BN}* {
7334 BEGIN(SliceSequenceName);
7337<SliceSequenceName>{ID}{BN}* {
7339 yyextra->current->name = yytext ;
7340 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7343<SliceSequenceName>";" {
7344 yyextra->current->section = EntryType::makeVariable();
7345 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7350<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7352 if (yyextra->current->spec.isLocal())
7354 yyextra->current->type =
"local ";
7356 yyextra->current->type +=
"dictionary<";
7357 yyextra->current->type += yytext;
7358 yyextra->current->type +=
">";
7359 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7362<SliceDictionary>{BN}*">"{BN}* {
7364 BEGIN(SliceDictionaryName);
7367<SliceDictionaryName>{ID}{BN}* {
7369 yyextra->current->name = yytext ;
7370 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7373<SliceDictionaryName>";" {
7374 yyextra->current->section = EntryType::makeVariable();
7375 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7385<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7386 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7387 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7390<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7391 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7392 BEGIN( yyextra->docBlockContext );
7394<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7395 yyextra->docBlock << yytext;
7396 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7397 BEGIN( yyextra->docBlockContext );
7399<DocLine>{NONLopt}/"\n" {
7400 yyextra->docBlock << yytext;
7401 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
7402 BEGIN( yyextra->docBlockContext );
7407<DocBlock>"*"*{CCE} {
7409 BEGIN(yyextra->docBlockContext);
7411<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7414 yyextra->docBlock <<
"\\ilinebr " << indent;
7416<DocBlock>^{B}*"*"+/[^/] {
7419 yyextra->docBlock << indent;
7421<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7424 yyextra->docBlock << indent;
7426<DocBlock>^{B}*({CPPC}){B}* {
7429 yyextra->docBlock << yytext;
7433 yyextra->docBlock << yytext;
7435<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7436 yyextra->docBlock << yytext;
7438<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7439 yyextra->docBlock << yytext;
7440 char blockName[] =
"f$";
7442 if (c==
'[') blockName[1]=
']';
7443 else if (c==
'{') blockName[1]=
'}';
7444 else if (c==
'(') blockName[1]=
')';
7446 BEGIN(DocCopyBlock);
7448<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7449 yyextra->fileName = &yytext[6];
7450 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7451 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7452 yyextra->docBlock << yytext;
7454<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7455 yyextra->fileName = &yytext[6];
7456 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7457 yyextra->docBlock << yytext;
7459<DocBlock>{CMD}"iline"{LINENR}{B} {
7464 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7468 yyextra->yyLineNr = nr;
7470 yyextra->docBlock << yytext;
7472<DocBlock>{B}*"<"{PRE}">" {
7473 yyextra->docBlock << yytext;
7475 BEGIN(DocCopyBlock);
7477<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7478 yyextra->docBlock << yytext;
7480 BEGIN(DocCopyBlock);
7482<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc")/[^a-z_A-Z0-9\-] {
7483 yyextra->docBlock << yytext;
7485 BEGIN(DocCopyBlock);
7487<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7488 yyextra->docBlock << yytext;
7490 BEGIN(DocCopyBlock);
7492<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7494 yyextra->docBlock <<
"\\ilinebr ";
7495 yyextra->docBlock << pat;
7497 BEGIN(DocCopyBlock);
7499<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7501 yyextra->docBlock << pat;
7503 BEGIN(DocCopyBlock);
7505<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7506<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7507<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7509 yyextra->docBlock <<
"\\ilinebr ";
7510 yyextra->docBlock << pat;
7512 BEGIN(DocCopyBlock);
7514<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7515<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7516<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7518 yyextra->docBlock << pat;
7520 BEGIN(DocCopyBlock);
7523 yyextra->docBlock <<
"```";
7526 yyextra->docBlock << yytext;
7529 yyextra->docBlock << yytext;
7531 BEGIN(DocCopyBlock);
7533<DocBlock>{B}*"<"{CODE}">" {
7534 if (yyextra->insideCS)
7536 yyextra->docBlock << yytext;
7538 BEGIN(DocCopyBlock);
7545<DocBlock>[^@*~`'\/\\\n]+ {
7546 yyextra->docBlock << yytext;
7550 yyextra->docBlock << *yytext;
7553 yyextra->docBlock << *yytext;
7558<DocCopyBlock>"</"{PRE}">" {
7563 yyextra->docBlock << yytext;
7565<DocCopyBlock>"</"{CODE}">" {
7570 yyextra->docBlock << yytext;
7572<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7577 yyextra->docBlock << yytext;
7579<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7584 yyextra->docBlock << yytext;
7586<DocCopyBlock>^{B}*"*"+/{BN}+ {
7587 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7595 yyextra->docBlock << indent;
7598<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7599 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7603 yyextra->docBlock << indent;
7610<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7611 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7615 yyextra->docBlock << indent+
"*";
7622<DocCopyBlock>^{B}*"*"+/{BN}* {
7623 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7626 if (yyextra->nestedComment>0)
7629 yyextra->docBlock << indent+
"*";
7634 yyextra->docBlock << indent;
7642<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7648 yyextra->docBlock << pat;
7650<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7656 yyextra->docBlock << pat;
7658<DocCopyBlock>"```" {
7659 if (yyextra->docBlockName==
"``")
7661 yyextra->docBlock <<
"`";
7663 yyextra->docBlock <<
"``";
7668 yyextra->docBlock << yytext;
7671<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7676 yyextra->docBlock << yytext;
7678<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7683 yyextra->docBlock << yytext;
7685<DocCopyBlock>"`"{1,2} {
7690 yyextra->docBlock << yytext;
7692<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7693 yyextra->docBlock << yytext;
7696 yyextra->docBlock << yytext;
7697 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7701 yyextra->lastStringContext=YY_START;
7702 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7703 yyextra->stopAtInvalidString=
true;
7707<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7710 yyextra->nestedComment++;
7712 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7714 yyextra->nestedComment--;
7716 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7718 warn(yyextra->fileName,yyextra->yyLineNr,
7719 "Found end of C comment inside a '{}' block without matching start of the comment!"
7720 " Maybe the end marker for the block is missing?",
7721 yyextra->docBlockName);
7724 yyextra->docBlock << yytext;
7727 yyextra->docBlock << *yytext;
7731 yyextra->docBlock << *yytext;
7733<DocCopyBlock><<EOF>> {
7734 warn(yyextra->fileName,yyextra->yyLineNr,
7735 "reached end of file while inside a '{}' block!"
7736 " The command that should end the block seems to be missing!",
7737 yyextra->docBlockName);
7744<Prototype>"operator"{B}*"("{B}*")" {
7745 yyextra->current->name+=yytext;
7748 yyextra->current->args+=*yytext;
7749 yyextra->currentArgumentContext = PrototypeQual;
7750 yyextra->fullArgString = yyextra->current->args;
7751 yyextra->copyArgString = &yyextra->current->args;
7752 BEGIN( ReadFuncArgType ) ;
7754<Prototype>"("({ID}"::")*({B}*[&*])+ {
7755 if (yyextra->insidePHP)
7761 yyextra->current->type+=yyextra->current->name+yytext;
7762 yyextra->current->name.clear();
7763 BEGIN( PrototypePtr );
7766<PrototypePtr>{SCOPENAME} {
7767 yyextra->current->name+=yytext;
7770 yyextra->current->args+=*yytext;
7771 yyextra->currentArgumentContext = PrototypeQual;
7772 yyextra->fullArgString = yyextra->current->args;
7773 yyextra->copyArgString = &yyextra->current->args;
7774 BEGIN( ReadFuncArgType ) ;
7777 yyextra->current->type+=
')';
7781 yyextra->current->name+=yytext;
7784 BEGIN( PrototypeSkipLine);
7786<PrototypeQual>{B}*"const"{B}* {
7787 yyextra->current->args +=
" const ";
7788 yyextra->current->argList.setConstSpecifier(
TRUE);
7790<PrototypeQual>{B}*"volatile"{B}* {
7791 yyextra->current->args +=
" volatile ";
7792 yyextra->current->argList.setVolatileSpecifier(
TRUE);
7794<PrototypeQual>{B}*"="{B}*"0"{B}* {
7795 yyextra->current->args +=
" = 0";
7796 yyextra->current->virt = Specifier::Pure;
7797 yyextra->current->argList.setPureSpecifier(
TRUE);
7799<PrototypeQual>"throw"{B}*"(" {
7800 yyextra->current->exception =
"throw(";
7801 BEGIN(PrototypeExc);
7804 yyextra->current->exception +=
')';
7805 BEGIN(PrototypeQual);
7808 yyextra->current->exception += *yytext;
7811 yyextra->current->args += *yytext;
7814 yyextra->current->name += *yytext;
7816<PrototypeSkipLine>. {
7822<SkipCxxComment>.*"\\\n" {
7823 if (yyextra->insideCS)
7832<SkipCxxComment>{ANYopt}/\n {
7833 BEGIN( yyextra->lastCContext ) ;
7835<SkipComment>[^\*\n]+
7840 if (!yyextra->insideCpp) REJECT;
7841 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7842 yyextra->lastC11AttributeContext = YY_START;
7843 BEGIN( SkipC11Attribute );
7848 if (yyextra->insideIDL && yyextra->insideCppQuote)
7852 else if (yyextra->insidePHP)
7854 yyextra->lastStringContext=YY_START;
7859 if (!yyextra->insidePHP)
7861 yyextra->lastCPPContext = YY_START;
7866 yyextra->lastCContext = YY_START ;
7867 BEGIN( SkipCxxComment ) ;
7871 if (!yyextra->insidePHP)
7873 yyextra->lastCContext = YY_START ;
7874 BEGIN( SkipCxxComment ) ;
7877 if (yyextra->insidePHP)
7879 yyextra->lastStringContext=YY_START;
7880 BEGIN(SkipPHPString);
7884 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
7886 if (yyextra->current->type.isEmpty())
7888 if (yyextra->current->name.isEmpty())
7889 yyextra->current->name=
"?";
7891 yyextra->current->name+=
"?";
7895 yyextra->current->type+=
"?";
7899<*>"}" { yyextra->exported=
false; }
7901<SkipComment>{CPPC}|{CCS}
7902<*>{CCS} { yyextra->lastCContext = YY_START ;
7903 BEGIN( SkipComment ) ;
7905<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
7907 yyextra->lastCContext = YY_START ;
7908 BEGIN( SkipCxxComment ) ;
7911 if (yyextra->insideCS && yyextra->fakeNS)
7915 BEGIN ( ReadNSBody);
7927 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7929 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
7931 *buf = yyextra->inputString[yyextra->inputPosition++] ;
7941 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7942 yyextra->outerScopeEntries.clear();
7943 yyextra->baseName.clear();
7944 yyextra->protection = Protection::Public;
7945 yyextra->baseProt = Protection::Public;
7946 yyextra->sharpCount = 0;
7947 yyextra->roundCount = 0;
7948 yyextra->curlyCount = 0;
7949 yyextra->mtype = MethodTypes::Method;
7950 yyextra->isStatic =
FALSE;
7951 yyextra->virt = Specifier::Normal;
7952 yyextra->baseVirt = Specifier::Normal;
7953 yyextra->isTypedef =
FALSE;
7954 yyextra->insideTryBlock =
FALSE;
7955 yyextra->insideFormula =
FALSE;
7956 yyextra->insideCode=
FALSE;
7958 yyextra->previous = 0;
7959 yyextra->firstTypedefEntry.reset();
7960 yyextra->memspecEntry.reset();
7965 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7966 if (yyextra->insideJava)
7968 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
7970 yyextra->current->protection = yyextra->protection;
7971 yyextra->current->exported = yyextra->exported ;
7972 yyextra->current->mtype = yyextra->mtype;
7973 yyextra->current->virt = yyextra->virt;
7974 yyextra->current->isStatic = yyextra->isStatic;
7975 yyextra->current->lang = yyextra->language;
7977 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
7978 yyextra->isTypedef=
FALSE;
7986 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7987 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
7989 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
7995 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
7998 for (p = yytext ; *p ; ++p )
8002 yyextra->yyLineNr++;
8008 yyextra->column+=tabSize - (yyextra->column%tabSize);
8019static inline int computeIndent(
const char *s,
int startIndent)
8021 int col=startIndent;
8027 if (c==
'\t') col+=tabSize-(col%tabSize);
8028 else if (c==
'\n') col=0;
8036 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8037 yyextra->current->protection = yyextra->protection = prot;
8038 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8039 yyextra->current->type.clear();
8040 yyextra->current->name.clear();
8041 yyextra->current->args.clear();
8042 yyextra->current->argList.clear();
8048 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8049 size_t tl=yyextra->current->type.length();
8050 if( tl>0 && !yyextra->current->name.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8052 yyextra->current->type +=
' ' ;
8054 yyextra->current->type += yyextra->current->name;
8055 yyextra->current->name.clear() ;
8056 tl=yyextra->current->type.length();
8057 if( tl>0 && !yyextra->current->args.isEmpty() && yyextra->current->type.at(tl-1)!=
'.')
8059 yyextra->current->type +=
' ' ;
8061 yyextra->current->type += yyextra->current->args ;
8062 yyextra->current->args.clear() ;
8063 yyextra->current->argList.clear();
8070 if (s==
nullptr || *s==0)
return name;
8072 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8084 bool funcPtr = i>0 && type[i-1]==
')';
8086 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8087 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8088 return type.
left(i);
8094 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8097 yyextra->docBlock <<
"\\iskip";
8099 yyextra->docBlockName=blockName;
8100 yyextra->fencedSize=fencedSize;
8101 yyextra->isCodeBlock=codeBlock;
8102 yyextra->nestedComment=0;
8108 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8109 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8113 yyextra->docBlock <<
"\\endiskip";
8115 yyextra->docBlockName=
"";
8136 if (i==-1)
return FALSE;
8146 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8148 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8149 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8150 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8151 yyextra->insideD = yyextra->language==SrcLangExt::D;
8152 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8153 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8154 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8155 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8156 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8157 yyextra->language==SrcLangExt::Lex);
8168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8169 if (yyextra->current_root->section.isScope())
8172 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8174 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8176 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8186 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8187 if (!yyextra->fileName.lower().endsWith(
".c"))
return FALSE;
8188 if (yyextra->current->argList.empty())
return FALSE;
8189 for (
const Argument &a : yyextra->current->argList)
8200 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8201 if (yyextra->insideJava)
8204 yyextra->current->protection = Protection::Public;
8205 if (text.
find(
"protected")!=-1)
8206 yyextra->current->protection = Protection::Protected;
8207 else if (text.
find(
"private")!=-1)
8208 yyextra->current->protection = Protection::Private;
8209 else if (text.
find(
"package")!=-1)
8210 yyextra->current->protection = Protection::Package;
8217 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8218 int si =
static_cast<int>(yyextra->current->args.length());
8219 if (yyextra->oldStyleArgType.isEmpty())
8221 std::string args = yyextra->current->args.str();
8222 static const reg::Ex re(R
"(\([^)]*\).*)");
8228 bi1=(int)match.position();
8229 size_t secondMatchStart = match.position()+match.length();
8232 bi2=(int)match.position();
8236 if (bi1!=-1 && bi2!=-1)
8239 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8241 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8242 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8244 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8245 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8246 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8251 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8254 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8255 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8257 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8258 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8264 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8267 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8271 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8272 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8285 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8288 oldStyleArgPtr=yyextra->current->args.
left(j);
8307 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8308 for (
Argument &a : yyextra->current->argList)
8317 a.
docs=brief+
"\n\n"+docs;
8349 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8352 yyextra->current->briefFile = yyextra->fileName;
8353 yyextra->current->briefLine = yyextra->yyLineNr;
8357 yyextra->current->docFile = yyextra->fileName;
8358 yyextra->current->docLine = yyextra->yyLineNr;
8366 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8367 if (yyextra->tempEntry==0)
8372 yyextra->previous = yyextra->current;
8373 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8377 yyextra->previous = yyextra->current;
8378 yyextra->current = yyextra->tempEntry;
8379 yyextra->tempEntry.reset();
8386 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8389 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8390 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8393 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8394 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8396 docEntry->inbodyFile = yyextra->fileName;
8397 docEntry->inbodyLine = lineNr;
8401 bool needsEntry=
FALSE;
8403 Markdown markdown(yyextra->fileName,lineNr);
8405 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8406 while (yyextra->commentScanner.parseCommentBlock(
8407 yyextra->thisParser,
8408 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8412 yyextra->docBlockInBody ?
FALSE : brief,
8413 yyextra->docBlockInBody ?
FALSE : yyextra->docBlockAutoBrief,
8414 yyextra->docBlockInBody,
8415 yyextra->protection,
8426 QCString docFile = yyextra->current->docFile;
8428 yyextra->current->docFile = docFile;
8429 yyextra->current->docLine = lineNr;
8437 if (yyextra->docBlockTerm)
8439 unput(yyextra->docBlockTerm);
8440 yyextra->docBlockTerm=0;
8447 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8458 QCString orgDoc = yyextra->current->doc;
8459 QCString orgBrief = yyextra->current->brief;
8460 int orgDocLine = yyextra->current->docLine;
8461 int orgBriefLine = yyextra->current->briefLine;
8463 yyextra->current->doc.
clear();
8464 yyextra->current->brief.clear();
8467 int lineNr = orgDocLine;
8469 Markdown markdown(yyextra->fileName,lineNr);
8471 QCString processedDoc =
Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
8472 while (yyextra->commentScanner.parseCommentBlock(
8473 yyextra->thisParser,
8474 yyextra->current.get(),
8481 yyextra->protection,
8490 if (needsEntry)
newEntry(yyscanner);
8496 a.
docs = yyextra->current->doc;
8499 yyextra->current->doc = orgDoc;
8500 yyextra->current->brief = orgBrief;
8501 yyextra->current->docLine = orgDocLine;
8502 yyextra->current->briefLine = orgBriefLine;
8513 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8514 for (
const auto &ce : rt->children())
8516 if (!ce->program.empty())
8520 yyextra->padCount=0;
8522 yyextra->programStr = ce->program.str();
8523 yyextra->inputString = yyextra->programStr.data();
8524 yyextra->inputPosition = 0;
8525 if (ce->section.isEnum() || ce->spec.isEnum())
8526 BEGIN( FindFields ) ;
8528 BEGIN( FindMembers ) ;
8529 yyextra->current_root = ce;
8530 yyextra->fileName = ce->fileName;
8532 yyextra->yyLineNr = ce->bodyLine;
8533 yyextra->yyColNr = ce->bodyColumn;
8534 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8536 yyextra->current = std::make_shared<Entry>();
8537 yyextra->isStatic =
FALSE;
8542 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8544 ce->groups = rt->groups;
8547 int ni=ce->name.findRev(
"::");
if (ni==-1) ni=0;
else ni+=2;
8549 if ( ce->section.isClass() )
8551 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8553 yyextra->current->protection = yyextra->protection = Protection::Public ;
8555 else if (yyextra->insideJava)
8557 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8559 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8561 if (ce->lang==SrcLangExt::ObjC)
8563 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8567 yyextra->current->protection = yyextra->protection = Protection::Public ;
8572 yyextra->current->protection = yyextra->protection = Protection::Private ;
8575 else if (ce->section.isEnum() )
8577 yyextra->current->protection = yyextra->protection = ce->protection;
8579 else if (!ce->name.isEmpty() && ce->name.at(ni)==
'@')
8581 if (ce->section.isNamespace() )
8583 yyextra->current->isStatic = yyextra->isStatic =
TRUE;
8585 yyextra->current->protection = yyextra->protection = ce->protection;
8586 yyextra->current->exported = yyextra->exported =
false;
8588 else if (ce->section.isNamespace() )
8590 yyextra->current->protection = yyextra->protection = Protection::Public ;
8591 yyextra->current->exported = yyextra->exported = ce->exported;
8595 yyextra->current->protection = yyextra->protection = Protection::Public ;
8596 yyextra->current->exported = yyextra->exported =
false;
8598 yyextra->mtype = MethodTypes::Method;
8599 yyextra->virt = Specifier::Normal;
8606 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8608 scannerYYlex(yyscanner);
8611 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8613 yyextra->programStr.clear();
8614 ce->program.str(std::string());
8628 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8629 for (
const auto &ce : rt->children())
8631 if (ce->section.isConcept())
8635 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8637 yyextra->padCount =0;
8639 yyextra->programStr = ce->initializer.str();
8640 yyextra->inputString = yyextra->programStr.data();
8641 yyextra->inputPosition = 0;
8642 yyextra->current_root = ce;
8643 yyextra->fileName = ce->fileName;
8644 yyextra->yyLineNr = ce->bodyLine;
8645 yyextra->yyColNr = ce->bodyColumn;
8646 yyextra->insideObjC =
false;
8647 yyextra->current = std::make_shared<Entry>();
8651 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8653 if (!ce->args.isEmpty())
8655 templArgs=indent+
"template"+ce->args+
"\n";
8657 yyextra->current->initializer.
str(
QCString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8659 yyextra->isStatic =
FALSE;
8661 yyextra->current->section = EntryType::makeConceptCodePart();
8662 yyextra->current->startLine = yyextra->yyLineNr;
8663 BEGIN( FindConceptParts );
8664 scannerYYlex(yyscanner);
8665 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8676 const char *fileBuf,
8677 const std::shared_ptr<Entry> &rt,
8681 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8684 yyextra->inputString = fileBuf;
8685 yyextra->inputPosition = 0;
8686 yyextra->column = 0;
8687 scannerYYrestart(
nullptr,yyscanner);
8690 yyextra->protection = Protection::Public;
8691 yyextra->mtype = MethodTypes::Method;
8692 yyextra->isStatic =
FALSE;
8693 yyextra->exported =
false;
8694 yyextra->virt = Specifier::Normal;
8695 yyextra->current_root = rt;
8696 yyextra->yyLineNr = 1 ;
8697 yyextra->yyBegLineNr = 1;
8698 yyextra->yyBegColNr = 0;
8699 yyextra->anonCount = 0;
8700 yyextra->anonNSCount = 0;
8701 yyextra->fileName = fileName;
8702 yyextra->clangParser = clangParser;
8704 rt->lang = yyextra->language;
8705 msg(
"Parsing file {}...\n",yyextra->fileName);
8707 yyextra->current_root = rt;
8709 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8710 yyextra->current = std::make_shared<Entry>();
8715 yyextra->current->name = yyextra->fileName;
8716 yyextra->current->section = sec;
8717 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8719 yyextra->current->reset();
8721 if ( yyextra->insidePHP )
8723 BEGIN( FindMembersPHP );
8725 else if ( yyextra->insideJava )
8727 yyextra->current->name=
"java::lang";
8728 yyextra->current->fileName = yyextra->fileName;
8729 yyextra->current->section = EntryType::makeUsingDir();
8730 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8732 BEGIN( FindMembers );
8736 BEGIN( FindMembers );
8739 scannerYYlex(yyscanner);
8741 if (YY_START==Comment)
8743 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8747 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8749 yyextra->programStr.clear();
8750 rt->program.str(std::string());
8755 yyextra->anonNSCount++;
8758 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8761 parent->moveToSubEntryAndKeep(child);
8763 yyextra->outerScopeEntries.clear();
8772 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8775 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8778 if (!yyextra->current)
8783 const char *orgInputString;
8784 int orgInputPosition;
8785 YY_BUFFER_STATE orgState;
8788 orgState = YY_CURRENT_BUFFER;
8789 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8790 orgInputString = yyextra->inputString;
8791 orgInputPosition = yyextra->inputPosition;
8794 yyextra->inputString = text.
data();
8795 yyextra->inputPosition = 0;
8796 yyextra->column = 0;
8797 scannerYYrestart(
nullptr, yyscanner);
8799 scannerYYlex(yyscanner);
8801 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8802 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.isEmpty())
8804 yyextra->current->section = EntryType::makeVariableDoc();
8808 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8809 yy_switch_to_buffer(orgState, yyscanner);
8810 yyextra->inputString = orgInputString;
8811 yyextra->inputPosition = orgInputPosition;
8827 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8835 scannerYYlex_destroy(
p->yyscanner);
8839 const char *fileBuf,
8840 const std::shared_ptr<Entry> &root,
8844 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8845 yyextra->thisParser =
this;
8849 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8857 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8858 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8859 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8870#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)
Helper class to process markdown formatted text.
bool endsWith(const char *s) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
#define Config_getInt(name)
#define AUTO_TRACE_ADD(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
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)