15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
60#define YY_NO_UNISTD_H 1
228static inline size_t computeIndent(
const char *s,
size_t startIndent);
260#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.
275NOTopt (("!"{BNopt})|("not"{BN}+))?
277HEXDIGIT ({DIGIT}|[a-f]|[A-F])
278ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
279SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
280TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
281CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
284CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
285PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
286PHPUSEKW ("public"|"private"|"protected")
287IDLATTR ("["[^\]]*"]"){BN}*
288TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
289RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
290RAWEND ")"[^ \t\(\)\\]{0,16}\"
291ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
292ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
293LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
294BITOP "&"|"|"|"^"|"<<"|">>"|"~"
295OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
296FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
297MODULE_ID ({ID}".")*{ID}
298LINENR {B}*[1-9][0-9]*
299FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
300FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
301FILECHARS {FILEICHAR}*{FILEECHAR}+
302HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
303VFILEMASK {FILECHARS}("."{FILECHARS})*
304FILEMASK {VFILEMASK}|{HFILEMASK}
315DCOMMC ("/\*!"|"/\**")
317DCOMMCPP ("/\/!"|"/\/\/")
319DCOMM {DCOMMC}|{DCOMMCPP}
390%x TryFunctionBlockEnd
405%x SkipInterpVerbString
420%x UNOIDLAttributeBlock
450%x SpecializationSingleQuote
451%x SpecializationDoubleQuote
484%x SliceDictionaryName
515<*>"DEPRECATED_ATTRIBUTE" {
516 if (!yyextra->insideObjC) REJECT;
518<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
519 if (!yyextra->insideObjC) REJECT;
520 yyextra->lastDeprecatedContext=YY_START;
521 yyextra->lastStringContext=Deprecated_round;
524<Deprecated_round>")" {
525 BEGIN(yyextra->lastDeprecatedContext);
527<Deprecated_round>{BNopt} {
530<Deprecated_round>. { }
532 yyextra->curlyCount=0;
533 yyextra->needsSemi =
true;
534 BEGIN(SkipCurlyBlock);
537 yyextra->roundCount=0;
538 BEGIN(SkipRoundBlock);
541 ++yyextra->roundCount;
544 if (yyextra->roundCount )
545 --yyextra->roundCount ;
550 ++yyextra->curlyCount ;
553 if( yyextra->curlyCount )
555 --yyextra->curlyCount ;
557 else if (yyextra->needsSemi)
563 BEGIN( FindMembers );
567 if (yyextra->insidePHP)
569 yyextra->lastStringContext=NextSemi;
570 BEGIN(SkipPHPString);
573<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
575 yyextra->lastStringContext=NextSemi;
580 BEGIN( FindMembers );
584 BEGIN( FindMembers );
587 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
591<FindMembers>"<?php" {
592 yyextra->insidePHP =
true;
594<FindMembersPHP>"<?"("php"?) {
595 BEGIN( FindMembers );
597<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
599 BEGIN( FindMembers );
601<FindMembers>"?>"|"</script>" {
602 if (yyextra->insidePHP)
603 BEGIN( FindMembersPHP );
607<FindMembersPHP>[^\n<]+ {
614<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
619<FindMembers>"%{"[^\n]* {
620 if (!yyextra->insideIDL)
624 if (!yyextra->insideIDL)
627<FindMembers>{B}*("properties"){BN}*":"{BN}* {
629 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
632<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
634 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
637<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
639 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
642<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
644 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
647<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
649 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
652<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
654 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
656<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
659<FindMembers>{B}*"internal"{BN}*":"{BN}* {
660 if (yyextra->insideCli)
669<FindMembers>{B}*"protected"{BN}*":"{BN}* {
672<FindMembers>{B}*"private"{BN}*":"{BN}* {
675<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
676 if (!yyextra->insideCpp) REJECT;
680<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
681 if (!yyextra->insideCpp) REJECT;
685<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
686 if (!yyextra->insideCpp) REJECT;
698<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
699<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
700 BEGIN( SkipComment ) ;
702<CppProt>("slots"|"Q_SLOTS") {
703 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
705<FindMembers>{B}*"event"{BN}+ {
706 if (yyextra->insideCli)
710 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
711 yyextra->current->bodyLine = yyextra->yyLineNr;
712 yyextra->current->bodyColumn = yyextra->yyColNr;
713 yyextra->curlyCount=0;
714 BEGIN( CliPropertyType );
716 else if (yyextra->insideCS)
719 yyextra->current->mtype = MethodTypes::Event;
720 yyextra->current->bodyLine = yyextra->yyLineNr;
721 yyextra->current->bodyColumn = yyextra->yyColNr;
728<FindMembers>{B}*"property"{BN}+ {
729 if (yyextra->insideCli)
733 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
734 yyextra->current->bodyLine = yyextra->yyLineNr;
735 yyextra->current->bodyColumn = yyextra->yyColNr;
736 yyextra->curlyCount=0;
737 BEGIN( CliPropertyType );
744<CliPropertyType>{ID} {
746 yyextra->current->name = yytext;
748<CliPropertyType>"[" {
749 yyextra->current->args =
"[";
750 BEGIN( CliPropertyIndex );
752<CliPropertyType>"{" {
753 yyextra->curlyCount=0;
755 BEGIN( CSAccessorDecl );
757<CliPropertyType>";" {
759 BEGIN( FindMembers );
764<CliPropertyType>{B}* {
768 yyextra->current->type += yytext;
770<CliPropertyIndex>"]" {
771 BEGIN( CliPropertyType );
772 yyextra->current->args+=yytext;
775 yyextra->current->args+=yytext;
790<FindMembers>{B}*"@private"{BN}+ {
793<FindMembers>{B}*"@protected"{BN}+ {
796<FindMembers>{B}*"@public"{BN}+ {
799<FindMembers>[\-+]{BN}* {
800 if (!yyextra->insideObjC)
806 yyextra->current->fileName = yyextra->fileName;
807 yyextra->current->startLine = yyextra->yyLineNr;
808 yyextra->current->startColumn = yyextra->yyColNr;
809 yyextra->current->bodyLine = yyextra->yyLineNr;
810 yyextra->current->bodyColumn = yyextra->yyColNr;
811 yyextra->current->section = EntryType::makeFunction();
812 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
813 yyextra->insideObjC =
true;
814 yyextra->yyBegColNr = yyextra->yyColNr;
815 yyextra->yyBegLineNr = yyextra->yyLineNr;
816 yyextra->current->virt = Specifier::Virtual;
818 yyextra->current->isStatic=yytext[0]==
'+';
824 BEGIN( ObjCReturnType );
825 yyextra->current->type.clear();
826 yyextra->roundCount=0;
829 if (yyextra->current->type.empty())
831 yyextra->current->type +=
"id";
833 yyextra->current->name = yytext;
837 yyextra->current->name +=
':';
839 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
842<ObjCReturnType>[^()]* {
843 yyextra->current->type += yytext;
845<ObjCReturnType>"(^)(" {
846 yyextra->current->type += yytext;
847 yyextra->roundCount++;
850 yyextra->current->type += yytext;
851 yyextra->roundCount++;
854 if (yyextra->roundCount<=0)
860 yyextra->current->type += yytext;
861 yyextra->roundCount--;
864<ObjCParams>({ID})?{BN}*":" {
869 yyextra->current->name +=
" :";
873 yyextra->current->name += keyw+
":";
875 if (yyextra->current->argList.back().type.empty())
877 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.
883<ObjCParams>{ID}{BN}* {
887<ObjCParams>","{BN}*"..." {
902 yyextra->roundCount=0;
903 yyextra->current->argList.back().type.clear();
904 BEGIN( ObjCParamType );
907 yyextra->roundCount++;
908 yyextra->current->argList.back().type+=yytext;
910<ObjCParamType>")"/{B}* {
911 if (yyextra->roundCount<=0)
917 yyextra->current->argList.back().type+=yytext;
918 yyextra->roundCount--;
921<ObjCParamType>[^()]* {
924<ObjCMethod,ObjCParams>";" {
925 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
927 yyextra->current->argList.back().type=
"id";
929 if (yyextra->current->argList.empty())
931 yyextra->current->argList.setNoParameters(
true);
DString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
938<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
943 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
945 yyextra->current->argList.back().type=
"id";
947 if (yyextra->current->argList.empty())
949 yyextra->current->argList.setNoParameters(
true);
955<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
956 if (yyextra->insideSlice)
959 yyextra->current->bodyLine = yyextra->yyLineNr;
960 yyextra->current->bodyColumn = yyextra->yyColNr;
961 yyextra->current->fileName = yyextra->fileName ;
962 yyextra->current->startLine = yyextra->yyLineNr ;
963 yyextra->current->startColumn = yyextra->yyColNr;
964 yyextra->current->args.clear();
965 yyextra->current->section = EntryType::makeTypedef();
966 yyextra->isTypedef =
true;
967 BEGIN( SliceSequence );
972<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
973 if (yyextra->insideSlice)
976 yyextra->current->bodyLine = yyextra->yyLineNr;
977 yyextra->current->bodyColumn = yyextra->yyColNr;
978 yyextra->current->fileName = yyextra->fileName ;
979 yyextra->current->startLine = yyextra->yyLineNr ;
980 yyextra->current->startColumn = yyextra->yyColNr;
981 yyextra->current->args.clear();
982 yyextra->current->section = EntryType::makeTypedef() ;
983 yyextra->isTypedef =
true;
984 BEGIN( SliceDictionary );
989<FindMembers>{BN}{1,80} {
992<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
993 if (yyextra->insideJava)
996 yyextra->lastSkipRoundContext = YY_START;
997 yyextra->roundCount=0;
1002 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1003 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1004 yyextra->current->protection = Protection::Public ;
1006 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
1013<ObjCPropAttr>"getter="{ID} {
1014 yyextra->current->read = yytext+7;
1016<ObjCPropAttr>"setter="{ID} {
1017 yyextra->current->write = yytext+7;
1019<ObjCPropAttr>"readonly" {
1020 yyextra->current->spec.setWritable(
false);
1022<ObjCPropAttr>"readwrite" {
1024<ObjCPropAttr>"assign" {
1026<ObjCPropAttr>"unsafe_unretained" {
1027 yyextra->current->spec.setAssign(
false);
1028 yyextra->current->spec.setUnretained(
true);
1030<ObjCPropAttr>"retain" {
1031 yyextra->current->spec.setAssign(
false);
1032 yyextra->current->spec.setRetain(
true);
1034<ObjCPropAttr>"copy" {
1035 yyextra->current->spec.setAssign(
false);
1036 yyextra->current->spec.setCopy(
true);
1038<ObjCPropAttr>"weak" {
1039 yyextra->current->spec.setAssign(
false);
1040 yyextra->current->spec.setWeak(
true);
1042<ObjCPropAttr>"strong" {
1043 yyextra->current->spec.setAssign(
false);
1044 yyextra->current->spec.setStrong(
true);
1046<ObjCPropAttr>"nonatomic" {
1047 yyextra->current->spec.setNonAtomic(
true);
1052<FindMembers>"@"{ID}("."{ID})+ {
1053 if (yyextra->insideJava)
1062<FindMembers>"@"{ID} {
1063 if (yyextra->insideJava)
1067 else if (
dstrcmp(yytext,
"@property")==0)
1069 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1070 yyextra->current->spec.setWritable(
true).setReadable(
true);
1071 yyextra->current->protection = Protection::Public ;
1073 else if (
dstrcmp(yytext,
"@synthesize")==0)
1075 BEGIN( ObjCSkipStatement );
1077 else if (
dstrcmp(yytext,
"@dynamic")==0)
1079 BEGIN( ObjCSkipStatement );
int dstrcmp(const char *str1, const char *str2)
1086<ObjCSkipStatement>";" {
1089<PackageName>{ID}(("."|"\\"){ID})* {
1090 yyextra->isTypedef=
false;
1092 yyextra->current->name = yytext;
1093 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1094 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1095 yyextra->current->section = EntryType::makeNamespace();
1096 yyextra->current->type =
"namespace" ;
1097 yyextra->current->fileName = yyextra->fileName;
1098 yyextra->current->startLine = yyextra->yyLineNr;
1099 yyextra->current->startColumn = yyextra->yyColNr;
1100 yyextra->current->bodyLine = yyextra->yyLineNr;
1101 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
1105 std::shared_ptr<Entry> tmp = yyextra->current;
1106 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1107 yyextra->current_root = std::move(tmp);
static void initEntry(yyscan_t yyscanner)
1112 yyextra->curlyCount=0;
1113 BEGIN( ReadNSBody );
1115<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1116 if (!yyextra->insideCpp) REJECT;
1118 yyextra->current->exported =
true;
1120 BEGIN( ModuleName );
1122<FindMembers>{B}*"module"{BN}*";" {
1123 if (!yyextra->insideCpp) REJECT;
1124 if (!yyextra->current->type.empty() || !yyextra->current->name.empty()) REJECT;
1127 BEGIN( FindMembers );
1129<FindMembers>{B}*"module"{BN}+ {
1130 if (!yyextra->insideCpp) REJECT;
1132 yyextra->current->exported =
false;
1134 BEGIN( ModuleName );
1136<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1137 if (!yyextra->insideCpp) REJECT;
1138 yyextra->current->exported =
true;
1140 BEGIN( ModuleImport );
1142<FindMembers>{B}*"import"{BN}+ {
1143 if (!yyextra->insideCpp) REJECT;
1145 BEGIN( ModuleImport );
1147<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1149 size_t i = name.
find(
':');
1155 yyextra->current->exported,
1158 yyextra->current->section = EntryType::makeModuleDoc();
1159 yyextra->isTypedef=
false;
1161 yyextra->current->type +=
" module";
1162 yyextra->current->fileName = yyextra->fileName;
1163 yyextra->current->startLine = yyextra->yyLineNr;
1164 yyextra->current->startColumn = yyextra->yyColNr;
1165 yyextra->current->bodyLine = yyextra->yyLineNr;
1166 yyextra->current->bodyColumn = yyextra->yyColNr;
1167 yyextra->current->name = name+
":"+partition;
DString mid(size_t index, size_t len=npos) const
size_t find(char c, size_t pos=0) const
void createModuleDef(const DString &fileName, int line, size_t column, bool exported, const DString &moduleName, const DString &partitionName=DString())
static ModuleManager & instance()
1170<ModuleName>{MODULE_ID} {
1174 yyextra->current->exported,
1176 yyextra->current->section = EntryType::makeModuleDoc();
1177 yyextra->isTypedef=
false;
1179 yyextra->current->type +=
" module";
1180 yyextra->current->fileName = yyextra->fileName;
1181 yyextra->current->startLine = yyextra->yyLineNr;
1182 yyextra->current->startColumn = yyextra->yyColNr;
1183 yyextra->current->bodyLine = yyextra->yyLineNr;
1184 yyextra->current->bodyColumn = yyextra->yyColNr;
1185 yyextra->current->name = yytext;
1188<ModuleName>":"{BN}+"private" {
1189 yyextra->current->exported = yyextra->exported =
false;
1192<ModuleName>";" { unput(
';');
1197<ModuleImport>"\""[^"\n]*"\"" {
1200 DString(yytext).mid(1,yyleng-2),
void addHeader(const DString &moduleFile, int line, const DString &headerName, bool isSystem)
1203<ModuleImport>"<"[^>\n]*">" {
1206 DString(yytext).mid(1,yyleng-2),
1209<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1211 size_t i = name.
find(
':');
1217 yyextra->current->exported,
void addImport(const DString &moduleFile, int line, const DString &importName, bool isExported, const DString &partitionName=DString())
1221<ModuleImport>{MODULE_ID} {
1225 yyextra->current->exported);
1228<ModuleImport>";" { BEGIN(FindMembers); }
1229<ModuleImport>\n {
lineCount(yyscanner); }
1231<FindMembers>{B}*"export"{BN}+"{" {
1232 yyextra->current->exported = yyextra->exported =
true;
1234<FindMembers>{B}*"export"{BN}+ {
1235 if (!yyextra->insideCpp) REJECT;
1236 yyextra->current->exported=
true;
1238<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1239 yyextra->current->type +=
" initonly ";
1240 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1243<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1244 yyextra->current->isStatic =
true;
1247<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1248 yyextra->current->isStatic =
true;
1251<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1252 yyextra->current->isStatic =
false;
1253 yyextra->current->explicitExternal =
true;
1256<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1258 yyextra->current->type +=
" const ";
1259 if (yyextra->insideCS) yyextra->current->isStatic =
true;
1267<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1268 yyextra->current->type +=
" virtual ";
1269 yyextra->current->virt = Specifier::Virtual;
1272<FindMembers>{B}*"constexpr"{BN}+ {
1273 if (yyextra->insideCpp)
1275 yyextra->current->spec.setConstExpr(
true);
1279<FindMembers>{B}*"consteval"{BN}+ {
1280 if (yyextra->insideCpp)
1282 yyextra->current->spec.setConstEval(
true);
1286<FindMembers>{B}*"constinit"{BN}+ {
1287 if (yyextra->insideCpp)
1289 yyextra->current->spec.setConstInit(
true);
1293<FindMembers>{B}*"published"{BN}+ {
1294 if (yyextra->insideIDL)
1297 yyextra->current->spec.setPublished(
true);
1304<FindMembers>{B}*"sealed"{BN}+ {
1305 if (yyextra->insideCS)
1307 yyextra->current->spec.setSealed(
true);
1314<FindMembers>{B}*"abstract"{BN}+ {
1315 if (yyextra->insidePHP || yyextra->insideCS)
1317 yyextra->current->spec.setAbstract(
true);
1321 if (yyextra->insideCpp) REJECT;
1322 yyextra->current->type +=
" abstract ";
1323 if (!yyextra->insideJava)
1325 yyextra->current->virt = Specifier::Pure;
1329 yyextra->current->spec.setAbstract(
true);
1334<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1335 yyextra->current->spec.setInline(
true);
1338<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1339 yyextra->current->spec.setMutable(
true);
1342<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1343 yyextra->current->spec.setThreadLocal(
true);
1346<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1347 yyextra->current->spec.setExplicit(
true);
1350<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1351 yyextra->current->spec.setLocal(
true);
1354<FindMembers>{B}*"@required"{BN}+ {
1355 yyextra->current->spec.setOptional(
false).setRequired(
true);
1358<FindMembers>{B}*"@optional"{BN}+ {
1359 yyextra->current->spec.setRequired(
false).setOptional(
true);
1367<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1368<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1369 yyextra->isTypedef=
false;
1370 yyextra->current->section = EntryType::makeNamespace();
1371 yyextra->current->type =
"namespace" ;
1372 yyextra->current->fileName = yyextra->fileName;
1373 yyextra->current->startLine = yyextra->yyLineNr;
1374 yyextra->current->startColumn = yyextra->yyColNr;
1375 yyextra->current->bodyLine = yyextra->yyLineNr;
1376 yyextra->current->bodyColumn = yyextra->yyColNr;
1378 if (yyextra->insidePHP)
1380 BEGIN( PackageName );
1384 BEGIN( CompoundName );
1387<FindMembers>{B}*"module"{BN}+ {
1389 if (yyextra->insideIDL || yyextra->insideSlice)
1391 yyextra->isTypedef=
false;
1392 yyextra->current->section = EntryType::makeNamespace();
1393 yyextra->current->type =
"module" ;
1394 yyextra->current->fileName = yyextra->fileName;
1395 yyextra->current->startLine = yyextra->yyLineNr;
1396 yyextra->current->startColumn = yyextra->yyColNr;
1397 yyextra->current->bodyLine = yyextra->yyLineNr;
1398 yyextra->current->bodyColumn = yyextra->yyColNr;
1399 BEGIN( CompoundName );
1401 else if (yyextra->insideD)
1412<FindMembers>{B}*"library"{BN}+ {
1414 if (yyextra->insideIDL)
1416 yyextra->isTypedef=
false;
1417 yyextra->current->section = EntryType::makeNamespace();
1418 yyextra->current->type =
"library" ;
1419 yyextra->current->fileName = yyextra->fileName;
1420 yyextra->current->startLine = yyextra->yyLineNr;
1421 yyextra->current->startColumn = yyextra->yyColNr;
1422 yyextra->current->bodyLine = yyextra->yyLineNr;
1423 yyextra->current->bodyColumn = yyextra->yyColNr;
1424 BEGIN( CompoundName );
1432<FindMembers>{B}*"constants"{BN}+ {
1434 if (yyextra->insideIDL)
1436 yyextra->isTypedef=
false;
1437 yyextra->current->section = EntryType::makeNamespace();
1438 yyextra->current->type =
"constants";
1439 yyextra->current->fileName = yyextra->fileName;
1440 yyextra->current->startLine = yyextra->yyLineNr;
1441 yyextra->current->startColumn = yyextra->yyColNr;
1442 yyextra->current->bodyLine = yyextra->yyLineNr;
1443 yyextra->current->bodyColumn = yyextra->yyColNr;
1444 BEGIN( CompoundName );
1452<FindMembers>{BN}*("service"){BN}+ {
1454 if (yyextra->insideIDL)
1456 yyextra->isTypedef=
false;
1457 yyextra->current->section = EntryType::makeClass();
1461 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1463 yyextra->current->type +=
" service " ;
1464 yyextra->current->fileName = yyextra->fileName;
1465 yyextra->current->startLine = yyextra->yyLineNr;
1466 yyextra->current->bodyLine = yyextra->yyLineNr;
1467 yyextra->current->bodyColumn = yyextra->yyColNr;
1468 BEGIN( CompoundName );
Wrapper class for a number of boolean properties.
1476<FindMembers>{BN}*("singleton"){BN}+ {
1478 if (yyextra->insideIDL)
1480 yyextra->isTypedef=
false;
1481 yyextra->current->section = EntryType::makeClass();
1483 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1484 setPublished(spec.isPublished());
1486 yyextra->current->type +=
" singleton " ;
1487 yyextra->current->fileName = yyextra->fileName;
1488 yyextra->current->startLine = yyextra->yyLineNr;
1489 yyextra->current->bodyLine = yyextra->yyLineNr;
1490 yyextra->current->bodyColumn = yyextra->yyColNr;
1491 BEGIN( CompoundName );
1499<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1501 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1503 yyextra->isTypedef=
false;
1504 yyextra->current->section = EntryType::makeClass();
1506 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1508 setOptional(spec.isOptional()).
1509 setPublished(spec.isPublished()).
1510 setLocal(spec.isLocal());
1512 yyextra->current->type +=
" interface" ;
1513 yyextra->current->fileName = yyextra->fileName;
1514 yyextra->current->startLine = yyextra->yyLineNr;
1515 yyextra->current->startColumn = yyextra->yyColNr;
1516 yyextra->current->bodyLine = yyextra->yyLineNr;
1517 yyextra->current->bodyColumn = yyextra->yyColNr;
1519 BEGIN( CompoundName );
1527<FindMembers>{B}*"@implementation"{BN}+ {
1529 yyextra->isTypedef=
false;
1530 yyextra->current->section = EntryType::makeObjcImpl();
1531 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1532 yyextra->insideObjC =
true;
1533 yyextra->current->protection = yyextra->protection = Protection::Public ;
1535 yyextra->current->type +=
" implementation" ;
1536 yyextra->current->fileName = yyextra->fileName;
1537 yyextra->current->startLine = yyextra->yyLineNr;
1538 yyextra->current->bodyLine = yyextra->yyLineNr;
1539 yyextra->current->bodyColumn = yyextra->yyColNr;
1540 BEGIN( CompoundName );
1542<FindMembers>{B}*"@interface"{BN}+ {
1544 yyextra->isTypedef=
false;
1545 yyextra->current->section = EntryType::makeClass();
1546 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1547 if (!yyextra->insideJava)
1549 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1550 yyextra->insideObjC =
true;
1552 yyextra->current->protection = yyextra->protection = Protection::Public ;
1554 yyextra->current->type +=
" interface" ;
1555 yyextra->current->fileName = yyextra->fileName;
1556 yyextra->current->startLine = yyextra->yyLineNr;
1557 yyextra->current->startColumn = yyextra->yyColNr;
1558 yyextra->current->bodyLine = yyextra->yyLineNr;
1559 yyextra->current->bodyColumn = yyextra->yyColNr;
1560 BEGIN( CompoundName );
1562<FindMembers>{B}*"@protocol"{BN}+ {
1564 yyextra->isTypedef=
false;
1565 yyextra->current->section = EntryType::makeClass();
1567 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1568 yyextra->insideObjC =
true;
1569 yyextra->current->protection = yyextra->protection = Protection::Public ;
1571 yyextra->current->type +=
" protocol" ;
1572 yyextra->current->fileName = yyextra->fileName;
1573 yyextra->current->startLine = yyextra->yyLineNr;
1574 yyextra->current->startColumn = yyextra->yyColNr;
1575 yyextra->current->bodyLine = yyextra->yyLineNr;
1576 yyextra->current->bodyColumn = yyextra->yyColNr;
1577 BEGIN( CompoundName );
1579<FindMembers>{B}*"exception"{BN}+ {
1580 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1581 yyextra->isTypedef=
false;
1582 yyextra->current->section = EntryType::makeClass();
1585 yyextra->current->spec =
TypeSpecifier().setException(
true).
1586 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1588 yyextra->current->type +=
" exception" ;
1589 yyextra->current->fileName = yyextra->fileName;
1590 yyextra->current->startLine = yyextra->yyLineNr;
1591 yyextra->current->startColumn = yyextra->yyColNr;
1592 yyextra->current->bodyLine = yyextra->yyLineNr;
1593 yyextra->current->bodyColumn = yyextra->yyColNr;
1595 BEGIN( CompoundName );
1597<FindMembers>"@class" |
1598<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1599<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1604 yyextra->current->section = EntryType::makeClass();
1606 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1609 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1611 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1613 yyextra->current->spec.setLocal(
true);
1617 yyextra->current->type +=
" const";
1619 else if (isVolatile)
1621 yyextra->current->type +=
" volatile";
1623 yyextra->current->type +=
" class" ;
1624 yyextra->current->fileName = yyextra->fileName;
1625 yyextra->current->startLine = yyextra->yyLineNr;
1626 yyextra->current->startColumn = yyextra->yyColNr;
1627 yyextra->current->bodyLine = yyextra->yyLineNr;
1628 yyextra->current->bodyColumn = yyextra->yyColNr;
1631 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1632 yyextra->insideObjC =
true;
1635 if (yytext[yyleng-1]==
'{') unput(
'{');
1636 BEGIN( CompoundName ) ;
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
1638<FindMembers>{B}*"value class{" |
1639<FindMembers>{B}*"value class"{BN}+ {
1640 yyextra->isTypedef=
false;
1641 yyextra->current->section = EntryType::makeClass();
1644 yyextra->current->type +=
" value class" ;
1645 yyextra->current->fileName = yyextra->fileName;
1646 yyextra->current->startLine = yyextra->yyLineNr;
1647 yyextra->current->startColumn = yyextra->yyColNr;
1648 yyextra->current->bodyLine = yyextra->yyLineNr;
1649 yyextra->current->bodyColumn = yyextra->yyColNr;
1651 if (yytext[yyleng-1]==
'{') unput(
'{');
1652 BEGIN( CompoundName ) ;
1654<FindMembers>{B}*"ref class{" |
1655<FindMembers>{B}*"ref class"{BN}+ {
1656 yyextra->isTypedef=
false;
1657 yyextra->current->section = EntryType::makeClass();
1660 yyextra->current->type +=
" ref class" ;
1661 yyextra->current->fileName = yyextra->fileName;
1662 yyextra->current->startLine = yyextra->yyLineNr;
1663 yyextra->current->startColumn = yyextra->yyColNr;
1664 yyextra->current->bodyLine = yyextra->yyLineNr;
1665 yyextra->current->bodyColumn = yyextra->yyColNr;
1667 if (yytext[yyleng-1]==
'{') unput(
'{');
1668 BEGIN( CompoundName ) ;
1670<FindMembers>{B}*"interface class{" |
1671<FindMembers>{B}*"interface class"{BN}+ {
1672 yyextra->isTypedef=
false;
1673 yyextra->current->section = EntryType::makeClass();
1674 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1676 yyextra->current->type +=
" interface class" ;
1677 yyextra->current->fileName = yyextra->fileName;
1678 yyextra->current->startLine = yyextra->yyLineNr;
1679 yyextra->current->startColumn = yyextra->yyColNr;
1680 yyextra->current->bodyLine = yyextra->yyLineNr;
1681 yyextra->current->bodyColumn = yyextra->yyColNr;
1683 if (yytext[yyleng-1]==
'{') unput(
'{');
1684 BEGIN( CompoundName ) ;
1686<FindMembers>{B}*"coclass"{BN}+ {
1687 if (yyextra->insideIDL)
1689 yyextra->isTypedef=
false;
1690 yyextra->current->section = EntryType::makeClass();
1692 yyextra->current->type +=
" coclass" ;
1693 yyextra->current->fileName = yyextra->fileName;
1694 yyextra->current->startLine = yyextra->yyLineNr;
1695 yyextra->current->startColumn = yyextra->yyColNr;
1696 yyextra->current->bodyLine = yyextra->yyLineNr;
1697 yyextra->current->bodyColumn = yyextra->yyColNr;
1699 BEGIN( CompoundName ) ;
1704 yyextra->current->name = yytext;
1705 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1709<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1710<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1711 if (yyextra->insideJava) REJECT;
1716 yyextra->current->section = EntryType::makeClass() ;
1720 setPublished(spec.isPublished()).
1721 setInline(spec.isInline()).
1722 setLocal(spec.isLocal());
1728 yyextra->current->type +=
" const";
1730 else if (isVolatile)
1732 yyextra->current->type +=
" volatile";
1734 yyextra->current->type +=
" struct" ;
1735 yyextra->current->fileName = yyextra->fileName;
1736 yyextra->current->startLine = yyextra->yyLineNr;
1737 yyextra->current->startColumn = yyextra->yyColNr;
1738 yyextra->current->bodyLine = yyextra->yyLineNr;
1739 yyextra->current->bodyColumn = yyextra->yyColNr;
1741 if (yytext[yyleng-1]==
'{') unput(
'{');
1742 BEGIN( CompoundName ) ;
1744<FindMembers>{B}*"value struct{" |
1745<FindMembers>{B}*"value struct"{BN}+ {
1746 yyextra->isTypedef=
false;
1747 yyextra->current->section = EntryType::makeClass();
1748 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1750 yyextra->current->type +=
" value struct" ;
1751 yyextra->current->fileName = yyextra->fileName;
1752 yyextra->current->startLine = yyextra->yyLineNr;
1753 yyextra->current->startColumn = yyextra->yyColNr;
1754 yyextra->current->bodyLine = yyextra->yyLineNr;
1755 yyextra->current->bodyColumn = yyextra->yyColNr;
1757 if (yytext[yyleng-1]==
'{') unput(
'{');
1758 BEGIN( CompoundName ) ;
1760<FindMembers>{B}*"ref struct{" |
1761<FindMembers>{B}*"ref struct"{BN}+ {
1762 yyextra->isTypedef=
false;
1763 yyextra->current->section = EntryType::makeClass();
1764 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1766 yyextra->current->type +=
" ref struct" ;
1767 yyextra->current->fileName = yyextra->fileName;
1768 yyextra->current->startLine = yyextra->yyLineNr;
1769 yyextra->current->startColumn = yyextra->yyColNr;
1770 yyextra->current->bodyLine = yyextra->yyLineNr;
1771 yyextra->current->bodyColumn = yyextra->yyColNr;
1773 if (yytext[yyleng-1]==
'{') unput(
'{');
1774 BEGIN( CompoundName ) ;
1776<FindMembers>{B}*"interface struct{" |
1777<FindMembers>{B}*"interface struct"{BN}+ {
1778 yyextra->isTypedef=
false;
1779 yyextra->current->section = EntryType::makeClass();
1780 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1782 yyextra->current->type +=
" interface struct";
1783 yyextra->current->fileName = yyextra->fileName;
1784 yyextra->current->startLine = yyextra->yyLineNr;
1785 yyextra->current->startColumn = yyextra->yyColNr;
1786 yyextra->current->bodyLine = yyextra->yyLineNr;
1787 yyextra->current->bodyColumn = yyextra->yyColNr;
1789 if (yytext[yyleng-1]==
'{') unput(
'{');
1790 BEGIN( CompoundName ) ;
1792<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1793<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1794 if (yyextra->insideJava) REJECT;
1799 yyextra->current->section = EntryType::makeClass();
1806 yyextra->current->type +=
" const";
1808 else if (isVolatile)
1810 yyextra->current->type +=
" volatile";
1812 yyextra->current->type +=
" union" ;
1813 yyextra->current->fileName = yyextra->fileName;
1814 yyextra->current->startLine = yyextra->yyLineNr;
1815 yyextra->current->startColumn = yyextra->yyColNr;
1816 yyextra->current->bodyLine = yyextra->yyLineNr;
1817 yyextra->current->bodyColumn = yyextra->yyColNr;
1819 if (yytext[yyleng-1]==
'{') unput(
'{');
1820 BEGIN( CompoundName ) ;
1822<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1823<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1828 if (yyextra->insideJava)
1830 yyextra->current->section = EntryType::makeClass();
1836 yyextra->current->section = EntryType::makeEnum() ;
1839 yyextra->current->type +=
" enum";
1842 yyextra->current->spec.setStrong(
true);
1846 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1848 yyextra->current->fileName = yyextra->fileName;
1849 yyextra->current->startLine = yyextra->yyLineNr;
1850 yyextra->current->startColumn = yyextra->yyColNr;
1851 yyextra->current->bodyLine = yyextra->yyLineNr;
1852 yyextra->current->bodyColumn = yyextra->yyColNr;
1854 if (yytext[yyleng-1]==
'{') unput(
'{');
1855 BEGIN( CompoundName ) ;
1857<FindMembers>{B}*"concept"{BN}+ {
1858 if (yyextra->insideJava) REJECT;
1859 yyextra->isTypedef=
false;
1860 yyextra->current->section = EntryType::makeConcept();
1862 yyextra->current->type +=
" concept";
1863 yyextra->current->fileName = yyextra->fileName;
1864 yyextra->current->startLine = yyextra->yyLineNr;
1865 yyextra->current->startColumn = yyextra->yyColNr;
1866 yyextra->current->bodyLine = yyextra->yyLineNr;
1867 yyextra->current->bodyColumn = yyextra->yyColNr;
1868 yyextra->current->args = yyextra->fullArgString;
1869 yyextra->keepComment =
true;
1871 BEGIN( ConceptName ) ;
1873<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1875 yyextra->current->name +=
"()";
1876 BEGIN( FindMembers );
1878<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1880 yyextra->current->name += yytext ;
1881 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1882 BEGIN( FindMembers ) ;
1884<Operator>"("{BN}*")"{BNopt}/"(" {
1886 yyextra->current->name += yytext ;
1887 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1888 BEGIN( FindMembers ) ;
1892 BEGIN( FindMembers ) ;
1896 yyextra->current->name += *yytext ;
1898<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1899 if (!yyextra->current->type.startsWith(
"friend "))
1901 yyextra->current->name += yytext;
1905 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1907 BEGIN( FindMembers ) ;
1909<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1912 yyextra->current->tArgLists.
push_back(al);
1913 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1914 yyextra->templateStr=
"<";
1915 yyextra->fullArgString = yyextra->templateStr;
1916 yyextra->copyArgString = &yyextra->templateStr;
1917 yyextra->currentArgumentContext = FindMembers;
1918 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1920<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1921 if (yyextra->insideJava) REJECT;
1923 BEGIN( NSAliasName );
1926 yyextra->aliasName = yytext;
1927 BEGIN( NSAliasArg );
1929<NSAliasArg>({ID}"::")*{ID} {
1931 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1942 BEGIN( FindMembers );
1944<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1946 yyextra->aliasName=yytext;
1949<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1953 yyextra->current->fileName = yyextra->fileName;
1955 yyextra->current->section = EntryType::makeUsingDecl();
1956 yyextra->current_root->copyToSubEntry(yyextra->current);
1958 yyextra->current->section = EntryType::makeUsingDir();
1959 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1961 yyextra->aliasName.clear();
DString removeRedundantWhiteSpace(const DString &s)
1963<PHPUseAs>{BN}+"as"{BN}+ {
1966<PHPUseAs>{PHPUSEKW} {
1970 if (!yyextra->aliasName.empty())
1975 yyextra->aliasName.clear();
const std::string & str() const
1977<PHPUse,PHPUseAs>[,;] {
1987<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1991 yyextra->current->fileName = yyextra->fileName;
1998 yyextra->current->section = EntryType::makeUsingDir();
1999 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.
2003<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2007 yyextra->current->fileName = yyextra->fileName;
2019 if (yyextra->insideD)
2021 yyextra->current->section = EntryType::makeUsingDir();
2026 yyextra->current->section = EntryType::makeUsingDecl();
2028 yyextra->previous = yyextra->current;
2029 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual const DString & docName() const =0
virtual void addIncludedByDependency(const FileDef *fd, const DString &incName, IncludeKind kind)=0
2033<IDLImport>"\""[^"]*"\"" {
2034 DString fileName(&yytext[1],yyleng-2);
2050<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2051 if (yyextra->insideJava) REJECT;
2052 yyextra->current->startLine=yyextra->yyLineNr;
2053 yyextra->current->startColumn = yyextra->yyColNr;
2057<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2058<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2060 yyextra->current->name=yytext;
2061 yyextra->current->fileName = yyextra->fileName;
2062 yyextra->current->section = EntryType::makeUsingDecl();
2063 yyextra->current->startLine = yyextra->yyLineNr;
2064 yyextra->usingNewVarNeeded =
true;
2065 if (yyextra->insideCS)
2070 yyextra->current->name=yytext;
2071 yyextra->current->fileName = yyextra->fileName;
2072 yyextra->current->startLine = yyextra->yyLineNr;
2073 yyextra->current->startColumn = yyextra->yyColNr;
2074 yyextra->current->section = EntryType::makeUsingDir();
2075 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2080<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2082 yyextra->current->fileName = yyextra->fileName;
2083 yyextra->current->section = EntryType::makeUsingDecl();
2084 yyextra->current->startLine = yyextra->yyLineNr;
2085 yyextra->current->bodyLine = yyextra->yyLineNr;
2086 yyextra->current->bodyColumn = yyextra->yyColNr;
2087 yyextra->lastInitializerContext = UsingAlias;
2088 yyextra->sharpCount=0;
2089 yyextra->initBracketCount=0;
2091 BEGIN(ReadInitializer);
2094 if (yyextra->usingNewVarNeeded)
2096 yyextra->previous = yyextra->current;
2097 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2099 yyextra->usingNewVarNeeded =
false;
2104 yyextra->lastInitializerContext = UsingAlias;
2105 yyextra->sharpCount=0;
2106 yyextra->initBracketCount=0;
2108 yyextra->usingNewVarNeeded =
false;
2109 BEGIN(ReadInitializer);
2112 yyextra->lastCContext = YY_START ;
2113 BEGIN( SkipComment ) ;
2116 yyextra->lastCContext = YY_START ;
2117 BEGIN( SkipCxxComment ) ;
2121 if (yyextra->usingNewVarNeeded)
2123 yyextra->previous = yyextra->current;
2124 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2126 yyextra->usingNewVarNeeded =
false;
2130 yyextra->current->section = EntryType::makeVariable();
2131 DString init = yyextra->current->initializer.str();
2132 init.stripPrefix(
"class ");
2133 init.stripPrefix(
"struct ");
2135 yyextra->current->type =
"typedef "+
init;
2136 yyextra->current->args.clear();
2137 yyextra->current->spec.setAlias(
true);
2138 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2143 yyextra->current->initializer << yytext;
2146 yyextra->current->initializer << yytext;
2150 yyextra->current->fileName = yyextra->fileName;
2151 yyextra->current->section = EntryType::makeUsingDir();
2152 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2154 yyextra->usingNewVarNeeded =
false;
2157<FindMembers>{SCOPENAME}{BN}*"<>" {
2162<FindMembers>{SCOPENAME}{BNopt}/"<" {
2164 if (yyextra->insideCpp && name==
"import") REJECT;
2165 yyextra->roundCount=0;
2166 yyextra->sharpCount=0;
2169 yyextra->current->name=name;
2175 BEGIN( EndTemplate );
2177<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2178 yyextra->sharpCount=0;
2179 yyextra->roundCount=0;
2187 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...
2190 if (!yyextra->insidePHP)
2196 yyextra->lastHereDocContext = YY_START;
2200<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2201 yyextra->current->name+=yytext;
2205 if (yyextra->roundCount==0)
2208 yyextra->sharpCount++;
2210 yyextra->current->name+=yytext;
2212<ClassTemplSpec,EndTemplate>">=" {
2213 yyextra->current->name+=yytext;
2215<ClassTemplSpec,EndTemplate>(">>") {
2216 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2224 yyextra->current->name+=yytext;
2229 yyextra->current->name+=
'>';
2231 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2233 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2238<EndTemplate>">"{BN}*"(" {
2240 yyextra->current->name+=
'>';
2242 if (yyextra->roundCount==0)
2244 --yyextra->sharpCount;
2246 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2248 yyextra->current->bodyLine = yyextra->yyLineNr;
2249 yyextra->current->bodyColumn = yyextra->yyColNr;
2250 yyextra->current->args =
"(";
2251 yyextra->currentArgumentContext = FuncQual;
2252 yyextra->fullArgString = yyextra->current->args;
2253 yyextra->copyArgString = &yyextra->current->args;
2255 BEGIN( ReadFuncArgType ) ;
2259 yyextra->current->name+=
"(";
2260 yyextra->roundCount++;
2263<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2265 yyextra->current->name+=
'>';
2266 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2271<EndTemplate>">"{BNopt}/"::" {
2273 yyextra->current->name+=
'>';
2275 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2277 BEGIN(FindMemberName);
2280<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2281 yyextra->roundCount++;
2283<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2284 if (yyextra->roundCount>0) yyextra->roundCount--;
2287 yyextra->current->name+=*yytext;
2290<FindMembers>"define"{BN}*"("{BN}*["'] {
2291 if (yyextra->insidePHP)
2293 yyextra->current->bodyLine = yyextra->yyLineNr;
2294 yyextra->current->bodyColumn = yyextra->yyColNr;
2301 yyextra->delimiter = yytext;
2302 *yyextra->pCopyHereDocGString << yytext;
2303 BEGIN(CopyHereDocEnd);
2305<CopyHereDoc>"\""{ID}/"\"" {
2306 yyextra->delimiter = &yytext[1];
2307 *yyextra->pCopyHereDocGString << yytext;
2308 BEGIN(CopyHereDocEnd);
2310<CopyHereDoc>"'"{ID}/"'" {
2311 yyextra->delimiter = &yytext[1];
2312 *yyextra->pCopyHereDocGString << yytext;
2313 BEGIN(CopyHereDocEnd);
2316 yyextra->delimiter = yytext;
2319<HereDoc>"\""{ID}/"\"" {
2320 yyextra->delimiter = &yytext[1];
2323<HereDoc>"'"{ID}/"'" {
2324 yyextra->delimiter = &yytext[1];
2327<HereDocEnd>^{Bopt}{ID} {
2330 BEGIN(yyextra->lastHereDocContext);
2334<CopyHereDocEnd>^{Bopt}{ID} {
2335 *yyextra->pCopyHereDocGString << yytext;
2338 BEGIN(yyextra->lastHereDocContext);
2343 *yyextra->pCopyHereDocGString << yytext;
2345<CopyHereDocEnd>{ID} {
2346 *yyextra->pCopyHereDocGString << yytext;
2349 *yyextra->pCopyHereDocGString << yytext;
2351<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2353<FindMembers>"Q_PROPERTY" {
2354 yyextra->yyBegLineNr = yyextra->yyLineNr;
2355 yyextra->yyBegColNr = yyextra->yyColNr;
2356 yyextra->current->protection = Protection::Public ;
2357 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2358 yyextra->current->type.clear();
2368 yyextra->current->name+=yytext;
2371 yyextra->current->type+= yyextra->current->name;
2372 yyextra->current->type+= yytext;
2373 yyextra->current->name=
"";
2375<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2376 yyextra->current->type+= yyextra->current->name;
2377 yyextra->current->name=yytext;
2379<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2380 yyextra->current->spec.setReadable(
true);
2383<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2384 yyextra->current->spec.setWritable(
true);
2387<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2388<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2389<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2390<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2391<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2392<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2393<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2394<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2395<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2396<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2400 yyextra->current->read = yytext;
2404 yyextra->current->write = yytext;
2407<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2408 yyextra->current->name=yytext;
2412<FindMembers>"requires" {
2413 if (yyextra->insideJava) REJECT;
2414 yyextra->current->req.clear();
2415 yyextra->requiresContext = YY_START;
2416 BEGIN(RequiresClause);
2418<RequiresClause>"requires"{BN}*/"{" {
2419 if (yyextra->insideJava) REJECT;
2421 yyextra->current->req+=yytext;
2422 BEGIN( RequiresExpression ) ;
2424<RequiresClause>"requires"{BN}*"(" {
2425 if (yyextra->insideJava) REJECT;
2427 yyextra->current->req+=yytext;
2428 yyextra->lastRoundContext=RequiresExpression;
2429 yyextra->pCopyRoundString=&yyextra->current->req;
2430 yyextra->roundCount=0;
2431 BEGIN( CopyRound ) ;
2433<RequiresExpression>"{" {
2434 yyextra->current->req+=yytext;
2435 yyextra->lastCurlyContext=RequiresClause;
2436 yyextra->pCopyCurlyString=&yyextra->current->req;
2437 yyextra->curlyCount=0;
2438 BEGIN( CopyCurly ) ;
2440<RequiresExpression>\n {
2441 yyextra->current->req+=
' ';
2444<RequiresExpression>. {
2445 yyextra->current->req+=yytext;
2447<RequiresClause>"(" {
2448 yyextra->current->req+=yytext;
2449 yyextra->lastRoundContext=RequiresClause;
2450 yyextra->pCopyRoundString=&yyextra->current->req;
2451 yyextra->roundCount=0;
2452 BEGIN( CopyRound ) ;
2454<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2458 yyextra->current->req+=yytext;
2459 yyextra->lastRoundContext=RequiresClause;
2460 yyextra->pCopyRoundString=&yyextra->current->req;
2461 yyextra->roundCount=0;
2469<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2473 yyextra->current->req+=yytext;
2474 yyextra->lastSharpContext=RequiresClause;
2475 yyextra->pCopySharpString=&yyextra->current->req;
2476 yyextra->sharpCount=0;
2484<RequiresClause>{NOTopt}{SCOPENAME} {
2488 yyextra->current->req=yytext;
2489 BEGIN(yyextra->requiresContext);
2496<RequiresClause>{NOTopt}"::"{ID} {
2498 yyextra->current->req+=yytext;
2500<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2502 yyextra->current->req+=yytext;
2504<RequiresClause>{BN}+ {
2505 yyextra->current->req+=
' ';
2510 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2511 BEGIN(yyextra->requiresContext);
2513<FindMembers,FindMemberName>{SCOPENAME} {
2515 yyextra->yyBegColNr=yyextra->yyColNr;
2516 yyextra->yyBegLineNr=yyextra->yyLineNr;
2518 if (yyextra->insideIDL && yyleng==9 &&
dstrcmp(yytext,
"cpp_quote")==0)
2522 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
dstrcmp(yytext,
"import")==0)
2524 if (yyextra->insideIDL)
2529 else if (yyextra->insidePHP &&
dstrcmp(yytext,
"use")==0)
2533 else if (yyextra->insideJava &&
dstrcmp(yytext,
"package")==0)
2538 else if (yyextra->insideIDL &&
dstrcmp(yytext,
"case")==0)
2540 BEGIN(IDLUnionCase);
2542 else if (yyextra->insideTryBlock &&
dstrcmp(yytext,
"catch")==0)
2544 yyextra->insideTryBlock=
false;
2545 BEGIN(TryFunctionBlock);
2547 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"alignas")==0)
2549 yyextra->lastAlignAsContext = YY_START;
2552 else if (yyextra->insideJS &&
dstrcmp(yytext,
"var")==0)
2554 yyextra->current->type=
"var";
2556 else if (yyextra->insideJS &&
dstrcmp(yytext,
"function")==0)
2558 yyextra->current->type=
"function";
2560 else if (yyextra->insideCS &&
dstrcmp(yytext,
"this")==0)
2564 yyextra->current->name=
"this";
2567 else if (yyextra->insideCpp && (
dstrcmp(yytext,
"static_assert")==0 ||
dstrcmp(yytext,
"_Static_assert")==0))
2570 BEGIN(StaticAssert);
2572 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"decltype")==0)
2576 if (!yyextra->current->type.empty()) yyextra->current->type+=
' ';
2577 yyextra->current->type+=yytext;
2580 else if (yyextra->insideSlice &&
dstrcmp(yytext,
"optional")==0)
2582 if (yyextra->current->type.empty())
2584 yyextra->current->type =
"optional";
2588 yyextra->current->type +=
" optional";
2590 yyextra->lastModifierContext = YY_START;
2591 BEGIN(SliceOptional);
2595 if (YY_START==FindMembers)
2599 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2600 if (javaLike &&
dstrcmp(yytext,
"public")==0)
2602 yyextra->current->protection = Protection::Public;
2604 else if (javaLike &&
dstrcmp(yytext,
"protected")==0)
2606 yyextra->current->protection = Protection::Protected;
2608 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
dstrcmp(yytext,
"internal")==0)
2610 yyextra->current->protection = Protection::Package;
2612 else if (javaLike &&
dstrcmp(yytext,
"private")==0)
2614 yyextra->current->protection = Protection::Private;
2616 else if (javaLike &&
dstrcmp(yytext,
"static")==0)
2618 if (YY_START==FindMembers)
2619 yyextra->current->name = yytext;
2621 yyextra->current->name += yytext;
2622 yyextra->current->isStatic =
true;
2626 if (YY_START==FindMembers)
2627 yyextra->current->name = yytext;
2629 yyextra->current->name += yytext;
2630 if (yyextra->current->name.startsWith(
"static "))
2632 yyextra->current->isStatic =
true;
2633 yyextra->current->name= yyextra->current->name.mid(7);
2635 else if (yyextra->current->name.startsWith(
"inline "))
2637 if (yyextra->current->type.empty())
2639 yyextra->current->type=
"inline";
2643 yyextra->current->type+=
"inline ";
2645 yyextra->current->name= yyextra->current->name.mid(7);
2647 else if (yyextra->current->name.startsWith(
"constexpr "))
2649 if (yyextra->current->type.empty())
2651 yyextra->current->type=
"constexpr";
2655 yyextra->current->type+=
"constexpr ";
2657 yyextra->current->name=yyextra->current->name.mid(10);
2659 else if (yyextra->current->name.startsWith(
"consteval "))
2661 if (yyextra->current->type.empty())
2663 yyextra->current->type=
"consteval";
2667 yyextra->current->type+=
"consteval ";
2669 yyextra->current->name=yyextra->current->name.mid(10);
2671 else if (yyextra->current->name.startsWith(
"constinit "))
2673 if (yyextra->current->type.empty())
2675 yyextra->current->type=
"constinit";
2679 yyextra->current->type+=
"constinit ";
2681 yyextra->current->name=yyextra->current->name.mid(10);
2683 else if (yyextra->current->name.startsWith(
"const "))
2685 if (yyextra->current->type.empty())
2687 yyextra->current->type=
"const";
2691 yyextra->current->type+=
"const ";
2693 yyextra->current->name=yyextra->current->name.mid(6);
2695 else if (yyextra->current->name.startsWith(
"volatile "))
2697 if (yyextra->current->type.empty())
2699 yyextra->current->type=
"volatile";
2703 yyextra->current->type+=
"volatile ";
2705 yyextra->current->name=yyextra->current->name.mid(9);
2707 else if (yyextra->current->name.startsWith(
"typedef "))
2709 if (yyextra->current->type.empty())
2711 yyextra->current->type=
"typedef";
2715 yyextra->current->type+=
"typedef ";
2717 yyextra->current->name=yyextra->current->name.mid(8);
2727 yyextra->externLinkage=
false;
2731 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2734 yyextra->lastSkipRoundContext = FindMembers;
2735 yyextra->roundCount=0;
2738<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2744 yyextra->current->type+=yytext;
2745 yyextra->lastRoundContext=FindMembers;
2746 yyextra->pCopyRoundString=&yyextra->current->type;
2747 yyextra->roundCount=0;
2750<DeclType>{BN}+ {
lineCount(yyscanner); }
2755<CSIndexer>"["[^\n\]]*"]" {
2759<FindMembers>[0-9]{ID} {
2762 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2764 yyextra->current->name+=
".";
2768 yyextra->current->name+=yytext;
2770<CppQuote>"("{B}*"\"" {
2771 yyextra->insideCppQuote=
true;
2775<IDLUnionCase>":" { BEGIN(FindMembers); }
2776<IDLUnionCase>\n {
lineCount(yyscanner); }
2778<TryFunctionBlock>\n {
lineCount(yyscanner); }
2779<TryFunctionBlock>"{" {
2780 yyextra->curlyCount=0;
2781 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2785<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2787<TryFunctionBlockEnd>\n { unput(*yytext);
2788 BEGIN( FindMembers );
2790<TryFunctionBlockEnd>. { unput(*yytext);
2791 BEGIN( FindMembers );
2794 yyextra->insideCppQuote=
false;
2797<FindConceptParts>[^\/\n]* {
2798 yyextra->current->initializer << yytext;
2800<FindConceptParts>. {
2801 yyextra->current->initializer << yytext;
2803<FindConceptParts>\n {
2804 yyextra->current->initializer << yytext;
2805 yyextra->yyLineNr++;
2807<FindConceptParts>{CCS} {
2808 yyextra->current->initializer << yytext;
2810<FindConceptParts>{CPPC} {
2811 yyextra->current->initializer << yytext;
2813<FindConceptParts>^[ \t]*{CCS}[!*] {
2815 size_t indent = text.
find(
'/');
2817 if (!yyextra->current->initializer.empty())
2819 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2822 yyextra->current->section = EntryType::makeConceptDocPart();
2823 yyextra->current->startLine = yyextra->yyLineNr;
2824 yyextra->current->startColumn = indent;
2825 yyextra->current->initializer.clear();
2826 BEGIN(FindConceptDocs);
2828<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2829 if (!yyextra->current->initializer.empty())
2831 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2835 size_t indent = line.find(
'/');
2836 yyextra->current->section = EntryType::makeConceptDocPart();
2837 yyextra->current->startLine = yyextra->yyLineNr;
2838 yyextra->current->startColumn = indent;
2839 yyextra->current->initializer.clear();
2840 yyextra->current->initializer << line.mid(indent+3);
2841 yyextra->yyLineNr++;
2842 BEGIN(FindConceptCxxDocs);
2844<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2846 size_t p = line.find(
'/');
2847 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2848 yyextra->current->initializer << line.mid(p+2);
2849 yyextra->yyLineNr++;
2851<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2852 yyextra->current->initializer << yytext;
2854<FindConceptCxxDocs>. {
2855 if (!yyextra->current->initializer.empty())
2859 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2863 yyextra->current->section = EntryType::makeConceptCodePart();
2864 yyextra->current->startLine = yyextra->yyLineNr;
2865 BEGIN(FindConceptParts);
static void handleCommentBlock(yyscan_t yyscanner, const DString &doc, bool brief)
2867<FindConceptDocs>^[ \t]*"*"+/[^/] {
2869<FindConceptDocs>[^\*\n]+ {
2870 yyextra->current->initializer << yytext;
2872<FindConceptDocs>\n {
2873 yyextra->current->initializer << yytext;
2874 yyextra->yyLineNr++;
2876<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2877 if (!yyextra->current->initializer.empty())
2881 yyextra->current->section = EntryType::makeConceptDocPart();
2882 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2886 yyextra->current->section = EntryType::makeConceptCodePart();
2887 yyextra->current->startLine = yyextra->yyLineNr;
2888 BEGIN(FindConceptParts);
2890<FindConceptDocs>"*"*{CCE} {
2891 if (!yyextra->current->initializer.empty())
2895 yyextra->current->section = EntryType::makeConceptDocPart();
2896 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2899 yyextra->current->section = EntryType::makeConceptCodePart();
2900 yyextra->current->startLine = yyextra->yyLineNr;
2901 BEGIN(FindConceptParts);
2903<FindConceptParts><<EOF>> {
2904 if (!yyextra->current->initializer.empty())
2906 if (!yyextra->current->section.isConceptCodePart())
2908 yyextra->current->section = EntryType::makeConceptDocPart();
2910 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2915<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2917 yyextra->lastCPPContext = YY_START;
2920<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2921<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2922 if (yyextra->insidePHP)
2924 yyextra->current->bodyLine = yyextra->yyLineNr;
2925 yyextra->current->bodyColumn = yyextra->yyColNr;
2926 yyextra->current->fileName = yyextra->fileName;
2927 yyextra->current->startLine = yyextra->yyLineNr;
2928 yyextra->current->startColumn = yyextra->yyColNr;
2929 yyextra->current->type.clear();
2930 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2931 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2932 yyextra->current->section = EntryType::makeDefine();
2933 yyextra->lastDefineContext = YY_START;
2936<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2937 yyextra->yyLineNr = atoi(&yytext[1]);
2939 yyextra->lastPreLineCtrlContext = YY_START;
2940 if (YY_START==ReadBody ||
2941 YY_START==ReadNSBody ||
2942 YY_START==ReadBodyIntf)
2944 yyextra->current->program << yytext;
2946 BEGIN( PreLineCtrl );
2948<PreLineCtrl>"\""[^\n\"]*"\"" {
2950 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2951 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2952 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2954 yyextra->current->program << yytext;
2958 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2959 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2960 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2962 yyextra->current->program << yytext;
2966 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2967 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2968 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2970 yyextra->current->program << yytext;
2973 BEGIN( yyextra->lastPreLineCtrlContext );
2976<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2977<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2978 BEGIN( yyextra->lastCPPContext) ;
2980<SDefine>{ID}{B}*"(" {
2981 yyextra->current->name = yytext;
2982 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2983 yyextra->current->args =
"(";
2984 yyextra->current->bodyLine = yyextra->yyLineNr;
2985 yyextra->current->bodyColumn = yyextra->yyColNr;
2986 yyextra->currentArgumentContext = DefineEnd;
2987 yyextra->fullArgString=yyextra->current->args;
2988 yyextra->copyArgString=&yyextra->current->args;
2989 BEGIN( ReadFuncArgType ) ;
3004 yyextra->current->bodyLine = yyextra->yyLineNr;
3005 yyextra->current->bodyColumn = yyextra->yyColNr;
3006 yyextra->current->name = yytext;
3013 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3015 BEGIN(yyextra->lastDefineContext);
3019 yyextra->current->fileName = yyextra->fileName;
3020 yyextra->current->startLine = yyextra->yyLineNr;
3021 yyextra->current->startColumn = yyextra->yyColNr;
3022 yyextra->current->type.clear();
3023 yyextra->current->type =
"const";
3024 DString init = yyextra->current->initializer.str();
3027 yyextra->current->initializer.str(
init.str());
3028 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3029 yyextra->current->section = EntryType::makeVariable();
3030 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3035<DefineEnd>\\[\r]?\n {
3037 yyextra->current->endBodyLine = yyextra->yyLineNr;
3040 if (yyextra->insideIDL && yyextra->insideCppQuote)
3046 yyextra->lastStringContext=DefineEnd;
3051<DefinePHP>{ID}["']{BN}*","{BN}* {
3052 yyextra->current->name = yytext;
3053 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3054 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3055 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3056 yyextra->current->bodyLine = yyextra->yyLineNr;
3057 yyextra->current->bodyColumn = yyextra->yyColNr;
3058 yyextra->lastRoundContext = DefinePHPEnd;
3059 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3060 yyextra->roundCount = 0;
3061 BEGIN( GCopyRound );
3065 if (yyextra->insideCli)
3068 yyextra->current->name = yytext ;
3076 yyextra->current->name += yytext ;
3079<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3080 if (YY_START==ReadInitializer && yyextra->keepComment)
3086 if (yyextra->current->bodyLine==-1)
3088 yyextra->current->bodyLine=yyextra->yyLineNr;
3089 yyextra->current->bodyColumn = yyextra->yyColNr;
3091 yyextra->docBlockContext = YY_START;
3092 yyextra->docBlockInBody =
false;
3093 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3095 if (YY_START==MemberSpec && yyextra->memspecEntry && yyextra->memspecEntry->briefFile.empty())
3097 if (yytext[yyleng-3]==
'/')
3099 yyextra->memspecEntry->briefFile = yyextra->fileName;
3100 yyextra->memspecEntry->briefLine = yyextra->yyLineNr;
3104 yyextra->memspecEntry->docFile = yyextra->fileName;
3105 yyextra->memspecEntry->docLine = yyextra->yyLineNr;
3111 yyextra->docBlock.
str(indent.
str());
3115 yyextra->docBlockTerm =
';';
3116 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3118 yyextra->current->bitfields =
":"+yyextra->current->args;
3119 yyextra->current->args.clear();
3120 yyextra->current->section = EntryType::makeVariable();
3122 if (yytext[yyleng-3]==
'/')
DString fill(char c, size_t len)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
3134<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3135 if (YY_START==ReadInitializer && yyextra->keepComment)
3141 yyextra->docBlockContext = YY_START;
3142 yyextra->docBlockInBody =
false;
3143 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3148 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]==
'/')
3170<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3171 if (YY_START==ReadInitializer && yyextra->keepComment)
3177 if (yyextra->current->bodyLine==-1)
3179 yyextra->current->bodyLine=yyextra->yyLineNr;
3180 yyextra->current->bodyColumn = yyextra->yyColNr;
3182 yyextra->docBlockContext = YY_START;
3183 yyextra->docBlockInBody =
false;
3184 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3188 yyextra->docBlock.
str(indent.
str());
3191 yyextra->docBlockTerm = 0;
3192 if (yytext[yyleng-3]==
'/')
3205<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3207 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3210 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3215 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3221 if (yytext[2]==
'!' || yytext[2]==
'/')
3223 yyextra->docBlockContext = YY_START;
3224 yyextra->docBlockInBody =
false;
3225 yyextra->docBlockAutoBrief =
false;
3226 yyextra->docBlock.str(std::string());
3227 yyextra->docBlockTerm = 0;
3233 yyextra->lastCContext=YY_START;
3234 BEGIN(SkipCxxComment);
3239 if (yytext[2]==
'!' || yytext[2]==
'*')
3241 yyextra->docBlockContext = YY_START;
3242 yyextra->docBlockInBody =
false;
3243 yyextra->docBlock.str(std::string());
3244 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3246 yyextra->docBlockTerm = 0;
3252 yyextra->lastCContext=YY_START;
3257<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3258 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3259 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3263 if (!yyextra->insideCS) REJECT;
3264 yyextra->current->bodyLine = yyextra->yyLineNr;
3265 yyextra->current->bodyColumn = yyextra->yyColNr;
3266 yyextra->current->initializer.str(yytext);
3267 yyextra->lastInitializerContext = YY_START;
3268 yyextra->sharpCount=0;
3269 yyextra->initBracketCount=0;
3270 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3271 yyextra->current->spec.setGettable(
true);
3272 BEGIN(ReadInitializerPtr);
3275 yyextra->current->bodyLine = yyextra->yyLineNr;
3276 yyextra->current->bodyColumn = yyextra->yyColNr;
3277 yyextra->current->initializer.str(
" ");
3278 for (
size_t ii = 2 ; ii < yyextra->yyColNr; ii++)
3279 yyextra->current->initializer <<
" ";
3280 yyextra->current->initializer <<
"=";
3281 yyextra->lastInitializerContext = YY_START;
3282 yyextra->sharpCount=0;
3283 yyextra->initBracketCount=0;
3284 BEGIN(ReadInitializer);
3286<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3288 yyextra->current->exception +=
" ";
3291<UNOIDLAttributeBlock>"}" {
3292 yyextra->current->exception +=
" }";
3296<ReadInitializer,ReadInitializerPtr>"(" {
3297 yyextra->lastRoundContext=YY_START;
3298 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3299 yyextra->roundCount=0;
3300 yyextra->current->initializer << *yytext;
3303<ReadInitializer,ReadInitializerPtr>"[" {
3304 if (!yyextra->insidePHP) REJECT;
3305 yyextra->lastSquareContext=YY_START;
3306 yyextra->pCopySquareGString=&yyextra->current->initializer;
3307 yyextra->squareCount=0;
3308 yyextra->current->initializer << *yytext;
3311<ReadInitializer,ReadInitializerPtr>"{" {
3312 yyextra->lastCurlyContext=YY_START;
3313 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3314 yyextra->curlyCount=0;
3315 yyextra->current->initializer << *yytext;
3318<ReadInitializer,ReadInitializerPtr>[;,] {
3320 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3322 yyextra->current->fileName = yyextra->fileName;
3323 yyextra->current->startLine = yyextra->yyLineNr;
3324 yyextra->current->startColumn = yyextra->yyColNr;
3325 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3326 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3327 yyextra->current->section = EntryType::makeVariable();
3328 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3332 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3335 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3336 BEGIN(yyextra->lastInitializerContext);
3338 else if (*yytext==
',' && yyextra->initBracketCount==0)
3341 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3342 BEGIN(yyextra->lastInitializerContext);
3346 yyextra->current->initializer << *yytext;
3349<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3350 if (!yyextra->insideCpp)
3356 yyextra->current->initializer << yytext;
3358 yyextra->lastRawStringContext = YY_START;
3359 yyextra->pCopyRawGString = &yyextra->current->initializer;
DString extractBeginRawStringDelimiter(const char *rawStart)
3364<ReadInitializer>{CPPC}.* {
3365 if (yyextra->keepComment)
3367 yyextra->current->initializer << yytext;
3374<ReadInitializer>{CCS} {
3375 if (yyextra->keepComment)
3377 yyextra->current->initializer << yytext;
3378 BEGIN(InitCopyComment);
3385<InitCopyComment>{CCE} {
3386 yyextra->current->initializer << yytext;
3387 BEGIN(ReadInitializer);
3389<InitCopyComment>\n {
3391 yyextra->current->initializer << yytext;
3394 yyextra->current->initializer << yytext;
3396<InitCopyComment><<EOF>> {
3397 warn(yyextra->fileName,yyextra->yyLineNr,
3398 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3401<RawGString>{RAWEND} {
3404 *yyextra->pCopyRawGString << yytext;
3405 BEGIN(yyextra->lastRawStringContext);
DString extractEndRawStringDelimiter(const char *rawEnd)
3412<RawGString>[^)\n]+ {
3413 *yyextra->pCopyRawGString << yytext;
3416 *yyextra->pCopyRawGString << yytext;
3419 *yyextra->pCopyRawGString << yytext;
3422<RawString>{RAWEND} {
3423 *yyextra->pCopyRawString+=yytext;
3424 yyextra->fullArgString+=yytext;
3427 BEGIN(yyextra->lastRawStringContext);
3431 *yyextra->pCopyRawString += yytext;
3432 yyextra->fullArgString+=yytext;
3435 *yyextra->pCopyRawString += yytext;
3436 yyextra->fullArgString+=yytext;
3439 *yyextra->pCopyRawString += yytext;
3440 yyextra->fullArgString+=yytext;
3443<ReadInitializer,ReadInitializerPtr>\" {
3444 if (yyextra->insideIDL && yyextra->insideCppQuote)
3450 yyextra->lastStringContext=YY_START;
3451 yyextra->current->initializer << yytext;
3452 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3453 yyextra->stopAtInvalidString=
false;
3457<ReadInitializer,ReadInitializerPtr>"->" {
3458 yyextra->current->initializer << yytext;
3460<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3461 yyextra->current->initializer << yytext;
3463<ReadInitializer,ReadInitializerPtr>(">>") {
3464 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3467 yyextra->initBracketCount-=2;
3468 yyextra->sharpCount-=2;
3470 yyextra->current->initializer << yytext;
3472<ReadInitializer,ReadInitializerPtr>(">=") {
3473 yyextra->current->initializer << yytext;
3475<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3476 yyextra->initBracketCount++;
3477 yyextra->sharpCount++;
3478 yyextra->current->initializer << *yytext;
3480<ReadInitializer,ReadInitializerPtr>[>\]})] {
3481 yyextra->initBracketCount--;
3482 yyextra->sharpCount--;
3485 yyextra->current->endBodyLine=yyextra->yyLineNr;
3487 yyextra->current->initializer << *yytext;
3489<ReadInitializer,ReadInitializerPtr>\' {
3490 if (yyextra->insidePHP)
3492 yyextra->current->initializer << yytext;
3493 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3494 yyextra->lastStringContext=YY_START;
3495 BEGIN(CopyPHPGString);
3499 yyextra->current->initializer << yytext;
3502<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3503 if (yyextra->insidePHP)
3509 yyextra->current->initializer << yytext;
3512<ReadInitializer,ReadInitializerPtr>\n {
3513 yyextra->current->initializer << *yytext;
3516<ReadInitializer,ReadInitializerPtr>"@\"" {
3518 yyextra->current->initializer << yytext;
3519 if (!yyextra->insideCS && !yyextra->insideObjC)
3526 yyextra->lastSkipVerbStringContext=YY_START;
3527 yyextra->pSkipVerbString=&yyextra->current->initializer;
3528 BEGIN(SkipVerbString);
3531<SkipVerbString>[^\n"\\]+ {
3532 *yyextra->pSkipVerbString << yytext;
3534<SkipVerbString>"\\\\" {
3535 if (yyextra->insideCS) REJECT
3536 *yyextra->pSkipVerbString << yytext;
3538<SkipVerbString>"\\\"" {
3539 if (yyextra->insideCS) REJECT
3540 *yyextra->pSkipVerbString << yytext;
3542<SkipVerbString>"\"\"" {
3543 *yyextra->pSkipVerbString << yytext;
3545<SkipVerbString>"\"" {
3546 *yyextra->pSkipVerbString << *yytext;
3547 BEGIN(yyextra->lastSkipVerbStringContext);
3550 *yyextra->pSkipVerbString << *yytext;
3554 *yyextra->pSkipVerbString << *yytext;
3556<ReadInitializer,ReadInitializerPtr>"?>" {
3557 if (yyextra->insidePHP)
3558 BEGIN( FindMembersPHP );
3560 yyextra->current->initializer << yytext;
3562<ReadInitializer,ReadInitializerPtr>. {
3563 yyextra->current->initializer << *yytext;
3567<CopyString,CopyPHPString>\\. {
3568 *yyextra->pCopyQuotedString+=yytext;
3571 *yyextra->pCopyQuotedString+=*yytext;
3572 BEGIN( yyextra->lastStringContext );
3575 *yyextra->pCopyQuotedString+=*yytext;
3576 BEGIN( yyextra->lastStringContext );
3578<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3579 *yyextra->pCopyQuotedString+=yytext;
3581<CopyString,CopyPHPString>\n {
3582 *yyextra->pCopyQuotedString+=*yytext;
3585<CopyString,CopyPHPString>. {
3586 *yyextra->pCopyQuotedString+=*yytext;
3590<CopyGString,CopyPHPGString>\\. {
3591 *yyextra->pCopyQuotedGString << yytext;
3594 *yyextra->pCopyQuotedGString << *yytext;
3595 BEGIN( yyextra->lastStringContext );
3598 *yyextra->pCopyQuotedGString << *yytext;
3599 BEGIN( yyextra->lastStringContext );
3601<CopyGString,CopyPHPGString>"<?php" {
3602 *yyextra->pCopyQuotedGString << yytext;
3603 BEGIN( yyextra->lastStringContext );
3605<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3606 *yyextra->pCopyQuotedGString << yytext;
3608<CopyGString,CopyPHPGString>\n {
3609 *yyextra->pCopyQuotedGString << *yytext;
3610 if (yyextra->stopAtInvalidString)
3612 BEGIN( yyextra->lastStringContext );
3619<CopyGString,CopyPHPGString>. {
3620 *yyextra->pCopyQuotedGString << *yytext;
3624<CopyC11Attribute>\" {
3625 *yyextra->pCopyC11AttributeString += *yytext;
3626 yyextra->pCopyQuotedString=yyextra->pCopyC11AttributeString;
3627 yyextra->lastStringContext=YY_START;
3630<CopyC11Attribute>\n {
3632 *yyextra->pCopyC11AttributeString += *yytext;
3634<CopyC11Attribute>{ID} {
3635 if (
dstrcmp(yytext,
"nodiscard")==0)
3637 yyextra->current->spec.setNoDiscard(
true);
3639 *yyextra->pCopyC11AttributeString += yytext;
3641<CopyC11Attribute>. {
3642 *yyextra->pCopyC11AttributeString += *yytext;
3644<CopyC11Attribute>"]]" {
3645 yyextra->commentScanner.addDeprecatedDocs(yyextra->current.get(),
3648 yyextra->thisParser);
3649 BEGIN(yyextra->lastC11AttributeContext);
3655 *yyextra->pCopyRoundString += *yytext;
3656 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3657 yyextra->lastStringContext=YY_START;
3661 *yyextra->pCopyRoundString += *yytext;
3662 yyextra->roundCount++;
3665 *yyextra->pCopyRoundString += *yytext;
3666 if (--yyextra->roundCount<0)
3667 BEGIN(yyextra->lastRoundContext);
3671 *yyextra->pCopyRoundString += *yytext;
3674 if (yyextra->insidePHP)
3676 yyextra->current->initializer << yytext;
3677 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3678 yyextra->lastStringContext=YY_START;
3679 BEGIN(CopyPHPString);
3683 *yyextra->pCopyRoundString += yytext;
3686<CopyRound>{CHARLIT} {
3687 if (yyextra->insidePHP)
3693 *yyextra->pCopyRoundString+=yytext;
3696<CopyRound>[^"'()\n,]+ {
3697 *yyextra->pCopyRoundString+=yytext;
3700 *yyextra->pCopyRoundString+=*yytext;
3705 *yyextra->pCopySharpString += *yytext;
3706 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3707 yyextra->lastStringContext=YY_START;
3711 *yyextra->pCopySharpString += *yytext;
3712 yyextra->sharpCount++;
3715 *yyextra->pCopySharpString += *yytext;
3716 if (--yyextra->sharpCount<0)
3718 BEGIN(yyextra->lastSharpContext);
3723 *yyextra->pCopySharpString += *yytext;
3726 if (yyextra->insidePHP)
3728 yyextra->current->initializer << yytext;
3729 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3730 yyextra->lastStringContext=YY_START;
3731 BEGIN(CopyPHPString);
3735 *yyextra->pCopySharpString += yytext;
3738<CopySharp>{CHARLIT} {
3739 if (yyextra->insidePHP)
3745 *yyextra->pCopySharpString+=yytext;
3748<CopySharp>[^"'<>\n,]+ {
3749 *yyextra->pCopySharpString+=yytext;
3752 *yyextra->pCopySharpString+=*yytext;
3758 *yyextra->pCopyRoundGString << *yytext;
3759 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3760 yyextra->lastStringContext=YY_START;
3764 *yyextra->pCopyRoundGString << *yytext;
3765 yyextra->roundCount++;
3768 *yyextra->pCopyRoundGString << *yytext;
3769 if (--yyextra->roundCount<0)
3770 BEGIN(yyextra->lastRoundContext);
3774 *yyextra->pCopyRoundGString << *yytext;
3777 if (yyextra->insidePHP)
3779 yyextra->current->initializer << yytext;
3780 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3781 yyextra->lastStringContext=YY_START;
3782 BEGIN(CopyPHPGString);
3786 *yyextra->pCopyRoundGString << yytext;
3789<GCopyRound>{CHARLIT} {
3790 if (yyextra->insidePHP)
3796 *yyextra->pCopyRoundGString << yytext;
3800 if (!yyextra->insideCS) REJECT;
3801 *yyextra->pCopyRoundGString << yytext;
3802 yyextra->lastSkipVerbStringContext=YY_START;
3803 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3804 BEGIN(SkipVerbString);
3806<GCopyRound>[^"'()\n\/,R]+ {
3807 *yyextra->pCopyRoundGString << yytext;
3809<GCopyRound>{RAWBEGIN} {
3810 *yyextra->pCopyRoundGString << yytext;
3812 yyextra->lastRawStringContext = YY_START;
3813 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3817 *yyextra->pCopyRoundGString << *yytext;
3822 *yyextra->pCopySquareGString << *yytext;
3823 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3824 yyextra->lastStringContext=YY_START;
3828 *yyextra->pCopySquareGString << *yytext;
3829 if (yyextra->insidePHP)
3831 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3832 yyextra->lastStringContext=YY_START;
3833 BEGIN(CopyPHPGString);
3837 *yyextra->pCopySquareGString << *yytext;
3838 yyextra->squareCount++;
3841 *yyextra->pCopySquareGString << *yytext;
3842 if (--yyextra->squareCount<0)
3843 BEGIN(yyextra->lastSquareContext);
3847 *yyextra->pCopySquareGString << *yytext;
3850 if (yyextra->insidePHP)
3852 yyextra->current->initializer << yytext;
3853 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3854 yyextra->lastStringContext=YY_START;
3855 BEGIN(CopyPHPGString);
3859 *yyextra->pCopySquareGString << yytext;
3862<GCopySquare>{CHARLIT} {
3863 if (yyextra->insidePHP)
3869 *yyextra->pCopySquareGString << yytext;
3872<GCopySquare>[^"'\[\]\n\/,]+ {
3873 *yyextra->pCopySquareGString << yytext;
3876 *yyextra->pCopySquareGString << *yytext;
3881 *yyextra->pCopyCurlyString += *yytext;
3882 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3883 yyextra->lastStringContext=YY_START;
3884 yyextra->keepComment=
false;
3888 *yyextra->pCopyCurlyString += *yytext;
3889 if (yyextra->insidePHP)
3891 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3892 yyextra->lastStringContext=YY_START;
3893 yyextra->keepComment=
false;
3894 BEGIN(CopyPHPString);
3898 *yyextra->pCopyCurlyString += *yytext;
3899 yyextra->curlyCount++;
3902 *yyextra->pCopyCurlyString += *yytext;
3903 if (--yyextra->curlyCount<0)
3905 yyextra->keepComment=
false;
3906 BEGIN(yyextra->lastCurlyContext);
3909<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3915 *yyextra->pCopyCurlyString += yytext;
3918<CopyCurly>[^"'{}\/\n,]+ {
3919 *yyextra->pCopyCurlyString += yytext;
3921<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3924 *yyextra->pCopyCurlyString += *yytext;
3927 *yyextra->pCopyCurlyString += *yytext;
3929<CopyCurly>{CPPC}[^\n]* {
3930 if (yyextra->keepComment)
3932 *yyextra->pCopyCurlyString += yytext;
3940 if (yyextra->keepComment)
3942 *yyextra->pCopyCurlyString += yytext;
3951 *yyextra->pCopyCurlyString += yytext;
3956 *yyextra->pCopyCurlyString += *yytext;
3959 *yyextra->pCopyCurlyString += *yytext;
3961<CopyComment><<EOF>> {
3962 warn(yyextra->fileName,yyextra->yyLineNr,
3963 "reached end of file while inside a C style comment block!");
3968<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3970<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3972 size_t s = line.
find(
' ');
3974 size_t e = line.
find(
'"',s);
3975 yyextra->yyLineNr = line.
mid(s,e-s).
toInt();
3976 if (yytext[yyleng-1]==
'\n')
int toInt(bool *ok=nullptr, int base=10) const
3983 *yyextra->pCopyCurlyGString << *yytext;
3984 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3985 yyextra->lastStringContext=YY_START;
3986 yyextra->keepComment =
false;
3990 *yyextra->pCopyCurlyGString << *yytext;
3991 if (yyextra->insidePHP)
3993 yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
3994 yyextra->lastStringContext=YY_START;
3995 yyextra->keepComment =
false;
3996 BEGIN(CopyPHPGString);
4000 *yyextra->pCopyCurlyGString << *yytext;
4001 yyextra->curlyCount++;
4004 *yyextra->pCopyCurlyGString << *yytext;
4005 if (--yyextra->curlyCount<0)
4007 yyextra->current->endBodyLine = yyextra->yyLineNr;
4008 yyextra->keepComment =
false;
4009 BEGIN(yyextra->lastCurlyContext);
4012<GCopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
4018 *yyextra->pCopyCurlyGString << yytext;
4021<GCopyCurly>[^"'{}\/\n,]+ {
4022 *yyextra->pCopyCurlyGString << yytext;
4025 *yyextra->pCopyCurlyGString << yytext;
4027<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
4030 *yyextra->pCopyCurlyGString << *yytext;
4033 *yyextra->pCopyCurlyGString << *yytext;
4035<GCopyCurly>{CPPC}[^\n]* {
4036 if (yyextra->keepComment)
4038 *yyextra->pCopyCurlyGString << yytext;
4046 if (yyextra->keepComment)
4048 *yyextra->pCopyCurlyGString << yytext;
4049 BEGIN(GCopyComment);
4056<GCopyComment>{CCE} {
4057 *yyextra->pCopyCurlyGString << yytext;
4062 *yyextra->pCopyCurlyGString << *yytext;
4065 *yyextra->pCopyCurlyGString << *yytext;
4067<GCopyComment><<EOF>> {
4068 warn(yyextra->fileName,yyextra->yyLineNr,
4069 "reached end of file while inside a C style comment block!");
4077 if (yyextra->current->type.empty() &&
4078 yyextra->current->name==
"enum")
4080 yyextra->current->section = EntryType::makeEnum();
4081 yyextra->current->name.clear();
4082 yyextra->current->args.clear();
4083 BEGIN(EnumBaseType);
4087 if (yyextra->current->type.empty())
4090 yyextra->current->name.sprintf(
"__pad%d__",yyextra->padCount++);
4093 yyextra->current->bitfields+=
":";
4097 yyextra->current->bitfields+=*yytext;
4100 yyextra->current->args+=*yytext;
4104 yyextra->current->args+=
' ';
4107 DString oldType = yyextra->current->type;
4108 if (yyextra->current->bodyLine==-1)
4110 yyextra->current->bodyLine = yyextra->yyLineNr;
4111 yyextra->current->bodyColumn = yyextra->yyColNr;
4113 if ( yyextra->insidePHP && yyextra->current->type.startsWith(
"var"))
4115 yyextra->current->type = yyextra->current->type.mid(3);
4117 if (yyextra->isTypedef && !yyextra->current->type.startsWith(
"typedef "))
4119 yyextra->current->type.prepend(
"typedef ");
4121 bool isStatic = yyextra->current->isStatic;
4122 Protection prot = yyextra->current->protection;
4123 bool isConcept = yyextra->current->section.isConcept();
4124 bool isModule = yyextra->current->section.isModuleDoc();
4127 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4132 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4135 else if (!yyextra->current->name.empty() && !yyextra->current->section.isEnum())
4137 yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
4139 yyextra->current->name=yyextra->current->name.stripWhiteSpace();
4140 if (yyextra->current->section.isClass())
4144 yyextra->current->section = EntryType::makeVariable() ;
4145 yyextra->current->fileName = yyextra->fileName;
4146 yyextra->current->startLine = yyextra->yyBegLineNr;
4147 yyextra->current->startColumn = yyextra->yyBegColNr;
4148 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4151 if ( *yytext ==
',')
4153 yyextra->current->isStatic = isStatic;
4154 yyextra->current->protection = prot;
4155 yyextra->current->name.clear();
4156 yyextra->current->args.clear();
4157 yyextra->current->brief.clear();
4158 yyextra->current->doc.clear();
4159 yyextra->current->initializer.str(std::string());
4160 yyextra->current->bitfields.clear();
4165 yyextra->mtype = MethodTypes::Method;
4166 yyextra->virt = Specifier::Normal;
4167 yyextra->current->bodyLine = -1;
4168 yyextra->current->bodyColumn = 1;
4169 yyextra->current->groups.clear();
4175 if (yyextra->insideSlice)
4177 yyextra->squareCount=1;
4178 yyextra->lastSquareContext = YY_START;
4179 yyextra->current->metaData +=
"[";
4180 BEGIN( SliceMetadata );
4182 else if (!yyextra->insideCS &&
4183 (yyextra->current->name.empty() ||
4184 yyextra->current->name==
"typedef"
4188 yyextra->squareCount=1;
4189 yyextra->lastSquareContext = YY_START;
4190 yyextra->idlAttr.clear();
4191 yyextra->idlProp.clear();
4192 yyextra->current->mtype = yyextra->mtype;
4195 yyextra->current->mtype == MethodTypes::Property)
4197 yyextra->odlProp =
true;
4198 yyextra->current->spec.setGettable(
true).setSettable(
true);
4201 BEGIN( IDLAttribute );
4203 else if (yyextra->insideCS &&
4204 yyextra->current->name.empty())
4206 yyextra->squareCount=1;
4207 yyextra->lastSquareContext = YY_START;
4210 yyextra->current->args.clear();
4211 BEGIN( SkipSquare );
4215 yyextra->current->args += yytext ;
4216 yyextra->squareCount=1;
4217 yyextra->externLinkage=
false;
4222 yyextra->squareCount++;
4223 yyextra->current->metaData +=
"[";
4225<SliceMetadata>{BN}* {
4228<SliceMetadata>\"[^\"]*\" {
4229 yyextra->current->metaData += yytext;
4232 yyextra->current->metaData += yytext;
4235 yyextra->current->metaData += yytext;
4236 if (--yyextra->squareCount<=0)
4238 BEGIN (yyextra->lastSquareContext);
4242 yyextra->current->type +=
"(";
4243 yyextra->roundCount++;
4245<SliceOptional>[0-9]+ {
4246 yyextra->current->type += yytext;
4249 yyextra->current->type +=
")";
4250 if(--yyextra->roundCount<=0)
4252 BEGIN (yyextra->lastModifierContext);
4257 if (--yyextra->squareCount<=0)
4260 if (yyextra->current->mtype == MethodTypes::Property)
4261 BEGIN( IDLPropName );
4263 BEGIN( yyextra->lastSquareContext );
4266<IDLAttribute>"propput" {
4269 yyextra->current->mtype = MethodTypes::Property;
4271 yyextra->current->spec.setSettable(
true);
4273<IDLAttribute>"propget" {
4276 yyextra->current->mtype = MethodTypes::Property;
4278 yyextra->current->spec.setGettable(
true);
4280<IDLAttribute>"property" {
4281 yyextra->current->spec.setProperty(
true);
4283<IDLAttribute>"attribute" {
4284 yyextra->current->spec.setAttribute(
true);
4286<IDLAttribute>"optional" {
4287 yyextra->current->spec.setOptional(
true);
4289<IDLAttribute>"readonly" {
4292 yyextra->current->spec.setSettable(
false);
4296 yyextra->current->spec.setReadonly(
true);
4299<IDLAttribute>"bound" {
4300 yyextra->current->spec.setBound(
true);
4302<IDLAttribute>"removable" {
4303 yyextra->current->spec.setRemovable(
true);
4305<IDLAttribute>"constrained" {
4306 yyextra->current->spec.setConstrained(
true);
4308<IDLAttribute>"transient" {
4309 yyextra->current->spec.setTransient(
true);
4311<IDLAttribute>"maybevoid" {
4312 yyextra->current->spec.setMaybeVoid(
true);
4314<IDLAttribute>"maybedefault" {
4315 yyextra->current->spec.setMaybeDefault(
true);
4317<IDLAttribute>"maybeambiguous" {
4318 yyextra->current->spec.setMaybeAmbiguous(
true);
4322<IDLPropName>{BN}*{ID}({BN}*[*]*{BN}*)? {
4325 if (yyextra->odlProp)
4327 yyextra->idlProp = yytext;
4330<IDLPropName>{ID}{BN}*"(" {
4331 yyextra->current->name = yytext;
4332 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
4333 yyextra->current->startLine = yyextra->yyLineNr;
4334 yyextra->current->startColumn = yyextra->yyColNr;
4337<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
4338 if (yyextra->odlProp)
4340 yyextra->idlProp += yytext;
4343<IDLPropName>{ID}{BNopt}/";" {
4344 if (yyextra->odlProp)
4346 yyextra->current->name = yytext;
4347 yyextra->idlProp = yyextra->idlProp.stripWhiteSpace();
4348 yyextra->odlProp =
false;
4353<IDLProp>{BN}*"["[^\]]*"]"{BN}* {
4354 yyextra->idlAttr = yytext;
4355 yyextra->idlAttr=yyextra->idlAttr.stripWhiteSpace();
4358 yyextra->idlProp = yytext;
4360<IDLProp>{BN}*{ID}{BN}*"," {
4361 if (yyextra->current->args.empty())
4362 yyextra->current->args =
"(";
4364 yyextra->current->args +=
", ";
4365 yyextra->current->args += yyextra->idlAttr;
4366 yyextra->current->args +=
" ";
4367 yyextra->current->args += yyextra->idlProp;
4368 yyextra->current->args +=
" ";
4369 yyextra->current->args += yytext;
4370 yyextra->current->args = yyextra->current->args.left(yyextra->current->args.length() - 1);
4371 yyextra->idlProp.clear();
4372 yyextra->idlAttr.clear();
4375<IDLProp>{BN}*{ID}{BN}*")"{BN}* {
4379 yyextra->current->fileName = yyextra->fileName;
4380 yyextra->current->type = yyextra->idlProp;
4381 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4382 if (!yyextra->current->args.empty())
4383 yyextra->current->args +=
")";
4384 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4385 yyextra->current->section = EntryType::makeVariable();
4386 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4388 BEGIN( FindMembers );
4393<Array>"]" { yyextra->current->args += *yytext ;
4394 if (--yyextra->squareCount<=0)
4395 BEGIN( FindMembers ) ;
4397<FuncFuncArray>"]" { yyextra->current->args += *yytext ;
4398 if (--yyextra->squareCount<=0)
4399 BEGIN( SFunction ) ;
4401<Array,FuncFuncArray>"[" { yyextra->current->args += *yytext ;
4402 yyextra->squareCount++;
4404<Array,FuncFuncArray>. { yyextra->current->args += *yytext ; }
4405<SkipSquare>"[" { yyextra->squareCount++; }
4407 if (--yyextra->squareCount<=0)
4408 BEGIN( yyextra->lastSquareContext );
4411 yyextra->lastStringContext=YY_START;
4412 BEGIN( SkipString );
4414<SkipSquare>[^\n\[\]\"]+
4415<FindMembers>"<" {
addType(yyscanner);
4416 yyextra->current->type += yytext ;
4419<Sharp>">" { yyextra->current->type += *yytext ;
4420 if (--yyextra->sharpCount<=0)
4421 BEGIN( FindMembers ) ;
4423<Sharp>"<" { yyextra->current->type += *yytext ;
4424 yyextra->sharpCount++;
4427 yyextra->current->type +=
' ';
4430<Sharp>. { yyextra->current->type += *yytext ; }
4433 yyextra->current->bodyLine = yyextra->yyLineNr;
4434 yyextra->current->bodyColumn = yyextra->yyColNr;
4435 yyextra->current->name = yytext;
4440 yyextra->lastInitializerContext = YY_START;
4441 yyextra->sharpCount=0;
4442 yyextra->initBracketCount=0;
4443 yyextra->current->initializer.str(
"=");
4444 BEGIN(ReadInitializer);
4447 yyextra->lastInitializerContext = YY_START;
4448 yyextra->sharpCount=0;
4449 yyextra->initBracketCount=0;
4450 yyextra->current->initializer.str(yytext);
4451 BEGIN(ReadInitializer);
4454 if (yyextra->insideJava)
4456 if (!yyextra->current->name.empty())
4458 yyextra->current->fileName = yyextra->fileName;
4459 yyextra->current->startLine = yyextra->yyLineNr;
4460 yyextra->current->startColumn = yyextra->yyColNr;
4461 if (!yyextra->current_root->spec.isEnum())
4463 yyextra->current->type =
"@";
4465 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4466 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4467 yyextra->current->section = EntryType::makeVariable();
4468 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4472 BEGIN( FindMembers );
4483 if (!yyextra->current->name.empty())
4485 yyextra->current->fileName = yyextra->fileName;
4486 if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4488 yyextra->current->startLine = yyextra->current->bodyLine;
4489 yyextra->current->startColumn = yyextra->current->bodyColumn;
4493 yyextra->current->startLine = yyextra->yyLineNr;
4494 yyextra->current->startColumn = yyextra->yyColNr;
4496 if (!yyextra->current_root->spec.isEnum())
4498 yyextra->current->type =
"@";
4500 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4501 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4502 yyextra->current->section = EntryType::makeVariable();
4504 if (!yyextra->insideCS && !yyextra->insideJava &&
4505 !yyextra->current_root->spec.isStrong())
4512 yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
4514 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
4519 yyextra->current->reset();
4524 yyextra->squareCount=1;
4525 yyextra->lastSquareContext = YY_START;
4528<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<\\\$R]* { yyextra->current->program << yytext ; }
4529<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
4530<ReadBody,ReadNSBody,ReadBodyIntf>"#".* {
if (!yyextra->insidePHP)
4533 yyextra->current->program << yytext ;
4536<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$\" {
if (!yyextra->insideCS) REJECT
4537 yyextra->current->program << yytext ;
4538 yyextra->pSkipInterpString = &yyextra->current->program;
4539 yyextra->lastSkipInterpStringContext=YY_START;
4540 yyextra->strCurlyCount = 0;
4541 BEGIN( SkipInterpString );
4543<SkipInterpString>([^"\\{}\x000D\x000A\x0085\x2028\x2029]|"{{"|"}}"|"\\'"|"\\\""|"\\\\"|"\\0"|"\\a"|"\\b"|"\\f"|"\\n"|"\\r"|"\\t"|"\\v"|"\\x"{HEXDIGIT}{HEXDIGIT}?{HEXDIGIT}?{HEXDIGIT}?|"\\"[uU]{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT}{HEXDIGIT})* {
4544 *yyextra->pSkipInterpString << yytext;
4546<SkipInterpString>"{" {
4547 *yyextra->pSkipInterpString << *yytext;
4548 yyextra->strCurlyCount++;
4550<SkipInterpString>"}" {
4551 *yyextra->pSkipInterpString << *yytext;
4552 yyextra->strCurlyCount--;
4554<SkipInterpString>\" {
4555 *yyextra->pSkipInterpString << *yytext;
4556 if (yyextra->strCurlyCount==0)
4558 BEGIN( yyextra->lastSkipInterpStringContext );
4561<SkipInterpString>. {
4562 *yyextra->pSkipInterpString << *yytext;
4565<SkipCurly,ReadBody,ReadNSBody,ReadBodyIntf,ReadExpressionBody,FindMembers,FindMemberName>$@\" {
if (!yyextra->insideCS) REJECT
4566 yyextra->current->program << yytext ;
4567 yyextra->pSkipInterpVerbString = &yyextra->current->program;
4568 yyextra->lastSkipInterpVerbStringContext=YY_START;
4569 yyextra->strCurlyCount = 0;
4570 BEGIN( SkipInterpVerbString );
4572<SkipInterpVerbString>([^\"{}]|"{{"|"}}"|"\"\"")* {
4573 *yyextra->pSkipInterpVerbString << yytext;
4575<SkipInterpVerbString>"{" {
4576 *yyextra->pSkipInterpVerbString << *yytext;
4577 yyextra->strCurlyCount++;
4579<SkipInterpVerbString>"}" {
4580 *yyextra->pSkipInterpVerbString << *yytext;
4581 yyextra->strCurlyCount--;
4583<SkipInterpVerbString>\" {
4584 *yyextra->pSkipInterpVerbString << *yytext;
4585 if (yyextra->strCurlyCount==0)
4587 BEGIN( yyextra->lastSkipInterpVerbStringContext );
4590<SkipInterpVerbString>. {
4591 *yyextra->pSkipInterpVerbString << *yytext;
4593<ReadBody,ReadNSBody,ReadBodyIntf>"\$" { yyextra->current->program << yytext ; }
4594<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
4595 yyextra->pSkipVerbString = &yyextra->current->program;
4596 yyextra->lastSkipVerbStringContext=YY_START;
4597 BEGIN( SkipVerbString );
4599<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" {
if (yyextra->insidePHP)
4601 yyextra->current->program << yytext ;
4602 yyextra->pCopyHereDocGString = &yyextra->current->program;
4603 yyextra->lastHereDocContext=YY_START;
4604 BEGIN( CopyHereDoc );
4611<ReadBody,ReadNSBody,ReadBodyIntf>{RAWBEGIN} {
4612 yyextra->current->program << yytext;
4614 yyextra->lastRawStringContext = YY_START;
4615 yyextra->pCopyRawGString = &yyextra->current->program;
4618<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
4619 yyextra->pCopyQuotedGString = &yyextra->current->program;
4620 yyextra->lastStringContext=YY_START;
4621 yyextra->stopAtInvalidString=
false;
4622 BEGIN( CopyGString );
4624<ReadBody,ReadNSBody,ReadBodyIntf>{DCOMMC} { yyextra->doxygenComment=
true; REJECT;}
4625<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
4626 yyextra->lastContext = YY_START ;
4629<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
4630 ++yyextra->yyLineNr ;
4631 yyextra->lastContext = YY_START ;
4634<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
4635 if (!yyextra->insidePHP)
4637 yyextra->current->program << yytext;
4641 yyextra->current->program << yytext;
4642 yyextra->pCopyQuotedGString = &yyextra->current->program;
4643 yyextra->lastStringContext=YY_START;
4644 BEGIN(CopyPHPGString);
4647<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
4648 if (yyextra->insidePHP)
4655 yyextra->current->program << yytext;
4658<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
4659 ++yyextra->curlyCount ;
4662 yyextra->current->program << yytext ;
4663 --yyextra->curlyCount ;
4665<ReadBody,ReadNSBody>"}" {
4666 if ( yyextra->curlyCount>0 )
4668 yyextra->current->program << yytext ;
4669 --yyextra->curlyCount ;
4673 yyextra->current->endBodyLine = yyextra->yyLineNr;
4674 std::shared_ptr<Entry> original_root = yyextra->current_root;
4675 if (yyextra->current->section.isNamespace() && yyextra->current->type ==
"namespace")
4679 DString doc = yyextra->current->doc;
4680 int docLine = yyextra->current->docLine;
4681 DString docFile = yyextra->current->docFile;
4682 DString brief = yyextra->current->brief;
4683 int briefLine = yyextra->current->briefLine;
4684 DString briefFile = yyextra->current->briefFile;
4685 auto groups = yyextra->current->groups;
4686 auto anchors = yyextra->current->anchors;
4687 auto sli = yyextra->current->sli;
4688 auto rqli = yyextra->current->rqli;
4690 yyextra->current->doc =
"";
4691 yyextra->current->docLine = 0;
4692 yyextra->current->docFile =
"";
4693 yyextra->current->brief =
"";
4694 yyextra->current->briefLine = 0;
4695 yyextra->current->briefFile =
"";
4696 yyextra->current->groups.
clear();
4697 yyextra->current->anchors.clear();
4698 yyextra->current->sli.clear();
4699 yyextra->current->rqli.clear();
4701 while ((split_point = yyextra->current->name.find(
"::")) !=
DString::npos)
4703 std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
4704 yyextra->current->program.str(std::string());
4705 new_current->name = yyextra->current->name.mid(split_point + 2);
4706 yyextra->current->name = yyextra->current->name.left(split_point);
4707 if (yyextra->current->name.startsWith(
"inline "))
4709 yyextra->current->name = yyextra->current->name.mid(7);
4710 yyextra->current->spec.setInline(
true);
4712 if (!yyextra->current_root->name.empty()) yyextra->current->name.prepend(yyextra->current_root->name+
"::");
4714 yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
4715 yyextra->current_root = yyextra->current;
4716 yyextra->current = new_current;
4719 yyextra->current->doc = doc;
4720 yyextra->current->docLine = docLine;
4721 yyextra->current->docFile = docFile;
4722 yyextra->current->brief = brief;
4723 yyextra->current->briefLine = briefLine;
4724 yyextra->current->briefFile = briefFile;
4725 yyextra->current->groups = groups;
4726 yyextra->current->anchors = anchors;
4727 yyextra->current->sli = sli;
4728 yyextra->current->rqli = rqli;
4730 DString &cn = yyextra->current->name;
4734 yyextra->current->spec.setInline(
true);
4736 DString rn = yyextra->current_root->name;
4742 if (yyextra->isTypedef && cn.
empty())
4745 BEGIN( TypedefName );
4749 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4751 yyextra->current->program <<
',';
4756 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4757 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
4759 if (yyextra->insideObjC &&
4760 (yyextra->current->spec.isInterface() || yyextra->current->spec.isCategory())
4763 BEGIN( ReadBodyIntf ) ;
4767 yyextra->memspecEntry = yyextra->current;
4768 if (yyextra->isTypedef)
4770 yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
4771 yyextra->current = std::make_shared<Entry>(*yyextra->current);
4775 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4776 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4778 if (yyextra->current->section.isNamespace() ||
4779 yyextra->current->spec.isInterface() ||
4780 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4781 yyextra->insideSlice
4784 yyextra->current->reset();
4785 yyextra->current_root = std::move(original_root);
4787 yyextra->memspecEntry.reset();
4788 BEGIN( FindMembers ) ;
4792 if (!yyextra->isTypedef)
4794 yyextra->current->doc.clear();
4795 yyextra->current->brief.clear();
4797 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4803<ReadBody>"}"{BN}+"typedef"{BN}+ {
4805 if ( yyextra->curlyCount>0 )
4807 yyextra->current->program << yytext ;
4808 --yyextra->curlyCount ;
4812 yyextra->isTypedef =
true;
4813 yyextra->current->endBodyLine = yyextra->yyLineNr;
4814 DString &cn = yyextra->current->name;
4815 DString rn = yyextra->current_root->name;
4820 BEGIN( TypedefName );
4823<TypedefName>("const"|"volatile"){BN} {
4825 yyextra->current->type.prepend(yytext);
4828 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4830 yyextra->current->program <<
",";
4832 yyextra->current->name=yytext;
4834 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4835 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4837 if (!yyextra->firstTypedefEntry)
4839 yyextra->firstTypedefEntry = yyextra->current;
4841 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4843 yyextra->isTypedef=
true;
4844 BEGIN(MemberSpecSkip);
4848 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4850 yyextra->current->program <<
',';
4853 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4854 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4855 yyextra->memspecEntry = yyextra->current;
4856 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4859 BEGIN( MemberSpec ) ;
4861<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4863 int i=0,l=(int)yyleng;
4864 while (i<l && (!
isId(yytext[i]))) i++;
4868 yyextra->msArgs=yyextra->msName.mid(j);
4869 yyextra->msName=yyextra->msName.left(j);
4874 if (yyextra->firstTypedefEntry)
4876 if (yyextra->firstTypedefEntry->spec.isStruct())
4878 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4880 else if (yyextra->firstTypedefEntry->spec.isUnion())
4882 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4884 else if (yyextra->firstTypedefEntry->section.isEnum())
4886 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4890 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
DString right(size_t len) const
bool isId(int c)
Returns true if c is a valid character for an identifier.
4896 yyextra->current->name = yyextra->msName;
4903 if (yyextra->msName.empty() && !yyextra->current->name.empty())
4909 const Entry *p=yyextra->current.get();
4927 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4931 if (!yyextra->msName.empty()
4937 if (typedefHidesStruct &&
4938 yyextra->isTypedef &&
4939 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4940 yyextra->msType.stripWhiteSpace().empty() &&
4941 yyextra->memspecEntry)
4943 yyextra->memspecEntry->name=yyextra->msName;
4947 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4948 varEntry->lang = yyextra->language;
4949 varEntry->protection = yyextra->current->protection ;
4950 varEntry->mtype = yyextra->current->mtype;
4951 varEntry->virt = yyextra->current->virt;
4952 varEntry->isStatic = yyextra->current->isStatic;
4953 varEntry->section = EntryType::makeVariable();
4954 varEntry->name = yyextra->msName.stripWhiteSpace();
4955 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4956 varEntry->args = yyextra->msArgs;
4957 if (yyextra->isTypedef)
4959 varEntry->type.prepend(
"typedef ");
4962 if (typedefHidesStruct &&
4963 yyextra->isTypedef &&
4964 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4965 yyextra->memspecEntry
4968 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4972 varEntry->type+=yyextra->current->name+yyextra->msType;
4974 varEntry->fileName = yyextra->fileName;
4975 varEntry->startLine = yyextra->yyLineNr;
4976 varEntry->startColumn = yyextra->yyColNr;
4977 varEntry->doc = yyextra->current->doc;
4978 varEntry->brief = yyextra->current->brief;
4979 varEntry->mGrpId = yyextra->current->mGrpId;
4980 varEntry->initializer.str(yyextra->current->initializer.str());
4981 varEntry->groups = yyextra->current->groups;
4982 varEntry->sli = yyextra->current->sli;
4987 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4992 if (!yyextra->isTypedef && yyextra->msName.empty() &&
4993 yyextra->memspecEntry && yyextra->current->section.isCompound())
4995 if (!yyextra->current->doc.empty())
4997 yyextra->memspecEntry->doc += yyextra->current->doc;
4999 if (!yyextra->current->brief.empty())
5001 yyextra->memspecEntry->brief += yyextra->current->brief;
5004 yyextra->msType.clear();
5005 yyextra->msName.clear();
5006 yyextra->msArgs.clear();
5007 yyextra->isTypedef=
false;
5008 yyextra->firstTypedefEntry.reset();
5009 yyextra->memspecEntry.reset();
5010 yyextra->current->reset();
5012 BEGIN( FindMembers );
5016 yyextra->current->doc.clear();
5017 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
5022 yyextra->lastInitializerContext=YY_START;
5023 yyextra->sharpCount=0;
5024 yyextra->initBracketCount=0;
5025 yyextra->current->initializer.str(yytext);
5026 BEGIN(ReadInitializer);
5037<MemberSpecSkip>"," { BEGIN(MemberSpec); }
5038<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
5039<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5042<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5043 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5045 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5046 yyextra->insideObjC=
false;
5047 BEGIN( FindMembers );
5049<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5050<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5052<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5053<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5054 if (yyextra->insidePHP)
5060 yyextra->current->bodyLine = yyextra->yyLineNr;
5061 yyextra->current->bodyColumn = yyextra->yyColNr;
5064 yyextra->funcPtrType=yytext;
5065 yyextra->roundCount=0;
5070<FuncPtr>{SCOPENAME} {
5071 yyextra->current->name = yytext;
5074 BEGIN( FuncPtrOperator );
5078 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5080 yyextra->funcPtrType += yyextra->current->name;
5084 BEGIN( EndFuncPtr );
5091<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5092 yyextra->current->name += yytext;
5093 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5096<FuncPtrOperator>\n {
5098 yyextra->current->name += *yytext;
5100<FuncPtrOperator>"(" {
5102 BEGIN( EndFuncPtr );
5105 yyextra->current->name += *yytext;
5107<EndFuncPtr>")"{BNopt}/";" {
5109 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5112<EndFuncPtr>")"{BNopt}/"(" {
5114 if (yyextra->funcPtrType!=
"(")
5116 yyextra->current->type+=yyextra->funcPtrType+
")";
5120<EndFuncPtr>")"{BNopt}/"[" {
5122 yyextra->current->type+=yyextra->funcPtrType;
5123 yyextra->current->args +=
")";
5128 yyextra->current->args += *yytext ;
5131 yyextra->current->bodyLine = yyextra->yyLineNr;
5132 yyextra->current->bodyColumn = yyextra->yyColNr;
5133 yyextra->currentArgumentContext = FuncFuncEnd;
5134 yyextra->fullArgString=yyextra->current->args;
5135 yyextra->copyArgString=&yyextra->current->args;
5136 BEGIN( ReadFuncArgType ) ;
5138<EndFuncPtr>"["[^\n\]]*"]" {
5139 yyextra->funcPtrType+=yytext;
5145 yyextra->current->args += *yytext ;
5146 ++yyextra->roundCount;
5149 yyextra->current->args += *yytext ;
5150 if ( yyextra->roundCount )
5151 --yyextra->roundCount;
5157<FuncFuncEnd>")"{BN}*"(" {
5159 yyextra->current->type+=yyextra->funcPtrType+
")(";
5160 BEGIN(FuncFuncType);
5162<FuncFuncEnd>")"{BNopt}/[;{] {
5164 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5167<FuncFuncEnd>")"{BNopt}/"[" {
5169 yyextra->current->type+=yyextra->funcPtrType;
5170 yyextra->current->args+=
")";
5171 BEGIN(FuncFuncArray);
5174 yyextra->current->args += *yytext;
5177 yyextra->current->type += *yytext;
5178 yyextra->roundCount++;
5181 yyextra->current->type += *yytext;
5182 if (yyextra->roundCount)
5183 --yyextra->roundCount;
5187<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5188<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5190 yyextra->current->type += *yytext;
5192<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5193 if (yyextra->current->type.startsWith(
"typedef") &&
5194 yyextra->current->bodyLine==-1)
5197 yyextra->current->bodyLine = yyextra->yyLineNr;
5198 yyextra->current->bodyColumn = yyextra->yyColNr;
5199 BEGIN( GetCallType );
5201 else if (!yyextra->current->name.empty())
5203 yyextra->current->args = yytext;
5204 yyextra->current->bodyLine = yyextra->yyLineNr;
5205 yyextra->current->bodyColumn = yyextra->yyColNr;
5206 yyextra->currentArgumentContext = FuncQual;
5207 yyextra->fullArgString=yyextra->current->args;
5208 yyextra->copyArgString=&yyextra->current->args;
5209 BEGIN( ReadFuncArgType ) ;
5213<GetCallType>{BN}*{ID}{BN}*"*" {
5216 yyextra->funcPtrType=
"(";
5217 yyextra->funcPtrType+=yytext;
5218 yyextra->roundCount=0;
5222 if (!yyextra->current->name.empty())
5224 yyextra->current->args = yytext;
5225 yyextra->current->bodyLine = yyextra->yyLineNr;
5226 yyextra->current->bodyColumn = yyextra->yyColNr;
5227 yyextra->currentArgumentContext = FuncQual;
5228 yyextra->fullArgString=yyextra->current->args;
5229 yyextra->copyArgString=&yyextra->current->args;
5230 BEGIN( ReadFuncArgType ) ;
5237<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5238 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5239 else yyextra->fullArgString+=yytext;
5241<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5242 yyextra->fullArgString+=yytext;
5244<CopyArgRound>[^\/\n\)\(\"\']+ {
5245 *yyextra->copyArgString+=yytext;
5246 yyextra->fullArgString+=yytext;
5248<CopyArgSquare>[^\/\n\]\[\"\']+ {
5249 *yyextra->copyArgString+=yytext;
5250 yyextra->fullArgString+=yytext;
5252<ReadFuncArgType,ReadTempArgs>{BN}* {
5253 *yyextra->copyArgString+=
" ";
5254 yyextra->fullArgString+=
" ";
5257<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5259 yyextra->lastRawStringContext = YY_START;
5260 yyextra->pCopyRawString = yyextra->copyArgString;
5261 *yyextra->pCopyRawString+=yytext;
5262 yyextra->fullArgString+=yytext;
5265<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5266 *yyextra->copyArgString+=*yytext;
5267 yyextra->fullArgString+=*yytext;
5268 yyextra->lastCopyArgStringContext = YY_START;
5269 BEGIN( CopyArgString );
5271<ReadFuncArgType>"[" {
5272 if (!yyextra->insidePHP) REJECT;
5273 *yyextra->copyArgString+=*yytext;
5274 yyextra->fullArgString+=*yytext;
5275 yyextra->argSquareCount=0;
5276 yyextra->lastCopyArgContext = YY_START;
5277 BEGIN( CopyArgSquare );
5279<ReadFuncArgType,ReadTempArgs>"(" {
5280 *yyextra->copyArgString+=*yytext;
5281 yyextra->fullArgString+=*yytext;
5282 yyextra->argRoundCount=0;
5283 yyextra->lastCopyArgContext = YY_START;
5284 BEGIN( CopyArgRound );
5286<ReadFuncArgType>")" {
5287 *yyextra->copyArgString+=*yytext;
5288 yyextra->fullArgString+=*yytext;
5290 if (yyextra->insideJS)
5301 yyextra->docBackup = yyextra->current->doc;
5302 yyextra->briefBackup = yyextra->current->brief;
5304 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)
5307<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5308 if (yyextra->currentArgumentContext==DefineEnd)
5312 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5318 BEGIN( yyextra->currentArgumentContext );
5324 yyextra->fullArgString+=yytext;
5325 yyextra->lastCopyArgChar=0;
5326 yyextra->lastCommentInArgContext=YY_START;
5328 BEGIN( CopyArgCommentLine );
5330 BEGIN( CopyArgComment );
5334<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5335<ReadFuncArgType,ReadTempArgs>{CCS} {
5336 yyextra->lastCContext = YY_START;
5337 BEGIN( SkipComment );
5339<ReadFuncArgType,ReadTempArgs>{CPPC} {
5340 yyextra->lastCContext = YY_START;
5341 BEGIN( SkipCxxComment );
5357<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5359 if (yyextra->currentArgumentContext==DefineEnd)
5363 int i;
for (i=(
int)yyleng-1;i>0;i--)
5367 *yyextra->copyArgString+=*yytext;
5368 yyextra->fullArgString+=*yytext;
5371 BEGIN( yyextra->currentArgumentContext );
5377 yyextra->lastCopyArgChar=*yytext;
5380 yyextra->lastCommentInArgContext=YY_START;
5381 yyextra->fullArgString+=text;
5383 BEGIN( CopyArgCommentLine );
5385 BEGIN( CopyArgComment );
5388<CopyArgComment>^{B}*"*"+/{BN}+
5389<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5390<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5391 if (yyextra->lastCopyArgChar!=0)
5392 unput(yyextra->lastCopyArgChar);
5393 BEGIN( yyextra->lastCommentInArgContext );
5395<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5397 if (yyextra->lastCopyArgChar!=0)
5398 unput(yyextra->lastCopyArgChar);
5399 BEGIN( yyextra->lastCommentInArgContext );
5401<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5402 yyextra->docBlockName=
"uml";
5403 yyextra->fullArgString+=yytext;
5404 BEGIN(CopyArgVerbatim);
5406<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5407 yyextra->docBlockName=&yytext[1];
5408 yyextra->fullArgString+=yytext;
5409 BEGIN(CopyArgVerbatim);
5411<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5412 yyextra->docBlockName=&yytext[1];
5413 if (yyextra->docBlockName.at(1)==
'[')
5415 yyextra->docBlockName.at(1)=
']';
5417 if (yyextra->docBlockName.at(1)==
'{')
5419 yyextra->docBlockName.at(1)=
'}';
5421 if (yyextra->docBlockName.at(1)==
'(')
5423 yyextra->docBlockName.at(1)=
')';
5425 yyextra->fullArgString+=yytext;
5426 BEGIN(CopyArgVerbatim);
5428<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5429 yyextra->fullArgString+=yytext;
5430 if (&yytext[4]==yyextra->docBlockName)
5432 yyextra->docBlockName=
"";
5433 BEGIN(CopyArgCommentLine);
5436<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5437 yyextra->fullArgString+=yytext;
5438 if (yyextra->docBlockName==&yytext[1])
5440 yyextra->docBlockName=
"";
5441 BEGIN(CopyArgCommentLine);
5444<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5445<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5446<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5447<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5448<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5449 warn(yyextra->fileName,yyextra->yyLineNr,
5450 "Ignoring {:c}brief command inside argument documentation",*yytext
5452 yyextra->fullArgString+=
' ';
5455 *yyextra->copyArgString+=*yytext;
5456 yyextra->fullArgString+=*yytext;
5457 yyextra->argSharpCount=1;
5458 BEGIN( CopyArgSharp );
5461 *yyextra->copyArgString+=*yytext;
5462 yyextra->fullArgString+=*yytext;
5464 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5466 BEGIN( yyextra->currentArgumentContext );
5469 yyextra->argRoundCount++;
5470 *yyextra->copyArgString+=*yytext;
5471 yyextra->fullArgString+=*yytext;
5474 *yyextra->copyArgString+=*yytext;
5475 yyextra->fullArgString+=*yytext;
5476 if (yyextra->argRoundCount>0)
5477 yyextra->argRoundCount--;
5479 BEGIN( yyextra->lastCopyArgContext );
5482 yyextra->argSquareCount++;
5483 *yyextra->copyArgString+=*yytext;
5484 yyextra->fullArgString+=*yytext;
5487 *yyextra->copyArgString+=*yytext;
5488 yyextra->fullArgString+=*yytext;
5489 if (yyextra->argSquareCount>0)
5490 yyextra->argSquareCount--;
5492 BEGIN( yyextra->lastCopyArgContext );
5495 *yyextra->copyArgString+=*yytext;
5496 yyextra->fullArgString+=*yytext;
5497 yyextra->argRoundCount=0;
5498 yyextra->lastCopyArgContext = YY_START;
5499 BEGIN( CopyArgRound );
5502 yyextra->argSharpCount++;
5504 *yyextra->copyArgString+=*yytext;
5505 yyextra->fullArgString+=*yytext;
5508 *yyextra->copyArgString+=*yytext;
5509 yyextra->fullArgString+=*yytext;
5510 yyextra->argSharpCount--;
5511 if (yyextra->argSharpCount>0)
5517 BEGIN( ReadTempArgs );
5521<CopyArgString,CopyArgPHPString>\\. {
5522 *yyextra->copyArgString+=yytext;
5523 yyextra->fullArgString+=yytext;
5526 *yyextra->copyArgString+=*yytext;
5527 yyextra->fullArgString+=*yytext;
5528 BEGIN( yyextra->lastCopyArgStringContext );
5530<CopyArgPHPString>\' {
5531 *yyextra->copyArgString+=*yytext;
5532 yyextra->fullArgString+=*yytext;
5533 BEGIN( yyextra->lastCopyArgStringContext );
5535<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5536 if (yyextra->insidePHP)
5542 *yyextra->copyArgString+=yytext;
5543 yyextra->fullArgString+=yytext;
5546<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5547 *yyextra->copyArgString+=yytext;
5548 yyextra->fullArgString+=yytext;
5549 if (yyextra->insidePHP)
5551 yyextra->lastCopyArgStringContext=YY_START;
5552 BEGIN(CopyArgPHPString);
5555<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5556 *yyextra->copyArgString+=yytext;
5557 yyextra->fullArgString+=yytext;
5559<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5561 *yyextra->copyArgString+=*yytext;
5562 yyextra->fullArgString+=*yytext;
5564<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5565 *yyextra->copyArgString+=yytext;
5566 yyextra->fullArgString+=yytext;
5568<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5569 *yyextra->copyArgString+=*yytext;
5570 yyextra->fullArgString+=*yytext;
5578<FuncRound>"(" { yyextra->current->args += *yytext ;
5579 ++yyextra->roundCount ;
5581<FuncRound>")" { yyextra->current->args += *yytext ;
5582 if ( yyextra->roundCount )
5583 --yyextra->roundCount ;
5595 if (
dstrcmp(yytext,
";")==0 &&
5596 ((yyextra->insideJS || yyextra->insidePHP) &&
5597 !yyextra->current->type.containsWord(
"function")) )
5599 yyextra->current->reset();
5601 BEGIN( FindMembers );
5605 unput(*yytext); BEGIN( SFunction );
5608<FuncQual>{BN}*"abstract"{BN}* {
5610 yyextra->current->virt = Specifier::Pure;
5611 yyextra->current->args +=
" override ";
5613<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5615 yyextra->current->spec.setOverride(
true);
5616 yyextra->current->args +=
" override ";
5617 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5620<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5622 yyextra->current->spec.setFinal(
true);
5623 yyextra->current->args +=
" final ";
5624 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5627<FuncQual>{BN}*"sealed"{BN}* {
5629 yyextra->current->spec.setSealed(
true);
5630 yyextra->current->args +=
" sealed ";
5632<FuncQual>{BN}*"new"{BN}* {
5634 yyextra->current->spec.setNew(
true);
5635 yyextra->current->args +=
" new ";
5637<FuncQual>{BN}*"const"{BN}* {
5639 yyextra->current->args +=
" const ";
5640 yyextra->current->argList.setConstSpecifier(
true);
5642<FuncQual>{BN}*"volatile"{BN}* {
5644 yyextra->current->args +=
" volatile ";
5645 yyextra->current->argList.setVolatileSpecifier(
true);
5647<FuncQual>{BN}*"noexcept"{BN}* {
5649 yyextra->current->args +=
" noexcept ";
5650 yyextra->current->spec.setNoExcept(
true);
5652<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5654 yyextra->current->args +=
" noexcept(false)";
5656<FuncQual>{BN}*"noexcept"{BN}*"(" {
5658 yyextra->current->args +=
" noexcept(";
5659 yyextra->current->spec.setNoExcept(
true);
5660 yyextra->lastRoundContext=FuncQual;
5661 yyextra->pCopyRoundString=&yyextra->current->args;
5662 yyextra->roundCount=0;
5666 yyextra->current->args +=
" &";
5669<FuncQual>{BN}*"&&" {
5670 yyextra->current->args +=
" &&";
5674<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5676 yyextra->current->args +=
" = 0";
5677 yyextra->current->virt = Specifier::Pure;
5678 yyextra->current->argList.setPureSpecifier(
true);
5679 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5682<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5684 yyextra->current->args +=
" = delete";
5685 yyextra->current->spec.setDelete(
true);
5686 yyextra->current->argList.setIsDeleted(
true);
5687 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5690<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5692 yyextra->current->args +=
" = default";
5693 yyextra->current->spec.setDefault(
true);
5694 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5697<FuncQual>{BN}*"->"{BN}* {
5699 yyextra->current->argList.setTrailingReturnType(
" -> ");
5700 yyextra->current->args +=
" -> ";
5701 yyextra->roundCount=0;
5702 BEGIN(TrailingReturn);
5704<TrailingReturn>[{;] {
5705 if (yyextra->roundCount>0) REJECT;
5707 yyextra->current->argList.finishTrailingReturnType();
5710<TrailingReturn>"requires"{BN}+ {
5711 if (yyextra->insideJava) REJECT;
5712 yyextra->requiresContext = FuncQual;
5713 yyextra->current->req+=
' ';
5714 yyextra->current->argList.finishTrailingReturnType();
5715 BEGIN(RequiresClause);
5717<TrailingReturn>"(" {
5718 yyextra->roundCount++;
5719 yyextra->current->argList.appendTrailingReturnType(yytext);
5720 yyextra->current->args+=yytext;
5722<TrailingReturn>")" {
5723 if (yyextra->roundCount>0)
5725 yyextra->roundCount--;
5729 warn(yyextra->fileName,yyextra->yyLineNr,
5730 "Found ')' without opening '(' for trailing return type '{})...'",
5731 yyextra->current->argList.trailingReturnType());
5733 yyextra->current->argList.appendTrailingReturnType(yytext);
5734 yyextra->current->args+=yytext;
5737 yyextra->current->argList.appendTrailingReturnType(yytext);
5738 yyextra->current->args+=yytext;
5742 yyextra->current->argList.appendTrailingReturnType(yytext);
5743 yyextra->current->args+=
' ';
5745<FuncRound,FuncFunc>{BN}*","{BN}* {
5747 yyextra->current->args +=
", " ;
5749<FuncQual,FuncRound,FuncFunc>{BN}+ {
5751 yyextra->current->args +=
' ' ;
5753<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5755 yyextra->lastCPPContext = YY_START;
5759 if (!yyextra->insideCS)
5766 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5773 yyextra->lastInitializerContext=YY_START;
5774 yyextra->sharpCount=0;
5775 yyextra->initBracketCount=0;
5776 yyextra->current->initializer.str(yytext);
5777 BEGIN(ReadInitializer);
5780<ReadExpressionBody>";" {
5781 if (!yyextra->current->sli.empty() && yyextra->previous)
5783 yyextra->previous->sli = yyextra->current->sli;
5784 yyextra->current->sli.clear();
5786 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5801 if (yyextra->insideCpp &&
dstrcmp(yytext,
"requires")==0)
5804 yyextra->requiresContext = YY_START;
5805 if (!yyextra->current->req.empty())
5807 yyextra->current->req+=
" && ";
5809 BEGIN(RequiresClause);
5811 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
5814 yyextra->current->typeConstr.clear();
5815 yyextra->current->typeConstr.push_back(
Argument());
5816 yyextra->lastCSConstraint = YY_START;
5817 BEGIN( CSConstraintName );
5821 yyextra->current->args = yytext;
5822 yyextra->oldStyleArgType.clear();
5823 BEGIN(OldStyleArgs);
5827 yyextra->current->args += yytext;
5833 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5835 if (yyextra->current->doc!=yyextra->docBackup)
5837 doc=yyextra->current->doc;
5838 yyextra->current->doc=yyextra->docBackup;
5840 if (yyextra->current->brief!=yyextra->briefBackup)
5842 brief=yyextra->current->brief;
5843 yyextra->current->brief=yyextra->briefBackup;
5845 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5846 oldStyleArgName,brief,doc);
5847 yyextra->current->args.clear();
5848 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5850<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5852 if (yyextra->current->argList.empty())
5854 yyextra->current->argList.setNoParameters(
true);
5860<OldStyleArgs>. { yyextra->current->args += *yytext; }
5861<FuncQual,FuncRound,FuncFunc>\" {
5862 if (yyextra->insideIDL && yyextra->insideCppQuote)
5868 yyextra->current->args += *yytext;
5871<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5872<FuncQual>{BN}*"try:" |
5873<FuncQual>{BN}*"try"{BN}+ {
5874 yyextra->insideTryBlock=
true;
5876 if (yytext[yyleng-1]==
':')
5882<FuncQual>{BN}*"throw"{BN}*"(" {
5883 yyextra->current->exception =
" throw (" ;
5884 yyextra->roundCount=0;
5886 BEGIN( ExcpRound ) ;
5888<FuncQual>{BN}*"raises"{BN}*"(" {
5889 yyextra->current->exception =
" raises (" ;
5891 yyextra->roundCount=0;
5892 BEGIN( ExcpRound ) ;
5894<FuncQual>{BN}*"throws"{BN}+ {
5895 yyextra->current->exception =
" throws " ;
5899<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5900 ++yyextra->roundCount ;
5902<ExcpRound>")" { yyextra->current->exception += *yytext ;
5903 if ( yyextra->roundCount )
5904 --yyextra->roundCount ;
5909 yyextra->current->exception += *yytext;
5912 unput(
'{'); BEGIN( FuncQual );
5915 unput(
';'); BEGIN( FuncQual );
5918 yyextra->current->exception +=
' ';
5922 yyextra->current->exception += *yytext;
5924<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5925 yyextra->current->name = yyextra->current->args ;
5926 yyextra->current->args = yytext ;
5927 yyextra->roundCount=0;
5928 BEGIN( FuncRound ) ;
5931 if (!yyextra->insidePHP) BEGIN(SkipInits);
5937 yyextra->current->fileName = yyextra->fileName;
5938 yyextra->current->startLine = yyextra->yyBegLineNr;
5939 yyextra->current->startColumn = yyextra->yyBegColNr;
5940 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5942 std::string type = yyextra->current->type.str();
5946 ti =
match.position();
5950 if (
size_t di = yyextra->current->type.find(
"decltype(");
5956 size_t ts=yyextra->current->type.find(
'<');
5957 size_t te=yyextra->current->type.rfind(
'>');
5960 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5963 bool isVariable = !yyextra->current->type.empty() &&
5964 (!isFunction || startsWithTypedef);
5969 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5974 if (yyextra->isTypedef && !startsWithTypedef)
5976 yyextra->current->type.prepend(
"typedef ");
5978 yyextra->current->section = EntryType::makeVariable() ;
5983 yyextra->current->section = EntryType::makeFunction() ;
5984 yyextra->current->proto = *yytext==
';';
5992 if (yyextra->isTypedef && !startsWithTypedef)
5994 yyextra->current->type.prepend(
"typedef ");
5997 yyextra->current->section = EntryType::makeVariable();
6002 yyextra->current->section = EntryType::makeFunction();
6003 yyextra->current->proto =
true;
6007 if ( yyextra->insidePHP)
6009 if (yyextra->current->type.findAndRemoveWord(
"final"))
6011 yyextra->current->spec.setFinal(
true);
6013 if (yyextra->current->type.findAndRemoveWord(
"abstract"))
6015 yyextra->current->spec.setAbstract(
true);
6018 if ( yyextra->insidePHP && !yyextra->current->type.containsWord(
"function"))
6021 if ( *yytext ==
'{' )
6023 yyextra->lastCurlyContext = FindMembers;
6024 yyextra->curlyCount=0;
6029 BEGIN( FindMembers );
6034 if ( yyextra->insidePHP)
6036 yyextra->current->type.findAndRemoveWord(
"function");
6038 yyextra->previous = yyextra->current;
6039 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6042 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6044 yyextra->current->spec.setOptional(
true).setRequired(
true);
6046 yyextra->lastCurlyContext = FindMembers;
6047 if ( *yytext ==
',' )
6049 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6051 if ( *yytext ==
'{' )
6053 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6055 yyextra->previous->spec.setInline(
true);
6057 yyextra->curlyCount=0;
6058 BEGIN( SkipCurly ) ;
6060 else if ( *yytext ==
'=' )
6062 yyextra->previous->spec.setInline(
true);
6063 yyextra->curlyCount=0;
6064 BEGIN( ReadExpressionBody );
6068 if (!yyextra->previous->section.isVariable())
6069 yyextra->previous->bodyLine=-1;
6070 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.
6074<SkipInits>">"{BN}*"{" {
6076 yyextra->curlyCount=1;
6077 BEGIN(SkipC11Inits);
6079<SkipInits>{ID}{BN}*"{" {
6081 yyextra->curlyCount=1;
6082 BEGIN(SkipC11Inits);
6085 ++yyextra->curlyCount;
6088 if ( --yyextra->curlyCount<=0 )
6099 ++yyextra->curlyCount ;
6101<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6104 if( yyextra->curlyCount )
6106 --yyextra->curlyCount ;
6110 if (!yyextra->current->sli.empty() && yyextra->previous)
6112 yyextra->previous->sli = yyextra->current->sli;
6113 yyextra->current->sli.clear();
6115 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6116 BEGIN( yyextra->lastCurlyContext ) ;
6119<SkipCurly>"}"{BN}*{DCOMM}"<" {
6121 if ( yyextra->curlyCount )
6124 --yyextra->curlyCount ;
6128 yyextra->current->endBodyLine=yyextra->yyLineNr;
6129 yyextra->tempEntry = yyextra->current;
6130 yyextra->current = yyextra->previous;
6132 yyextra->docBlockContext = SkipCurlyEndDoc;
6133 yyextra->docBlockInBody =
false;
6134 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6136 yyextra->docBlock.str(std::string());
6137 yyextra->docBlockTerm =
'}';
6138 if (yytext[yyleng-3]==
'/')
6150<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6151 yyextra->docBlockContext = SkipCurlyEndDoc;
6152 yyextra->docBlockInBody =
false;
6153 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6155 yyextra->docBlock.str(std::string());
6156 yyextra->docBlockTerm =
'}';
6157 if (yytext[yyleng-3]==
'/')
6168<SkipCurlyEndDoc>"}" {
6170 if (yyextra->tempEntry)
6172 yyextra->current = yyextra->tempEntry;
6173 yyextra->tempEntry.reset();
6175 BEGIN( yyextra->lastCurlyContext );
6177<SkipCurly,ReadExpressionBody>\" {
6179 yyextra->lastStringContext=YY_START;
6180 BEGIN( SkipString );
6182<SkipCurly>^{B}*"#" {
6183 if (yyextra->insidePHP)
6186 BEGIN( SkipCurlyCpp );
6188<SkipCurly,SkipC11Inits,SkipInits,ReadExpressionBody>\n {
6192<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6193 if (!yyextra->insidePHP)
6199 yyextra->lastHereDocContext = YY_START;
6203<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6205 yyextra->lastRawStringContext = YY_START;
6206 yyextra->dummyRawString.clear();
6207 yyextra->pCopyRawString = &yyextra->dummyRawString;
6208 *yyextra->pCopyRawString += yytext;
6211<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6215<SkipCurly,SkipCurlyCpp>"\$" {}
6219 yyextra->lastCurlyContext = FindMembers;
6222<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6226<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CCS} {
6228 yyextra->lastCContext = YY_START;
6231<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CPPC} {
6233 yyextra->lastCContext = YY_START;
6234 BEGIN(SkipCxxComment);
6236<SkipInits,SkipC11Inits>"(" {
6237 yyextra->roundCount=0;
6238 yyextra->lastSkipRoundContext=YY_START;
6241<SkipInits,SkipC11Inits>\" {
6242 yyextra->lastStringContext=YY_START;
6243 BEGIN( SkipString );
6246 warn(yyextra->fileName,yyextra->yyLineNr,
6247 "Found ';' while parsing initializer list! "
6248 "(doxygen could be confused by a macro call without semicolon)"
6250 BEGIN( FindMembers );
6252<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6253 if (!yyextra->insidePHP)
6256 yyextra->lastCContext = YY_START;
6257 BEGIN(SkipCxxComment);
6259<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6260 if (!yyextra->insideCS) REJECT;
6263 yyextra->lastSkipVerbStringContext=YY_START;
6264 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6265 yyextra->dummyTextStream.clear();
6266 BEGIN(SkipVerbString);
6268<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6269 if (yyextra->insidePHP) REJECT;
6271<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6272 if (yyextra->insidePHP)
6274 yyextra->lastStringContext=YY_START;
6275 BEGIN(SkipPHPString);
6278<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>. { }
6279<SkipString,SkipPHPString>\\. { }
6281 BEGIN( yyextra->lastStringContext );
6284 BEGIN( yyextra->lastStringContext );
6286<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6287<SkipString,SkipPHPString>\n {
6291<SkipString,SkipPHPString>. { }
6297 yyextra->current->section = EntryType::makeEmpty() ;
6298 yyextra->current->type.clear() ;
6299 yyextra->current->name.clear() ;
6300 yyextra->current->args.clear() ;
6301 yyextra->current->argList.clear();
6302 BEGIN( FindMembers ) ;
6305 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6309 if (!yyextra->current->name.empty() && !yyextra->current_root->name.empty())
6313 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6315 if (!yyextra->baseName.empty())
6317 yyextra->current->extends.emplace_back(
6318 yyextra->baseName,Protection::Public,Specifier::Normal);
6319 yyextra->baseName.clear();
6321 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6326 yyextra->current->section = EntryType::makeEmpty() ;
6327 yyextra->current->type.clear() ;
6328 yyextra->current->name.clear() ;
6329 yyextra->current->args.clear() ;
6330 yyextra->current->argList.clear();
6332 BEGIN( FindMembers ) ;
6334<CompoundName>{SCOPENAME}/{BN}*"<" {
6335 yyextra->sharpCount = 0;
6336 yyextra->current->name = yytext ;
6338 if (yyextra->current->spec.isProtocol())
6340 yyextra->current->name+=
"-p";
6343 yyextra->lastClassTemplSpecContext = ClassVar;
6344 if (yyextra->insideObjC)
6346 BEGIN( ObjCProtocolList );
6348 else if (yyextra->insideCS)
6355 yyextra->roundCount=0;
6356 BEGIN( ClassTemplSpec );
6363 yyextra->current->tArgLists.
push_back(al);
6364 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6365 yyextra->templateStr=
"<";
6366 yyextra->current->name +=
"<";
6367 yyextra->fullArgString = yyextra->templateStr;
6368 yyextra->copyArgString = &yyextra->current->name;
6370 yyextra->currentArgumentContext = ClassVar;
6371 BEGIN( ReadTempArgs );
6373<ObjCProtocolList>"<" {
6374 yyextra->insideProtocolList=
true;
6377<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6378 yyextra->current->name += yytext;
6380 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6383 if (yyextra->current->spec.isProtocol())
6390 BEGIN( yyextra->lastClassTemplSpecContext );
6394<ClassTemplSpec>"<" {
6395 yyextra->current->name += yytext;
6396 if (yyextra->roundCount==0) yyextra->sharpCount++;
6399 yyextra->current->name += yytext;
6401<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6402 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6406 yyextra->current->name =
substitute(yytext,
".",
"::");
6407 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6412 else if (!yyextra->current->tArgLists.empty())
6416 yyextra->current->name = yytext;
6417 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6420 DString rn = yyextra->current_root->name;
6422 if (!yyextra->current->name.empty() && !rn.
empty())
6426 yyextra->current->spec.setForwardDecl(
true);
6427 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6429 else if (yyextra->insideIDL &&
6430 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6431 yyextra->current->spec.isInterface()) ||
6432 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6433 yyextra->current->spec.isService())
6441 yyextra->current->name = yytext;
6442 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6443 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6446 yyextra->current->spec.setInterface(
false).setService(
false);
6450 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6453 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6456 yyextra->current->reset();
6458 if (yyextra->insideObjC)
6460 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6461 yyextra->insideObjC =
false;
6463 if (yyextra->isTypedef)
6465 yyextra->current->type.prepend(
"typedef");
6467 BEGIN( FindMembers );
Wrapper class for the Entry type.
6470<CompoundName>{SCOPENAME}/{BN}*"(" {
6471 yyextra->current->name = yytext ;
6474 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6476 yyextra->lastAlignAsContext = YY_START;
6481 if (yyextra->current->spec.isProtocol())
6483 yyextra->current->name +=
"-p";
6488<AlignAs>"(" { yyextra->roundCount=0;
6489 BEGIN( AlignAsEnd );
6493<AlignAsEnd>"(" { yyextra->roundCount++; }
6494<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6496 BEGIN( yyextra->lastAlignAsContext );
6502 yyextra->current->name = yytext ;
6506 yyextra->current->bodyLine = yyextra->yyLineNr;
6507 yyextra->current->bodyColumn = yyextra->yyColNr;
6508 yyextra->current->initializer.str(std::string());
6509 yyextra->lastInitializerContext = FindMembers;
6510 yyextra->sharpCount=0;
6511 yyextra->initBracketCount=0;
6512 BEGIN(ReadInitializer);
6514<CompoundName>{SCOPENAME}/{BN}*"," {
6516 yyextra->current->reset();
6519<CompoundName>{SCOPENAME} {
6520 yyextra->current->name = yytext ;
6523 if (yyextra->current->spec.isProtocol())
6525 yyextra->current->name +=
"-p";
6527 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6533<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6534 if (yyextra->current->section.isNamespace())
DString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple internal white...
6546<CompoundName>{CSSCOPENAME} {
6547 yyextra->current->name =
substitute(yytext,
".",
"::");
6551<ClassVar>{SCOPENAME}{BNopt}/"(" {
6552 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6555 yyextra->roundCount=0;
6556 BEGIN(SkipUnionSwitch);
6561 yyextra->yyBegColNr=yyextra->yyColNr;
6562 yyextra->yyBegLineNr=yyextra->yyLineNr;
6563 yyextra->current->name = yytext;
6564 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6567 BEGIN( FindMembers );
6571 if (yyextra->isTypedef)
6575 yyextra->current->type.prepend(
"typedef ");
6583<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6584 if (yyextra->insideCli)
6587 yyextra->current->spec.setSealedClass(
true);
6589 yyextra->current->spec.setAbstractClass(
true);
6597<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6598 yyextra->yyBegColNr=yyextra->yyColNr;
6599 yyextra->yyBegLineNr=yyextra->yyLineNr;
6602 if (yyextra->current->section.isEnum())
6604 yyextra->current->section = EntryType::makeVariable() ;
6606 yyextra->current->type +=
' ' ;
6607 yyextra->current->type += yyextra->current->name ;
6616 yyextra->yyBegColNr=yyextra->yyColNr;
6617 yyextra->yyBegLineNr=yyextra->yyLineNr;
6619 if (yyextra->insideIDL &&
dstrcmp(yytext,
"switch")==0)
6622 yyextra->roundCount=0;
6623 BEGIN(SkipUnionSwitch);
6625 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
dstrcmp(yytext,
"implements")==0 ||
dstrcmp(yytext,
"extends")==0))
6627 yyextra->current->type.clear();
6628 yyextra->baseProt = Protection::Public;
6629 yyextra->baseVirt = Specifier::Normal;
6630 yyextra->baseName.clear();
6631 BEGIN( BasesProt ) ;
6633 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
6635 yyextra->current->typeConstr.clear();
6636 yyextra->current->typeConstr.push_back(
Argument());
6637 yyextra->lastCSConstraint = YY_START;
6638 BEGIN( CSConstraintName );
6640 else if (yyextra->insideCli &&
dstrcmp(yytext,
"abstract")==0)
6642 yyextra->current->spec.setAbstract(
true);
6644 else if (yyextra->insideCli &&
dstrcmp(yytext,
"sealed")==0)
6646 yyextra->current->spec.setSealed(
true);
6648 else if (
dstrcmp(yytext,
"final")==0)
6650 yyextra->current->spec.setFinal(
true);
6654 if (yyextra->current->section.isEnum())
6656 yyextra->current->section = EntryType::makeVariable() ;
6658 yyextra->current->type +=
' ' ;
6659 yyextra->current->type += yyextra->current->name ;
6660 yyextra->current->name = yytext ;
6669 if (yyextra->insideObjC && *yytext==
'(')
6671 yyextra->current->name+=
'(';
6672 yyextra->current->spec.setCategory(
true);
6673 BEGIN( ClassCategory );
6675 else if (yyextra->insideCS && *yytext==
'(')
6677 yyextra->current->args=yytext;
6678 yyextra->currentArgumentContext = ClassVar;
6679 yyextra->fullArgString = yyextra->current->args;
6680 yyextra->copyArgString = &yyextra->current->args;
6681 BEGIN( ReadFuncArgType ) ;
6687 BEGIN( FindMembers );
6690<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6691<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6692 yyextra->fullArgString.clear();
6693 yyextra->lastCopyArgChar=
'#';
6694 yyextra->lastCommentInArgContext=YY_START;
6696 BEGIN( CopyArgCommentLine );
6698 BEGIN( CopyArgComment );
6700<CSConstraintType,CSConstraintName>"#" {
6701 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6703<CSConstraintType>"=>" {
6708 BEGIN( yyextra->lastCSConstraint );
6710<CSConstraintType>"{" {
6714 BEGIN( yyextra->lastCSConstraint );
6716<CSConstraintType,CSConstraintName>";" {
6719 BEGIN( yyextra->lastCSConstraint );
6721<CSConstraintName>":" {
6722 BEGIN( CSConstraintType );
6724<CSConstraintName>{ID} {
6726 yyextra->current->typeConstr.back().name=yytext;
6728<CSConstraintType>"where" {
6729 yyextra->current->typeConstr.push_back(
Argument());
6730 BEGIN( CSConstraintName );
6732<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6733 if (yyextra->current->typeConstr.back().type.empty())
6736 yyextra->current->typeConstr.back().type=yytext;
6740 DString name = yyextra->current->typeConstr.
back().name;
6741 yyextra->current->typeConstr.push_back(
Argument());
6742 yyextra->current->typeConstr.back().name=name;
6743 yyextra->current->typeConstr.
back().type=yytext;
char & back()
Returns a reference to the last character.
6746<CSConstraintName,CSConstraintType>\n {
6749<CSConstraintName,CSConstraintType>. {
6751<ClassCategory>{ID} {
6752 yyextra->current->name+=yytext;
6754<ClassCategory>")"/{BN}*"{" {
6755 yyextra->current->name+=
')';
6758<ClassCategory>")"/{BN}*"<" {
6759 yyextra->current->name+=
')';
6760 BEGIN( ObjCProtocolList );
6763 yyextra->current->name+=
')';
6764 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6776 if (yyextra->current->section.isVariable())
6778 yyextra->current->bitfields+=
":";
6779 yyextra->current->args.clear();
6782 else if (yyextra->current->section.isEnum())
6785 yyextra->current->args.clear();
6786 BEGIN(EnumBaseType);
6790 yyextra->current->type.clear();
6791 if (yyextra->current->spec.isInterface() ||
6792 yyextra->current->spec.isStruct() ||
6793 yyextra->current->spec.isRef() ||
6794 yyextra->current->spec.isValue() ||
6795 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6798 yyextra->baseProt = Protection::Public;
6802 yyextra->baseProt = Protection::Private;
6804 yyextra->baseVirt = Specifier::Normal;
6805 yyextra->baseName.clear();
6806 BEGIN( BasesProt ) ;
6810 if (yyextra->isTypedef)
6812 yyextra->current->type.prepend(
"typedef");
6814 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6816 yyextra->current->section = EntryType::makeVariable() ;
6818 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6820 yyextra->current->reset();
6827 BEGIN( FindMembers );
6829<Bases,ClassVar>{CPPC}"/"/[^/] {
6830 if (!yyextra->insideObjC)
6837 yyextra->current->program << yytext;
6838 yyextra->current->fileName = yyextra->fileName ;
6839 yyextra->current->startLine = yyextra->yyLineNr ;
6840 yyextra->current->startColumn = yyextra->yyColNr;
6841 yyextra->curlyCount=0;
6842 BEGIN( ReadBodyIntf );
6845<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6846<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6847<Bases,ClassVar>{CPPC}"!" |
6848<Bases,ClassVar>[\-+]{BN}* {
6849 if (!yyextra->insideObjC)
6856 yyextra->current->program << yytext;
6857 yyextra->current->fileName = yyextra->fileName ;
6858 yyextra->current->startLine = yyextra->yyLineNr ;
6859 yyextra->current->startColumn = yyextra->yyColNr;
6860 yyextra->curlyCount=0;
6861 BEGIN( ReadBodyIntf );
6864<CompoundName,ClassVar>{B}*"{"{B}* {
6865 yyextra->current->program.str(std::string());
6866 yyextra->current->fileName = yyextra->fileName ;
6867 yyextra->current->bodyLine = yyextra->yyLineNr;
6868 yyextra->current->bodyColumn = yyextra->yyColNr;
6870 if (yyextra->current->name.empty() && !yyextra->isTypedef)
6872 if (yyextra->current->section.isNamespace())
6876 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6888 yyextra->curlyCount=0;
6889 if (yyextra->current_root &&
6890 !yyextra->current_root->spec.isInterface() &&
6891 (yyextra->current->spec.isInterface() ||
6892 yyextra->current->spec.isProtocol() ||
6893 yyextra->current->spec.isCategory() ||
6894 yyextra->current->section.isObjcImpl()
6899 BEGIN( ReadBodyIntf );
6901 else if (yyextra->current->section.isNamespace())
6903 BEGIN( ReadNSBody );
DString stripPath(const DString &s)
6910<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6911<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6912<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6913<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6914<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6915<BasesProt>{BN} {
lineCount(yyscanner); }
6916<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6917<Bases>"decltype"{BN}*"(" {
6919 yyextra->roundCount=0;
6920 yyextra->lastSkipRoundContext=YY_START;
6923<Bases>("\\")?({ID}"\\")*{ID} {
6924 if (!yyextra->insidePHP)
6933 yyextra->baseName += bn;
6934 yyextra->current->args +=
' ';
6935 yyextra->current->args += yytext;
6938<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6944 yyextra->current->typeConstr.clear();
6945 yyextra->current->typeConstr.push_back(
Argument());
6946 yyextra->lastCSConstraint = YY_START;
6947 BEGIN( CSConstraintName );
6951 yyextra->baseName+=yytext;
6952 yyextra->current->args +=
' ';
6953 yyextra->current->args += yytext;
6956<Bases>{BN}*{ID}("."{ID})* {
6958 yyextra->baseName += name;
6959 yyextra->current->args +=
' ';
6960 yyextra->current->args += name;
6962<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6963 if (!yyextra->insideObjC)
6973<ClassVar,Bases>"@end" {
6981<ClassVar>"<" { yyextra->current->name += *yytext;
6982 yyextra->sharpCount=1;
6983 yyextra->roundCount=0;
6984 yyextra->lastSkipSharpContext = YY_START;
6985 yyextra->specName = &yyextra->current->name;
6986 BEGIN ( Specialization );
6990 yyextra->sharpCount=1;
6991 yyextra->roundCount=0;
6992 yyextra->lastSkipSharpContext = YY_START;
6993 if (yyextra->insideObjC)
7003 yyextra->templateStr = yytext;
7004 yyextra->specName = &yyextra->templateStr;
7005 BEGIN ( Specialization );
7008<Specialization>"<" { *yyextra->specName += *yytext;
7009 if (yyextra->roundCount==0) yyextra->sharpCount++;
7011<Specialization>">" {
7012 *yyextra->specName += *yytext;
7013 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
7016 BEGIN(yyextra->lastSkipSharpContext);
7019<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
7020<Specialization>"<<" { *yyextra->specName += yytext; }
7021<Specialization>">>"/{B}*"::" {
7026<Specialization>">>" {
7027 if (yyextra->insideCS)
7037 if (yyextra->roundCount>0)
7039 *yyextra->specName += yytext;
7049<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7050<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7051<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7053<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7054<Specialization>"\\'" { *yyextra->specName += *yytext;}
7055<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7056<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7057<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7058<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7059<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7060<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7061<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7062<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7063<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7066 *yyextra->specName += *yytext;
7068<SkipRound>"(" { ++yyextra->roundCount; }
7069<SkipRound>")" {
if (--yyextra->roundCount<0)
7070 BEGIN ( yyextra->lastSkipRoundContext );
7073 yyextra->lastStringContext=SkipRound;
7076<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7077 if (yyextra->insideProtocolList)
7079 yyextra->baseName+=
"-p";
7083 yyextra->current->args +=
',' ;
7086 if (!yyextra->baseName.empty())
7088 yyextra->current->extends.emplace_back(
7089 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7092 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7093 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7094 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7096 yyextra->baseProt=Protection::Public;
7100 yyextra->baseProt=Protection::Private;
7102 yyextra->baseVirt=Specifier::Normal;
7103 yyextra->baseName.clear();
7106 yyextra->insideProtocolList=
false;
7109 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7125 if (*yytext==
',' && yyextra->insideObjC)
7127 yyextra->insideProtocolList=
true;
7133 yyextra->current->program.str(std::string());
7134 yyextra->current->fileName = yyextra->fileName ;
7135 yyextra->current->bodyLine = yyextra->yyLineNr;
7136 yyextra->current->bodyColumn = yyextra->yyColNr;
7138 if (!yyextra->baseName.empty())
7140 yyextra->current->extends.emplace_back(
7141 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7143 yyextra->baseName.clear();
7145 yyextra->curlyCount=0;
7146 if (yyextra->insideObjC)
7148 BEGIN( ReadBodyIntf );
7155<SkipUnionSwitch>{B}*"(" {
7156 yyextra->roundCount++;
7158<SkipUnionSwitch>")" {
7159 if (--yyextra->roundCount==0)
7164<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7166<Comment>{BN}+ { yyextra->current->program << yytext ;
7169<Comment>{CCS} { yyextra->current->program << yytext ; }
7170<Comment>{CPPC} { yyextra->current->program << yytext ; }
7171<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7172 if (yyextra->doxygenComment) yyextra->insideCode=
true;
7173 yyextra->current->program << yytext ;
7175<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7176 if (yyextra->doxygenComment) yyextra->insideCode=
false;
7177 yyextra->current->program << yytext ;
7179<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7180<Comment>{CCE} { yyextra->current->program << yytext ;
7181 if (!yyextra->insideCode)
7183 yyextra->doxygenComment=
false;
7184 BEGIN( yyextra->lastContext );
7187<Comment>. { yyextra->current->program << *yytext ; }
7189<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7191 if (!yyextra->current->doc.empty())
7193 yyextra->current->doc+=
"\n\n";
7197 yyextra->current->docLine = yyextra->yyLineNr;
7198 yyextra->current->docFile = yyextra->fileName;
7201 yyextra->lastDocContext = YY_START;
7202 if (yyextra->current_root->section.isScope())
7204 yyextra->current->inside = yyextra->current_root->name+
"::";
7206 yyextra->docBlockContext = YY_START;
7207 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7212 yyextra->docBlock.
str(indent.
str());
7214 if (yyextra->docBlockAutoBrief)
7216 yyextra->current->briefLine = yyextra->yyLineNr;
7217 yyextra->current->briefFile = yyextra->fileName;
7222<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7228 yyextra->lastDocContext = YY_START;
7231 if (yyextra->current_root->section.isScope())
7233 yyextra->current->inside = yyextra->current_root->name+
"::";
7235 yyextra->current->docLine = yyextra->yyLineNr;
7236 yyextra->current->docFile = yyextra->fileName;
7237 yyextra->docBlockContext = YY_START;
7238 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7240 yyextra->docBlockAutoBrief = javadocAutoBrief;
7244 yyextra->docBlock.
str(indent.
str());
7246 if (yyextra->docBlockAutoBrief)
7248 yyextra->current->briefLine = yyextra->yyLineNr;
7249 yyextra->current->briefFile = yyextra->fileName;
7256 yyextra->current->program << yytext ;
7257 yyextra->lastContext = YY_START ;
7258 yyextra->doxygenComment=
true;
7262<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7267<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7268 yyextra->lastDocContext = YY_START;
7271 if (yyextra->current_root->section.isScope())
7273 yyextra->current->inside = yyextra->current_root->name+
"::";
7275 yyextra->current->docLine = yyextra->yyLineNr;
7276 yyextra->current->docFile = yyextra->fileName;
7277 yyextra->docBlockContext = YY_START;
7278 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7280 yyextra->docBlockAutoBrief = javadocAutoBrief;
7284 yyextra->docBlock.
str(indent.
str());
7286 if (yyextra->docBlockAutoBrief)
7288 yyextra->current->briefLine = yyextra->yyLineNr;
7289 yyextra->current->briefFile = yyextra->fileName;
7294<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7295 yyextra->lastDocContext = YY_START;
7296 if (yyextra->current_root->section.isScope())
7298 yyextra->current->inside = yyextra->current_root->name+
"::";
7300 yyextra->docBlockContext = YY_START;
7301 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7302 yyextra->docBlockAutoBrief =
false;
7306 yyextra->docBlock.
str(indent.
str());
7311<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7312 yyextra->lastDocContext = YY_START;
7313 if (yyextra->current_root->section.isScope())
7315 yyextra->current->inside = yyextra->current_root->name+
"::";
7317 yyextra->docBlockContext = YY_START;
7318 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7319 yyextra->docBlockAutoBrief =
false;
7322 yyextra->docBlock.
str(indent.
str());
7326<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7328 yyextra->externLinkage=
true;
7331 if (yyextra->externLinkage)
7333 yyextra->externLinkage=
false;
7335 else if (yyextra->insideCS &&
7336 !yyextra->current->name.empty() &&
7337 !yyextra->current->type.empty())
7339 if (yyextra->current->mtype == MethodTypes::Event)
7341 yyextra->mtype = MethodTypes::Event;
7343 else if (yyextra->current->type.containsWord(
"event"))
7345 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7349 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7351 yyextra->current->bodyLine = yyextra->yyLineNr;
7352 yyextra->current->bodyColumn = yyextra->yyColNr;
7353 yyextra->curlyCount=0;
7354 BEGIN( CSAccessorDecl );
7356 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7360 yyextra->current->exception =
" {";
7361 BEGIN(UNOIDLAttributeBlock);
7365 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7366 yyextra->current->name.empty()
7370 yyextra->needsSemi =
false;
7371 if (yyextra->current->isStatic)
7373 yyextra->current->name=
"[static initializer]";
7374 yyextra->current->type.clear();
7378 yyextra->current->name=
"[instance initializer]";
7395 yyextra->current->bodyLine = yyextra->yyLineNr;
7396 yyextra->current->bodyColumn = yyextra->yyColNr;
7397 yyextra->current->initializer.str(yytext);
7398 yyextra->lastInitializerContext = YY_START;
7399 yyextra->sharpCount=0;
7400 yyextra->initBracketCount=1;
7401 BEGIN(ReadInitializer);
7405<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7406<CSAccessorDecl>"}"{B}*"=" {
7408 if (yyextra->curlyCount != 0) REJECT;
7409 yyextra->current->initializer.str(
"=");
7410 yyextra->current->endBodyLine=yyextra->yyLineNr;
7411 yyextra->lastInitializerContext = FindMembers;
7412 BEGIN(ReadInitializer);
7414<CSAccessorDecl>"}" {
7415 if (yyextra->curlyCount)
7417 yyextra->curlyCount--;
7421 yyextra->mtype = MethodTypes::Method;
7422 yyextra->virt = Specifier::Normal;
7424 yyextra->current->endBodyLine=yyextra->yyLineNr;
7429<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7430<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7431<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7432<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7433<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7434<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7435<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7436<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7437<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7438<CSAccessorDecl>{CHARLIT} {}
7439<CSAccessorDecl>"\"" { BEGIN(CSString);}
7440<CSAccessorDecl>"." {}
7441<CSAccessorDecl>\n {
lineCount(yyscanner); }
7442<CSString>"\"" { BEGIN(CSAccessorDecl);}
7450<SliceSequence>{SCOPENAME} {
7451 if (yyextra->current->spec.isLocal())
7453 yyextra->current->type =
"local ";
7455 yyextra->current->type +=
"sequence<";
7456 yyextra->current->type += yytext;
7457 yyextra->current->type +=
">";
7460<SliceSequence>{BN}*">"{BN}* {
7462 BEGIN(SliceSequenceName);
7465<SliceSequenceName>{ID}{BN}* {
7467 yyextra->current->name = yytext ;
7468 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7471<SliceSequenceName>";" {
7472 yyextra->current->section = EntryType::makeVariable();
7473 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7478<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7480 if (yyextra->current->spec.isLocal())
7482 yyextra->current->type =
"local ";
7484 yyextra->current->type +=
"dictionary<";
7485 yyextra->current->type += yytext;
7486 yyextra->current->type +=
">";
7487 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7490<SliceDictionary>{BN}*">"{BN}* {
7492 BEGIN(SliceDictionaryName);
7495<SliceDictionaryName>{ID}{BN}* {
7497 yyextra->current->name = yytext ;
7498 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7501<SliceDictionaryName>";" {
7502 yyextra->current->section = EntryType::makeVariable();
7503 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7513<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7514 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7515 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7518<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7519 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7520 BEGIN( yyextra->docBlockContext );
7522<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7523 yyextra->docBlock << yytext;
7524 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7525 BEGIN( yyextra->docBlockContext );
7527<DocLine>{NONLopt}/"\n" {
7528 yyextra->docBlock << yytext;
7529 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7530 BEGIN( yyextra->docBlockContext );
7535<DocBlock>"*"*{CCE} {
7537 BEGIN(yyextra->docBlockContext);
7539<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7542 yyextra->docBlock <<
"\\ilinebr " << indent;
7544<DocBlock>^{B}*"*"+/[^/] {
7547 yyextra->docBlock << indent;
7549<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7552 yyextra->docBlock << indent;
7554<DocBlock>^{B}*({CPPC}){B}* {
7557 yyextra->docBlock << yytext;
7561 yyextra->docBlock << yytext;
7563<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7564 yyextra->docBlock << yytext;
7566<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7567 yyextra->docBlock << yytext;
7568 char blockName[] =
"f$";
7570 if (c==
'[') blockName[1]=
']';
7571 else if (c==
'{') blockName[1]=
'}';
7572 else if (c==
'(') blockName[1]=
')';
7574 BEGIN(DocCopyBlock);
7576<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7577 yyextra->fileName = &yytext[6];
7578 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7579 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7580 yyextra->docBlock << yytext;
7582<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7583 yyextra->fileName = &yytext[6];
7584 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7585 yyextra->docBlock << yytext;
7587<DocBlock>{CMD}"iline"{LINENR}{B} {
7592 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7596 yyextra->yyLineNr = nr;
7598 yyextra->docBlock << yytext;
7600<DocBlock>{B}*"<"{PRE}">" {
7601 yyextra->docBlock << yytext;
7603 BEGIN(DocCopyBlock);
7605<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7606 yyextra->docBlock << yytext;
7608 BEGIN(DocCopyBlock);
7610<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7611 yyextra->docBlock << yytext;
7613 BEGIN(DocCopyBlock);
7615<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7616 yyextra->docBlock << yytext;
7618 BEGIN(DocCopyBlock);
7620<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7622 yyextra->docBlock <<
"\\ilinebr ";
7623 yyextra->docBlock << pat;
7625 BEGIN(DocCopyBlock);
7627<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7629 yyextra->docBlock << pat;
7631 BEGIN(DocCopyBlock);
7633<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7634<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7635<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7637 yyextra->docBlock <<
"\\ilinebr ";
7638 yyextra->docBlock << pat;
7640 BEGIN(DocCopyBlock);
7642<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7643<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7644<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7646 yyextra->docBlock << pat;
7648 BEGIN(DocCopyBlock);
7651 yyextra->docBlock <<
"```";
7654 yyextra->docBlock << yytext;
7657 yyextra->docBlock << yytext;
7659 BEGIN(DocCopyBlock);
7661<DocBlock>{B}*"<"{CODE}">" {
7662 if (yyextra->insideCS)
7664 yyextra->docBlock << yytext;
7666 BEGIN(DocCopyBlock);
7673<DocBlock>[^@*~`'\/\\\n]+ {
7674 yyextra->docBlock << yytext;
7678 yyextra->docBlock << *yytext;
7681 yyextra->docBlock << *yytext;
7686<DocCopyBlock>"</"{PRE}">" {
7691 yyextra->docBlock << yytext;
7693<DocCopyBlock>"</"{CODE}">" {
7698 yyextra->docBlock << yytext;
7700<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7705 yyextra->docBlock << yytext;
7707<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7712 yyextra->docBlock << yytext;
7714<DocCopyBlock>^{B}*"*"+/{BN}+ {
7715 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7723 yyextra->docBlock << indent;
7726<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7727 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7731 yyextra->docBlock << indent;
7738<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7739 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7743 yyextra->docBlock << indent+
"*";
7750<DocCopyBlock>^{B}*"*"+/{BN}* {
7751 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7754 if (yyextra->nestedComment>0)
7757 yyextra->docBlock << indent+
"*";
7762 yyextra->docBlock << indent;
7770<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7776 yyextra->docBlock << pat;
7778<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7784 yyextra->docBlock << pat;
7786<DocCopyBlock>"```" {
7787 if (yyextra->docBlockName==
"``")
7789 yyextra->docBlock <<
"`";
7791 yyextra->docBlock <<
"``";
7796 yyextra->docBlock << yytext;
7799<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7804 yyextra->docBlock << yytext;
7806<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7811 yyextra->docBlock << yytext;
7813<DocCopyBlock>"`"{1,2} {
7818 yyextra->docBlock << yytext;
7820<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7821 yyextra->docBlock << yytext;
7824 yyextra->docBlock << yytext;
7825 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7829 yyextra->lastStringContext=YY_START;
7830 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7831 yyextra->stopAtInvalidString=
true;
7835<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7838 yyextra->nestedComment++;
7840 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7842 yyextra->nestedComment--;
7844 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7846 warn(yyextra->fileName,yyextra->yyLineNr,
7847 "Found end of C comment inside a '{}' block without matching start of the comment!"
7848 " Maybe the end marker for the block is missing?",
7849 yyextra->docBlockName);
7852 yyextra->docBlock << yytext;
7855 yyextra->docBlock << *yytext;
7859 yyextra->docBlock << *yytext;
7861<DocCopyBlock><<EOF>> {
7862 warn(yyextra->fileName,yyextra->yyLineNr,
7863 "reached end of file while inside a '{}' block!"
7864 " The command that should end the block seems to be missing!",
7865 yyextra->docBlockName);
7872<Prototype>"operator"{B}*"("{B}*")" {
7873 yyextra->current->name+=yytext;
7876 yyextra->current->args+=*yytext;
7877 yyextra->currentArgumentContext = PrototypeQual;
7878 yyextra->fullArgString = yyextra->current->args;
7879 yyextra->copyArgString = &yyextra->current->args;
7880 BEGIN( ReadFuncArgType ) ;
7882<Prototype>"("({ID}"::")*({B}*[&*])+ {
7883 if (yyextra->insidePHP)
7889 yyextra->current->type+=yyextra->current->name+yytext;
7890 yyextra->current->name.clear();
7891 BEGIN( PrototypePtr );
7894<PrototypePtr>{SCOPENAME} {
7895 yyextra->current->name+=yytext;
7898 yyextra->current->args+=*yytext;
7899 yyextra->currentArgumentContext = PrototypeQual;
7900 yyextra->fullArgString = yyextra->current->args;
7901 yyextra->copyArgString = &yyextra->current->args;
7902 BEGIN( ReadFuncArgType ) ;
7905 yyextra->current->type+=
')';
7909 yyextra->current->name+=yytext;
7912 BEGIN( PrototypeSkipLine);
7914<PrototypeQual>{B}*"const"{B}* {
7915 yyextra->current->args +=
" const ";
7916 yyextra->current->argList.setConstSpecifier(
true);
7918<PrototypeQual>{B}*"volatile"{B}* {
7919 yyextra->current->args +=
" volatile ";
7920 yyextra->current->argList.setVolatileSpecifier(
true);
7922<PrototypeQual>{B}*"="{B}*"0"{B}* {
7923 yyextra->current->args +=
" = 0";
7924 yyextra->current->virt = Specifier::Pure;
7925 yyextra->current->argList.setPureSpecifier(
true);
7927<PrototypeQual>"throw"{B}*"(" {
7928 yyextra->current->exception =
"throw(";
7929 BEGIN(PrototypeExc);
7932 yyextra->current->exception +=
')';
7933 BEGIN(PrototypeQual);
7936 yyextra->current->exception += *yytext;
7939 yyextra->current->args += *yytext;
7942 yyextra->current->name += *yytext;
7944<PrototypeSkipLine>. {
7950<SkipCxxComment>.*"\\\n" {
7951 if (yyextra->insideCS)
7960<SkipCxxComment>{ANYopt}/\n {
7961 BEGIN( yyextra->lastCContext ) ;
7963<SkipComment>[^\*\n]+
7968 if (!yyextra->insideCpp) REJECT;
7969 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7970 yyextra->lastC11AttributeContext = YY_START;
7971 yyextra->pCopyC11AttributeString = &yyextra->current->attributes;
7972 BEGIN( CopyC11Attribute );
7977 if (yyextra->insideIDL && yyextra->insideCppQuote)
7981 else if (yyextra->insidePHP)
7983 yyextra->lastStringContext=YY_START;
7988 if (!yyextra->insidePHP)
7990 yyextra->lastCPPContext = YY_START;
7995 yyextra->lastCContext = YY_START ;
7996 BEGIN( SkipCxxComment ) ;
8000 if (!yyextra->insidePHP)
8002 yyextra->lastCContext = YY_START ;
8003 BEGIN( SkipCxxComment ) ;
8006 if (yyextra->insidePHP)
8008 yyextra->lastStringContext=YY_START;
8009 BEGIN(SkipPHPString);
8013 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
8015 if (yyextra->current->type.empty())
8017 if (yyextra->current->name.empty())
8018 yyextra->current->name=
"?";
8020 yyextra->current->name+=
"?";
8024 yyextra->current->type+=
"?";
8028<*>"}" { yyextra->exported=
false; }
8030<SkipComment>{CPPC}|{CCS}
8031<*>{CCS} { yyextra->lastCContext = YY_START ;
8032 BEGIN( SkipComment ) ;
8034<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8036 yyextra->lastCContext = YY_START ;
8037 BEGIN( SkipCxxComment ) ;
8040 if (yyextra->insideCS && yyextra->fakeNS)
8044 BEGIN ( ReadNSBody);
8056 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8058 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8060 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8070 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8071 yyextra->outerScopeEntries.clear();
8072 yyextra->baseName.clear();
8073 yyextra->protection = Protection::Public;
8074 yyextra->baseProt = Protection::Public;
8075 yyextra->sharpCount = 0;
8076 yyextra->roundCount = 0;
8077 yyextra->curlyCount = 0;
8078 yyextra->mtype = MethodTypes::Method;
8079 yyextra->isStatic =
false;
8080 yyextra->virt = Specifier::Normal;
8081 yyextra->baseVirt = Specifier::Normal;
8082 yyextra->isTypedef =
false;
8083 yyextra->insideTryBlock =
false;
8084 yyextra->insideFormula =
false;
8085 yyextra->insideCode=
false;
8087 yyextra->previous = 0;
8088 yyextra->firstTypedefEntry.reset();
8089 yyextra->memspecEntry.reset();
8094 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8095 if (yyextra->insideJava)
8097 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8099 yyextra->current->protection = yyextra->protection;
8100 yyextra->current->exported = yyextra->exported ;
8101 yyextra->current->mtype = yyextra->mtype;
8102 yyextra->current->virt = yyextra->virt;
8103 yyextra->current->isStatic = yyextra->isStatic;
8104 yyextra->current->lang = yyextra->language;
8106 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8107 yyextra->isTypedef=
false;
8117 char result[md5_sig.size()*3+2];
8120 for (
size_t i=0;i<md5_sig.size();i++)
8122 static const char oct[]=
"01234567";
8123 uint8_t
byte = md5_sig[i];
8124 *p++=oct[(
byte>>6)&7];
8125 *p++=oct[(
byte>>3)&7];
8126 *p++=oct[(
byte>>0)&7];
8134 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8135 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8137 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8143 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8146 for (p = yytext ; *p ; ++p )
8150 yyextra->yyLineNr++;
8156 yyextra->column+=tabSize - (yyextra->column%tabSize);
8157 yyextra->yyColNr=1+yyextra->column;
8170 size_t col=startIndent;
8176 if (c==
'\t') col+=tabSize-(col%tabSize);
8177 else if (c==
'\n') col=0;
8185 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8186 yyextra->current->
protection = yyextra->protection = prot;
8187 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8188 yyextra->current->type.clear();
8189 yyextra->current->name.clear();
8190 yyextra->current->args.clear();
8191 yyextra->current->argList.clear();
8197 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8198 size_t tl=yyextra->current->type.length();
8199 if( tl>0 && !yyextra->current->name.empty() && yyextra->current->type.at(tl-1)!=
'.')
8201 yyextra->current->type +=
' ' ;
8203 yyextra->current->type += yyextra->current->name;
8204 yyextra->current->name.clear() ;
8205 tl=yyextra->current->type.length();
8206 if( tl>0 && !yyextra->current->args.empty() && yyextra->current->type.at(tl-1)!=
'.')
8208 yyextra->current->type +=
' ' ;
8210 yyextra->current->type += yyextra->current->args ;
8211 yyextra->current->args.clear() ;
8212 yyextra->current->argList.clear();
8219 if (s==
nullptr || *s==0)
return name;
8221 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8233 bool funcPtr = i>0 && type[i-1]==
')';
8235 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8236 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8237 return type.
left(i);
8243 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8246 yyextra->docBlock <<
"\\iskip";
8248 yyextra->docBlockName=blockName;
8249 yyextra->fencedSize=fencedSize;
8250 yyextra->isCodeBlock=codeBlock;
8251 yyextra->nestedComment=0;
8257 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8258 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8262 yyextra->docBlock <<
"\\endiskip";
8264 yyextra->docBlockName=
"";
8284 size_t i=name.
find(
"operator");
8286 if (i==0 && !
isId(name.
at(8)))
return true;
8287 if (i>0 && !
isId(name.
at(i-1)) && !
isId(name.
at(i+8)))
return true;
8295 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8297 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8298 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8299 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8300 yyextra->insideD = yyextra->language==SrcLangExt::D;
8301 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8302 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8303 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8304 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8305 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8306 yyextra->language==SrcLangExt::Lex);
8317 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8318 if (yyextra->current_root->section.isScope())
8321 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8323 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8325 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8335 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8336 if (!yyextra->fileName.lower().endsWith(
".c"))
return false;
8337 if (yyextra->current->argList.empty())
return false;
8338 for (
const Argument &a : yyextra->current->argList)
8349 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8350 if (yyextra->insideJava)
8353 yyextra->current->protection = Protection::Public;
8355 yyextra->current->protection = Protection::Protected;
8357 yyextra->current->protection = Protection::Private;
8359 yyextra->current->protection = Protection::Package;
8366 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8367 int si =
static_cast<int>(yyextra->current->args.length());
8368 if (yyextra->oldStyleArgType.empty())
8370 std::string args = yyextra->current->args.str();
8371 static const reg::Ex re(R
"(\([^)]*\).*)");
8377 bi1=(int)match.position();
8378 size_t secondMatchStart = match.position()+match.length();
8381 bi2=(int)match.position();
8385 if (bi1!=-1 && bi2!=-1)
8388 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8390 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8391 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8393 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8394 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8395 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8400 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8403 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8404 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8406 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8407 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8413 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8416 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8420 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8421 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8434 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8437 oldStyleArgPtr=yyextra->current->args.
left(j);
8456 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8457 for (
Argument &a : yyextra->current->argList)
8466 a.
docs=brief+
"\n\n"+docs;
8468 else if (!brief.
empty())
8498 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8501 yyextra->current->briefFile = yyextra->fileName;
8502 yyextra->current->briefLine = yyextra->yyLineNr;
8506 yyextra->current->docFile = yyextra->fileName;
8507 yyextra->current->docLine = yyextra->yyLineNr;
8515 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8516 if (yyextra->tempEntry==0)
8521 yyextra->previous = yyextra->current;
8522 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8526 yyextra->previous = yyextra->current;
8527 yyextra->current = yyextra->tempEntry;
8528 yyextra->tempEntry.reset();
8535 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8538 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8539 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8542 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8543 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8545 docEntry->inbodyFile = yyextra->fileName;
8546 docEntry->inbodyLine = lineNr;
8550 bool needsEntry=
false;
8552 Markdown markdown(yyextra->fileName,lineNr);
8555 while (yyextra->commentScanner.parseCommentBlock(
8556 yyextra->thisParser,
8557 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8561 yyextra->docBlockInBody ?
false : brief,
8562 yyextra->docBlockInBody ?
false : yyextra->docBlockAutoBrief,
8563 yyextra->docBlockInBody,
8564 yyextra->protection,
8575 DString docFile = yyextra->current->docFile;
8577 yyextra->current->docFile = docFile;
8578 yyextra->current->docLine = lineNr;
8586 if (yyextra->docBlockTerm)
8588 unput(yyextra->docBlockTerm);
8589 yyextra->docBlockTerm=0;
8596 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8607 DString orgDoc = yyextra->current->doc;
8608 DString orgBrief = yyextra->current->brief;
8609 int orgDocLine = yyextra->current->docLine;
8610 int orgBriefLine = yyextra->current->briefLine;
8612 yyextra->current->doc.
clear();
8613 yyextra->current->brief.clear();
8616 int lineNr = orgDocLine;
8618 Markdown markdown(yyextra->fileName,lineNr);
8621 while (yyextra->commentScanner.parseCommentBlock(
8622 yyextra->thisParser,
8623 yyextra->current.get(),
8630 yyextra->protection,
8639 if (needsEntry)
newEntry(yyscanner);
8645 a.
docs = yyextra->current->doc;
8648 yyextra->current->doc = orgDoc;
8649 yyextra->current->brief = orgBrief;
8650 yyextra->current->docLine = orgDocLine;
8651 yyextra->current->briefLine = orgBriefLine;
8662 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8663 for (
const auto &ce : rt->children())
8665 if (!ce->program.empty())
8669 yyextra->padCount=0;
8671 yyextra->programStr = ce->program.str();
8672 yyextra->inputString = yyextra->programStr.data();
8673 yyextra->inputPosition = 0;
8674 if (ce->section.isEnum() || ce->spec.isEnum())
8675 BEGIN( FindFields ) ;
8677 BEGIN( FindMembers ) ;
8678 yyextra->current_root = ce;
8679 yyextra->fileName = ce->fileName;
8681 yyextra->yyLineNr = ce->bodyLine;
8682 yyextra->yyColNr = ce->bodyColumn;
8683 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8685 yyextra->current = std::make_shared<Entry>();
8686 yyextra->isStatic =
false;
8691 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8693 ce->groups = rt->groups;
8696 size_t ni=ce->name.rfind(
"::");
8699 if ( ce->section.isClass() )
8701 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8703 yyextra->current->protection = yyextra->protection = Protection::Public ;
8705 else if (yyextra->insideJava)
8707 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8709 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8711 if (ce->lang==SrcLangExt::ObjC)
8713 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8717 yyextra->current->protection = yyextra->protection = Protection::Public ;
8722 yyextra->current->protection = yyextra->protection = Protection::Private ;
8725 else if (ce->section.isEnum() )
8727 yyextra->current->protection = yyextra->protection = ce->protection;
8729 else if (!ce->name.empty() && ce->name.at(ni)==
'@')
8731 if (ce->section.isNamespace() )
8733 yyextra->current->isStatic = yyextra->isStatic =
true;
8735 yyextra->current->protection = yyextra->protection = ce->protection;
8736 yyextra->current->exported = yyextra->exported =
false;
8738 else if (ce->section.isNamespace() )
8740 yyextra->current->protection = yyextra->protection = Protection::Public ;
8741 yyextra->current->exported = yyextra->exported = ce->exported;
8745 yyextra->current->protection = yyextra->protection = Protection::Public ;
8746 yyextra->current->exported = yyextra->exported =
false;
8748 yyextra->mtype = MethodTypes::Method;
8749 yyextra->virt = Specifier::Normal;
8756 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8758 scannerYYlex(yyscanner);
8761 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8763 yyextra->programStr.clear();
8764 ce->program.str(std::string());
8778 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8779 for (
const auto &ce : rt->children())
8781 if (ce->section.isConcept())
8785 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8787 yyextra->padCount =0;
8789 yyextra->programStr = ce->initializer.str();
8790 yyextra->inputString = yyextra->programStr.data();
8791 yyextra->inputPosition = 0;
8792 yyextra->current_root = ce;
8793 yyextra->fileName = ce->fileName;
8794 yyextra->yyLineNr = ce->bodyLine;
8795 yyextra->yyColNr = ce->bodyColumn;
8796 yyextra->insideObjC =
false;
8797 yyextra->current = std::make_shared<Entry>();
8801 indent.
fill(
' ',ce->startColumn?ce->startColumn-1:0);
8803 if (!ce->args.empty())
8805 templArgs=indent+
"template"+ce->args+
"\n";
8807 yyextra->current->initializer.
str(
DString(templArgs+indent+
"concept "+ce->name+
" =").
str());
8809 yyextra->isStatic =
false;
8811 yyextra->current->section = EntryType::makeConceptCodePart();
8812 yyextra->current->startLine = yyextra->yyLineNr;
8813 BEGIN( FindConceptParts );
8814 scannerYYlex(yyscanner);
8815 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8826 const char *fileBuf,
8827 const std::shared_ptr<Entry> &rt,
8831 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8834 yyextra->inputString = fileBuf;
8835 yyextra->inputPosition = 0;
8836 yyextra->column = 0;
8837 scannerYYrestart(
nullptr,yyscanner);
8840 yyextra->protection = Protection::Public;
8841 yyextra->mtype = MethodTypes::Method;
8842 yyextra->isStatic =
false;
8843 yyextra->exported =
false;
8844 yyextra->virt = Specifier::Normal;
8845 yyextra->current_root = rt;
8846 yyextra->yyLineNr = 1 ;
8847 yyextra->yyBegLineNr = 1;
8848 yyextra->yyBegColNr = 0;
8849 yyextra->anonCount = 0;
8850 yyextra->anonNSCount = 0;
8851 yyextra->fileName = fileName;
8852 yyextra->clangParser = clangParser;
8854 rt->lang = yyextra->language;
8855 msg(
"Parsing file {}...\n",yyextra->fileName);
8857 yyextra->current_root = rt;
8859 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8860 yyextra->current = std::make_shared<Entry>();
8865 yyextra->current->name = yyextra->fileName;
8866 yyextra->current->section = sec;
8867 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8869 yyextra->current->reset();
8871 if ( yyextra->insidePHP )
8873 BEGIN( FindMembersPHP );
8875 else if ( yyextra->insideJava )
8877 yyextra->current->name=
"java::lang";
8878 yyextra->current->fileName = yyextra->fileName;
8879 yyextra->current->section = EntryType::makeUsingDir();
8880 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8882 BEGIN( FindMembers );
8886 BEGIN( FindMembers );
8889 scannerYYlex(yyscanner);
8891 if (YY_START==Comment)
8893 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8897 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8899 yyextra->programStr.clear();
8900 rt->program.str(std::string());
8905 yyextra->anonNSCount++;
8908 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8911 parent->moveToSubEntryAndKeep(child);
8913 yyextra->outerScopeEntries.clear();
8922 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8925 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8928 if (!yyextra->current)
8933 const char *orgInputString;
8934 int orgInputPosition;
8935 YY_BUFFER_STATE orgState;
8938 orgState = YY_CURRENT_BUFFER;
8939 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8940 orgInputString = yyextra->inputString;
8941 orgInputPosition = yyextra->inputPosition;
8944 yyextra->inputString = text.
data();
8945 yyextra->inputPosition = 0;
8946 yyextra->column = 0;
8947 scannerYYrestart(
nullptr, yyscanner);
8949 scannerYYlex(yyscanner);
8951 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8952 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.empty())
8954 yyextra->current->section = EntryType::makeVariableDoc();
8958 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8959 yy_switch_to_buffer(orgState, yyscanner);
8960 yyextra->inputString = orgInputString;
8961 yyextra->inputPosition = orgInputPosition;
8977 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8985 scannerYYlex_destroy(
p->yyscanner);
8989 const char *fileBuf,
8990 const std::shared_ptr<Entry> &root,
8994 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8995 yyextra->thisParser =
this;
8999 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
9007 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
9008 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
9009 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
9020#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)
Protection protection
class protection
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)