15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
23#define yyguts_t scannerYYguts_t
61#define YY_NO_UNISTD_H 1
229static inline size_t computeIndent(
const char *s,
size_t startIndent);
261#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Abstract interface for outline parsers.
Text streaming class that buffers data.
#define lineCount(s, len)
static DString generateAnonymousAnchor(const DString &fileName, int count)
static void startVerbatimBlock(yyscan_t yyscanner, const DString &blockName, size_t fencedSize=0, bool codeBlock=false)
static void storeClangId(yyscan_t yyscanner, const char *id)
static bool endVerbatimBlock(yyscan_t yyscanner, const DString &blockName, size_t fencedSize=0)
static void startCommentBlock(yyscan_t yyscanner, bool)
static void setContext(yyscan_t yyscanner)
static bool startOfRequiresExpression(const DString &req)
static void initParser(yyscan_t yyscanner)
static DString stripFuncPtr(const DString &type)
static bool checkForKnRstyleC(yyscan_t yyscanner)
static void addKnRArgInfo(yyscan_t yyscanner, const DString &type, const DString &name, const DString &brief, const DString &docs)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static void initMethodProtection(yyscan_t yyscanner, Protection prot)
static const char * stateToString(int state)
void fixArgumentListForJavaScript(ArgumentList &al)
static void splitKnRArg(yyscan_t yyscanner, DString &oldStyleArgPtr, DString &oldStyleArgName)
static bool nameIsOperator(DString &name)
static void handleParametersCommentBlocks(yyscan_t yyscanner, ArgumentList &al)
static void prependScope(yyscan_t yyscanner)
static const char * getLexerFILE()
static void setJavaProtection(yyscan_t yyscanner)
static void addType(yyscan_t yyscanner)
static DString stripQuotes(const char *s)
static size_t computeIndent(const char *s, size_t startIndent)
static void handleCommentBlock(yyscan_t yyscanner, const DString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
Some helper functions for std::string.
TextStream * pSkipInterpString
EntryRelations outerScopeEntries
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
DString * pCopyC11AttributeString
TextStream * pCopyCurlyGString
int lastCommentInArgContext
DString * pCopyRoundString
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
std::pair< Entry *, std::shared_ptr< Entry > > EntryRelation
int lastC11AttributeContext
DString * pCopyCurlyString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
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
DString * pCopySharpString
DString * pCopyQuotedString
int lastSkipVerbStringContext
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
std::vector< EntryRelation > EntryRelations
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
276NOTopt (("!"{BNopt})|("not"{BN}+))?
278HEXDIGIT ({DIGIT}|[a-f]|[A-F])
279ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
280SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
281TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
282CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
285CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
286PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
287PHPUSEKW ("public"|"private"|"protected")
288IDLATTR ("["[^\]]*"]"){BN}*
289TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
290RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
291RAWEND ")"[^ \t\(\)\\]{0,16}\"
292ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
293ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
294LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
295BITOP "&"|"|"|"^"|"<<"|">>"|"~"
296OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
297FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
298MODULE_ID ({ID}".")*{ID}
299LINENR {B}*[1-9][0-9]*
300FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
301FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
302FILECHARS {FILEICHAR}*{FILEECHAR}+
303HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
304VFILEMASK {FILECHARS}("."{FILECHARS})*
305FILEMASK {VFILEMASK}|{HFILEMASK}
316DCOMMC ("/\*!"|"/\**")
318DCOMMCPP ("/\/!"|"/\/\/")
320DCOMM {DCOMMC}|{DCOMMCPP}
391%x TryFunctionBlockEnd
406%x SkipInterpVerbString
421%x UNOIDLAttributeBlock
451%x SpecializationSingleQuote
452%x SpecializationDoubleQuote
485%x SliceDictionaryName
516<*>"DEPRECATED_ATTRIBUTE" {
517 if (!yyextra->insideObjC) REJECT;
519<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
520 if (!yyextra->insideObjC) REJECT;
521 yyextra->lastDeprecatedContext=YY_START;
522 yyextra->lastStringContext=Deprecated_round;
525<Deprecated_round>")" {
526 BEGIN(yyextra->lastDeprecatedContext);
528<Deprecated_round>{BNopt} {
531<Deprecated_round>. { }
533 yyextra->curlyCount=0;
534 yyextra->needsSemi =
true;
535 BEGIN(SkipCurlyBlock);
538 yyextra->roundCount=0;
539 BEGIN(SkipRoundBlock);
542 ++yyextra->roundCount;
545 if (yyextra->roundCount )
546 --yyextra->roundCount ;
551 ++yyextra->curlyCount ;
554 if( yyextra->curlyCount )
556 --yyextra->curlyCount ;
558 else if (yyextra->needsSemi)
564 BEGIN( FindMembers );
568 if (yyextra->insidePHP)
570 yyextra->lastStringContext=NextSemi;
571 BEGIN(SkipPHPString);
574<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
576 yyextra->lastStringContext=NextSemi;
581 BEGIN( FindMembers );
585 BEGIN( FindMembers );
588 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
592<FindMembers>"<?php" {
593 yyextra->insidePHP =
true;
595<FindMembersPHP>"<?"("php"?) {
596 BEGIN( FindMembers );
598<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
600 BEGIN( FindMembers );
602<FindMembers>"?>"|"</script>" {
603 if (yyextra->insidePHP)
604 BEGIN( FindMembersPHP );
608<FindMembersPHP>[^\n<]+ {
615<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
620<FindMembers>"%{"[^\n]* {
621 if (!yyextra->insideIDL)
625 if (!yyextra->insideIDL)
628<FindMembers>{B}*("properties"){BN}*":"{BN}* {
630 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
633<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
635 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
638<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
643<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
645 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
648<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
650 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
653<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
655 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
657<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
660<FindMembers>{B}*"internal"{BN}*":"{BN}* {
661 if (yyextra->insideCli)
670<FindMembers>{B}*"protected"{BN}*":"{BN}* {
673<FindMembers>{B}*"private"{BN}*":"{BN}* {
676<FindMembers>{B}*("private"{BN}+"protected"|"protected"{BN}+"private")/{BN} {
677 if (!yyextra->insideCS) REJECT;
680 yyextra->current->protection = Protection::Package;
682<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
683 if (!yyextra->insideCpp) REJECT;
687<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
688 if (!yyextra->insideCpp) REJECT;
692<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
693 if (!yyextra->insideCpp) REJECT;
705<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
706<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
707 BEGIN( SkipComment ) ;
709<CppProt>("slots"|"Q_SLOTS") {
710 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
712<FindMembers>{B}*"event"{BN}+ {
713 if (yyextra->insideCli)
717 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
718 yyextra->current->bodyLine = yyextra->yyLineNr;
719 yyextra->current->bodyColumn = yyextra->yyColNr;
720 yyextra->curlyCount=0;
721 BEGIN( CliPropertyType );
723 else if (yyextra->insideCS)
726 yyextra->current->mtype = MethodTypes::Event;
727 yyextra->current->bodyLine = yyextra->yyLineNr;
728 yyextra->current->bodyColumn = yyextra->yyColNr;
735<FindMembers>{B}*"property"{BN}+ {
736 if (yyextra->insideCli)
740 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
741 yyextra->current->bodyLine = yyextra->yyLineNr;
742 yyextra->current->bodyColumn = yyextra->yyColNr;
743 yyextra->curlyCount=0;
744 BEGIN( CliPropertyType );
751<CliPropertyType>{ID} {
753 yyextra->current->name = yytext;
755<CliPropertyType>"[" {
756 yyextra->current->args =
"[";
757 BEGIN( CliPropertyIndex );
759<CliPropertyType>"{" {
760 yyextra->curlyCount=0;
762 BEGIN( CSAccessorDecl );
764<CliPropertyType>";" {
766 BEGIN( FindMembers );
771<CliPropertyType>{B}* {
775 yyextra->current->type += yytext;
777<CliPropertyIndex>"]" {
778 BEGIN( CliPropertyType );
779 yyextra->current->args+=yytext;
782 yyextra->current->args+=yytext;
797<FindMembers>{B}*"@private"{BN}+ {
800<FindMembers>{B}*"@protected"{BN}+ {
803<FindMembers>{B}*"@public"{BN}+ {
806<FindMembers>[\-+]{BN}* {
807 if (!yyextra->insideObjC)
813 yyextra->current->fileName = yyextra->fileName;
814 yyextra->current->startLine = yyextra->yyLineNr;
815 yyextra->current->startColumn = yyextra->yyColNr;
816 yyextra->current->bodyLine = yyextra->yyLineNr;
817 yyextra->current->bodyColumn = yyextra->yyColNr;
818 yyextra->current->section = EntryType::makeFunction();
819 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
820 yyextra->insideObjC =
true;
821 yyextra->yyBegColNr = yyextra->yyColNr;
822 yyextra->yyBegLineNr = yyextra->yyLineNr;
823 yyextra->current->virt = Specifier::Virtual;
825 yyextra->current->isStatic=yytext[0]==
'+';
831 BEGIN( ObjCReturnType );
832 yyextra->current->type.clear();
833 yyextra->roundCount=0;
836 if (yyextra->current->type.empty())
838 yyextra->current->type +=
"id";
840 yyextra->current->name = yytext;
844 yyextra->current->name +=
':';
846 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
849<ObjCReturnType>[^()]* {
850 yyextra->current->type += yytext;
852<ObjCReturnType>"(^)(" {
853 yyextra->current->type += yytext;
854 yyextra->roundCount++;
857 yyextra->current->type += yytext;
858 yyextra->roundCount++;
861 if (yyextra->roundCount<=0)
867 yyextra->current->type += yytext;
868 yyextra->roundCount--;
871<ObjCParams>({ID})?{BN}*":" {
876 yyextra->current->name +=
" :";
880 yyextra->current->name += keyw+
":";
882 if (yyextra->current->argList.back().type.empty())
884 yyextra->current->argList.back().type=
"id";
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
890<ObjCParams>{ID}{BN}* {
894<ObjCParams>","{BN}*"..." {
909 yyextra->roundCount=0;
910 yyextra->current->argList.back().type.clear();
911 BEGIN( ObjCParamType );
914 yyextra->roundCount++;
915 yyextra->current->argList.back().type+=yytext;
917<ObjCParamType>")"/{B}* {
918 if (yyextra->roundCount<=0)
924 yyextra->current->argList.back().type+=yytext;
925 yyextra->roundCount--;
928<ObjCParamType>[^()]* {
931<ObjCMethod,ObjCParams>";" {
932 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
934 yyextra->current->argList.back().type=
"id";
936 if (yyextra->current->argList.empty())
938 yyextra->current->argList.setNoParameters(
true);
DString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
945<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
950 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
952 yyextra->current->argList.back().type=
"id";
954 if (yyextra->current->argList.empty())
956 yyextra->current->argList.setNoParameters(
true);
962<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
963 if (yyextra->insideSlice)
966 yyextra->current->bodyLine = yyextra->yyLineNr;
967 yyextra->current->bodyColumn = yyextra->yyColNr;
968 yyextra->current->fileName = yyextra->fileName ;
969 yyextra->current->startLine = yyextra->yyLineNr ;
970 yyextra->current->startColumn = yyextra->yyColNr;
971 yyextra->current->args.clear();
972 yyextra->current->section = EntryType::makeTypedef();
973 yyextra->isTypedef =
true;
974 BEGIN( SliceSequence );
979<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
980 if (yyextra->insideSlice)
983 yyextra->current->bodyLine = yyextra->yyLineNr;
984 yyextra->current->bodyColumn = yyextra->yyColNr;
985 yyextra->current->fileName = yyextra->fileName ;
986 yyextra->current->startLine = yyextra->yyLineNr ;
987 yyextra->current->startColumn = yyextra->yyColNr;
988 yyextra->current->args.clear();
989 yyextra->current->section = EntryType::makeTypedef() ;
990 yyextra->isTypedef =
true;
991 BEGIN( SliceDictionary );
996<FindMembers>{BN}{1,80} {
999<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
1000 if (yyextra->insideJava)
1003 yyextra->lastSkipRoundContext = YY_START;
1004 yyextra->roundCount=0;
1009 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1010 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1011 yyextra->current->protection = Protection::Public ;
1013 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
1020<ObjCPropAttr>"getter="{ID} {
1021 yyextra->current->read = yytext+7;
1023<ObjCPropAttr>"setter="{ID} {
1024 yyextra->current->write = yytext+7;
1026<ObjCPropAttr>"readonly" {
1027 yyextra->current->spec.setWritable(
false);
1029<ObjCPropAttr>"readwrite" {
1031<ObjCPropAttr>"assign" {
1033<ObjCPropAttr>"unsafe_unretained" {
1034 yyextra->current->spec.setAssign(
false);
1035 yyextra->current->spec.setUnretained(
true);
1037<ObjCPropAttr>"retain" {
1038 yyextra->current->spec.setAssign(
false);
1039 yyextra->current->spec.setRetain(
true);
1041<ObjCPropAttr>"copy" {
1042 yyextra->current->spec.setAssign(
false);
1043 yyextra->current->spec.setCopy(
true);
1045<ObjCPropAttr>"weak" {
1046 yyextra->current->spec.setAssign(
false);
1047 yyextra->current->spec.setWeak(
true);
1049<ObjCPropAttr>"strong" {
1050 yyextra->current->spec.setAssign(
false);
1051 yyextra->current->spec.setStrong(
true);
1053<ObjCPropAttr>"nonatomic" {
1054 yyextra->current->spec.setNonAtomic(
true);
1059<FindMembers>"@"{ID}("."{ID})+ {
1060 if (yyextra->insideJava)
1069<FindMembers>"@"{ID} {
1070 if (yyextra->insideJava)
1074 else if (
dstrcmp(yytext,
"@property")==0)
1076 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1077 yyextra->current->spec.setWritable(
true).setReadable(
true);
1078 yyextra->current->protection = Protection::Public ;
1080 else if (
dstrcmp(yytext,
"@synthesize")==0)
1082 BEGIN( ObjCSkipStatement );
1084 else if (
dstrcmp(yytext,
"@dynamic")==0)
1086 BEGIN( ObjCSkipStatement );
int dstrcmp(const char *str1, const char *str2)
1093<ObjCSkipStatement>";" {
1096<PackageName>{ID}(("."|"\\"){ID})* {
1097 yyextra->isTypedef=
false;
1099 yyextra->current->name = yytext;
1100 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1101 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1102 yyextra->current->section = EntryType::makeNamespace();
1103 yyextra->current->type =
"namespace" ;
1104 yyextra->current->fileName = yyextra->fileName;
1105 yyextra->current->startLine = yyextra->yyLineNr;
1106 yyextra->current->startColumn = yyextra->yyColNr;
1107 yyextra->current->bodyLine = yyextra->yyLineNr;
1108 yyextra->current->bodyColumn = yyextra->yyColNr;
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
1112 std::shared_ptr<Entry> tmp = yyextra->current;
1113 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1114 yyextra->current_root = std::move(tmp);
1119 yyextra->curlyCount=0;
1120 BEGIN( ReadNSBody );
1122<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1123 if (!yyextra->insideCpp) REJECT;
1125 yyextra->current->exported =
true;
1127 BEGIN( ModuleName );
1129<FindMembers>{B}*"module"{BN}*";" {
1130 if (!yyextra->insideCpp) REJECT;
1131 if (!yyextra->current->type.empty() || !yyextra->current->name.empty()) REJECT;
1134 BEGIN( FindMembers );
1136<FindMembers>{B}*"module"{BN}+ {
1137 if (!yyextra->insideCpp) REJECT;
1139 yyextra->current->exported =
false;
1141 BEGIN( ModuleName );
1143<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1144 if (!yyextra->insideCpp) REJECT;
1145 yyextra->current->exported =
true;
1147 BEGIN( ModuleImport );
1149<FindMembers>{B}*"import"{BN}+ {
1150 if (!yyextra->insideCpp) REJECT;
1152 BEGIN( ModuleImport );
1154<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1156 size_t i =
name.find(
':');
1157 DString partition =
name.mid(i+1).stripWhiteSpace();
1158 name =
name.left(i).stripWhiteSpace();
1162 yyextra->current->exported,
1165 yyextra->current->section = EntryType::makeModuleDoc();
1166 yyextra->isTypedef=
false;
1168 yyextra->current->type +=
" module";
1169 yyextra->current->fileName = yyextra->fileName;
1170 yyextra->current->startLine = yyextra->yyLineNr;
1171 yyextra->current->startColumn = yyextra->yyColNr;
1172 yyextra->current->bodyLine = yyextra->yyLineNr;
1173 yyextra->current->bodyColumn = yyextra->yyColNr;
1174 yyextra->current->name =
name+
":"+partition;
void createModuleDef(const DString &fileName, int line, size_t column, bool exported, const DString &moduleName, const DString &partitionName=DString())
static ModuleManager & instance()
const char * name(int level)
1177<ModuleName>{MODULE_ID} {
1181 yyextra->current->exported,
1183 yyextra->current->section = EntryType::makeModuleDoc();
1184 yyextra->isTypedef=
false;
1186 yyextra->current->type +=
" module";
1187 yyextra->current->fileName = yyextra->fileName;
1188 yyextra->current->startLine = yyextra->yyLineNr;
1189 yyextra->current->startColumn = yyextra->yyColNr;
1190 yyextra->current->bodyLine = yyextra->yyLineNr;
1191 yyextra->current->bodyColumn = yyextra->yyColNr;
1192 yyextra->current->name = yytext;
1195<ModuleName>":"{BN}+"private" {
1196 yyextra->current->exported = yyextra->exported =
false;
1199<ModuleName>";" { unput(
';');
1204<ModuleImport>"\""[^"\n]*"\"" {
1207 DString(yytext).mid(1,yyleng-2),
void addHeader(const DString &moduleFile, int line, const DString &headerName, bool isSystem)
1210<ModuleImport>"<"[^>\n]*">" {
1213 DString(yytext).mid(1,yyleng-2),
1216<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1218 size_t i =
name.find(
':');
1219 DString partition =
name.mid(i+1).stripWhiteSpace();
1220 name =
name.left(i).stripWhiteSpace();
1224 yyextra->current->exported,
void addImport(const DString &moduleFile, int line, const DString &importName, bool isExported, const DString &partitionName=DString())
1228<ModuleImport>{MODULE_ID} {
1232 yyextra->current->exported);
1235<ModuleImport>";" { BEGIN(FindMembers); }
1236<ModuleImport>\n {
lineCount(yyscanner); }
1238<FindMembers>{B}*"export"{BN}+"{" {
1239 yyextra->current->exported = yyextra->exported =
true;
1241<FindMembers>{B}*"export"{BN}+ {
1242 if (!yyextra->insideCpp) REJECT;
1243 yyextra->current->exported=
true;
1245<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1246 yyextra->current->type +=
" initonly ";
1247 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1250<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1251 yyextra->current->isStatic =
true;
1254<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1255 yyextra->current->isStatic =
true;
1258<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1259 yyextra->current->isStatic =
false;
1260 yyextra->current->explicitExternal =
true;
1263<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1265 yyextra->current->type +=
" const ";
1266 if (yyextra->insideCS) yyextra->current->isStatic =
true;
1274<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1275 yyextra->current->type +=
" virtual ";
1276 yyextra->current->virt = Specifier::Virtual;
1279<FindMembers>{B}*"constexpr"{BN}+ {
1280 if (yyextra->insideCpp)
1282 yyextra->current->spec.setConstExpr(
true);
1286<FindMembers>{B}*"consteval"{BN}+ {
1287 if (yyextra->insideCpp)
1289 yyextra->current->spec.setConstEval(
true);
1293<FindMembers>{B}*"constinit"{BN}+ {
1294 if (yyextra->insideCpp)
1296 yyextra->current->spec.setConstInit(
true);
1300<FindMembers>{B}*"published"{BN}+ {
1301 if (yyextra->insideIDL)
1304 yyextra->current->spec.setPublished(
true);
1311<FindMembers>{B}*"sealed"{BN}+ {
1312 if (yyextra->insideCS)
1314 yyextra->current->spec.setSealed(
true);
1321<FindMembers>{B}*"abstract"{BN}+ {
1322 if (yyextra->insidePHP || yyextra->insideCS)
1324 yyextra->current->spec.setAbstract(
true);
1328 if (yyextra->insideCpp) REJECT;
1329 yyextra->current->type +=
" abstract ";
1330 if (!yyextra->insideJava)
1332 yyextra->current->virt = Specifier::Pure;
1336 yyextra->current->spec.setAbstract(
true);
1341<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1342 yyextra->current->spec.setInline(
true);
1345<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1346 yyextra->current->spec.setMutable(
true);
1349<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1350 yyextra->current->spec.setThreadLocal(
true);
1353<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1354 yyextra->current->spec.setExplicit(
true);
1357<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1358 yyextra->current->spec.setLocal(
true);
1361<FindMembers>{B}*"@required"{BN}+ {
1362 yyextra->current->spec.setOptional(
false).setRequired(
true);
1365<FindMembers>{B}*"@optional"{BN}+ {
1366 yyextra->current->spec.setRequired(
false).setOptional(
true);
1374<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1375<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1376 yyextra->isTypedef=
false;
1377 yyextra->current->section = EntryType::makeNamespace();
1378 yyextra->current->type =
"namespace" ;
1379 yyextra->current->fileName = yyextra->fileName;
1380 yyextra->current->startLine = yyextra->yyLineNr;
1381 yyextra->current->startColumn = yyextra->yyColNr;
1382 yyextra->current->bodyLine = yyextra->yyLineNr;
1383 yyextra->current->bodyColumn = yyextra->yyColNr;
1385 if (yyextra->insidePHP)
1387 BEGIN( PackageName );
1391 BEGIN( CompoundName );
1394<FindMembers>{B}*"module"{BN}+ {
1396 if (yyextra->insideIDL || yyextra->insideSlice)
1398 yyextra->isTypedef=
false;
1399 yyextra->current->section = EntryType::makeNamespace();
1400 yyextra->current->type =
"module" ;
1401 yyextra->current->fileName = yyextra->fileName;
1402 yyextra->current->startLine = yyextra->yyLineNr;
1403 yyextra->current->startColumn = yyextra->yyColNr;
1404 yyextra->current->bodyLine = yyextra->yyLineNr;
1405 yyextra->current->bodyColumn = yyextra->yyColNr;
1406 BEGIN( CompoundName );
1408 else if (yyextra->insideD)
1419<FindMembers>{B}*"library"{BN}+ {
1421 if (yyextra->insideIDL)
1423 yyextra->isTypedef=
false;
1424 yyextra->current->section = EntryType::makeNamespace();
1425 yyextra->current->type =
"library" ;
1426 yyextra->current->fileName = yyextra->fileName;
1427 yyextra->current->startLine = yyextra->yyLineNr;
1428 yyextra->current->startColumn = yyextra->yyColNr;
1429 yyextra->current->bodyLine = yyextra->yyLineNr;
1430 yyextra->current->bodyColumn = yyextra->yyColNr;
1431 BEGIN( CompoundName );
1439<FindMembers>{B}*"constants"{BN}+ {
1441 if (yyextra->insideIDL)
1443 yyextra->isTypedef=
false;
1444 yyextra->current->section = EntryType::makeNamespace();
1445 yyextra->current->type =
"constants";
1446 yyextra->current->fileName = yyextra->fileName;
1447 yyextra->current->startLine = yyextra->yyLineNr;
1448 yyextra->current->startColumn = yyextra->yyColNr;
1449 yyextra->current->bodyLine = yyextra->yyLineNr;
1450 yyextra->current->bodyColumn = yyextra->yyColNr;
1451 BEGIN( CompoundName );
1459<FindMembers>{BN}*("service"){BN}+ {
1461 if (yyextra->insideIDL)
1463 yyextra->isTypedef=
false;
1464 yyextra->current->section = EntryType::makeClass();
1468 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1470 yyextra->current->type +=
" service " ;
1471 yyextra->current->fileName = yyextra->fileName;
1472 yyextra->current->startLine = yyextra->yyLineNr;
1473 yyextra->current->bodyLine = yyextra->yyLineNr;
1474 yyextra->current->bodyColumn = yyextra->yyColNr;
1475 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1483<FindMembers>{BN}*("singleton"){BN}+ {
1485 if (yyextra->insideIDL)
1487 yyextra->isTypedef=
false;
1488 yyextra->current->section = EntryType::makeClass();
1490 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1491 setPublished(spec.isPublished());
1493 yyextra->current->type +=
" singleton " ;
1494 yyextra->current->fileName = yyextra->fileName;
1495 yyextra->current->startLine = yyextra->yyLineNr;
1496 yyextra->current->bodyLine = yyextra->yyLineNr;
1497 yyextra->current->bodyColumn = yyextra->yyColNr;
1498 BEGIN( CompoundName );
1506<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1508 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1510 yyextra->isTypedef=
false;
1511 yyextra->current->section = EntryType::makeClass();
1513 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1515 setOptional(spec.isOptional()).
1516 setPublished(spec.isPublished()).
1517 setLocal(spec.isLocal());
1519 yyextra->current->type +=
" interface" ;
1520 yyextra->current->fileName = yyextra->fileName;
1521 yyextra->current->startLine = yyextra->yyLineNr;
1522 yyextra->current->startColumn = yyextra->yyColNr;
1523 yyextra->current->bodyLine = yyextra->yyLineNr;
1524 yyextra->current->bodyColumn = yyextra->yyColNr;
1526 BEGIN( CompoundName );
1534<FindMembers>{B}*"@implementation"{BN}+ {
1536 yyextra->isTypedef=
false;
1537 yyextra->current->section = EntryType::makeObjcImpl();
1538 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1539 yyextra->insideObjC =
true;
1540 yyextra->current->protection = yyextra->protection = Protection::Public ;
1542 yyextra->current->type +=
" implementation" ;
1543 yyextra->current->fileName = yyextra->fileName;
1544 yyextra->current->startLine = yyextra->yyLineNr;
1545 yyextra->current->bodyLine = yyextra->yyLineNr;
1546 yyextra->current->bodyColumn = yyextra->yyColNr;
1547 BEGIN( CompoundName );
1549<FindMembers>{B}*"@interface"{BN}+ {
1551 yyextra->isTypedef=
false;
1552 yyextra->current->section = EntryType::makeClass();
1553 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1554 if (!yyextra->insideJava)
1556 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1557 yyextra->insideObjC =
true;
1559 yyextra->current->protection = yyextra->protection = Protection::Public ;
1561 yyextra->current->type +=
" interface" ;
1562 yyextra->current->fileName = yyextra->fileName;
1563 yyextra->current->startLine = yyextra->yyLineNr;
1564 yyextra->current->startColumn = yyextra->yyColNr;
1565 yyextra->current->bodyLine = yyextra->yyLineNr;
1566 yyextra->current->bodyColumn = yyextra->yyColNr;
1567 BEGIN( CompoundName );
1569<FindMembers>{B}*"@protocol"{BN}+ {
1571 yyextra->isTypedef=
false;
1572 yyextra->current->section = EntryType::makeClass();
1574 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1575 yyextra->insideObjC =
true;
1576 yyextra->current->protection = yyextra->protection = Protection::Public ;
1578 yyextra->current->type +=
" protocol" ;
1579 yyextra->current->fileName = yyextra->fileName;
1580 yyextra->current->startLine = yyextra->yyLineNr;
1581 yyextra->current->startColumn = yyextra->yyColNr;
1582 yyextra->current->bodyLine = yyextra->yyLineNr;
1583 yyextra->current->bodyColumn = yyextra->yyColNr;
1584 BEGIN( CompoundName );
1586<FindMembers>{B}*"exception"{BN}+ {
1587 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1588 yyextra->isTypedef=
false;
1589 yyextra->current->section = EntryType::makeClass();
1592 yyextra->current->spec =
TypeSpecifier().setException(
true).
1593 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1595 yyextra->current->type +=
" exception" ;
1596 yyextra->current->fileName = yyextra->fileName;
1597 yyextra->current->startLine = yyextra->yyLineNr;
1598 yyextra->current->startColumn = yyextra->yyColNr;
1599 yyextra->current->bodyLine = yyextra->yyLineNr;
1600 yyextra->current->bodyColumn = yyextra->yyColNr;
1602 BEGIN( CompoundName );
1604<FindMembers>"@class" |
1605<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1606<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1611 yyextra->current->section = EntryType::makeClass();
1613 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1616 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1618 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1620 yyextra->current->spec.setLocal(
true);
1624 yyextra->current->type +=
" const";
1626 else if (isVolatile)
1628 yyextra->current->type +=
" volatile";
1630 yyextra->current->type +=
" class" ;
1631 yyextra->current->fileName = yyextra->fileName;
1632 yyextra->current->startLine = yyextra->yyLineNr;
1633 yyextra->current->startColumn = yyextra->yyColNr;
1634 yyextra->current->bodyLine = yyextra->yyLineNr;
1635 yyextra->current->bodyColumn = yyextra->yyColNr;
1638 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1639 yyextra->insideObjC =
true;
1642 if (yytext[yyleng-1]==
'{') unput(
'{');
1643 BEGIN( CompoundName ) ;
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
size_t find(char c, size_t pos=0) const
1645<FindMembers>{B}*"value class{" |
1646<FindMembers>{B}*"value class"{BN}+ {
1647 yyextra->isTypedef=
false;
1648 yyextra->current->section = EntryType::makeClass();
1651 yyextra->current->type +=
" value class" ;
1652 yyextra->current->fileName = yyextra->fileName;
1653 yyextra->current->startLine = yyextra->yyLineNr;
1654 yyextra->current->startColumn = yyextra->yyColNr;
1655 yyextra->current->bodyLine = yyextra->yyLineNr;
1656 yyextra->current->bodyColumn = yyextra->yyColNr;
1658 if (yytext[yyleng-1]==
'{') unput(
'{');
1659 BEGIN( CompoundName ) ;
1661<FindMembers>{B}*"ref class{" |
1662<FindMembers>{B}*"ref class"{BN}+ {
1663 yyextra->isTypedef=
false;
1664 yyextra->current->section = EntryType::makeClass();
1667 yyextra->current->type +=
" ref class" ;
1668 yyextra->current->fileName = yyextra->fileName;
1669 yyextra->current->startLine = yyextra->yyLineNr;
1670 yyextra->current->startColumn = yyextra->yyColNr;
1671 yyextra->current->bodyLine = yyextra->yyLineNr;
1672 yyextra->current->bodyColumn = yyextra->yyColNr;
1674 if (yytext[yyleng-1]==
'{') unput(
'{');
1675 BEGIN( CompoundName ) ;
1677<FindMembers>{B}*"interface class{" |
1678<FindMembers>{B}*"interface class"{BN}+ {
1679 yyextra->isTypedef=
false;
1680 yyextra->current->section = EntryType::makeClass();
1681 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1683 yyextra->current->type +=
" interface class" ;
1684 yyextra->current->fileName = yyextra->fileName;
1685 yyextra->current->startLine = yyextra->yyLineNr;
1686 yyextra->current->startColumn = yyextra->yyColNr;
1687 yyextra->current->bodyLine = yyextra->yyLineNr;
1688 yyextra->current->bodyColumn = yyextra->yyColNr;
1690 if (yytext[yyleng-1]==
'{') unput(
'{');
1691 BEGIN( CompoundName ) ;
1693<FindMembers>{B}*"coclass"{BN}+ {
1694 if (yyextra->insideIDL)
1696 yyextra->isTypedef=
false;
1697 yyextra->current->section = EntryType::makeClass();
1699 yyextra->current->type +=
" coclass" ;
1700 yyextra->current->fileName = yyextra->fileName;
1701 yyextra->current->startLine = yyextra->yyLineNr;
1702 yyextra->current->startColumn = yyextra->yyColNr;
1703 yyextra->current->bodyLine = yyextra->yyLineNr;
1704 yyextra->current->bodyColumn = yyextra->yyColNr;
1706 BEGIN( CompoundName ) ;
1711 yyextra->current->name = yytext;
1712 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1716<FindMembers>{B}*{TYPEDEFPREFIX}"record"{BN}* |
1717<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1718<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1731 yyextra->current->section = EntryType::makeClass() ;
1737 setPublished(spec.isPublished()).
1738 setInline(spec.isInline()).
1739 setLocal(spec.isLocal());
1745 setPublished(spec.isPublished()).
1746 setInline(spec.isInline()).
1747 setLocal(spec.isLocal());
1754 yyextra->current->type +=
" const";
1756 else if (isVolatile)
1758 yyextra->current->type +=
" volatile";
1760 yyextra->current->type +=
" struct" ;
1762 yyextra->current->fileName = yyextra->fileName;
1763 yyextra->current->startLine = yyextra->yyLineNr;
1764 yyextra->current->startColumn = yyextra->yyColNr;
1765 yyextra->current->bodyLine = yyextra->yyLineNr;
1766 yyextra->current->bodyColumn = yyextra->yyColNr;
1768 if (yytext[yyleng-1]==
'{') unput(
'{');
1769 BEGIN( CompoundName ) ;
1771<FindMembers>{B}*"value struct{" |
1772<FindMembers>{B}*"value struct"{BN}+ {
1773 yyextra->isTypedef=
false;
1774 yyextra->current->section = EntryType::makeClass();
1775 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1777 yyextra->current->type +=
" value struct" ;
1778 yyextra->current->fileName = yyextra->fileName;
1779 yyextra->current->startLine = yyextra->yyLineNr;
1780 yyextra->current->startColumn = yyextra->yyColNr;
1781 yyextra->current->bodyLine = yyextra->yyLineNr;
1782 yyextra->current->bodyColumn = yyextra->yyColNr;
1784 if (yytext[yyleng-1]==
'{') unput(
'{');
1785 BEGIN( CompoundName ) ;
1787<FindMembers>{B}*"ref struct{" |
1788<FindMembers>{B}*"ref struct"{BN}+ {
1789 yyextra->isTypedef=
false;
1790 yyextra->current->section = EntryType::makeClass();
1791 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1793 yyextra->current->type +=
" ref struct" ;
1794 yyextra->current->fileName = yyextra->fileName;
1795 yyextra->current->startLine = yyextra->yyLineNr;
1796 yyextra->current->startColumn = yyextra->yyColNr;
1797 yyextra->current->bodyLine = yyextra->yyLineNr;
1798 yyextra->current->bodyColumn = yyextra->yyColNr;
1800 if (yytext[yyleng-1]==
'{') unput(
'{');
1801 BEGIN( CompoundName ) ;
1803<FindMembers>{B}*"interface struct{" |
1804<FindMembers>{B}*"interface struct"{BN}+ {
1805 yyextra->isTypedef=
false;
1806 yyextra->current->section = EntryType::makeClass();
1807 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1809 yyextra->current->type +=
" interface struct";
1810 yyextra->current->fileName = yyextra->fileName;
1811 yyextra->current->startLine = yyextra->yyLineNr;
1812 yyextra->current->startColumn = yyextra->yyColNr;
1813 yyextra->current->bodyLine = yyextra->yyLineNr;
1814 yyextra->current->bodyColumn = yyextra->yyColNr;
1816 if (yytext[yyleng-1]==
'{') unput(
'{');
1817 BEGIN( CompoundName ) ;
1819<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1820<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1821 if (yyextra->insideJava) REJECT;
1826 yyextra->current->section = EntryType::makeClass();
1833 yyextra->current->type +=
" const";
1835 else if (isVolatile)
1837 yyextra->current->type +=
" volatile";
1839 yyextra->current->type +=
" union" ;
1840 yyextra->current->fileName = yyextra->fileName;
1841 yyextra->current->startLine = yyextra->yyLineNr;
1842 yyextra->current->startColumn = yyextra->yyColNr;
1843 yyextra->current->bodyLine = yyextra->yyLineNr;
1844 yyextra->current->bodyColumn = yyextra->yyColNr;
1846 if (yytext[yyleng-1]==
'{') unput(
'{');
1847 BEGIN( CompoundName ) ;
1849<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1850<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1855 if (yyextra->insideJava)
1857 yyextra->current->section = EntryType::makeClass();
1863 yyextra->current->section = EntryType::makeEnum() ;
1866 yyextra->current->type +=
" enum";
1869 yyextra->current->spec.setStrong(
true);
1873 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1875 yyextra->current->fileName = yyextra->fileName;
1876 yyextra->current->startLine = yyextra->yyLineNr;
1877 yyextra->current->startColumn = yyextra->yyColNr;
1878 yyextra->current->bodyLine = yyextra->yyLineNr;
1879 yyextra->current->bodyColumn = yyextra->yyColNr;
1881 if (yytext[yyleng-1]==
'{') unput(
'{');
1882 BEGIN( CompoundName ) ;
1884<FindMembers>{B}*"concept"{BN}+ {
1885 if (yyextra->insideJava) REJECT;
1886 yyextra->isTypedef=
false;
1887 yyextra->current->section = EntryType::makeConcept();
1889 yyextra->current->type +=
" concept";
1890 yyextra->current->fileName = yyextra->fileName;
1891 yyextra->current->startLine = yyextra->yyLineNr;
1892 yyextra->current->startColumn = yyextra->yyColNr;
1893 yyextra->current->bodyLine = yyextra->yyLineNr;
1894 yyextra->current->bodyColumn = yyextra->yyColNr;
1895 yyextra->current->args = yyextra->fullArgString;
1896 yyextra->keepComment =
true;
1898 BEGIN( ConceptName ) ;
1900<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1902 yyextra->current->name +=
"()";
1903 BEGIN( FindMembers );
1905<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1907 yyextra->current->name += yytext ;
1908 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1909 BEGIN( FindMembers ) ;
1911<Operator>"("{BN}*")"{BNopt}/"(" {
1913 yyextra->current->name += yytext ;
1914 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1915 BEGIN( FindMembers ) ;
1919 BEGIN( FindMembers ) ;
1923 yyextra->current->name += *yytext ;
1925<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1926 if (!yyextra->current->type.startsWith(
"friend "))
1928 yyextra->current->name += yytext;
1932 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1934 BEGIN( FindMembers ) ;
1936<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1939 yyextra->current->tArgLists.
push_back(al);
1940 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1941 yyextra->templateStr=
"<";
1942 yyextra->fullArgString = yyextra->templateStr;
1943 yyextra->copyArgString = &yyextra->templateStr;
1944 yyextra->currentArgumentContext = FindMembers;
1945 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1947<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1948 if (yyextra->insideJava) REJECT;
1950 BEGIN( NSAliasName );
1953 yyextra->aliasName = yytext;
1954 BEGIN( NSAliasArg );
1956<NSAliasArg>({ID}"::")*{ID} {
1958 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1969 BEGIN( FindMembers );
1971<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1973 yyextra->aliasName=yytext;
1976<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1980 yyextra->current->fileName = yyextra->fileName;
1982 yyextra->current->section = EntryType::makeUsingDecl();
1983 yyextra->current_root->copyToSubEntry(yyextra->current);
1985 yyextra->current->section = EntryType::makeUsingDir();
1986 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1988 yyextra->aliasName.clear();
DString removeRedundantWhiteSpace(const DString &s)
1990<PHPUseAs>{BN}+"as"{BN}+ {
1993<PHPUseAs>{PHPUSEKW} {
1997 if (!yyextra->aliasName.empty())
2002 yyextra->aliasName.clear();
const std::string & str() const
2004<PHPUse,PHPUseAs>[,;] {
2014<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
2018 yyextra->current->fileName = yyextra->fileName;
2025 yyextra->current->section = EntryType::makeUsingDir();
2026 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
static FileNameLinkedMap * inputNameLinkedMap
A model of a file symbol.
virtual void addIncludeDependency(const FileDef *fd, const DString &incName, IncludeKind kind)=0
FileDef * findFileDef(const DString &n, bool &ambig) const
Returns the file definition in fnMap that matches the file name n.
2030<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2034 yyextra->current->fileName = yyextra->fileName;
2046 if (yyextra->insideD)
2048 yyextra->current->section = EntryType::makeUsingDir();
2053 yyextra->current->section = EntryType::makeUsingDecl();
2055 yyextra->previous = yyextra->current;
2056 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual const DString & docName() const =0
virtual void addIncludedByDependency(const FileDef *fd, const DString &incName, IncludeKind kind)=0
2060<IDLImport>"\""[^"]*"\"" {
2061 DString fileName(&yytext[1],yyleng-2);
2077<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2078 if (yyextra->insideJava) REJECT;
2079 yyextra->current->startLine=yyextra->yyLineNr;
2080 yyextra->current->startColumn = yyextra->yyColNr;
2084<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2085<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2087 yyextra->current->name=yytext;
2088 yyextra->current->fileName = yyextra->fileName;
2089 yyextra->current->section = EntryType::makeUsingDecl();
2090 yyextra->current->startLine = yyextra->yyLineNr;
2091 yyextra->usingNewVarNeeded =
true;
2092 if (yyextra->insideCS)
2097 yyextra->current->name=yytext;
2098 yyextra->current->fileName = yyextra->fileName;
2099 yyextra->current->startLine = yyextra->yyLineNr;
2100 yyextra->current->startColumn = yyextra->yyColNr;
2101 yyextra->current->section = EntryType::makeUsingDir();
2102 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2107<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2109 yyextra->current->fileName = yyextra->fileName;
2110 yyextra->current->section = EntryType::makeUsingDecl();
2111 yyextra->current->startLine = yyextra->yyLineNr;
2112 yyextra->current->bodyLine = yyextra->yyLineNr;
2113 yyextra->current->bodyColumn = yyextra->yyColNr;
2114 yyextra->lastInitializerContext = UsingAlias;
2115 yyextra->sharpCount=0;
2116 yyextra->initBracketCount=0;
2118 BEGIN(ReadInitializer);
2121 if (yyextra->usingNewVarNeeded)
2123 yyextra->previous = yyextra->current;
2124 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2126 yyextra->usingNewVarNeeded =
false;
2131 yyextra->lastInitializerContext = UsingAlias;
2132 yyextra->sharpCount=0;
2133 yyextra->initBracketCount=0;
2135 yyextra->usingNewVarNeeded =
false;
2136 BEGIN(ReadInitializer);
2139 yyextra->lastCContext = YY_START ;
2140 BEGIN( SkipComment ) ;
2143 yyextra->lastCContext = YY_START ;
2144 BEGIN( SkipCxxComment ) ;
2148 if (yyextra->usingNewVarNeeded)
2150 yyextra->previous = yyextra->current;
2151 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2153 yyextra->usingNewVarNeeded =
false;
2157 yyextra->current->section = EntryType::makeVariable();
2158 DString init = yyextra->current->initializer.str();
2159 init.stripPrefix(
"class ");
2160 init.stripPrefix(
"struct ");
2162 yyextra->current->type =
"typedef "+
init;
2163 yyextra->current->args.clear();
2164 yyextra->current->spec.setAlias(
true);
2165 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2170 yyextra->current->initializer << yytext;
2173 yyextra->current->initializer << yytext;
2177 yyextra->current->fileName = yyextra->fileName;
2178 yyextra->current->section = EntryType::makeUsingDir();
2179 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2181 yyextra->usingNewVarNeeded =
false;
2184<FindMembers>{SCOPENAME}{BN}*"<>" {
2189<FindMembers>{SCOPENAME}{BNopt}/"<" {
2191 if (yyextra->insideCpp && name==
"import") REJECT;
2192 yyextra->roundCount=0;
2193 yyextra->sharpCount=0;
2196 yyextra->current->name=
name;
2202 BEGIN( EndTemplate );
2204<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2205 yyextra->sharpCount=0;
2206 yyextra->roundCount=0;
2214 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...
2217 if (!yyextra->insidePHP)
2223 yyextra->lastHereDocContext = YY_START;
2227<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2228 yyextra->current->name+=yytext;
2232 if (yyextra->roundCount==0)
2235 yyextra->sharpCount++;
2237 yyextra->current->name+=yytext;
2239<ClassTemplSpec,EndTemplate>">=" {
2240 yyextra->current->name+=yytext;
2242<ClassTemplSpec,EndTemplate>(">>") {
2243 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2251 yyextra->current->name+=yytext;
2256 yyextra->current->name+=
'>';
2258 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2260 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2265<EndTemplate>">"{BN}*"(" {
2267 yyextra->current->name+=
'>';
2269 if (yyextra->roundCount==0)
2271 --yyextra->sharpCount;
2273 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2275 yyextra->current->bodyLine = yyextra->yyLineNr;
2276 yyextra->current->bodyColumn = yyextra->yyColNr;
2277 yyextra->current->args =
"(";
2278 yyextra->currentArgumentContext = FuncQual;
2279 yyextra->fullArgString = yyextra->current->args;
2280 yyextra->copyArgString = &yyextra->current->args;
2282 BEGIN( ReadFuncArgType ) ;
2286 yyextra->current->name+=
"(";
2287 yyextra->roundCount++;
2290<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2292 yyextra->current->name+=
'>';
2293 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2298<EndTemplate>">"{BNopt}/"::" {
2300 yyextra->current->name+=
'>';
2302 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2304 BEGIN(FindMemberName);
2307<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2308 yyextra->roundCount++;
2310<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2311 if (yyextra->roundCount>0) yyextra->roundCount--;
2314 yyextra->current->name+=*yytext;
2317<FindMembers>"define"{BN}*"("{BN}*["'] {
2318 if (yyextra->insidePHP)
2320 yyextra->current->bodyLine = yyextra->yyLineNr;
2321 yyextra->current->bodyColumn = yyextra->yyColNr;
2328 yyextra->delimiter = yytext;
2329 *yyextra->pCopyHereDocGString << yytext;
2330 BEGIN(CopyHereDocEnd);
2332<CopyHereDoc>"\""{ID}/"\"" {
2333 yyextra->delimiter = &yytext[1];
2334 *yyextra->pCopyHereDocGString << yytext;
2335 BEGIN(CopyHereDocEnd);
2337<CopyHereDoc>"'"{ID}/"'" {
2338 yyextra->delimiter = &yytext[1];
2339 *yyextra->pCopyHereDocGString << yytext;
2340 BEGIN(CopyHereDocEnd);
2343 yyextra->delimiter = yytext;
2346<HereDoc>"\""{ID}/"\"" {
2347 yyextra->delimiter = &yytext[1];
2350<HereDoc>"'"{ID}/"'" {
2351 yyextra->delimiter = &yytext[1];
2354<HereDocEnd>^{Bopt}{ID} {
2357 BEGIN(yyextra->lastHereDocContext);
2361<CopyHereDocEnd>^{Bopt}{ID} {
2362 *yyextra->pCopyHereDocGString << yytext;
2365 BEGIN(yyextra->lastHereDocContext);
2370 *yyextra->pCopyHereDocGString << yytext;
2372<CopyHereDocEnd>{ID} {
2373 *yyextra->pCopyHereDocGString << yytext;
2376 *yyextra->pCopyHereDocGString << yytext;
2378<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2380<FindMembers>"Q_PROPERTY" {
2381 yyextra->yyBegLineNr = yyextra->yyLineNr;
2382 yyextra->yyBegColNr = yyextra->yyColNr;
2383 yyextra->current->protection = Protection::Public ;
2384 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2385 yyextra->current->type.clear();
2395 yyextra->current->name+=yytext;
2398 yyextra->current->type+= yyextra->current->name;
2399 yyextra->current->type+= yytext;
2400 yyextra->current->name=
"";
2402<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2403 yyextra->current->type+= yyextra->current->name;
2404 yyextra->current->name=yytext;
2406<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2407 yyextra->current->spec.setReadable(
true);
2410<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2411 yyextra->current->spec.setWritable(
true);
2414<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2415<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2416<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2417<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2418<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2419<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2420<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2421<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2422<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2423<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2427 yyextra->current->read = yytext;
2431 yyextra->current->write = yytext;
2434<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2435 yyextra->current->name=yytext;
2439<FindMembers>"requires" {
2440 if (yyextra->insideJava) REJECT;
2441 yyextra->current->req.clear();
2442 yyextra->requiresContext = YY_START;
2443 BEGIN(RequiresClause);
2445<RequiresClause>"requires"{BN}*/"{" {
2446 if (yyextra->insideJava) REJECT;
2448 yyextra->current->req+=yytext;
2449 BEGIN( RequiresExpression ) ;
2451<RequiresClause>"requires"{BN}*"(" {
2452 if (yyextra->insideJava) REJECT;
2454 yyextra->current->req+=yytext;
2455 yyextra->lastRoundContext=RequiresExpression;
2456 yyextra->pCopyRoundString=&yyextra->current->req;
2457 yyextra->roundCount=0;
2458 BEGIN( CopyRound ) ;
2460<RequiresExpression>"{" {
2461 yyextra->current->req+=yytext;
2462 yyextra->lastCurlyContext=RequiresClause;
2463 yyextra->pCopyCurlyString=&yyextra->current->req;
2464 yyextra->curlyCount=0;
2465 BEGIN( CopyCurly ) ;
2467<RequiresExpression>\n {
2468 yyextra->current->req+=
' ';
2471<RequiresExpression>. {
2472 yyextra->current->req+=yytext;
2474<RequiresClause>"(" {
2475 yyextra->current->req+=yytext;
2476 yyextra->lastRoundContext=RequiresClause;
2477 yyextra->pCopyRoundString=&yyextra->current->req;
2478 yyextra->roundCount=0;
2479 BEGIN( CopyRound ) ;
2481<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2485 yyextra->current->req+=yytext;
2486 yyextra->lastRoundContext=RequiresClause;
2487 yyextra->pCopyRoundString=&yyextra->current->req;
2488 yyextra->roundCount=0;
2496<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2500 yyextra->current->req+=yytext;
2501 yyextra->lastSharpContext=RequiresClause;
2502 yyextra->pCopySharpString=&yyextra->current->req;
2503 yyextra->sharpCount=0;
2511<RequiresClause>{NOTopt}{SCOPENAME} {
2515 yyextra->current->req=yytext;
2516 BEGIN(yyextra->requiresContext);
2523<RequiresClause>{NOTopt}"::"{ID} {
2525 yyextra->current->req+=yytext;
2527<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2529 yyextra->current->req+=yytext;
2531<RequiresClause>{BN}+ {
2532 yyextra->current->req+=
' ';
2537 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2538 BEGIN(yyextra->requiresContext);
2540<FindMembers,FindMemberName>{SCOPENAME} {
2542 yyextra->yyBegColNr=yyextra->yyColNr;
2543 yyextra->yyBegLineNr=yyextra->yyLineNr;
2545 if (yyextra->insideIDL && yyleng==9 &&
dstrcmp(yytext,
"cpp_quote")==0)
2549 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
dstrcmp(yytext,
"import")==0)
2551 if (yyextra->insideIDL)
2556 else if (yyextra->insidePHP &&
dstrcmp(yytext,
"use")==0)
2560 else if (yyextra->insideJava &&
dstrcmp(yytext,
"package")==0)
2565 else if (yyextra->insideIDL &&
dstrcmp(yytext,
"case")==0)
2567 BEGIN(IDLUnionCase);
2569 else if (yyextra->insideTryBlock &&
dstrcmp(yytext,
"catch")==0)
2571 yyextra->insideTryBlock=
false;
2572 BEGIN(TryFunctionBlock);
2574 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"alignas")==0)
2576 yyextra->lastAlignAsContext = YY_START;
2579 else if (yyextra->insideJS &&
dstrcmp(yytext,
"var")==0)
2581 yyextra->current->type=
"var";
2583 else if (yyextra->insideJS &&
dstrcmp(yytext,
"function")==0)
2585 yyextra->current->type=
"function";
2587 else if (yyextra->insideCS &&
dstrcmp(yytext,
"this")==0)
2591 yyextra->current->name=
"this";
2594 else if (yyextra->insideCpp && (
dstrcmp(yytext,
"static_assert")==0 ||
dstrcmp(yytext,
"_Static_assert")==0))
2597 BEGIN(StaticAssert);
2599 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"decltype")==0)
2603 if (!yyextra->current->type.empty()) yyextra->current->type+=
' ';
2604 yyextra->current->type+=yytext;
2607 else if (yyextra->insideSlice &&
dstrcmp(yytext,
"optional")==0)
2609 if (yyextra->current->type.empty())
2611 yyextra->current->type =
"optional";
2615 yyextra->current->type +=
" optional";
2617 yyextra->lastModifierContext = YY_START;
2618 BEGIN(SliceOptional);
2622 if (YY_START==FindMembers)
2626 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2627 if (javaLike &&
dstrcmp(yytext,
"public")==0)
2629 yyextra->current->protection = Protection::Public;
2631 else if (javaLike &&
dstrcmp(yytext,
"protected")==0)
2633 yyextra->current->protection = Protection::Protected;
2635 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
dstrcmp(yytext,
"internal")==0)
2638 if (!(yyextra->insideCS && yyextra->current->protection==Protection::Protected))
2640 yyextra->current->protection = Protection::Package;
2643 else if (javaLike &&
dstrcmp(yytext,
"private")==0)
2645 yyextra->current->protection = Protection::Private;
2647 else if (yyextra->insideCS && YY_START==FindMembers &&
dstrcmp(yytext,
"new")==0)
2650 yyextra->current->spec.setNew(
true);
2652 else if (javaLike &&
dstrcmp(yytext,
"static")==0)
2654 if (YY_START==FindMembers)
2655 yyextra->current->name = yytext;
2657 yyextra->current->name += yytext;
2658 yyextra->current->isStatic =
true;
2662 if (YY_START==FindMembers)
2663 yyextra->current->name = yytext;
2665 yyextra->current->name += yytext;
2666 if (yyextra->current->name.startsWith(
"static "))
2668 yyextra->current->isStatic =
true;
2669 yyextra->current->name= yyextra->current->name.mid(7);
2671 else if (yyextra->current->name.startsWith(
"inline "))
2673 if (yyextra->current->type.empty())
2675 yyextra->current->type=
"inline";
2679 yyextra->current->type+=
"inline ";
2681 yyextra->current->name= yyextra->current->name.mid(7);
2683 else if (yyextra->current->name.startsWith(
"constexpr "))
2685 if (yyextra->current->type.empty())
2687 yyextra->current->type=
"constexpr";
2691 yyextra->current->type+=
"constexpr ";
2693 yyextra->current->name=yyextra->current->name.mid(10);
2695 else if (yyextra->current->name.startsWith(
"consteval "))
2697 if (yyextra->current->type.empty())
2699 yyextra->current->type=
"consteval";
2703 yyextra->current->type+=
"consteval ";
2705 yyextra->current->name=yyextra->current->name.mid(10);
2707 else if (yyextra->current->name.startsWith(
"constinit "))
2709 if (yyextra->current->type.empty())
2711 yyextra->current->type=
"constinit";
2715 yyextra->current->type+=
"constinit ";
2717 yyextra->current->name=yyextra->current->name.mid(10);
2719 else if (yyextra->current->name.startsWith(
"const "))
2721 if (yyextra->current->type.empty())
2723 yyextra->current->type=
"const";
2727 yyextra->current->type+=
"const ";
2729 yyextra->current->name=yyextra->current->name.mid(6);
2731 else if (yyextra->current->name.startsWith(
"volatile "))
2733 if (yyextra->current->type.empty())
2735 yyextra->current->type=
"volatile";
2739 yyextra->current->type+=
"volatile ";
2741 yyextra->current->name=yyextra->current->name.mid(9);
2743 else if (yyextra->current->name.startsWith(
"typedef "))
2745 if (yyextra->current->type.empty())
2747 yyextra->current->type=
"typedef";
2751 yyextra->current->type+=
"typedef ";
2753 yyextra->current->name=yyextra->current->name.mid(8);
2763 yyextra->externLinkage=
false;
2767 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2770 yyextra->lastSkipRoundContext = FindMembers;
2771 yyextra->roundCount=0;
2774<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2780 yyextra->current->type+=yytext;
2781 yyextra->lastRoundContext=FindMembers;
2782 yyextra->pCopyRoundString=&yyextra->current->type;
2783 yyextra->roundCount=0;
2786<DeclType>{BN}+ {
lineCount(yyscanner); }
2791<CSIndexer>"["[^\n\]]*"]" {
2795<FindMembers>[0-9]{ID} {
2798 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2800 yyextra->current->name+=
".";
2804 yyextra->current->name+=yytext;
2806<CppQuote>"("{B}*"\"" {
2807 yyextra->insideCppQuote=
true;
2811<IDLUnionCase>":" { BEGIN(FindMembers); }
2812<IDLUnionCase>\n {
lineCount(yyscanner); }
2814<TryFunctionBlock>\n {
lineCount(yyscanner); }
2815<TryFunctionBlock>"{" {
2816 yyextra->curlyCount=0;
2817 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2821<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2823<TryFunctionBlockEnd>\n { unput(*yytext);
2824 BEGIN( FindMembers );
2826<TryFunctionBlockEnd>. { unput(*yytext);
2827 BEGIN( FindMembers );
2830 yyextra->insideCppQuote=
false;
2833<FindConceptParts>[^\/\n]* {
2834 yyextra->current->initializer << yytext;
2836<FindConceptParts>. {
2837 yyextra->current->initializer << yytext;
2839<FindConceptParts>\n {
2840 yyextra->current->initializer << yytext;
2841 yyextra->yyLineNr++;
2843<FindConceptParts>{CCS} {
2844 yyextra->current->initializer << yytext;
2846<FindConceptParts>{CPPC} {
2847 yyextra->current->initializer << yytext;
2849<FindConceptParts>^[ \t]*{CCS}[!*] {
2851 size_t indent = text.
find(
'/');
2853 if (!yyextra->current->initializer.empty())
2855 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2858 yyextra->current->section = EntryType::makeConceptDocPart();
2859 yyextra->current->startLine = yyextra->yyLineNr;
2860 yyextra->current->startColumn = indent;
2861 yyextra->current->initializer.clear();
2862 BEGIN(FindConceptDocs);
2864<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2865 if (!yyextra->current->initializer.empty())
2867 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2871 size_t indent = line.find(
'/');
2872 yyextra->current->section = EntryType::makeConceptDocPart();
2873 yyextra->current->startLine = yyextra->yyLineNr;
2874 yyextra->current->startColumn = indent;
2875 yyextra->current->initializer.clear();
2876 yyextra->current->initializer << line.mid(indent+3);
2877 yyextra->yyLineNr++;
2878 BEGIN(FindConceptCxxDocs);
2880<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2882 size_t p = line.find(
'/');
2883 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2884 yyextra->current->initializer << line.mid(p+2);
2885 yyextra->yyLineNr++;
2887<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2888 yyextra->current->initializer << yytext;
2890<FindConceptCxxDocs>. {
2891 if (!yyextra->current->initializer.empty())
2895 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2899 yyextra->current->section = EntryType::makeConceptCodePart();
2900 yyextra->current->startLine = yyextra->yyLineNr;
2901 BEGIN(FindConceptParts);
2903<FindConceptDocs>^[ \t]*"*"+/[^/] {
2905<FindConceptDocs>[^\*\n]+ {
2906 yyextra->current->initializer << yytext;
2908<FindConceptDocs>\n {
2909 yyextra->current->initializer << yytext;
2910 yyextra->yyLineNr++;
2912<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2913 if (!yyextra->current->initializer.empty())
2917 yyextra->current->section = EntryType::makeConceptDocPart();
2918 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2922 yyextra->current->section = EntryType::makeConceptCodePart();
2923 yyextra->current->startLine = yyextra->yyLineNr;
2924 BEGIN(FindConceptParts);
2926<FindConceptDocs>"*"*{CCE} {
2927 if (!yyextra->current->initializer.empty())
2931 yyextra->current->section = EntryType::makeConceptDocPart();
2932 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2935 yyextra->current->section = EntryType::makeConceptCodePart();
2936 yyextra->current->startLine = yyextra->yyLineNr;
2937 BEGIN(FindConceptParts);
2939<FindConceptParts><<EOF>> {
2940 if (!yyextra->current->initializer.empty())
2942 if (!yyextra->current->section.isConceptCodePart())
2944 yyextra->current->section = EntryType::makeConceptDocPart();
2946 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2951<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2953 yyextra->lastCPPContext = YY_START;
2956<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2957<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2958 if (yyextra->insidePHP)
2960 yyextra->current->bodyLine = yyextra->yyLineNr;
2961 yyextra->current->bodyColumn = yyextra->yyColNr;
2962 yyextra->current->fileName = yyextra->fileName;
2963 yyextra->current->startLine = yyextra->yyLineNr;
2964 yyextra->current->startColumn = yyextra->yyColNr;
2965 yyextra->current->type.clear();
2966 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2967 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2968 yyextra->current->section = EntryType::makeDefine();
2969 yyextra->lastDefineContext = YY_START;
2972<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2973 yyextra->yyLineNr = atoi(&yytext[1]);
2975 yyextra->lastPreLineCtrlContext = YY_START;
2976 if (YY_START==ReadBody ||
2977 YY_START==ReadNSBody ||
2978 YY_START==ReadBodyIntf)
2980 yyextra->current->program << yytext;
2982 BEGIN( PreLineCtrl );
2984<PreLineCtrl>"\""[^\n\"]*"\"" {
2986 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2987 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2988 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2990 yyextra->current->program << yytext;
2994 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2995 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2996 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2998 yyextra->current->program << yytext;
3002 if (yyextra->lastPreLineCtrlContext==ReadBody ||
3003 yyextra->lastPreLineCtrlContext==ReadNSBody ||
3004 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
3006 yyextra->current->program << yytext;
3009 BEGIN( yyextra->lastPreLineCtrlContext );
3012<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
3013<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
3014 BEGIN( yyextra->lastCPPContext) ;
3016<SDefine>{ID}{B}*"(" {
3017 yyextra->current->name = yytext;
3018 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3019 yyextra->current->args =
"(";
3020 yyextra->current->bodyLine = yyextra->yyLineNr;
3021 yyextra->current->bodyColumn = yyextra->yyColNr;
3022 yyextra->currentArgumentContext = DefineEnd;
3023 yyextra->fullArgString=yyextra->current->args;
3024 yyextra->copyArgString=&yyextra->current->args;
3025 BEGIN( ReadFuncArgType ) ;
3040 yyextra->current->bodyLine = yyextra->yyLineNr;
3041 yyextra->current->bodyColumn = yyextra->yyColNr;
3042 yyextra->current->name = yytext;
3049 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3051 BEGIN(yyextra->lastDefineContext);
3055 yyextra->current->fileName = yyextra->fileName;
3056 yyextra->current->startLine = yyextra->yyLineNr;
3057 yyextra->current->startColumn = yyextra->yyColNr;
3058 yyextra->current->type.clear();
3059 yyextra->current->type =
"const";
3060 DString init = yyextra->current->initializer.str();
3063 yyextra->current->initializer.str(
init.str());
3064 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3065 yyextra->current->section = EntryType::makeVariable();
3066 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3071<DefineEnd>\\[\r]?\n {
3073 yyextra->current->endBodyLine = yyextra->yyLineNr;
3076 if (yyextra->insideIDL && yyextra->insideCppQuote)
3082 yyextra->lastStringContext=DefineEnd;
3087<DefinePHP>{ID}["']{BN}*","{BN}* {
3088 yyextra->current->name = yytext;
3089 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3090 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3091 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3092 yyextra->current->bodyLine = yyextra->yyLineNr;
3093 yyextra->current->bodyColumn = yyextra->yyColNr;
3094 yyextra->lastRoundContext = DefinePHPEnd;
3095 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3096 yyextra->roundCount = 0;
3097 BEGIN( GCopyRound );
3101 if (yyextra->insideCli)
3104 yyextra->current->name = yytext ;
3112 yyextra->current->name += yytext ;
3115<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3116 if (YY_START==ReadInitializer && yyextra->keepComment)
3122 if (yyextra->current->bodyLine==-1)
3124 yyextra->current->bodyLine=yyextra->yyLineNr;
3125 yyextra->current->bodyColumn = yyextra->yyColNr;
3127 yyextra->docBlockContext = YY_START;
3128 yyextra->docBlockInBody =
false;
3129 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3131 if (YY_START==MemberSpec && yyextra->memspecEntry && yyextra->memspecEntry->briefFile.empty())
3133 if (yytext[yyleng-3]==
'/')
3135 yyextra->memspecEntry->briefFile = yyextra->fileName;
3136 yyextra->memspecEntry->briefLine = yyextra->yyLineNr;
3140 yyextra->memspecEntry->docFile = yyextra->fileName;
3141 yyextra->memspecEntry->docLine = yyextra->yyLineNr;
3147 yyextra->docBlock.
str(indent.
str());
3151 yyextra->docBlockTerm =
';';
3152 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3154 yyextra->current->bitfields =
":"+yyextra->current->args;
3155 yyextra->current->args.clear();
3156 yyextra->current->section = EntryType::makeVariable();
3158 if (yytext[yyleng-3]==
'/')
DString fill(char c, size_t len)
Fills a string with a predefined character.
#define Config_getBool(name)
3170<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3171 if (YY_START==ReadInitializer && yyextra->keepComment)
3177 yyextra->docBlockContext = YY_START;
3178 yyextra->docBlockInBody =
false;
3179 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3184 yyextra->docBlock.
str(indent.
str());
3187 yyextra->docBlockTerm =
',';
3188 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3190 yyextra->current->bitfields =
":"+yyextra->current->args;
3191 yyextra->current->args.clear();
3192 yyextra->current->section = EntryType::makeVariable();
3194 if (yytext[yyleng-3]==
'/')
3206<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3207 if (YY_START==ReadInitializer && yyextra->keepComment)
3213 if (yyextra->current->bodyLine==-1)
3215 yyextra->current->bodyLine=yyextra->yyLineNr;
3216 yyextra->current->bodyColumn = yyextra->yyColNr;
3218 yyextra->docBlockContext = YY_START;
3219 yyextra->docBlockInBody =
false;
3220 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3224 yyextra->docBlock.
str(indent.
str());
3227 yyextra->docBlockTerm = 0;
3228 if (yytext[yyleng-3]==
'/')
3241<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3243 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3246 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3251 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3257 if (yytext[2]==
'!' || yytext[2]==
'/')
3259 yyextra->docBlockContext = YY_START;
3260 yyextra->docBlockInBody =
false;
3261 yyextra->docBlockAutoBrief =
false;
3262 yyextra->docBlock.str(std::string());
3263 yyextra->docBlockTerm = 0;
3269 yyextra->lastCContext=YY_START;
3270 BEGIN(SkipCxxComment);
3275 if (yytext[2]==
'!' || yytext[2]==
'*')
3277 yyextra->docBlockContext = YY_START;
3278 yyextra->docBlockInBody =
false;
3279 yyextra->docBlock.str(std::string());
3280 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3282 yyextra->docBlockTerm = 0;
3288 yyextra->lastCContext=YY_START;
3293<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3294 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3295 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3299 if (!yyextra->insideCS) REJECT;
3300 yyextra->current->bodyLine = yyextra->yyLineNr;
3301 yyextra->current->bodyColumn = yyextra->yyColNr;
3302 yyextra->current->initializer.str(yytext);
3303 yyextra->lastInitializerContext = YY_START;
3304 yyextra->sharpCount=0;
3305 yyextra->initBracketCount=0;
3306 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3307 yyextra->current->spec.setGettable(
true);
3308 BEGIN(ReadInitializerPtr);
3311 yyextra->current->bodyLine = yyextra->yyLineNr;
3312 yyextra->current->bodyColumn = yyextra->yyColNr;
3313 yyextra->current->initializer.str(
" ");
3314 for (
size_t ii = 2 ; ii < yyextra->yyColNr; ii++)
3315 yyextra->current->initializer <<
" ";
3316 yyextra->current->initializer <<
"=";
3317 yyextra->lastInitializerContext = YY_START;
3318 yyextra->sharpCount=0;
3319 yyextra->initBracketCount=0;
3320 BEGIN(ReadInitializer);
3322<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3324 yyextra->current->exception +=
" ";
3327<UNOIDLAttributeBlock>"}" {
3328 yyextra->current->exception +=
" }";
3332<ReadInitializer,ReadInitializerPtr>"(" {
3333 yyextra->lastRoundContext=YY_START;
3334 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3335 yyextra->roundCount=0;
3336 yyextra->current->initializer << *yytext;
3339<ReadInitializer,ReadInitializerPtr>"[" {
3340 if (!yyextra->insidePHP) REJECT;
3341 yyextra->lastSquareContext=YY_START;
3342 yyextra->pCopySquareGString=&yyextra->current->initializer;
3343 yyextra->squareCount=0;
3344 yyextra->current->initializer << *yytext;
3347<ReadInitializer,ReadInitializerPtr>"{" {
3348 yyextra->lastCurlyContext=YY_START;
3349 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3350 yyextra->curlyCount=0;
3351 yyextra->current->initializer << *yytext;
3354<ReadInitializer,ReadInitializerPtr>[;,] {
3356 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3358 yyextra->current->fileName = yyextra->fileName;
3359 yyextra->current->startLine = yyextra->yyLineNr;
3360 yyextra->current->startColumn = yyextra->yyColNr;
3361 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3362 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3363 yyextra->current->section = EntryType::makeVariable();
3364 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3368 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3371 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3372 BEGIN(yyextra->lastInitializerContext);
3374 else if (*yytext==
',' && yyextra->initBracketCount==0)
3377 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3378 BEGIN(yyextra->lastInitializerContext);
3382 yyextra->current->initializer << *yytext;
3385<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3386 if (!yyextra->insideCpp)
3392 yyextra->current->initializer << yytext;
3394 yyextra->lastRawStringContext = YY_START;
3395 yyextra->pCopyRawGString = &yyextra->current->initializer;
DString extractBeginRawStringDelimiter(const char *rawStart)
3400<ReadInitializer>{CPPC}.* {
3401 if (yyextra->keepComment)
3403 yyextra->current->initializer << yytext;
3410<ReadInitializer>{CCS} {
3411 if (yyextra->keepComment)
3413 yyextra->current->initializer << yytext;
3414 BEGIN(InitCopyComment);
3421<InitCopyComment>{CCE} {
3422 yyextra->current->initializer << yytext;
3423 BEGIN(ReadInitializer);
3425<InitCopyComment>\n {
3427 yyextra->current->initializer << yytext;
3430 yyextra->current->initializer << yytext;
3432<InitCopyComment><<EOF>> {
3433 warn(yyextra->fileName,yyextra->yyLineNr,
3434 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3437<RawGString>{RAWEND} {
3440 *yyextra->pCopyRawGString << yytext;
3441 BEGIN(yyextra->lastRawStringContext);
DString extractEndRawStringDelimiter(const char *rawEnd)
3448<RawGString>[^)\n]+ {
3449 *yyextra->pCopyRawGString << yytext;
3452 *yyextra->pCopyRawGString << yytext;
3455 *yyextra->pCopyRawGString << yytext;
3458<RawString>{RAWEND} {
3459 *yyextra->pCopyRawString+=yytext;
3460 yyextra->fullArgString+=yytext;
3463 BEGIN(yyextra->lastRawStringContext);
3467 *yyextra->pCopyRawString += yytext;
3468 yyextra->fullArgString+=yytext;
3471 *yyextra->pCopyRawString += yytext;
3472 yyextra->fullArgString+=yytext;
3475 *yyextra->pCopyRawString += yytext;
3476 yyextra->fullArgString+=yytext;
3479<ReadInitializer,ReadInitializerPtr>\" {
3480 if (yyextra->insideIDL && yyextra->insideCppQuote)
3486 yyextra->lastStringContext=YY_START;
3487 yyextra->current->initializer << yytext;
3488 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3489 yyextra->stopAtInvalidString=
false;
3493<ReadInitializer,ReadInitializerPtr>"->" {
3494 yyextra->current->initializer << yytext;
3496<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3497 yyextra->current->initializer << yytext;
3499<ReadInitializer,ReadInitializerPtr>(">>") {
3500 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3503 yyextra->initBracketCount-=2;
3504 yyextra->sharpCount-=2;
3506 yyextra->current->initializer << yytext;
3508<ReadInitializer,ReadInitializerPtr>(">=") {
3509 yyextra->current->initializer << yytext;
3511<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3512 yyextra->initBracketCount++;
3513 yyextra->sharpCount++;
3514 yyextra->current->initializer << *yytext;
3516<ReadInitializer,ReadInitializerPtr>[>\]})] {
3517 yyextra->initBracketCount--;
3518 yyextra->sharpCount--;
3521 yyextra->current->endBodyLine=yyextra->yyLineNr;
3523 yyextra->current->initializer << *yytext;
3525<ReadInitializer,ReadInitializerPtr>\' {
3526 if (yyextra->insidePHP)
3528 yyextra->current->initializer << yytext;
3529 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3530 yyextra->lastStringContext=YY_START;
3531 BEGIN(CopyPHPGString);
3535 yyextra->current->initializer << yytext;
3538<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3539 if (yyextra->insidePHP)
3545 yyextra->current->initializer << yytext;
3548<ReadInitializer,ReadInitializerPtr>\n {
3549 yyextra->current->initializer << *yytext;
3552<ReadInitializer,ReadInitializerPtr>"@\"" {
3554 yyextra->current->initializer << yytext;
3555 if (!yyextra->insideCS && !yyextra->insideObjC)
3562 yyextra->lastSkipVerbStringContext=YY_START;
3563 yyextra->pSkipVerbString=&yyextra->current->initializer;
3564 BEGIN(SkipVerbString);
3567<SkipVerbString>[^\n"\\]+ {
3568 *yyextra->pSkipVerbString << yytext;
3570<SkipVerbString>"\\\\" {
3571 if (yyextra->insideCS) REJECT
3572 *yyextra->pSkipVerbString << yytext;
3574<SkipVerbString>"\\\"" {
3575 if (yyextra->insideCS) REJECT
3576 *yyextra->pSkipVerbString << yytext;
3578<SkipVerbString>"\"\"" {
3579 *yyextra->pSkipVerbString << yytext;
3581<SkipVerbString>"\"" {
3582 *yyextra->pSkipVerbString << *yytext;
3583 BEGIN(yyextra->lastSkipVerbStringContext);
3586 *yyextra->pSkipVerbString << *yytext;
3590 *yyextra->pSkipVerbString << *yytext;
3592<ReadInitializer,ReadInitializerPtr>"?>" {
3593 if (yyextra->insidePHP)
3594 BEGIN( FindMembersPHP );
3596 yyextra->current->initializer << yytext;
3598<ReadInitializer,ReadInitializerPtr>. {
3599 yyextra->current->initializer << *yytext;
3603<CopyString,CopyPHPString>\\. {
3604 *yyextra->pCopyQuotedString+=yytext;
3607 *yyextra->pCopyQuotedString+=*yytext;
3608 BEGIN( yyextra->lastStringContext );
3611 *yyextra->pCopyQuotedString+=*yytext;
3612 BEGIN( yyextra->lastStringContext );
3614<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3615 *yyextra->pCopyQuotedString+=yytext;
3617<CopyString,CopyPHPString>\n {
3618 *yyextra->pCopyQuotedString+=*yytext;
3621<CopyString,CopyPHPString>. {
3622 *yyextra->pCopyQuotedString+=*yytext;
3626<CopyGString,CopyPHPGString>\\. {
3627 *yyextra->pCopyQuotedGString << yytext;
3630 *yyextra->pCopyQuotedGString << *yytext;
3631 BEGIN( yyextra->lastStringContext );
3634 *yyextra->pCopyQuotedGString << *yytext;
3635 BEGIN( yyextra->lastStringContext );
3637<CopyGString,CopyPHPGString>"<?php" {
3638 *yyextra->pCopyQuotedGString << yytext;
3639 BEGIN( yyextra->lastStringContext );
3641<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3642 *yyextra->pCopyQuotedGString << yytext;
3644<CopyGString,CopyPHPGString>\n {
3645 *yyextra->pCopyQuotedGString << *yytext;
3646 if (yyextra->stopAtInvalidString)
3648 BEGIN( yyextra->lastStringContext );
3655<CopyGString,CopyPHPGString>. {
3656 *yyextra->pCopyQuotedGString << *yytext;
3660<CopyC11Attribute>\" {
3661 *yyextra->pCopyC11AttributeString += *yytext;
3662 yyextra->pCopyQuotedString=yyextra->pCopyC11AttributeString;
3663 yyextra->lastStringContext=YY_START;
3666<CopyC11Attribute>\n {
3668 *yyextra->pCopyC11AttributeString += *yytext;
3670<CopyC11Attribute>{ID} {
3671 if (
dstrcmp(yytext,
"nodiscard")==0)
3673 yyextra->current->spec.setNoDiscard(
true);
3675 *yyextra->pCopyC11AttributeString += yytext;
3677<CopyC11Attribute>. {
3678 *yyextra->pCopyC11AttributeString += *yytext;
3680<CopyC11Attribute>"]]" {
3681 yyextra->commentScanner.addDeprecatedDocs(yyextra->current.get(),
3684 yyextra->thisParser);
3685 BEGIN(yyextra->lastC11AttributeContext);
3691 *yyextra->pCopyRoundString += *yytext;
3692 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3693 yyextra->lastStringContext=YY_START;
3697 *yyextra->pCopyRoundString += *yytext;
3698 yyextra->roundCount++;
3701 *yyextra->pCopyRoundString += *yytext;
3702 if (--yyextra->roundCount<0)
3703 BEGIN(yyextra->lastRoundContext);
3707 *yyextra->pCopyRoundString += *yytext;
3710 if (yyextra->insidePHP)
3712 yyextra->current->initializer << yytext;
3713 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3714 yyextra->lastStringContext=YY_START;
3715 BEGIN(CopyPHPString);
3719 *yyextra->pCopyRoundString += yytext;
3722<CopyRound>{CHARLIT} {
3723 if (yyextra->insidePHP)
3729 *yyextra->pCopyRoundString+=yytext;
3732<CopyRound>[^"'()\n,]+ {
3733 *yyextra->pCopyRoundString+=yytext;
3736 *yyextra->pCopyRoundString+=*yytext;
3741 *yyextra->pCopySharpString += *yytext;
3742 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3743 yyextra->lastStringContext=YY_START;
3747 *yyextra->pCopySharpString += *yytext;
3748 yyextra->sharpCount++;
3751 *yyextra->pCopySharpString += *yytext;
3752 if (--yyextra->sharpCount<0)
3754 BEGIN(yyextra->lastSharpContext);
3759 *yyextra->pCopySharpString += *yytext;
3762 if (yyextra->insidePHP)
3764 yyextra->current->initializer << yytext;
3765 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3766 yyextra->lastStringContext=YY_START;
3767 BEGIN(CopyPHPString);
3771 *yyextra->pCopySharpString += yytext;
3774<CopySharp>{CHARLIT} {
3775 if (yyextra->insidePHP)
3781 *yyextra->pCopySharpString+=yytext;
3784<CopySharp>[^"'<>\n,]+ {
3785 *yyextra->pCopySharpString+=yytext;
3788 *yyextra->pCopySharpString+=*yytext;
3794 *yyextra->pCopyRoundGString << *yytext;
3795 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3796 yyextra->lastStringContext=YY_START;
3800 *yyextra->pCopyRoundGString << *yytext;
3801 yyextra->roundCount++;
3804 *yyextra->pCopyRoundGString << *yytext;
3805 if (--yyextra->roundCount<0)
3806 BEGIN(yyextra->lastRoundContext);
3810 *yyextra->pCopyRoundGString << *yytext;
3813 if (yyextra->insidePHP)
3815 yyextra->current->initializer << yytext;
3816 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3817 yyextra->lastStringContext=YY_START;
3818 BEGIN(CopyPHPGString);
3822 *yyextra->pCopyRoundGString << yytext;
3825<GCopyRound>{CHARLIT} {
3826 if (yyextra->insidePHP)
3832 *yyextra->pCopyRoundGString << yytext;
3836 if (!yyextra->insideCS) REJECT;
3837 *yyextra->pCopyRoundGString << yytext;
3838 yyextra->lastSkipVerbStringContext=YY_START;
3839 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3840 BEGIN(SkipVerbString);
3842<GCopyRound>[^"'()\n\/,R]+ {
3843 *yyextra->pCopyRoundGString << yytext;
3845<GCopyRound>{RAWBEGIN} {
3846 *yyextra->pCopyRoundGString << yytext;
3848 yyextra->lastRawStringContext = YY_START;
3849 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3853 *yyextra->pCopyRoundGString << *yytext;
3858 *yyextra->pCopySquareGString << *yytext;
3859 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3860 yyextra->lastStringContext=YY_START;
3864 *yyextra->pCopySquareGString << *yytext;
3865 if (yyextra->insidePHP)
3867 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3868 yyextra->lastStringContext=YY_START;
3869 BEGIN(CopyPHPGString);
3873 *yyextra->pCopySquareGString << *yytext;
3874 yyextra->squareCount++;
3877 *yyextra->pCopySquareGString << *yytext;
3878 if (--yyextra->squareCount<0)
3879 BEGIN(yyextra->lastSquareContext);
3883 *yyextra->pCopySquareGString << *yytext;
3886 if (yyextra->insidePHP)
3888 yyextra->current->initializer << yytext;
3889 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3890 yyextra->lastStringContext=YY_START;
3891 BEGIN(CopyPHPGString);
3895 *yyextra->pCopySquareGString << yytext;
3898<GCopySquare>{CHARLIT} {
3899 if (yyextra->insidePHP)
3905 *yyextra->pCopySquareGString << yytext;
3908<GCopySquare>[^"'\[\]\n\/,]+ {
3909 *yyextra->pCopySquareGString << yytext;
3912 *yyextra->pCopySquareGString << *yytext;
3917 *yyextra->pCopyCurlyString += *yytext;
3918 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3919 yyextra->lastStringContext=YY_START;
3920 yyextra->keepComment=
false;
3924 *yyextra->pCopyCurlyString += *yytext;
3925 if (yyextra->insidePHP)
3927 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3928 yyextra->lastStringContext=YY_START;
3929 yyextra->keepComment=
false;
3930 BEGIN(CopyPHPString);
3934 *yyextra->pCopyCurlyString += *yytext;
3935 yyextra->curlyCount++;
3938 *yyextra->pCopyCurlyString += *yytext;
3939 if (--yyextra->curlyCount<0)
3941 yyextra->keepComment=
false;
3942 BEGIN(yyextra->lastCurlyContext);
3945<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3951 *yyextra->pCopyCurlyString += yytext;
3954<CopyCurly>[^"'{}\/\n,]+ {
3955 *yyextra->pCopyCurlyString += yytext;
3957<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3960 *yyextra->pCopyCurlyString += *yytext;
3963 *yyextra->pCopyCurlyString += *yytext;
3965<CopyCurly>{CPPC}[^\n]* {
3966 if (yyextra->keepComment)
3968 *yyextra->pCopyCurlyString += yytext;
3976 if (yyextra->keepComment)
3978 *yyextra->pCopyCurlyString += yytext;
3987 *yyextra->pCopyCurlyString += yytext;
3992 *yyextra->pCopyCurlyString += *yytext;
3995 *yyextra->pCopyCurlyString += *yytext;
3997<CopyComment><<EOF>> {
3998 warn(yyextra->fileName,yyextra->yyLineNr,
3999 "reached end of file while inside a C style comment block!");
4004<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
4006<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
4008 size_t s = line.
find(
' ');
4010 size_t e = line.
find(
'"',s);
4011 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
4012 if (yytext[yyleng-1]==
'\n')
DString mid(size_t index, size_t len=npos) const
int toInt(bool *ok=nullptr, int base=10) const
4019 *yyextra->pCopyCurlyGString << *yytext;
4020 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
4021 yyextra->lastStringContext=YY_START;
4022 yyextra->keepComment =
false;
4026 *yyextra->pCopyCurlyGString << *yytext;
4027 if (yyextra->insidePHP)
4029 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
4030 yyextra->lastStringContext=YY_START;
4031 yyextra->keepComment =
false;
4032 BEGIN(CopyPHPGString);
4036 *yyextra->pCopyCurlyGString << *yytext;
4037 yyextra->curlyCount++;
4039<GCopyCurly>"}"/{BN}*("||"|"&&") {
4040 *yyextra->pCopyCurlyGString << *yytext;
4041 if (--yyextra->curlyCount<0)
4043 yyextra->current->endBodyLine = yyextra->yyLineNr;
4044 BEGIN(yyextra->lastCurlyContext);
4048 *yyextra->pCopyCurlyGString << *yytext;
4049 if (--yyextra->curlyCount<0)
4051 yyextra->current->endBodyLine = yyextra->yyLineNr;
4052 yyextra->keepComment =
false;
4053 BEGIN(yyextra->lastCurlyContext);
4056<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
4062 *yyextra->pCopyCurlyGString << yytext;
4065<GCopyCurly>[^"'{}\/\n,]+ {
4066 *yyextra->pCopyCurlyGString << yytext;
4069 *yyextra->pCopyCurlyGString << yytext;
4071<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
4074 *yyextra->pCopyCurlyGString << *yytext;
4077 *yyextra->pCopyCurlyGString << *yytext;
4079<GCopyCurly>{CPPC}[^\n]* {
4080 if (yyextra->keepComment)
4082 *yyextra->pCopyCurlyGString << yytext;
4090 if (yyextra->keepComment)
4092 *yyextra->pCopyCurlyGString << yytext;
4093 BEGIN(GCopyComment);
4100<GCopyComment>{CCE} {
4101 *yyextra->pCopyCurlyGString << yytext;
4106 *yyextra->pCopyCurlyGString << *yytext;
4109 *yyextra->pCopyCurlyGString << *yytext;
4111<GCopyComment><<EOF>> {
4112 warn(yyextra->fileName,yyextra->yyLineNr,
4113 "reached end of file while inside a C style comment block!");
4121 if (yyextra->current->type.empty() &&
4122 yyextra->current->name==
"enum")
4124 yyextra->current->section = EntryType::makeEnum();
4125 yyextra->current->name.clear();
4126 yyextra->current->args.clear();
4127 BEGIN(EnumBaseType);
4131 if (yyextra->current->type.empty())
4134 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4137 yyextra->current->bitfields+=
":";
4141 yyextra->current->bitfields+=*yytext;
4144 yyextra->current->args+=*yytext;
4148 yyextra->current->args+=
' ';
4151 DString oldType = yyextra->current->type;
4152 if (yyextra->current->bodyLine==-1)
4154 yyextra->current->bodyLine = yyextra->yyLineNr;
4155 yyextra->current->bodyColumn = yyextra->yyColNr;
4157 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4159 yyextra->current->type = yyextra->current->type.mid(3);
4161 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4163 yyextra->current->type.prepend(
"typedef ");
4165 bool isStatic = yyextra->current->isStatic;
4166 Protection prot = yyextra->current->protection;
4167 bool isConcept = yyextra->current->section.isConcept();
4168 bool isModule = yyextra->current->section.isModuleDoc();
4171 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4176 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4179 else if (!yyextra->current->name.empty() && !yyextra->current->section.isEnum())
4181 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4183 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4184 if (yyextra->current->section.isClass())
4188 yyextra->current->section = EntryType::makeVariable() ;
4189 yyextra->current->fileName = yyextra->fileName;
4190 yyextra->current->startLine = yyextra->yyBegLineNr;
4191 yyextra->current->startColumn = yyextra->yyBegColNr;
4192 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4195 if ( *yytext ==
',')
4197 yyextra->current->isStatic = isStatic;
4198 yyextra->current->protection = prot;
4199 yyextra->current->name.clear();
4200 yyextra->current->args.clear();
4201 yyextra->current->brief.clear();
4202 yyextra->current->doc.clear();
4203 yyextra->current->initializer.str(std::string());
4204 yyextra->current->bitfields.clear();
4209 yyextra->mtype = MethodTypes::Method;
4210 yyextra->virt = Specifier::Normal;
4211 yyextra->current->bodyLine = -1;
4212 yyextra->current->bodyColumn = 1;
4213 yyextra->current->groups.clear();
4219 if (yyextra->insideSlice)
4221 yyextra->squareCount=1;
4222 yyextra->lastSquareContext = YY_START;
4223 yyextra->current->metaData +=
"[";
4224 BEGIN( SliceMetadata );
4226 else if (!yyextra->insideCS &&
4227 (yyextra->current->name.empty() ||
4228 yyextra->current->name==
"typedef"
4232 yyextra->squareCount=1;
4233 yyextra->lastSquareContext = YY_START;
4234 yyextra->idlAttr.clear();
4235 yyextra->idlProp.clear();
4236 yyextra->current->mtype = yyextra->mtype;
4239 yyextra->current->mtype == MethodTypes::Property)
4241 yyextra->odlProp =
true;
4242 yyextra->current->spec.setGettable(
true).setSettable(
true);
4245 BEGIN( IDLAttribute );
4247 else if (yyextra->insideCS &&
4248 yyextra->current->name.empty())
4250 yyextra->squareCount=1;
4251 yyextra->lastSquareContext = YY_START;
4254 yyextra->current->args.clear();
4255 BEGIN( SkipSquare );
4259 yyextra->current->args += yytext ;
4260 yyextra->squareCount=1;
4261 yyextra->externLinkage=
false;
4266 yyextra->squareCount++;
4267 yyextra->current->metaData +=
"[";
4269<SliceMetadata>{BN}* {
4272<SliceMetadata>\"[^\"]*\" {
4273 yyextra->current->metaData += yytext;
4276 yyextra->current->metaData += yytext;
4279 yyextra->current->metaData += yytext;
4280 if (--yyextra->squareCount<=0)
4282 BEGIN (yyextra->lastSquareContext);
4286 yyextra->current->type +=
"(";
4287 yyextra->roundCount++;
4289<SliceOptional>[0-9]+ {
4290 yyextra->current->type += yytext;
4293 yyextra->current->type +=
")";
4294 if(--yyextra->roundCount<=0)
4296 BEGIN (yyextra->lastModifierContext);
4301 if (--yyextra->squareCount<=0)
4304 if (yyextra->current->mtype == MethodTypes::Property)
4305 BEGIN( IDLPropName );
4307 BEGIN( yyextra->lastSquareContext );
4310<IDLAttribute>"propput" {
4313 yyextra->current->mtype = MethodTypes::Property;
4315 yyextra->current->spec.setSettable(
true);
4317<IDLAttribute>"propget" {
4320 yyextra->current->mtype = MethodTypes::Property;
4322 yyextra->current->spec.setGettable(
true);
4324<IDLAttribute>"property" {
4325 yyextra->current->spec.setProperty(
true);
4327<IDLAttribute>"attribute" {
4328 yyextra->current->spec.setAttribute(
true);
4330<IDLAttribute>"optional" {
4331 yyextra->current->spec.setOptional(
true);
4333<IDLAttribute>"readonly" {
4336 yyextra->current->spec.setSettable(
false);
4340 yyextra->current->spec.setReadonly(
true);
4343<IDLAttribute>"bound" {
4344 yyextra->current->spec.setBound(
true);
4346<IDLAttribute>"removable" {
4347 yyextra->current->spec.setRemovable(
true);
4349<IDLAttribute>"constrained" {
4350 yyextra->current->spec.setConstrained(
true);
4352<IDLAttribute>"transient" {
4353 yyextra->current->spec.setTransient(
true);
4355<IDLAttribute>"maybevoid" {
4356 yyextra->current->spec.setMaybeVoid(
true);
4358<IDLAttribute>"maybedefault" {
4359 yyextra->current->spec.setMaybeDefault(
true);
4361<IDLAttribute>"maybeambiguous" {
4362 yyextra->current->spec.setMaybeAmbiguous(
true);
4366<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4369 if (yyextra->odlProp)
4371 yyextra->idlProp = yytext;
4374<IDLPropName>{ID}{BN}*"(" {
4375 yyextra->current->name = yytext;
4376 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4377 yyextra->current->startLine = yyextra->yyLineNr;
4378 yyextra->current->startColumn = yyextra->yyColNr;
4381<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4382 if (yyextra->odlProp)
4384 yyextra->idlProp += yytext;
4387<IDLPropName>{ID}{BNopt}/";" {
4388 if (yyextra->odlProp)
4390 yyextra->current->name = yytext;
4391 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4392 yyextra->odlProp =
false;
4397<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4398 yyextra->idlAttr = yytext;
4399 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4402 yyextra->idlProp = yytext;
4404<IDLProp>{BN}*{ID}{BN}*"," {
4405 if (yyextra->current->args.empty())
4406 yyextra->current->args =
"(";
4408 yyextra->current->args +=
", ";
4409 yyextra->current->args += yyextra->idlAttr;
4410 yyextra->current->args +=
" ";
4411 yyextra->current->args += yyextra->idlProp;
4412 yyextra->current->args +=
" ";
4413 yyextra->current->args += yytext;
4414 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4415 yyextra->idlProp.clear();
4416 yyextra->idlAttr.clear();
4419<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4423 yyextra->current->fileName = yyextra->fileName;
4424 yyextra->current->type = yyextra->idlProp;
4425 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4426 if (!yyextra->current->args.empty())
4427 yyextra->current->args +=
")";
4428 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4429 yyextra->current->section = EntryType::makeVariable();
4430 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4432 BEGIN( FindMembers );
4437<Array>"]" { yyextra->current->args += *yytext ;
4438 if (--yyextra->squareCount<=0)
4439 BEGIN( FindMembers ) ;
4441<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4442 if (--yyextra->squareCount<=0)
4443 BEGIN( SFunction ) ;
4445<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4446 yyextra->squareCount++;
4448<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4449<SkipSquare>"[" { yyextra->squareCount++; }
4451 if (--yyextra->squareCount<=0)
4452 BEGIN( yyextra->lastSquareContext );
4455 yyextra->lastStringContext=YY_START;
4456 BEGIN( SkipString );
4458<SkipSquare>[^\n\[\]\"]+
4459<FindMembers>"<" {
addType(yyscanner);
4460 yyextra->current->type += yytext ;
4463<Sharp>">" { yyextra->current->type += *yytext ;
4464 if (--yyextra->sharpCount<=0)
4465 BEGIN( FindMembers ) ;
4467<Sharp>"<" { yyextra->current->type += *yytext ;
4468 yyextra->sharpCount++;
4471 yyextra->current->type +=
' ';
4474<Sharp>. { yyextra->current->type += *yytext ; }
4477 yyextra->current->bodyLine = yyextra->yyLineNr;
4478 yyextra->current->bodyColumn = yyextra->yyColNr;
4479 yyextra->current->name = yytext;
4484 yyextra->lastInitializerContext = YY_START;
4485 yyextra->sharpCount=0;
4486 yyextra->initBracketCount=0;
4487 yyextra->current->initializer.str(
"=");
4488 BEGIN(ReadInitializer);
4491 yyextra->lastInitializerContext = YY_START;
4492 yyextra->sharpCount=0;
4493 yyextra->initBracketCount=0;
4494 yyextra->current->initializer.str(yytext);
4495 BEGIN(ReadInitializer);
4498 if (yyextra->insideJava)
4500 if (!yyextra->current->name.empty())
4502 yyextra->current->fileName = yyextra->fileName;
4503 yyextra->current->startLine = yyextra->yyLineNr;
4504 yyextra->current->startColumn = yyextra->yyColNr;
4505 if (!yyextra->current_root->spec.isEnum())
4507 yyextra->current->type =
"@";
4509 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4510 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4511 yyextra->current->section = EntryType::makeVariable();
4512 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4516 BEGIN( FindMembers );
4527 if (!yyextra->current->name.empty())
4529 yyextra->current->fileName = yyextra->fileName;
4530 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4532 yyextra->current->startLine = yyextra->current->bodyLine;
4533 yyextra->current->startColumn = yyextra->current->bodyColumn;
4537 yyextra->current->startLine = yyextra->yyLineNr;
4538 yyextra->current->startColumn = yyextra->yyColNr;
4540 if (!yyextra->current_root->spec.isEnum())
4542 yyextra->current->type =
"@";
4544 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4545 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4546 yyextra->current->section = EntryType::makeVariable();
4548 if (!yyextra->insideCS && !yyextra->insideJava &&
4549 !yyextra->current_root->spec.isStrong())
4556 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4558 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4563 yyextra->current->reset();
4568 yyextra->squareCount=1;
4569 yyextra->lastSquareContext = YY_START;
4572<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4573<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4574<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4577 yyextra->current->program << yytext ;
4580<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4581 yyextra->current->program << yytext ;
4582 yyextra->pSkipInterpString = &yyextra->current->program;
4583 yyextra->lastSkipInterpStringContext=YY_START;
4584 yyextra->strCurlyCount = 0;
4585 BEGIN( SkipInterpString );
4587<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})* {
4588 *yyextra->pSkipInterpString << yytext;
4590<SkipInterpString>"{" {
4591 *yyextra->pSkipInterpString << *yytext;
4592 yyextra->strCurlyCount++;
4594<SkipInterpString>"}" {
4595 *yyextra->pSkipInterpString << *yytext;
4596 yyextra->strCurlyCount--;
4598<SkipInterpString>\" {
4599 *yyextra->pSkipInterpString << *yytext;
4600 if (yyextra->strCurlyCount==0)
4602 BEGIN( yyextra->lastSkipInterpStringContext );
4605<SkipInterpString>. {
4606 *yyextra->pSkipInterpString << *yytext;
4609<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4610 yyextra->current->program << yytext ;
4611 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4612 yyextra->lastSkipInterpVerbStringContext=YY_START;
4613 yyextra->strCurlyCount = 0;
4614 BEGIN( SkipInterpVerbString );
4616<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4617 *yyextra->pSkipInterpVerbString << yytext;
4619<SkipInterpVerbString>"{" {
4620 *yyextra->pSkipInterpVerbString << *yytext;
4621 yyextra->strCurlyCount++;
4623<SkipInterpVerbString>"}" {
4624 *yyextra->pSkipInterpVerbString << *yytext;
4625 yyextra->strCurlyCount--;
4627<SkipInterpVerbString>\" {
4628 *yyextra->pSkipInterpVerbString << *yytext;
4629 if (yyextra->strCurlyCount==0)
4631 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4634<SkipInterpVerbString>. {
4635 *yyextra->pSkipInterpVerbString << *yytext;
4637<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4638<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4639 yyextra->pSkipVerbString = &yyextra->current->program;
4640 yyextra->lastSkipVerbStringContext=YY_START;
4641 BEGIN( SkipVerbString );
4643<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4645 yyextra->current->program << yytext ;
4646 yyextra->pCopyHereDocGString = &yyextra->current->program;
4647 yyextra->lastHereDocContext=YY_START;
4648 BEGIN( CopyHereDoc );
4655<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4656 yyextra->current->program << yytext;
4658 yyextra->lastRawStringContext = YY_START;
4659 yyextra->pCopyRawGString = &yyextra->current->program;
4662<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4663 yyextra->pCopyQuotedGString = &yyextra->current->program;
4664 yyextra->lastStringContext=YY_START;
4665 yyextra->stopAtInvalidString=
false;
4666 BEGIN( CopyGString );
4668<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4669<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4670 yyextra->lastContext = YY_START ;
4673<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4674 ++yyextra->yyLineNr ;
4675 yyextra->lastContext = YY_START ;
4678<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4679 if (!yyextra->insidePHP)
4681 yyextra->current->program << yytext;
4685 yyextra->current->program << yytext;
4686 yyextra->pCopyQuotedGString = &yyextra->current->program;
4687 yyextra->lastStringContext=YY_START;
4688 BEGIN(CopyPHPGString);
4691<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4692 if (yyextra->insidePHP)
4699 yyextra->current->program << yytext;
4702<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4703 ++yyextra->curlyCount ;
4706 yyextra->current->program << yytext ;
4707 --yyextra->curlyCount ;
4709<ReadBody,ReadNSBody>"}" {
4710 if ( yyextra->curlyCount>0 )
4712 yyextra->current->program << yytext ;
4713 --yyextra->curlyCount ;
4717 yyextra->current->endBodyLine = yyextra->yyLineNr;
4718 std::shared_ptr<Entry> original_root = yyextra->current_root;
4719 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4723 DString doc = yyextra->current->doc;
4724 int docLine = yyextra->current->docLine;
4725 DString docFile = yyextra->current->docFile;
4726 DString brief = yyextra->current->brief;
4727 int briefLine = yyextra->current->briefLine;
4728 DString briefFile = yyextra->current->briefFile;
4729 auto groups = yyextra->current->groups;
4730 auto anchors = yyextra->current->anchors;
4731 auto sli = yyextra->current->sli;
4732 auto rqli = yyextra->current->rqli;
4734 yyextra->current->doc =
"";
4735 yyextra->current->docLine = 0;
4736 yyextra->current->docFile =
"";
4737 yyextra->current->brief =
"";
4738 yyextra->current->briefLine = 0;
4739 yyextra->current->briefFile =
"";
4740 yyextra->current->groups.
clear();
4741 yyextra->current->anchors.clear();
4742 yyextra->current->sli.clear();
4743 yyextra->current->rqli.clear();
4745 while ((split_point = yyextra->current->name.find(
"::")) !=
DString::npos)
4747 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4748 yyextra->current->program.str(std::string());
4749 new_current->name = yyextra->current->name.mid(split_point + 2);
4750 yyextra->current->name = yyextra->current->name.left(split_point);
4751 if (yyextra->current->name.startsWith(
"inline "))
4753 yyextra->current->name = yyextra->current->name.mid(7);
4754 yyextra->current->spec.setInline(
true);
4756 if (!yyextra->current_root->name.empty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4758 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4759 yyextra->current_root = yyextra->current;
4760 yyextra->current = new_current;
4763 yyextra->current->doc = doc;
4764 yyextra->current->docLine = docLine;
4765 yyextra->current->docFile = docFile;
4766 yyextra->current->brief = brief;
4767 yyextra->current->briefLine = briefLine;
4768 yyextra->current->briefFile = briefFile;
4769 yyextra->current->groups = groups;
4770 yyextra->current->anchors = anchors;
4771 yyextra->current->sli = sli;
4772 yyextra->current->rqli = rqli;
4774 DString &cn = yyextra->current->name;
4778 yyextra->current->spec.setInline(
true);
4780 DString rn = yyextra->current_root->name;
4786 if (yyextra->isTypedef && cn.
empty())
4789 BEGIN( TypedefName );
4793 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4795 yyextra->current->program <<
',';
4800 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4801 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4803 if (yyextra->insideObjC &&
4804 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4807 BEGIN( ReadBodyIntf ) ;
4811 yyextra->memspecEntry = yyextra->current;
4812 if (yyextra->isTypedef)
4814 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4815 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4819 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4820 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4822 if (yyextra->current->section.isNamespace() ||
4823 yyextra->current->spec.isInterface() ||
4824 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4825 yyextra->insideSlice
4828 yyextra->current->reset();
4829 yyextra->current_root = std::move(original_root);
4831 yyextra->memspecEntry.reset();
4832 BEGIN( FindMembers ) ;
4836 if (!yyextra->isTypedef)
4838 yyextra->current->doc.clear();
4839 yyextra->current->brief.clear();
4841 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4847<ReadBody>"}"{BN}+"typedef"{BN}+ {
4849 if ( yyextra->curlyCount>0 )
4851 yyextra->current->program << yytext ;
4852 --yyextra->curlyCount ;
4856 yyextra->isTypedef =
true;
4857 yyextra->current->endBodyLine = yyextra->yyLineNr;
4858 DString &cn = yyextra->current->name;
4859 DString rn = yyextra->current_root->name;
4864 BEGIN( TypedefName );
4867<TypedefName>("const"|"volatile"){BN} {
4869 yyextra->current->type.prepend(yytext);
4872 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4874 yyextra->current->program <<
",";
4876 yyextra->current->name=yytext;
4878 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4879 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4881 if (!yyextra->firstTypedefEntry)
4883 yyextra->firstTypedefEntry = yyextra->current;
4885 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4887 yyextra->isTypedef=
true;
4888 BEGIN(MemberSpecSkip);
4892 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4894 yyextra->current->program <<
',';
4897 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4898 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4899 yyextra->memspecEntry = yyextra->current;
4900 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4903 BEGIN( MemberSpec ) ;
4905<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4907 int i=0,l=(int)yyleng;
4908 while (i<l && (!
isId(yytext[i]))) i++;
4912 yyextra->msArgs=yyextra->msName.mid(j);
4913 yyextra->msName=yyextra->msName.left(j);
4918 if (yyextra->firstTypedefEntry)
4920 if (yyextra->firstTypedefEntry->spec.isStruct())
4922 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4924 else if (yyextra->firstTypedefEntry->spec.isUnion())
4926 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4928 else if (yyextra->firstTypedefEntry->section.isEnum())
4930 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4932 else if (yyextra->firstTypedefEntry->spec.isRecord())
4934 yyextra->msType.prepend(
"record "+yyextra->firstTypedefEntry->name);
4938 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
DString right(size_t len) const
bool isId(char c)
Returns true if c is a valid character for an identifier.
4944 yyextra->current->name = yyextra->msName;
4951 if (yyextra->msName.empty() && !yyextra->current->name.empty())
4957 const Entry *p=yyextra->current.get();
4975 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4979 if (!yyextra->msName.empty()
4985 if (typedefHidesStruct &&
4986 yyextra->isTypedef &&
4987 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isRecord() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4988 yyextra->msType.stripWhiteSpace().empty() &&
4989 yyextra->memspecEntry)
4991 yyextra->memspecEntry->name=yyextra->msName;
4995 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4996 varEntry->lang = yyextra->language;
4997 varEntry->protection = yyextra->current->protection ;
4998 varEntry->mtype = yyextra->current->mtype;
4999 varEntry->virt = yyextra->current->virt;
5000 varEntry->isStatic = yyextra->current->isStatic;
5001 varEntry->section = EntryType::makeVariable();
5002 varEntry->name = yyextra->msName.stripWhiteSpace();
5003 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
5004 varEntry->args = yyextra->msArgs;
5005 if (yyextra->isTypedef)
5007 varEntry->type.prepend(
"typedef ");
5010 if (typedefHidesStruct &&
5011 yyextra->isTypedef &&
5012 (yyextra->current->spec.isStruct() || yyextra->current->spec.isRecord() || yyextra->current->spec.isUnion()) &&
5013 yyextra->memspecEntry
5016 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
5020 varEntry->type+=yyextra->current->name+yyextra->msType;
5022 varEntry->fileName = yyextra->fileName;
5023 varEntry->startLine = yyextra->yyLineNr;
5024 varEntry->startColumn = yyextra->yyColNr;
5025 varEntry->doc = yyextra->current->doc;
5026 varEntry->brief = yyextra->current->brief;
5027 varEntry->mGrpId = yyextra->current->mGrpId;
5028 varEntry->initializer.str(yyextra->current->initializer.str());
5029 varEntry->groups = yyextra->current->groups;
5030 varEntry->sli = yyextra->current->sli;
5035 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
5040 if (!yyextra->isTypedef && yyextra->msName.empty() &&
5041 yyextra->memspecEntry && yyextra->current->section.isCompound())
5043 if (!yyextra->current->doc.empty())
5045 yyextra->memspecEntry->doc += yyextra->current->doc;
5047 if (!yyextra->current->brief.empty())
5049 yyextra->memspecEntry->brief += yyextra->current->brief;
5052 yyextra->msType.clear();
5053 yyextra->msName.clear();
5054 yyextra->msArgs.clear();
5055 yyextra->isTypedef=
false;
5056 yyextra->firstTypedefEntry.reset();
5057 yyextra->memspecEntry.reset();
5058 yyextra->current->reset();
5060 BEGIN( FindMembers );
5064 yyextra->current->doc.clear();
5065 yyextra->current->brief.clear();
size_t rfind(char c, size_t pos=npos) const
char & at(size_t i)
Returns a reference to the character at index i.
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
5070 yyextra->lastInitializerContext=YY_START;
5071 yyextra->sharpCount=0;
5072 yyextra->initBracketCount=0;
5073 yyextra->current->initializer.str(yytext);
5074 BEGIN(ReadInitializer);
5085<MemberSpecSkip>"," { BEGIN(MemberSpec); }
5086<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
5087<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5090<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5091 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5093 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5094 yyextra->insideObjC=
false;
5095 BEGIN( FindMembers );
5097<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5098<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5100<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5101<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5102 if (yyextra->insidePHP)
5108 yyextra->current->bodyLine = yyextra->yyLineNr;
5109 yyextra->current->bodyColumn = yyextra->yyColNr;
5112 yyextra->funcPtrType=yytext;
5113 yyextra->roundCount=0;
5118<FuncPtr>{SCOPENAME} {
5119 yyextra->current->name = yytext;
5122 BEGIN( FuncPtrOperator );
5126 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5128 yyextra->funcPtrType += yyextra->current->name;
5132 BEGIN( EndFuncPtr );
5139<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5140 yyextra->current->name += yytext;
5141 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5144<FuncPtrOperator>\n {
5146 yyextra->current->name += *yytext;
5148<FuncPtrOperator>"(" {
5150 BEGIN( EndFuncPtr );
5153 yyextra->current->name += *yytext;
5155<EndFuncPtr>")"{BNopt}/";" {
5157 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5160<EndFuncPtr>")"{BNopt}/"(" {
5162 if (yyextra->funcPtrType!=
"(")
5164 yyextra->current->type+=yyextra->funcPtrType+
")";
5168<EndFuncPtr>")"{BNopt}/"[" {
5170 yyextra->current->type+=yyextra->funcPtrType;
5171 yyextra->current->args +=
")";
5176 yyextra->current->args += *yytext ;
5179 yyextra->current->bodyLine = yyextra->yyLineNr;
5180 yyextra->current->bodyColumn = yyextra->yyColNr;
5181 yyextra->currentArgumentContext = FuncFuncEnd;
5182 yyextra->fullArgString=yyextra->current->args;
5183 yyextra->copyArgString=&yyextra->current->args;
5184 BEGIN( ReadFuncArgType ) ;
5186<EndFuncPtr>"["[^\n\]]*"]" {
5187 yyextra->funcPtrType+=yytext;
5193 yyextra->current->args += *yytext ;
5194 ++yyextra->roundCount;
5197 yyextra->current->args += *yytext ;
5198 if ( yyextra->roundCount )
5199 --yyextra->roundCount;
5205<FuncFuncEnd>")"{BN}*"(" {
5207 yyextra->current->type+=yyextra->funcPtrType+
")(";
5208 BEGIN(FuncFuncType);
5210<FuncFuncEnd>")"{BNopt}/[;{] {
5212 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5215<FuncFuncEnd>")"{BNopt}/"[" {
5217 yyextra->current->type+=yyextra->funcPtrType;
5218 yyextra->current->args+=
")";
5219 BEGIN(FuncFuncArray);
5222 yyextra->current->args += *yytext;
5225 yyextra->current->type += *yytext;
5226 yyextra->roundCount++;
5229 yyextra->current->type += *yytext;
5230 if (yyextra->roundCount)
5231 --yyextra->roundCount;
5235<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5236<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5238 yyextra->current->type += *yytext;
5240<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5241 if (yyextra->current->type.startsWith(
"typedef") &&
5242 yyextra->current->bodyLine==-1)
5245 yyextra->current->bodyLine = yyextra->yyLineNr;
5246 yyextra->current->bodyColumn = yyextra->yyColNr;
5247 BEGIN( GetCallType );
5249 else if (!yyextra->current->name.empty())
5251 yyextra->current->args = yytext;
5252 yyextra->current->bodyLine = yyextra->yyLineNr;
5253 yyextra->current->bodyColumn = yyextra->yyColNr;
5254 yyextra->currentArgumentContext = FuncQual;
5255 yyextra->fullArgString=yyextra->current->args;
5256 yyextra->copyArgString=&yyextra->current->args;
5257 BEGIN( ReadFuncArgType ) ;
5261<GetCallType>{BN}*{ID}{BN}*"*" {
5264 yyextra->funcPtrType=
"(";
5265 yyextra->funcPtrType+=yytext;
5266 yyextra->roundCount=0;
5270 if (yyextra->insideCS && yyextra->current->name.empty())
5275 yyextra->current->type += *yytext;
5276 yyextra->lastRoundContext = FindMembers;
5277 yyextra->pCopyRoundString = &yyextra->current->type;
5278 yyextra->roundCount = 0;
5281 else if (!yyextra->current->name.empty())
5283 yyextra->current->args = yytext;
5284 yyextra->current->bodyLine = yyextra->yyLineNr;
5285 yyextra->current->bodyColumn = yyextra->yyColNr;
5286 yyextra->currentArgumentContext = FuncQual;
5287 yyextra->fullArgString=yyextra->current->args;
5288 yyextra->copyArgString=&yyextra->current->args;
5289 BEGIN( ReadFuncArgType ) ;
5296<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5297 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5298 else yyextra->fullArgString+=yytext;
5300<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5301 yyextra->fullArgString+=yytext;
5303<CopyArgRound>[^\/\n\)\(\"\']+ {
5304 *yyextra->copyArgString+=yytext;
5305 yyextra->fullArgString+=yytext;
5307<CopyArgSquare>[^\/\n\]\[\"\']+ {
5308 *yyextra->copyArgString+=yytext;
5309 yyextra->fullArgString+=yytext;
5311<ReadFuncArgType,ReadTempArgs>{BN}* {
5312 *yyextra->copyArgString+=
" ";
5313 yyextra->fullArgString+=
" ";
5316<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5318 yyextra->lastRawStringContext = YY_START;
5319 yyextra->pCopyRawString = yyextra->copyArgString;
5320 *yyextra->pCopyRawString+=yytext;
5321 yyextra->fullArgString+=yytext;
5324<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5325 *yyextra->copyArgString+=*yytext;
5326 yyextra->fullArgString+=*yytext;
5327 yyextra->lastCopyArgStringContext = YY_START;
5328 BEGIN( CopyArgString );
5330<ReadFuncArgType>"[" {
5331 if (!yyextra->insidePHP) REJECT;
5332 *yyextra->copyArgString+=*yytext;
5333 yyextra->fullArgString+=*yytext;
5334 yyextra->argSquareCount=0;
5335 yyextra->lastCopyArgContext = YY_START;
5336 BEGIN( CopyArgSquare );
5338<ReadFuncArgType,ReadTempArgs>"(" {
5339 *yyextra->copyArgString+=*yytext;
5340 yyextra->fullArgString+=*yytext;
5341 yyextra->argRoundCount=0;
5342 yyextra->lastCopyArgContext = YY_START;
5343 BEGIN( CopyArgRound );
5345<ReadFuncArgType>")" {
5346 *yyextra->copyArgString+=*yytext;
5347 yyextra->fullArgString+=*yytext;
5349 if (yyextra->insideJS)
5360 yyextra->docBackup = yyextra->current->doc;
5361 yyextra->briefBackup = yyextra->current->brief;
5363 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)
5366<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5367 if (yyextra->currentArgumentContext==DefineEnd)
5371 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5377 BEGIN( yyextra->currentArgumentContext );
5383 yyextra->fullArgString+=yytext;
5384 yyextra->lastCopyArgChar=0;
5385 yyextra->lastCommentInArgContext=YY_START;
5387 BEGIN( CopyArgCommentLine );
5389 BEGIN( CopyArgComment );
5393<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5394<ReadFuncArgType,ReadTempArgs>{CCS} {
5395 yyextra->lastCContext = YY_START;
5396 BEGIN( SkipComment );
5398<ReadFuncArgType,ReadTempArgs>{CPPC} {
5399 yyextra->lastCContext = YY_START;
5400 BEGIN( SkipCxxComment );
5416<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5418 if (yyextra->currentArgumentContext==DefineEnd)
5422 int i;
for (i=(
int)yyleng-1;i>0;i--)
5426 *yyextra->copyArgString+=*yytext;
5427 yyextra->fullArgString+=*yytext;
5430 BEGIN( yyextra->currentArgumentContext );
5436 yyextra->lastCopyArgChar=*yytext;
5439 yyextra->lastCommentInArgContext=YY_START;
5440 yyextra->fullArgString+=text;
5442 BEGIN( CopyArgCommentLine );
5444 BEGIN( CopyArgComment );
5447<CopyArgComment>^{B}*"*"+/{BN}+
5448<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5449<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5450 if (yyextra->lastCopyArgChar!=0)
5451 unput(yyextra->lastCopyArgChar);
5452 BEGIN( yyextra->lastCommentInArgContext );
5454<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5456 if (yyextra->lastCopyArgChar!=0)
5457 unput(yyextra->lastCopyArgChar);
5458 BEGIN( yyextra->lastCommentInArgContext );
5460<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5461 yyextra->docBlockName=
"uml";
5462 yyextra->fullArgString+=yytext;
5463 BEGIN(CopyArgVerbatim);
5465<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5466 yyextra->docBlockName=&yytext[1];
5467 yyextra->fullArgString+=yytext;
5468 BEGIN(CopyArgVerbatim);
5470<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5471 yyextra->docBlockName=&yytext[1];
5472 if (yyextra->docBlockName.at(1)==
'[')
5474 yyextra->docBlockName.at(1)=
']';
5476 if (yyextra->docBlockName.at(1)==
'{')
5478 yyextra->docBlockName.at(1)=
'}';
5480 if (yyextra->docBlockName.at(1)==
'(')
5482 yyextra->docBlockName.at(1)=
')';
5484 yyextra->fullArgString+=yytext;
5485 BEGIN(CopyArgVerbatim);
5487<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5488 yyextra->fullArgString+=yytext;
5489 if (&yytext[4]==yyextra->docBlockName)
5491 yyextra->docBlockName=
"";
5492 BEGIN(CopyArgCommentLine);
5495<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5496 yyextra->fullArgString+=yytext;
5497 if (yyextra->docBlockName==&yytext[1])
5499 yyextra->docBlockName=
"";
5500 BEGIN(CopyArgCommentLine);
5503<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5504<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5505<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5506<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5507<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5508 warn(yyextra->fileName,yyextra->yyLineNr,
5509 "Ignoring {:c}brief command inside argument documentation",*yytext
5511 yyextra->fullArgString+=
' ';
5514 *yyextra->copyArgString+=*yytext;
5515 yyextra->fullArgString+=*yytext;
5516 yyextra->argSharpCount=1;
5517 BEGIN( CopyArgSharp );
5520 *yyextra->copyArgString+=*yytext;
5521 yyextra->fullArgString+=*yytext;
5523 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5525 BEGIN( yyextra->currentArgumentContext );
5528 yyextra->argRoundCount++;
5529 *yyextra->copyArgString+=*yytext;
5530 yyextra->fullArgString+=*yytext;
5533 *yyextra->copyArgString+=*yytext;
5534 yyextra->fullArgString+=*yytext;
5535 if (yyextra->argRoundCount>0)
5536 yyextra->argRoundCount--;
5538 BEGIN( yyextra->lastCopyArgContext );
5541 yyextra->argSquareCount++;
5542 *yyextra->copyArgString+=*yytext;
5543 yyextra->fullArgString+=*yytext;
5546 *yyextra->copyArgString+=*yytext;
5547 yyextra->fullArgString+=*yytext;
5548 if (yyextra->argSquareCount>0)
5549 yyextra->argSquareCount--;
5551 BEGIN( yyextra->lastCopyArgContext );
5554 *yyextra->copyArgString+=*yytext;
5555 yyextra->fullArgString+=*yytext;
5556 yyextra->argRoundCount=0;
5557 yyextra->lastCopyArgContext = YY_START;
5558 BEGIN( CopyArgRound );
5561 yyextra->argSharpCount++;
5563 *yyextra->copyArgString+=*yytext;
5564 yyextra->fullArgString+=*yytext;
5567 *yyextra->copyArgString+=*yytext;
5568 yyextra->fullArgString+=*yytext;
5569 yyextra->argSharpCount--;
5570 if (yyextra->argSharpCount>0)
5576 BEGIN( ReadTempArgs );
5580<CopyArgString,CopyArgPHPString>\\. {
5581 *yyextra->copyArgString+=yytext;
5582 yyextra->fullArgString+=yytext;
5585 *yyextra->copyArgString+=*yytext;
5586 yyextra->fullArgString+=*yytext;
5587 BEGIN( yyextra->lastCopyArgStringContext );
5589<CopyArgPHPString>\' {
5590 *yyextra->copyArgString+=*yytext;
5591 yyextra->fullArgString+=*yytext;
5592 BEGIN( yyextra->lastCopyArgStringContext );
5594<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5595 if (yyextra->insidePHP)
5601 *yyextra->copyArgString+=yytext;
5602 yyextra->fullArgString+=yytext;
5605<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5606 *yyextra->copyArgString+=yytext;
5607 yyextra->fullArgString+=yytext;
5608 if (yyextra->insidePHP)
5610 yyextra->lastCopyArgStringContext=YY_START;
5611 BEGIN(CopyArgPHPString);
5614<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5615 *yyextra->copyArgString+=yytext;
5616 yyextra->fullArgString+=yytext;
5618<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5620 *yyextra->copyArgString+=*yytext;
5621 yyextra->fullArgString+=*yytext;
5623<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5624 *yyextra->copyArgString+=yytext;
5625 yyextra->fullArgString+=yytext;
5627<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5628 *yyextra->copyArgString+=*yytext;
5629 yyextra->fullArgString+=*yytext;
5637<FuncRound>"(" { yyextra->current->args += *yytext ;
5638 ++yyextra->roundCount ;
5640<FuncRound>")" { yyextra->current->args += *yytext ;
5641 if ( yyextra->roundCount )
5642 --yyextra->roundCount ;
5654 if (
dstrcmp(yytext,
";")==0 &&
5655 ((yyextra->insideJS || yyextra->insidePHP) &&
5656 !yyextra->current->type.containsWord(
"function")) )
5658 yyextra->current->reset();
5660 BEGIN( FindMembers );
5664 unput(*yytext); BEGIN( SFunction );
5667<FuncQual>{BN}*"abstract"{BN}* {
5669 yyextra->current->virt = Specifier::Pure;
5670 yyextra->current->args +=
" override ";
5672<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5674 yyextra->current->spec.setOverride(
true);
5675 yyextra->current->args +=
" override ";
5676 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5679<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5681 yyextra->current->spec.setFinal(
true);
5682 yyextra->current->args +=
" final ";
5683 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5686<FuncQual>{BN}*"sealed"{BN}* {
5688 yyextra->current->spec.setSealed(
true);
5689 yyextra->current->args +=
" sealed ";
5691<FuncQual>{BN}*"new"{BN}* {
5693 yyextra->current->spec.setNew(
true);
5694 yyextra->current->args +=
" new ";
5696<FuncQual>{BN}*"const"{BN}* {
5698 yyextra->current->args +=
" const ";
5699 yyextra->current->argList.setConstSpecifier(
true);
5701<FuncQual>{BN}*"volatile"{BN}* {
5703 yyextra->current->args +=
" volatile ";
5704 yyextra->current->argList.setVolatileSpecifier(
true);
5706<FuncQual>{BN}*"noexcept"{BN}* {
5708 yyextra->current->args +=
" noexcept ";
5709 yyextra->current->spec.setNoExcept(
true);
5711<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5713 yyextra->current->args +=
" noexcept(false)";
5715<FuncQual>{BN}*"noexcept"{BN}*"(" {
5717 yyextra->current->args +=
" noexcept(";
5718 yyextra->current->spec.setNoExcept(
true);
5719 yyextra->lastRoundContext=FuncQual;
5720 yyextra->pCopyRoundString=&yyextra->current->args;
5721 yyextra->roundCount=0;
5725 yyextra->current->args +=
" &";
5728<FuncQual>{BN}*"&&" {
5729 yyextra->current->args +=
" &&";
5733<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5735 yyextra->current->args +=
" = 0";
5736 yyextra->current->virt = Specifier::Pure;
5737 yyextra->current->argList.setPureSpecifier(
true);
5738 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5741<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5743 yyextra->current->args +=
" = delete";
5744 yyextra->current->spec.setDelete(
true);
5745 yyextra->current->argList.setIsDeleted(
true);
5746 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5749<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5751 yyextra->current->args +=
" = default";
5752 yyextra->current->spec.setDefault(
true);
5753 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5756<FuncQual>{BN}*"->"{BN}* {
5758 yyextra->current->argList.setTrailingReturnType(
" -> ");
5759 yyextra->current->args +=
" -> ";
5760 yyextra->roundCount=0;
5761 BEGIN(TrailingReturn);
5763<TrailingReturn>[{;] {
5764 if (yyextra->roundCount>0) REJECT;
5766 yyextra->current->argList.finishTrailingReturnType();
5769<TrailingReturn>"requires"{BN}+ {
5770 if (yyextra->insideJava) REJECT;
5771 yyextra->requiresContext = FuncQual;
5772 yyextra->current->req+=
' ';
5773 yyextra->current->argList.finishTrailingReturnType();
5774 BEGIN(RequiresClause);
5776<TrailingReturn>"(" {
5777 yyextra->roundCount++;
5778 yyextra->current->argList.appendTrailingReturnType(yytext);
5779 yyextra->current->args+=yytext;
5781<TrailingReturn>")" {
5782 if (yyextra->roundCount>0)
5784 yyextra->roundCount--;
5788 warn(yyextra->fileName,yyextra->yyLineNr,
5789 "Found ')' without opening '(' for trailing return type '{})...'",
5790 yyextra->current->argList.trailingReturnType());
5792 yyextra->current->argList.appendTrailingReturnType(yytext);
5793 yyextra->current->args+=yytext;
5796 yyextra->current->argList.appendTrailingReturnType(yytext);
5797 yyextra->current->args+=yytext;
5801 yyextra->current->argList.appendTrailingReturnType(yytext);
5802 yyextra->current->args+=
' ';
5804<FuncRound,FuncFunc>{BN}*","{BN}* {
5806 yyextra->current->args +=
", " ;
5808<FuncQual,FuncRound,FuncFunc>{BN}+ {
5810 yyextra->current->args +=
' ' ;
5812<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5814 yyextra->lastCPPContext = YY_START;
5818 if (!yyextra->insideCS)
5825 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5832 yyextra->lastInitializerContext=YY_START;
5833 yyextra->sharpCount=0;
5834 yyextra->initBracketCount=0;
5835 yyextra->current->initializer.str(yytext);
5836 BEGIN(ReadInitializer);
5839<ReadExpressionBody>";" {
5840 if (!yyextra->current->sli.empty() && yyextra->previous)
5842 yyextra->previous->sli = yyextra->current->sli;
5843 yyextra->current->sli.clear();
5845 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5860 if (yyextra->insideCpp &&
dstrcmp(yytext,
"requires")==0)
5863 yyextra->requiresContext = YY_START;
5864 if (!yyextra->current->req.empty())
5866 yyextra->current->req+=
" && ";
5868 BEGIN(RequiresClause);
5870 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
5873 yyextra->current->typeConstr.clear();
5874 yyextra->current->typeConstr.push_back(
Argument());
5875 yyextra->lastCSConstraint = YY_START;
5876 BEGIN( CSConstraintName );
5880 yyextra->current->args = yytext;
5881 yyextra->oldStyleArgType.clear();
5882 BEGIN(OldStyleArgs);
5886 yyextra->current->args += yytext;
5892 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5894 if (yyextra->current->doc!=yyextra->docBackup)
5896 doc=yyextra->current->doc;
5897 yyextra->current->doc=yyextra->docBackup;
5899 if (yyextra->current->brief!=yyextra->briefBackup)
5901 brief=yyextra->current->brief;
5902 yyextra->current->brief=yyextra->briefBackup;
5904 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5905 oldStyleArgName,brief,doc);
5906 yyextra->current->args.clear();
5907 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5909<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5911 if (yyextra->current->argList.empty())
5913 yyextra->current->argList.setNoParameters(
true);
5919<OldStyleArgs>. { yyextra->current->args += *yytext; }
5920<FuncQual,FuncRound,FuncFunc>\" {
5921 if (yyextra->insideIDL && yyextra->insideCppQuote)
5927 yyextra->current->args += *yytext;
5930<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5931<FuncQual>{BN}*"try:" |
5932<FuncQual>{BN}*"try"{BN}+ {
5933 yyextra->insideTryBlock=
true;
5935 if (yytext[yyleng-1]==
':')
5941<FuncQual>{BN}*"throw"{BN}*"(" {
5942 yyextra->current->exception =
" throw (" ;
5943 yyextra->roundCount=0;
5945 BEGIN( ExcpRound ) ;
5947<FuncQual>{BN}*"raises"{BN}*"(" {
5948 yyextra->current->exception =
" raises (" ;
5950 yyextra->roundCount=0;
5951 BEGIN( ExcpRound ) ;
5953<FuncQual>{BN}*"throws"{BN}+ {
5954 yyextra->current->exception =
" throws " ;
5958<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5959 ++yyextra->roundCount ;
5961<ExcpRound>")" { yyextra->current->exception += *yytext ;
5962 if ( yyextra->roundCount )
5963 --yyextra->roundCount ;
5968 yyextra->current->exception += *yytext;
5971 unput(
'{'); BEGIN( FuncQual );
5974 unput(
';'); BEGIN( FuncQual );
5977 yyextra->current->exception +=
' ';
5981 yyextra->current->exception += *yytext;
5983<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5984 yyextra->current->name = yyextra->current->args ;
5985 yyextra->current->args = yytext ;
5986 yyextra->roundCount=0;
5987 BEGIN( FuncRound ) ;
5990 if (!yyextra->insidePHP) BEGIN(SkipInits);
5996 yyextra->current->fileName = yyextra->fileName;
5997 yyextra->current->startLine = yyextra->yyBegLineNr;
5998 yyextra->current->startColumn = yyextra->yyBegColNr;
5999 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
6001 std::string type = yyextra->current->type.str();
6005 ti =
match.position();
6009 if (
size_t di = yyextra->current->type.find(
"decltype(");
6015 size_t ts=yyextra->current->type.find(
'<');
6016 size_t te=yyextra->current->type.rfind(
'>');
6019 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
6022 bool isVariable = !yyextra->current->type.empty() &&
6023 (!isFunction || startsWithTypedef);
6028 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
6033 if (yyextra->isTypedef && !startsWithTypedef)
6035 yyextra->current->type.prepend(
"typedef ");
6037 yyextra->current->section = EntryType::makeVariable() ;
6042 yyextra->current->section = EntryType::makeFunction() ;
6043 yyextra->current->proto = *yytext==
';';
6051 if (yyextra->isTypedef && !startsWithTypedef)
6053 yyextra->current->type.prepend(
"typedef ");
6056 yyextra->current->section = EntryType::makeVariable();
6061 yyextra->current->section = EntryType::makeFunction();
6062 yyextra->current->proto =
true;
6066 if ( yyextra->insidePHP)
6068 if (yyextra->current->type.findAndRemoveWord(
"final"))
6070 yyextra->current->spec.setFinal(
true);
6072 if (yyextra->current->type.findAndRemoveWord(
"abstract"))
6074 yyextra->current->spec.setAbstract(
true);
6077 if ( yyextra->insidePHP && !yyextra->current->type.containsWord(
"function"))
6080 if ( *yytext ==
'{' )
6082 yyextra->lastCurlyContext = FindMembers;
6083 yyextra->curlyCount=0;
6088 BEGIN( FindMembers );
6093 if ( yyextra->insidePHP)
6095 yyextra->current->type.findAndRemoveWord(
"function");
6097 yyextra->previous = yyextra->current;
6098 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6101 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6103 yyextra->current->spec.setOptional(
true).setRequired(
true);
6105 yyextra->lastCurlyContext = FindMembers;
6106 if ( *yytext ==
',' )
6108 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6110 if ( *yytext ==
'{' )
6112 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6114 yyextra->previous->spec.setInline(
true);
6116 yyextra->curlyCount=0;
6117 BEGIN( SkipCurly ) ;
6119 else if ( *yytext ==
'=' )
6121 yyextra->previous->spec.setInline(
true);
6122 yyextra->curlyCount=0;
6123 BEGIN( ReadExpressionBody );
6127 if (!yyextra->previous->section.isVariable())
6128 yyextra->previous->bodyLine=-1;
6129 BEGIN( FindMembers ) ;
Class representing a regular expression.
Object representing the matching results.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
6133<SkipInits>">"{BN}*"{" {
6135 yyextra->curlyCount=1;
6136 BEGIN(SkipC11Inits);
6138<SkipInits>{ID}{BN}*"{" {
6140 yyextra->curlyCount=1;
6141 BEGIN(SkipC11Inits);
6144 ++yyextra->curlyCount;
6147 if ( --yyextra->curlyCount<=0 )
6158 ++yyextra->curlyCount ;
6160<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6163 if( yyextra->curlyCount )
6165 --yyextra->curlyCount ;
6169 if (!yyextra->current->sli.empty() && yyextra->previous)
6171 yyextra->previous->sli = yyextra->current->sli;
6172 yyextra->current->sli.clear();
6174 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6175 BEGIN( yyextra->lastCurlyContext ) ;
6178<SkipCurly>"}"{BN}*{DCOMM}"<" {
6180 if ( yyextra->curlyCount )
6183 --yyextra->curlyCount ;
6187 yyextra->current->endBodyLine=yyextra->yyLineNr;
6188 yyextra->tempEntry = yyextra->current;
6189 yyextra->current = yyextra->previous;
6191 yyextra->docBlockContext = SkipCurlyEndDoc;
6192 yyextra->docBlockInBody =
false;
6193 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6195 yyextra->docBlock.str(std::string());
6196 yyextra->docBlockTerm =
'}';
6197 if (yytext[yyleng-3]==
'/')
6209<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6210 yyextra->docBlockContext = SkipCurlyEndDoc;
6211 yyextra->docBlockInBody =
false;
6212 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6214 yyextra->docBlock.str(std::string());
6215 yyextra->docBlockTerm =
'}';
6216 if (yytext[yyleng-3]==
'/')
6227<SkipCurlyEndDoc>"}" {
6229 if (yyextra->tempEntry)
6231 yyextra->current = yyextra->tempEntry;
6232 yyextra->tempEntry.reset();
6234 BEGIN( yyextra->lastCurlyContext );
6236<SkipCurly,ReadExpressionBody>\" {
6238 yyextra->lastStringContext=YY_START;
6239 BEGIN( SkipString );
6241<SkipCurly>^{B}*"#" {
6242 if (yyextra->insidePHP)
6245 BEGIN( SkipCurlyCpp );
6247<SkipCurly,SkipC11Inits,SkipInits,ReadExpressionBody>\n {
6251<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6252 if (!yyextra->insidePHP)
6258 yyextra->lastHereDocContext = YY_START;
6262<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6264 yyextra->lastRawStringContext = YY_START;
6265 yyextra->dummyRawString.clear();
6266 yyextra->pCopyRawString = &yyextra->dummyRawString;
6267 *yyextra->pCopyRawString += yytext;
6270<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6274<SkipCurly,SkipCurlyCpp>"\$" {}
6278 yyextra->lastCurlyContext = FindMembers;
6281<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6285<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CCS} {
6287 yyextra->lastCContext = YY_START;
6290<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CPPC} {
6292 yyextra->lastCContext = YY_START;
6293 BEGIN(SkipCxxComment);
6295<SkipInits,SkipC11Inits>"(" {
6296 yyextra->roundCount=0;
6297 yyextra->lastSkipRoundContext=YY_START;
6300<SkipInits,SkipC11Inits>\" {
6301 yyextra->lastStringContext=YY_START;
6302 BEGIN( SkipString );
6305 warn(yyextra->fileName,yyextra->yyLineNr,
6306 "Found ';' while parsing initializer list! "
6307 "(doxygen could be confused by a macro call without semicolon)"
6309 BEGIN( FindMembers );
6311<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6312 if (!yyextra->insidePHP)
6315 yyextra->lastCContext = YY_START;
6316 BEGIN(SkipCxxComment);
6318<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6319 if (!yyextra->insideCS) REJECT;
6322 yyextra->lastSkipVerbStringContext=YY_START;
6323 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6324 yyextra->dummyTextStream.clear();
6325 BEGIN(SkipVerbString);
6327<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6328 if (yyextra->insidePHP) REJECT;
6330<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6331 if (yyextra->insidePHP)
6333 yyextra->lastStringContext=YY_START;
6334 BEGIN(SkipPHPString);
6337<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>. { }
6338<SkipString,SkipPHPString>\\. { }
6340 BEGIN( yyextra->lastStringContext );
6343 BEGIN( yyextra->lastStringContext );
6345<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6346<SkipString,SkipPHPString>\n {
6350<SkipString,SkipPHPString>. { }
6356 yyextra->current->section = EntryType::makeEmpty() ;
6357 yyextra->current->type.clear() ;
6358 yyextra->current->name.clear() ;
6359 yyextra->current->args.clear() ;
6360 yyextra->current->argList.clear();
6361 BEGIN( FindMembers ) ;
6364 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6368 if (!yyextra->current->name.empty() && !yyextra->current_root->name.empty())
6372 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6374 if (!yyextra->baseName.empty())
6376 yyextra->current->extends.emplace_back(
6377 yyextra->baseName,Protection::Public,Specifier::Normal);
6378 yyextra->baseName.clear();
6380 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6385 yyextra->current->section = EntryType::makeEmpty() ;
6386 yyextra->current->type.clear() ;
6387 yyextra->current->name.clear() ;
6388 yyextra->current->args.clear() ;
6389 yyextra->current->argList.clear();
6391 BEGIN( FindMembers ) ;
6393<CompoundName>{SCOPENAME}/{BN}*"<" {
6394 yyextra->sharpCount = 0;
6395 yyextra->current->name = yytext ;
6397 if (yyextra->current->spec.isProtocol())
6399 yyextra->current->name+=
"-p";
6402 yyextra->lastClassTemplSpecContext = ClassVar;
6403 if (yyextra->insideObjC)
6405 BEGIN( ObjCProtocolList );
6407 else if (yyextra->insideCS)
6414 yyextra->roundCount=0;
6415 BEGIN( ClassTemplSpec );
6422 yyextra->current->tArgLists.
push_back(al);
6423 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6424 yyextra->templateStr=
"<";
6425 yyextra->current->name +=
"<";
6426 yyextra->fullArgString = yyextra->templateStr;
6427 yyextra->copyArgString = &yyextra->current->name;
6429 yyextra->currentArgumentContext = ClassVar;
6430 BEGIN( ReadTempArgs );
6432<ObjCProtocolList>"<" {
6433 yyextra->insideProtocolList=
true;
6436<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6437 yyextra->current->name += yytext;
6439 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6442 if (yyextra->current->spec.isProtocol())
6449 BEGIN( yyextra->lastClassTemplSpecContext );
6453<ClassTemplSpec>"<" {
6454 yyextra->current->name += yytext;
6455 if (yyextra->roundCount==0) yyextra->sharpCount++;
6458 yyextra->current->name += yytext;
6460<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6461 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6465 yyextra->current->name =
substitute(yytext,
".",
"::");
6466 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6471 else if (!yyextra->current->tArgLists.empty())
6475 yyextra->current->name = yytext;
6476 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6479 DString rn = yyextra->current_root->name;
6481 if (!yyextra->current->name.empty() && !rn.
empty())
6485 yyextra->current->spec.setForwardDecl(
true);
6486 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6488 else if (yyextra->insideIDL &&
6489 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6490 yyextra->current->spec.isInterface()) ||
6491 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6492 yyextra->current->spec.isService())
6500 yyextra->current->name = yytext;
6501 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6502 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6505 yyextra->current->spec.setInterface(
false).setService(
false);
6509 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6512 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6515 yyextra->current->reset();
6517 if (yyextra->insideObjC)
6519 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6520 yyextra->insideObjC =
false;
6522 if (yyextra->isTypedef)
6524 yyextra->current->type.prepend(
"typedef");
6526 BEGIN( FindMembers );
Wrapper class for the Entry type.
6529<CompoundName>{SCOPENAME}/{BN}*"(" {
6530 yyextra->current->name = yytext ;
6533 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6535 yyextra->lastAlignAsContext = YY_START;
6540 if (yyextra->current->spec.isProtocol())
6542 yyextra->current->name +=
"-p";
6547<AlignAs>"(" { yyextra->roundCount=0;
6548 BEGIN( AlignAsEnd );
6552<AlignAsEnd>"(" { yyextra->roundCount++; }
6553<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6555 BEGIN( yyextra->lastAlignAsContext );
6561 yyextra->current->name = yytext ;
6565 yyextra->current->bodyLine = yyextra->yyLineNr;
6566 yyextra->current->bodyColumn = yyextra->yyColNr;
6567 yyextra->current->initializer.str(std::string());
6568 yyextra->lastInitializerContext = FindMembers;
6569 yyextra->sharpCount=0;
6570 yyextra->initBracketCount=0;
6571 BEGIN(ReadInitializer);
6573<CompoundName>{SCOPENAME}/{BN}*"," {
6575 yyextra->current->reset();
6578<CompoundName>{SCOPENAME} {
6579 yyextra->current->name = yytext ;
6582 if (yyextra->current->spec.isProtocol())
6584 yyextra->current->name +=
"-p";
6586 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6592<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6593 if (yyextra->current->section.isNamespace())
DString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple internal white...
6605<CompoundName>{CSSCOPENAME} {
6606 yyextra->current->name =
substitute(yytext,
".",
"::");
6610<ClassVar>{SCOPENAME}{BNopt}/"(" {
6611 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6614 yyextra->roundCount=0;
6615 BEGIN(SkipUnionSwitch);
6620 yyextra->yyBegColNr=yyextra->yyColNr;
6621 yyextra->yyBegLineNr=yyextra->yyLineNr;
6622 yyextra->current->name = yytext;
6623 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6626 BEGIN( FindMembers );
6630 if (yyextra->isTypedef)
6634 yyextra->current->type.prepend(
"typedef ");
6642<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6643 if (yyextra->insideCli)
6646 yyextra->current->spec.setSealedClass(
true);
6648 yyextra->current->spec.setAbstractClass(
true);
6656<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6657 yyextra->yyBegColNr=yyextra->yyColNr;
6658 yyextra->yyBegLineNr=yyextra->yyLineNr;
6661 if (yyextra->current->section.isEnum())
6663 yyextra->current->section = EntryType::makeVariable() ;
6665 yyextra->current->type +=
' ' ;
6666 yyextra->current->type += yyextra->current->name ;
6675 yyextra->yyBegColNr=yyextra->yyColNr;
6676 yyextra->yyBegLineNr=yyextra->yyLineNr;
6678 if (yyextra->insideIDL &&
dstrcmp(yytext,
"switch")==0)
6681 yyextra->roundCount=0;
6682 BEGIN(SkipUnionSwitch);
6684 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
dstrcmp(yytext,
"implements")==0 ||
dstrcmp(yytext,
"extends")==0))
6686 yyextra->current->type.clear();
6687 yyextra->baseProt = Protection::Public;
6688 yyextra->baseVirt = Specifier::Normal;
6689 yyextra->baseName.clear();
6690 BEGIN( BasesProt ) ;
6692 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
6694 yyextra->current->typeConstr.clear();
6695 yyextra->current->typeConstr.push_back(
Argument());
6696 yyextra->lastCSConstraint = YY_START;
6697 BEGIN( CSConstraintName );
6699 else if (yyextra->insideCli &&
dstrcmp(yytext,
"abstract")==0)
6701 yyextra->current->spec.setAbstract(
true);
6703 else if (yyextra->insideCli &&
dstrcmp(yytext,
"sealed")==0)
6705 yyextra->current->spec.setSealed(
true);
6707 else if (
dstrcmp(yytext,
"final")==0)
6709 yyextra->current->spec.setFinal(
true);
6713 if (yyextra->current->section.isEnum())
6715 yyextra->current->section = EntryType::makeVariable() ;
6717 yyextra->current->type +=
' ' ;
6718 yyextra->current->type += yyextra->current->name ;
6719 yyextra->current->name = yytext ;
6728 if (yyextra->insideObjC && *yytext==
'(')
6730 yyextra->current->name+=
'(';
6731 yyextra->current->spec.setCategory(
true);
6732 BEGIN( ClassCategory );
6734 else if ((yyextra->insideCS && *yytext==
'(') ||
6735 (yyextra->insideJava && *yytext==
'('))
6737 yyextra->current->args=yytext;
6738 yyextra->currentArgumentContext = ClassVar;
6739 yyextra->fullArgString = yyextra->current->args;
6740 yyextra->copyArgString = &yyextra->current->args;
6741 BEGIN( ReadFuncArgType ) ;
6747 BEGIN( FindMembers );
6750<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6751<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6752 yyextra->fullArgString.clear();
6753 yyextra->lastCopyArgChar=
'#';
6754 yyextra->lastCommentInArgContext=YY_START;
6756 BEGIN( CopyArgCommentLine );
6758 BEGIN( CopyArgComment );
6760<CSConstraintType,CSConstraintName>"#" {
6761 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6763<CSConstraintType>"=>" {
6768 BEGIN( yyextra->lastCSConstraint );
6770<CSConstraintType>"{" {
6774 BEGIN( yyextra->lastCSConstraint );
6776<CSConstraintType,CSConstraintName>";" {
6779 BEGIN( yyextra->lastCSConstraint );
6781<CSConstraintName>":" {
6782 BEGIN( CSConstraintType );
6784<CSConstraintName>{ID} {
6786 yyextra->current->typeConstr.back().name=yytext;
6788<CSConstraintType>"where" {
6789 yyextra->current->typeConstr.push_back(
Argument());
6790 BEGIN( CSConstraintName );
6792<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6793 if (yyextra->current->typeConstr.back().type.empty())
6796 yyextra->current->typeConstr.back().type=yytext;
6800 DString name = yyextra->current->typeConstr.back().name;
6801 yyextra->current->typeConstr.push_back(
Argument());
6802 yyextra->current->typeConstr.back().name=
name;
6803 yyextra->current->typeConstr.back().type=yytext;
6806<CSConstraintName,CSConstraintType>\n {
6809<CSConstraintName,CSConstraintType>. {
6811<ClassCategory>{ID} {
6812 yyextra->current->name+=yytext;
6814<ClassCategory>")"/{BN}*"{" {
6815 yyextra->current->name+=
')';
6818<ClassCategory>")"/{BN}*"<" {
6819 yyextra->current->name+=
')';
6820 BEGIN( ObjCProtocolList );
6823 yyextra->current->name+=
')';
6824 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6836 if (yyextra->current->section.isVariable())
6838 yyextra->current->bitfields+=
":";
6839 yyextra->current->args.clear();
6842 else if (yyextra->current->section.isEnum())
6845 yyextra->current->args.clear();
6846 BEGIN(EnumBaseType);
6850 yyextra->current->type.clear();
6851 if (yyextra->current->spec.isInterface() ||
6852 yyextra->current->spec.isStruct() ||
6853 yyextra->current->spec.isRecord() ||
6854 yyextra->current->spec.isRef() ||
6855 yyextra->current->spec.isValue() ||
6856 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6859 yyextra->baseProt = Protection::Public;
6863 yyextra->baseProt = Protection::Private;
6865 yyextra->baseVirt = Specifier::Normal;
6866 yyextra->baseName.clear();
6867 BEGIN( BasesProt ) ;
6871 if (yyextra->isTypedef)
6873 yyextra->current->type.prepend(
"typedef");
6875 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6877 yyextra->current->section = EntryType::makeVariable() ;
6879 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6881 yyextra->current->reset();
6888 BEGIN( FindMembers );
6890<Bases,ClassVar>{CPPC}"/"/[^/] {
6891 if (!yyextra->insideObjC)
6898 yyextra->current->program << yytext;
6899 yyextra->current->fileName = yyextra->fileName ;
6900 yyextra->current->startLine = yyextra->yyLineNr ;
6901 yyextra->current->startColumn = yyextra->yyColNr;
6902 yyextra->curlyCount=0;
6903 BEGIN( ReadBodyIntf );
6906<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6907<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6908<Bases,ClassVar>{CPPC}"!" |
6909<Bases,ClassVar>[\-+]{BN}* {
6910 if (!yyextra->insideObjC)
6917 yyextra->current->program << yytext;
6918 yyextra->current->fileName = yyextra->fileName ;
6919 yyextra->current->startLine = yyextra->yyLineNr ;
6920 yyextra->current->startColumn = yyextra->yyColNr;
6921 yyextra->curlyCount=0;
6922 BEGIN( ReadBodyIntf );
6925<CompoundName,ClassVar>{B}*"{"{B}* {
6926 yyextra->current->program.str(std::string());
6927 yyextra->current->fileName = yyextra->fileName ;
6928 yyextra->current->bodyLine = yyextra->yyLineNr;
6929 yyextra->current->bodyColumn = yyextra->yyColNr;
6931 if (yyextra->current->name.empty() && !yyextra->isTypedef)
6933 if (yyextra->current->section.isNamespace())
6937 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6949 yyextra->curlyCount=0;
6950 if (yyextra->current_root &&
6951 !yyextra->current_root->spec.isInterface() &&
6952 (yyextra->current->spec.isInterface() ||
6953 yyextra->current->spec.isProtocol() ||
6954 yyextra->current->spec.isCategory() ||
6955 yyextra->current->section.isObjcImpl()
6960 BEGIN( ReadBodyIntf );
6962 else if (yyextra->current->section.isNamespace())
6964 BEGIN( ReadNSBody );
DString stripPath(const DString &s)
6971<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6972<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6973<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6974<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6975<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6976<BasesProt>{BN} {
lineCount(yyscanner); }
6977<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6978<Bases>"decltype"{BN}*"(" {
6980 yyextra->roundCount=0;
6981 yyextra->lastSkipRoundContext=YY_START;
6984<Bases>("\\")?({ID}"\\")*{ID} {
6985 if (!yyextra->insidePHP)
6994 yyextra->baseName += bn;
6995 yyextra->current->args +=
' ';
6996 yyextra->current->args += yytext;
6999<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
7005 yyextra->current->typeConstr.clear();
7006 yyextra->current->typeConstr.push_back(
Argument());
7007 yyextra->lastCSConstraint = YY_START;
7008 BEGIN( CSConstraintName );
7012 yyextra->baseName+=yytext;
7013 yyextra->current->args +=
' ';
7014 yyextra->current->args += yytext;
7017<Bases>{BN}*{ID}("."{ID})* {
7019 yyextra->baseName +=
name;
7020 yyextra->current->args +=
' ';
7021 yyextra->current->args +=
name;
7023<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
7024 if (!yyextra->insideObjC)
7034<ClassVar,Bases>"@end" {
7042<ClassVar>"<" { yyextra->current->name += *yytext;
7043 yyextra->sharpCount=1;
7044 yyextra->roundCount=0;
7045 yyextra->lastSkipSharpContext = YY_START;
7046 yyextra->specName = &yyextra->current->name;
7047 BEGIN ( Specialization );
7051 yyextra->sharpCount=1;
7052 yyextra->roundCount=0;
7053 yyextra->lastSkipSharpContext = YY_START;
7054 if (yyextra->insideObjC)
7064 yyextra->templateStr = yytext;
7065 yyextra->specName = &yyextra->templateStr;
7066 BEGIN ( Specialization );
7069<Specialization>"<" { *yyextra->specName += *yytext;
7070 if (yyextra->roundCount==0) yyextra->sharpCount++;
7072<Specialization>">" {
7073 *yyextra->specName += *yytext;
7074 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
7077 BEGIN(yyextra->lastSkipSharpContext);
7080<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
7081<Specialization>"<<" { *yyextra->specName += yytext; }
7082<Specialization>">>"/{B}*"::" {
7087<Specialization>">>" {
7088 if (yyextra->insideCS)
7098 if (yyextra->roundCount>0)
7100 *yyextra->specName += yytext;
7110<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7111<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7112<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7114<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7115<Specialization>"\\'" { *yyextra->specName += *yytext;}
7116<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7117<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7118<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7119<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7120<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7121<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7122<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7123<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7124<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7127 *yyextra->specName += *yytext;
7129<SkipRound>"(" { ++yyextra->roundCount; }
7130<SkipRound>")" {
if (--yyextra->roundCount<0)
7131 BEGIN ( yyextra->lastSkipRoundContext );
7134 yyextra->lastStringContext=SkipRound;
7137<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7138 if (yyextra->insideProtocolList)
7140 yyextra->baseName+=
"-p";
7144 yyextra->current->args +=
',' ;
7147 if (!yyextra->baseName.empty())
7149 yyextra->current->extends.emplace_back(
7150 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7153 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7154 yyextra->current->spec.isRecord() ||
7155 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7156 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7158 yyextra->baseProt=Protection::Public;
7162 yyextra->baseProt=Protection::Private;
7164 yyextra->baseVirt=Specifier::Normal;
7165 yyextra->baseName.clear();
7168 yyextra->insideProtocolList=
false;
7171 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7187 if (*yytext==
',' && yyextra->insideObjC)
7189 yyextra->insideProtocolList=
true;
7195 yyextra->current->program.str(std::string());
7196 yyextra->current->fileName = yyextra->fileName ;
7197 yyextra->current->bodyLine = yyextra->yyLineNr;
7198 yyextra->current->bodyColumn = yyextra->yyColNr;
7200 if (!yyextra->baseName.empty())
7202 yyextra->current->extends.emplace_back(
7203 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7205 yyextra->baseName.clear();
7207 yyextra->curlyCount=0;
7208 if (yyextra->insideObjC)
7210 BEGIN( ReadBodyIntf );
7217<SkipUnionSwitch>{B}*"(" {
7218 yyextra->roundCount++;
7220<SkipUnionSwitch>")" {
7221 if (--yyextra->roundCount==0)
7226<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7228<Comment>{BN}+ { yyextra->current->program << yytext ;
7231<Comment>{CCS} { yyextra->current->program << yytext ; }
7232<Comment>{CPPC} { yyextra->current->program << yytext ; }
7233<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7234 if (yyextra->doxygenComment) yyextra->insideCode=
true;
7235 yyextra->current->program << yytext ;
7237<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7238 if (yyextra->doxygenComment) yyextra->insideCode=
false;
7239 yyextra->current->program << yytext ;
7241<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7242<Comment>{CCE} { yyextra->current->program << yytext ;
7243 if (!yyextra->insideCode)
7245 yyextra->doxygenComment=
false;
7246 BEGIN( yyextra->lastContext );
7249<Comment>. { yyextra->current->program << *yytext ; }
7251<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7253 if (!yyextra->current->doc.empty())
7255 yyextra->current->doc+=
"\n\n";
7259 yyextra->current->docLine = yyextra->yyLineNr;
7260 yyextra->current->docFile = yyextra->fileName;
7263 yyextra->lastDocContext = YY_START;
7264 if (yyextra->current_root->section.isScope())
7266 yyextra->current->inside = yyextra->current_root->name+
"::";
7268 yyextra->docBlockContext = YY_START;
7269 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7274 yyextra->docBlock.
str(indent.
str());
7276 if (yyextra->docBlockAutoBrief)
7278 yyextra->current->briefLine = yyextra->yyLineNr;
7279 yyextra->current->briefFile = yyextra->fileName;
7284<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7290 yyextra->lastDocContext = YY_START;
7293 if (yyextra->current_root->section.isScope())
7295 yyextra->current->inside = yyextra->current_root->name+
"::";
7297 yyextra->current->docLine = yyextra->yyLineNr;
7298 yyextra->current->docFile = yyextra->fileName;
7299 yyextra->docBlockContext = YY_START;
7300 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7302 yyextra->docBlockAutoBrief = javadocAutoBrief;
7306 yyextra->docBlock.
str(indent.
str());
7308 if (yyextra->docBlockAutoBrief)
7310 yyextra->current->briefLine = yyextra->yyLineNr;
7311 yyextra->current->briefFile = yyextra->fileName;
7318 yyextra->current->program << yytext ;
7319 yyextra->lastContext = YY_START ;
7320 yyextra->doxygenComment=
true;
7324<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7329<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7330 yyextra->lastDocContext = YY_START;
7333 if (yyextra->current_root->section.isScope())
7335 yyextra->current->inside = yyextra->current_root->name+
"::";
7337 yyextra->current->docLine = yyextra->yyLineNr;
7338 yyextra->current->docFile = yyextra->fileName;
7339 yyextra->docBlockContext = YY_START;
7340 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7342 yyextra->docBlockAutoBrief = javadocAutoBrief;
7346 yyextra->docBlock.
str(indent.
str());
7348 if (yyextra->docBlockAutoBrief)
7350 yyextra->current->briefLine = yyextra->yyLineNr;
7351 yyextra->current->briefFile = yyextra->fileName;
7356<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7357 yyextra->lastDocContext = YY_START;
7358 if (yyextra->current_root->section.isScope())
7360 yyextra->current->inside = yyextra->current_root->name+
"::";
7362 yyextra->docBlockContext = YY_START;
7363 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7364 yyextra->docBlockAutoBrief =
false;
7368 yyextra->docBlock.
str(indent.
str());
7373<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7374 yyextra->lastDocContext = YY_START;
7375 if (yyextra->current_root->section.isScope())
7377 yyextra->current->inside = yyextra->current_root->name+
"::";
7379 yyextra->docBlockContext = YY_START;
7380 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7381 yyextra->docBlockAutoBrief =
false;
7384 yyextra->docBlock.
str(indent.
str());
7388<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7390 yyextra->externLinkage=
true;
7393 if (yyextra->externLinkage)
7395 yyextra->externLinkage=
false;
7397 else if (yyextra->insideCS &&
7398 !yyextra->current->name.empty() &&
7399 !yyextra->current->type.empty())
7401 if (yyextra->current->mtype == MethodTypes::Event)
7403 yyextra->mtype = MethodTypes::Event;
7405 else if (yyextra->current->type.containsWord(
"event"))
7407 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7411 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7413 yyextra->current->bodyLine = yyextra->yyLineNr;
7414 yyextra->current->bodyColumn = yyextra->yyColNr;
7415 yyextra->curlyCount=0;
7416 BEGIN( CSAccessorDecl );
7418 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7422 yyextra->current->exception =
" {";
7423 BEGIN(UNOIDLAttributeBlock);
7427 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7428 yyextra->current->name.empty()
7432 yyextra->needsSemi =
false;
7433 if (yyextra->current->isStatic)
7435 yyextra->current->name=
"[static initializer]";
7436 yyextra->current->type.clear();
7440 yyextra->current->name=
"[instance initializer]";
7457 yyextra->current->bodyLine = yyextra->yyLineNr;
7458 yyextra->current->bodyColumn = yyextra->yyColNr;
7459 yyextra->current->initializer.str(yytext);
7460 yyextra->lastInitializerContext = YY_START;
7461 yyextra->sharpCount=0;
7462 yyextra->initBracketCount=1;
7463 BEGIN(ReadInitializer);
7467<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7468<CSAccessorDecl>"}"{B}*"=" {
7470 if (yyextra->curlyCount != 0) REJECT;
7471 yyextra->current->initializer.str(
"=");
7472 yyextra->current->endBodyLine=yyextra->yyLineNr;
7473 yyextra->lastInitializerContext = FindMembers;
7474 BEGIN(ReadInitializer);
7476<CSAccessorDecl>"}" {
7477 if (yyextra->curlyCount)
7479 yyextra->curlyCount--;
7483 yyextra->mtype = MethodTypes::Method;
7484 yyextra->virt = Specifier::Normal;
7486 yyextra->current->endBodyLine=yyextra->yyLineNr;
7491<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7492<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7493<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7494<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7495<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7496<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7497<CSAccessorDecl>"init" {
if (yyextra->curlyCount==0) yyextra->current->spec.setInitonly(
true); }
7498<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7499<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7500<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7501<CSAccessorDecl>{CHARLIT} {}
7502<CSAccessorDecl>{ID} {}
7503<CSAccessorDecl>"\"" { BEGIN(CSString);}
7504<CSAccessorDecl>"." {}
7505<CSAccessorDecl>\n {
lineCount(yyscanner); }
7506<CSString>"\"" { BEGIN(CSAccessorDecl);}
7514<SliceSequence>{SCOPENAME} {
7515 if (yyextra->current->spec.isLocal())
7517 yyextra->current->type =
"local ";
7519 yyextra->current->type +=
"sequence<";
7520 yyextra->current->type += yytext;
7521 yyextra->current->type +=
">";
7524<SliceSequence>{BN}*">"{BN}* {
7526 BEGIN(SliceSequenceName);
7529<SliceSequenceName>{ID}{BN}* {
7531 yyextra->current->name = yytext ;
7532 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7535<SliceSequenceName>";" {
7536 yyextra->current->section = EntryType::makeVariable();
7537 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7542<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7544 if (yyextra->current->spec.isLocal())
7546 yyextra->current->type =
"local ";
7548 yyextra->current->type +=
"dictionary<";
7549 yyextra->current->type += yytext;
7550 yyextra->current->type +=
">";
7551 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7554<SliceDictionary>{BN}*">"{BN}* {
7556 BEGIN(SliceDictionaryName);
7559<SliceDictionaryName>{ID}{BN}* {
7561 yyextra->current->name = yytext ;
7562 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7565<SliceDictionaryName>";" {
7566 yyextra->current->section = EntryType::makeVariable();
7567 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7577<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7578 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7579 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7582<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7583 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7584 BEGIN( yyextra->docBlockContext );
7586<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7587 yyextra->docBlock << yytext;
7588 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7589 BEGIN( yyextra->docBlockContext );
7591<DocLine>{NONLopt}/"\n" {
7592 yyextra->docBlock << yytext;
7593 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7594 BEGIN( yyextra->docBlockContext );
7599<DocBlock>"*"*{CCE} {
7601 BEGIN(yyextra->docBlockContext);
7603<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7606 yyextra->docBlock <<
"\\ilinebr " << indent;
7608<DocBlock>^{B}*"*"+/[^/] {
7611 yyextra->docBlock << indent;
7613<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7616 yyextra->docBlock << indent;
7618<DocBlock>^{B}*({CPPC}){B}* {
7621 yyextra->docBlock << yytext;
7625 yyextra->docBlock << yytext;
7627<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7628 yyextra->docBlock << yytext;
7630<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7631 yyextra->docBlock << yytext;
7632 char blockName[] =
"f$";
7634 if (c==
'[') blockName[1]=
']';
7635 else if (c==
'{') blockName[1]=
'}';
7636 else if (c==
'(') blockName[1]=
')';
7638 BEGIN(DocCopyBlock);
7640<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7641 yyextra->fileName = &yytext[6];
7642 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7643 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7644 yyextra->docBlock << yytext;
7646<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7647 yyextra->fileName = &yytext[6];
7648 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7649 yyextra->docBlock << yytext;
7651<DocBlock>{CMD}"iline"{LINENR}{B} {
7656 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7660 yyextra->yyLineNr = nr;
7662 yyextra->docBlock << yytext;
7664<DocBlock>{B}*"<"{PRE}">" {
7665 yyextra->docBlock << yytext;
7667 BEGIN(DocCopyBlock);
7669<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7670 yyextra->docBlock << yytext;
7672 BEGIN(DocCopyBlock);
7674<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7675 yyextra->docBlock << yytext;
7677 BEGIN(DocCopyBlock);
7679<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7680 yyextra->docBlock << yytext;
7682 BEGIN(DocCopyBlock);
7684<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7686 yyextra->docBlock <<
"\\ilinebr ";
7687 yyextra->docBlock << pat;
7689 BEGIN(DocCopyBlock);
7691<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7693 yyextra->docBlock << pat;
7695 BEGIN(DocCopyBlock);
7697<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7698<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7699<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7701 yyextra->docBlock <<
"\\ilinebr ";
7702 yyextra->docBlock << pat;
7704 BEGIN(DocCopyBlock);
7706<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7707<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7708<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7710 yyextra->docBlock << pat;
7712 BEGIN(DocCopyBlock);
7715 yyextra->docBlock <<
"```";
7718 yyextra->docBlock << yytext;
7721 yyextra->docBlock << yytext;
7723 BEGIN(DocCopyBlock);
7725<DocBlock>{B}*"<"{CODE}">" {
7726 if (yyextra->insideCS)
7728 yyextra->docBlock << yytext;
7730 BEGIN(DocCopyBlock);
7737<DocBlock>[^@*~`'\/\\\n]+ {
7738 yyextra->docBlock << yytext;
7742 yyextra->docBlock << *yytext;
7745 yyextra->docBlock << *yytext;
7750<DocCopyBlock>"</"{PRE}">" {
7755 yyextra->docBlock << yytext;
7757<DocCopyBlock>"</"{CODE}">" {
7762 yyextra->docBlock << yytext;
7764<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7769 yyextra->docBlock << yytext;
7771<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7776 yyextra->docBlock << yytext;
7778<DocCopyBlock>^{B}*"*"+/{BN}+ {
7779 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7787 yyextra->docBlock << indent;
7790<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7791 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7795 yyextra->docBlock << indent;
7802<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7803 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7807 yyextra->docBlock << indent+
"*";
7814<DocCopyBlock>^{B}*"*"+/{BN}* {
7815 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7818 if (yyextra->nestedComment>0)
7821 yyextra->docBlock << indent+
"*";
7826 yyextra->docBlock << indent;
7834<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7840 yyextra->docBlock << pat;
7842<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7848 yyextra->docBlock << pat;
7850<DocCopyBlock>"```" {
7851 if (yyextra->docBlockName==
"``")
7853 yyextra->docBlock <<
"`";
7855 yyextra->docBlock <<
"``";
7860 yyextra->docBlock << yytext;
7863<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7868 yyextra->docBlock << yytext;
7870<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7875 yyextra->docBlock << yytext;
7877<DocCopyBlock>"`"{1,2} {
7882 yyextra->docBlock << yytext;
7884<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7885 yyextra->docBlock << yytext;
7888 yyextra->docBlock << yytext;
7889 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7893 yyextra->lastStringContext=YY_START;
7894 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7895 yyextra->stopAtInvalidString=
true;
7899<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7902 yyextra->nestedComment++;
7904 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7906 yyextra->nestedComment--;
7908 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7910 warn(yyextra->fileName,yyextra->yyLineNr,
7911 "Found end of C comment inside a '{}' block without matching start of the comment!"
7912 " Maybe the end marker for the block is missing?",
7913 yyextra->docBlockName);
7916 yyextra->docBlock << yytext;
7919 yyextra->docBlock << *yytext;
7923 yyextra->docBlock << *yytext;
7925<DocCopyBlock><<EOF>> {
7926 warn(yyextra->fileName,yyextra->yyLineNr,
7927 "reached end of file while inside a '{}' block!"
7928 " The command that should end the block seems to be missing!",
7929 yyextra->docBlockName);
7936<Prototype>"operator"{B}*"("{B}*")" {
7937 yyextra->current->name+=yytext;
7940 yyextra->current->args+=*yytext;
7941 yyextra->currentArgumentContext = PrototypeQual;
7942 yyextra->fullArgString = yyextra->current->args;
7943 yyextra->copyArgString = &yyextra->current->args;
7944 BEGIN( ReadFuncArgType ) ;
7946<Prototype>"("({ID}"::")*({B}*[&*])+ {
7947 if (yyextra->insidePHP)
7953 yyextra->current->type+=yyextra->current->name+yytext;
7954 yyextra->current->name.clear();
7955 BEGIN( PrototypePtr );
7958<PrototypePtr>{SCOPENAME} {
7959 yyextra->current->name+=yytext;
7962 yyextra->current->args+=*yytext;
7963 yyextra->currentArgumentContext = PrototypeQual;
7964 yyextra->fullArgString = yyextra->current->args;
7965 yyextra->copyArgString = &yyextra->current->args;
7966 BEGIN( ReadFuncArgType ) ;
7969 yyextra->current->type+=
')';
7973 yyextra->current->name+=yytext;
7976 BEGIN( PrototypeSkipLine);
7978<PrototypeQual>{B}*"const"{B}* {
7979 yyextra->current->args +=
" const ";
7980 yyextra->current->argList.setConstSpecifier(
true);
7982<PrototypeQual>{B}*"volatile"{B}* {
7983 yyextra->current->args +=
" volatile ";
7984 yyextra->current->argList.setVolatileSpecifier(
true);
7986<PrototypeQual>{B}*"="{B}*"0"{B}* {
7987 yyextra->current->args +=
" = 0";
7988 yyextra->current->virt = Specifier::Pure;
7989 yyextra->current->argList.setPureSpecifier(
true);
7991<PrototypeQual>"throw"{B}*"(" {
7992 yyextra->current->exception =
"throw(";
7993 BEGIN(PrototypeExc);
7996 yyextra->current->exception +=
')';
7997 BEGIN(PrototypeQual);
8000 yyextra->current->exception += *yytext;
8003 yyextra->current->args += *yytext;
8006 yyextra->current->name += *yytext;
8008<PrototypeSkipLine>. {
8014<SkipCxxComment>.*"\\\n" {
8015 if (yyextra->insideCS)
8024<SkipCxxComment>{ANYopt}/\n {
8025 BEGIN( yyextra->lastCContext ) ;
8027<SkipComment>[^\*\n]+
8032 if (!yyextra->insideCpp) REJECT;
8033 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
8034 yyextra->lastC11AttributeContext = YY_START;
8035 yyextra->pCopyC11AttributeString = &yyextra->current->attributes;
8036 BEGIN( CopyC11Attribute );
8041 if (yyextra->insideIDL && yyextra->insideCppQuote)
8045 else if (yyextra->insidePHP)
8047 yyextra->lastStringContext=YY_START;
8052 if (!yyextra->insidePHP)
8054 yyextra->lastCPPContext = YY_START;
8059 yyextra->lastCContext = YY_START ;
8060 BEGIN( SkipCxxComment ) ;
8064 if (!yyextra->insidePHP)
8066 yyextra->lastCContext = YY_START ;
8067 BEGIN( SkipCxxComment ) ;
8070 if (yyextra->insidePHP)
8072 yyextra->lastStringContext=YY_START;
8073 BEGIN(SkipPHPString);
8077 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
8079 if (yyextra->current->type.empty())
8081 if (yyextra->current->name.empty())
8082 yyextra->current->name=
"?";
8084 yyextra->current->name+=
"?";
8088 yyextra->current->type+=
"?";
8092<*>"}" { yyextra->exported=
false; }
8094<SkipComment>{CPPC}|{CCS}
8095<*>{CCS} { yyextra->lastCContext = YY_START ;
8096 BEGIN( SkipComment ) ;
8098<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8100 yyextra->lastCContext = YY_START ;
8101 BEGIN( SkipCxxComment ) ;
8104 if (yyextra->insideCS && yyextra->fakeNS)
8108 BEGIN ( ReadNSBody);
8122 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8124 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8135 yyextra->outerScopeEntries.clear();
8136 yyextra->baseName.clear();
8137 yyextra->protection = Protection::Public;
8138 yyextra->baseProt = Protection::Public;
8139 yyextra->sharpCount = 0;
8140 yyextra->roundCount = 0;
8141 yyextra->curlyCount = 0;
8142 yyextra->mtype = MethodTypes::Method;
8143 yyextra->isStatic =
false;
8144 yyextra->virt = Specifier::Normal;
8145 yyextra->baseVirt = Specifier::Normal;
8146 yyextra->isTypedef =
false;
8147 yyextra->insideTryBlock =
false;
8148 yyextra->insideFormula =
false;
8149 yyextra->insideCode=
false;
8151 yyextra->previous = 0;
8152 yyextra->firstTypedefEntry.reset();
8153 yyextra->memspecEntry.reset();
8159 if (yyextra->insideJava)
8161 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8163 yyextra->current->protection = yyextra->protection;
8164 yyextra->current->exported = yyextra->exported ;
8165 yyextra->current->mtype = yyextra->mtype;
8166 yyextra->current->virt = yyextra->virt;
8167 yyextra->current->isStatic = yyextra->isStatic;
8168 yyextra->current->lang = yyextra->language;
8170 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8171 yyextra->isTypedef=
false;
8181 char result[md5_sig.size()*3+2];
8184 for (
size_t i=0;i<md5_sig.size();i++)
8186 static const char oct[]=
"01234567";
8187 uint8_t
byte = md5_sig[i];
8188 *p++=oct[(
byte>>6)&7];
8189 *p++=oct[(
byte>>3)&7];
8190 *p++=oct[(
byte>>0)&7];
8199 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8201 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8210 for (p = yytext ; *p ; ++p )
8214 yyextra->yyLineNr++;
8220 yyextra->column+=tabSize - (yyextra->column%tabSize);
8221 yyextra->yyColNr=1+yyextra->column;
8234 size_t col=startIndent;
8240 if (c==
'\t') col+=tabSize-(col%tabSize);
8241 else if (c==
'\n') col=0;
8250 yyextra->current->protection = yyextra->protection = prot;
8251 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8252 yyextra->current->type.clear();
8253 yyextra->current->name.clear();
8254 yyextra->current->args.clear();
8255 yyextra->current->argList.clear();
8262 size_t tl=yyextra->current->type.length();
8263 if( tl>0 && !yyextra->current->name.empty() && yyextra->current->type.at(tl-1)!=
'.')
8265 yyextra->current->type +=
' ' ;
8267 yyextra->current->type += yyextra->current->name;
8268 yyextra->current->name.clear() ;
8269 tl=yyextra->current->type.length();
8270 if( tl>0 && !yyextra->current->args.empty() && yyextra->current->type.at(tl-1)!=
'.')
8272 yyextra->current->type +=
' ' ;
8274 yyextra->current->type += yyextra->current->args ;
8275 yyextra->current->args.clear() ;
8276 yyextra->current->argList.clear();
8283 if (s==
nullptr || *s==0)
return name;
8285 if (name.at(0)==
'"' && name.at(name.length()-1)==
'"')
8287 name=name.mid(1,name.length()-2);
8297 bool funcPtr = i>0 && type[i-1]==
')';
8299 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8300 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8301 return type.
left(i);
8310 yyextra->docBlock <<
"\\iskip";
8312 yyextra->docBlockName=blockName;
8313 yyextra->fencedSize=fencedSize;
8314 yyextra->isCodeBlock=codeBlock;
8315 yyextra->nestedComment=0;
8322 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8326 yyextra->docBlock <<
"\\endiskip";
8328 yyextra->docBlockName=
"";
8348 size_t i=name.find(
"operator");
8350 if (i==0 && !
isId(name.at(8)))
return true;
8351 if (i>0 && !
isId(name.at(i-1)) && !
isId(name.at(i+8)))
return true;
8361 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8362 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8363 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8364 yyextra->insideD = yyextra->language==SrcLangExt::D;
8365 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8366 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8367 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8368 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8369 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8370 yyextra->language==SrcLangExt::Lex);
8382 if (yyextra->current_root->section.isScope())
8385 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8387 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8389 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8400 if (!yyextra->fileName.lower().endsWith(
".c"))
return false;
8401 if (yyextra->current->argList.empty())
return false;
8402 for (
const Argument &a : yyextra->current->argList)
8414 if (yyextra->insideJava)
8417 yyextra->current->protection = Protection::Public;
8419 yyextra->current->protection = Protection::Protected;
8421 yyextra->current->protection = Protection::Private;
8423 yyextra->current->protection = Protection::Package;
8431 int si =
static_cast<int>(yyextra->current->args.length());
8432 if (yyextra->oldStyleArgType.empty())
8434 std::string args = yyextra->current->args.str();
8435 static const reg::Ex re(R
"(\([^)]*\).*)");
8441 bi1=(int)match.position();
8442 size_t secondMatchStart = match.position()+match.length();
8445 bi2=(int)match.position();
8449 if (bi1!=-1 && bi2!=-1)
8452 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8454 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8455 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8457 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8458 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8459 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8464 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8467 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8468 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8470 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8471 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8477 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8480 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8484 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8485 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8498 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8501 oldStyleArgPtr=yyextra->current->args.
left(j);
8521 for (
Argument &a : yyextra->current->argList)
8527 a.
name=name.stripWhiteSpace();
8530 a.
docs=brief+
"\n\n"+docs;
8532 else if (!brief.
empty())
8565 yyextra->current->briefFile = yyextra->fileName;
8566 yyextra->current->briefLine = yyextra->yyLineNr;
8570 yyextra->current->docFile = yyextra->fileName;
8571 yyextra->current->docLine = yyextra->yyLineNr;
8580 if (yyextra->tempEntry==0)
8585 yyextra->previous = yyextra->current;
8586 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8590 yyextra->previous = yyextra->current;
8591 yyextra->current = yyextra->tempEntry;
8592 yyextra->tempEntry.reset();
8602 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8603 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8606 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8607 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8609 docEntry->inbodyFile = yyextra->fileName;
8610 docEntry->inbodyLine = lineNr;
8614 bool needsEntry=
false;
8616 Markdown markdown(yyextra->fileName,lineNr);
8619 while (yyextra->commentScanner.parseCommentBlock(
8620 yyextra->thisParser,
8621 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8625 yyextra->docBlockInBody ?
false : brief,
8626 yyextra->docBlockInBody ?
false : yyextra->docBlockAutoBrief,
8627 yyextra->docBlockInBody,
8628 yyextra->protection,
8639 DString docFile = yyextra->current->docFile;
8641 yyextra->current->docFile = docFile;
8642 yyextra->current->docLine = lineNr;
8650 if (yyextra->docBlockTerm)
8652 unput(yyextra->docBlockTerm);
8653 yyextra->docBlockTerm=0;
8671 DString orgDoc = yyextra->current->doc;
8672 DString orgBrief = yyextra->current->brief;
8673 int orgDocLine = yyextra->current->docLine;
8674 int orgBriefLine = yyextra->current->briefLine;
8676 yyextra->current->doc.
clear();
8677 yyextra->current->brief.clear();
8680 int lineNr = orgDocLine;
8682 Markdown markdown(yyextra->fileName,lineNr);
8685 while (yyextra->commentScanner.parseCommentBlock(
8686 yyextra->thisParser,
8687 yyextra->current.get(),
8694 yyextra->protection,
8703 if (needsEntry)
newEntry(yyscanner);
8709 a.
docs = yyextra->current->doc;
8712 yyextra->current->doc = orgDoc;
8713 yyextra->current->brief = orgBrief;
8714 yyextra->current->docLine = orgDocLine;
8715 yyextra->current->briefLine = orgBriefLine;
8727 for (
const auto &ce : rt->children())
8729 if (!ce->program.empty())
8733 yyextra->padCount=0;
8735 yyextra->programStr = ce->program.str();
8736 yyextra->inputString = yyextra->programStr.data();
8737 yyextra->inputPosition = 0;
8738 if (ce->section.isEnum() || ce->spec.isEnum())
8739 BEGIN( FindFields ) ;
8741 BEGIN( FindMembers ) ;
8742 yyextra->current_root = ce;
8743 yyextra->fileName = ce->fileName;
8745 yyextra->yyLineNr = ce->bodyLine;
8746 yyextra->yyColNr = ce->bodyColumn;
8747 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8749 yyextra->current = std::make_shared<Entry>();
8750 yyextra->isStatic =
false;
8755 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8757 ce->groups = rt->groups;
8760 size_t ni=ce->name.rfind(
"::");
8763 if ( ce->section.isClass() )
8765 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8767 yyextra->current->protection = yyextra->protection = Protection::Public ;
8769 else if (yyextra->insideJava)
8771 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8773 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isRecord() ||ce->spec.isUnion())
8775 if (ce->lang==SrcLangExt::ObjC)
8777 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8779 else if (!ce->name.empty() && ce->name.at(ni)==
'@' && (ce->spec.isStruct() || ce->spec.isRecord() || ce->spec.isUnion()))
8783 yyextra->current->protection = yyextra->protection = ce->protection;
8787 yyextra->current->protection = yyextra->protection = Protection::Public ;
8792 yyextra->current->protection = yyextra->protection = Protection::Private ;
8795 else if (ce->section.isEnum() )
8797 yyextra->current->protection = yyextra->protection = ce->protection;
8799 else if (!ce->name.empty() && ce->name.at(ni)==
'@')
8801 if (ce->section.isNamespace() )
8803 yyextra->current->isStatic = yyextra->isStatic =
true;
8805 yyextra->current->protection = yyextra->protection = ce->protection;
8806 yyextra->current->exported = yyextra->exported =
false;
8808 else if (ce->section.isNamespace() )
8810 yyextra->current->protection = yyextra->protection = Protection::Public ;
8811 yyextra->current->exported = yyextra->exported = ce->exported;
8815 yyextra->current->protection = yyextra->protection = Protection::Public ;
8816 yyextra->current->exported = yyextra->exported =
false;
8818 yyextra->mtype = MethodTypes::Method;
8819 yyextra->virt = Specifier::Normal;
8826 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8828 scannerYYlex(yyscanner);
8831 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8833 yyextra->programStr.clear();
8834 ce->program.str(std::string());
8849 for (
const auto &ce : rt->children())
8851 if (ce->section.isConcept())
8855 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8857 yyextra->padCount =0;
8859 yyextra->programStr = ce->initializer.str();
8860 yyextra->inputString = yyextra->programStr.data();
8861 yyextra->inputPosition = 0;
8862 yyextra->current_root = ce;
8863 yyextra->fileName = ce->fileName;
8864 yyextra->yyLineNr = ce->bodyLine;
8865 yyextra->yyColNr = ce->bodyColumn;
8866 yyextra->insideObjC =
false;
8867 yyextra->current = std::make_shared<Entry>();
8871 indent.
fill(
' ',ce->startColumn?ce->startColumn-1:0);
8873 if (!ce->args.empty())
8875 templArgs=indent+
"template"+ce->args+
"\n";
8877 yyextra->current->initializer.
str(
DString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8879 yyextra->isStatic =
false;
8881 yyextra->current->section = EntryType::makeConceptCodePart();
8882 yyextra->current->startLine = yyextra->yyLineNr;
8883 BEGIN( FindConceptParts );
8884 scannerYYlex(yyscanner);
8885 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8896 const char *fileBuf,
8897 const std::shared_ptr<Entry> &rt,
8904 yyextra->inputString = fileBuf;
8905 yyextra->inputPosition = 0;
8906 yyextra->column = 0;
8907 scannerYYrestart(
nullptr,yyscanner);
8910 yyextra->protection = Protection::Public;
8911 yyextra->mtype = MethodTypes::Method;
8912 yyextra->isStatic =
false;
8913 yyextra->exported =
false;
8914 yyextra->virt = Specifier::Normal;
8915 yyextra->current_root = rt;
8916 yyextra->yyLineNr = 1 ;
8917 yyextra->yyBegLineNr = 1;
8918 yyextra->yyBegColNr = 0;
8919 yyextra->anonCount = 0;
8920 yyextra->anonNSCount = 0;
8921 yyextra->fileName = fileName;
8922 yyextra->clangParser = clangParser;
8924 rt->lang = yyextra->language;
8925 msg(
"Parsing file {}...\n",yyextra->fileName);
8927 yyextra->current_root = rt;
8929 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8930 yyextra->current = std::make_shared<Entry>();
8935 yyextra->current->name = yyextra->fileName;
8936 yyextra->current->section = sec;
8937 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8939 yyextra->current->reset();
8941 if ( yyextra->insidePHP )
8943 BEGIN( FindMembersPHP );
8945 else if ( yyextra->insideJava )
8947 yyextra->current->name=
"java::lang";
8948 yyextra->current->fileName = yyextra->fileName;
8949 yyextra->current->section = EntryType::makeUsingDir();
8950 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8952 BEGIN( FindMembers );
8956 BEGIN( FindMembers );
8959 scannerYYlex(yyscanner);
8961 if (YY_START==Comment)
8963 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8967 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8969 yyextra->programStr.clear();
8970 rt->program.str(std::string());
8975 yyextra->anonNSCount++;
8978 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8981 parent->moveToSubEntryAndKeep(child);
8983 yyextra->outerScopeEntries.clear();
8995 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8998 if (!yyextra->current)
9003 const char *orgInputString;
9004 int orgInputPosition;
9005 YY_BUFFER_STATE orgState;
9008 orgState = YY_CURRENT_BUFFER;
9009 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
9010 orgInputString = yyextra->inputString;
9011 orgInputPosition = yyextra->inputPosition;
9014 yyextra->inputString = text.
data();
9015 yyextra->inputPosition = 0;
9016 yyextra->column = 0;
9017 scannerYYrestart(
nullptr, yyscanner);
9019 scannerYYlex(yyscanner);
9021 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
9022 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.empty())
9024 yyextra->current->section = EntryType::makeVariableDoc();
9028 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
9029 yy_switch_to_buffer(orgState, yyscanner);
9030 yyextra->inputString = orgInputString;
9031 yyextra->inputPosition = orgInputPosition;
9047 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
9055 scannerYYlex_destroy(
p->yyscanner);
9059 const char *fileBuf,
9060 const std::shared_ptr<Entry> &root,
9065 yyextra->thisParser =
this;
9069 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
9077 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
9078 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
9079 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
9090#include "scanner.l.h"
void parsePrototype(const DString &text) override
Callback function called by the comment block scanner.
bool needsPreprocessing(const DString &extension) const override
Returns true if the language identified by extension needs the C preprocessor to be run before feed t...
void parseInput(const DString &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.
std::unique_ptr< Private > p
~COutlineParser() override
DString & setNum(short n)
std::string_view view() const
bool stripPrefix(const DString &prefix)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool endsWith(const char *s) const
static bool isFlagSet(const DebugMask mask)
static EntryType guessSection(const DString &name)
Helper class to process markdown formatted text.
DString process(const DString &input, int &startNewlines, bool fromParseInput=false)
#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.
const char * qPrint(const char *s)
std::array< uint8_t, 16 > md5hash(const std::string_view &str)
DString trunc(const DString &s, size_t numChars=15)
static void newEntry(yyscan_t yyscanner)
static void parseMain(yyscan_t yyscanner, const DString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, ClangTUParser *clangParser)
static void parseCompounds(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
static void parsePrototype(yyscan_t yyscanner, const DString &text)
static void parseConcepts(yyscan_t yyscanner, const std::shared_ptr< Entry > &rt)
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
DString stripIndentation(const DString &s, bool skipFirstLine)
DString stripFromPath(const DString &path)