15%option never-interactive
16%option prefix="scannerYY"
18%option extra-type="struct scannerYY_state *"
22#define YY_TYPEDEF_YY_SCANNER_T
62#define YY_NO_UNISTD_H 1
230static inline int computeIndent(
const char *s,
int startIndent);
261#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
This class represents an function or template argument list.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
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 void initParser(yyscan_t yyscanner)
static void startCommentBlock(yyscan_t yyscanner, bool brief)
static void handleCommentBlock(yyscan_t yyscanner, const DString &doc, bool brief)
static void initEntry(yyscan_t yyscanner)
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 setContext(yyscan_t yyscanner)
static bool startOfRequiresExpression(const DString &req)
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 void initMethodProtection(yyscan_t yyscanner, Protection prot)
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 void setJavaProtection(yyscan_t yyscanner)
static void addType(yyscan_t yyscanner)
static DString stripQuotes(const char *s)
Some helper functions for std::string.
TextStream * pSkipInterpString
EntryRelations outerScopeEntries
int lastCopyArgStringContext
std::shared_ptr< Entry > firstTypedefEntry
int lastDeprecatedContext
bool insideJS
processing JavaScript code?
OutlineParserInterface * thisParser
std::shared_ptr< Entry > tempEntry
std::shared_ptr< Entry > memspecEntry
TextStream * pCopySquareGString
int lastInitializerContext
std::shared_ptr< Entry > previous
int lastPreLineCtrlContext
ClangTUParser * clangParser
bool insideCS
processing C# code?
ArgumentList * currentArgumentList
DString * pCopyC11AttributeString
TextStream * pCopyCurlyGString
int lastCommentInArgContext
DString * pCopyRoundString
int lastSkipInterpVerbStringContext
TextStream * pSkipVerbString
std::pair< Entry *, std::shared_ptr< Entry > > EntryRelation
int lastC11AttributeContext
DString * pCopyCurlyString
bool insidePHP
processing PHP code?
std::shared_ptr< Entry > current_root
CommentScanner commentScanner
bool insideIDL
processing IDL code?
bool insideSlice
processing Slice code?
TextStream * pCopyHereDocGString
bool insideObjC
processing Objective C code?
bool insideCli
processing C++/CLI code?
int currentArgumentContext
DString * pCopySharpString
DString * pCopyQuotedString
int lastSkipVerbStringContext
TextStream * pCopyRawGString
TextStream * pCopyQuotedGString
TextStream * pSkipInterpVerbString
std::shared_ptr< Entry > current
int lastSkipInterpStringContext
bool insideD
processing D code?
std::vector< EntryRelation > EntryRelations
TextStream * pCopyRoundGString
bool insideCpp
processing C/C++ code
TextStream dummyTextStream
int lastClassTemplSpecContext
bool insideJava
processing Java code?
A bunch of utility functions.
276NOTopt (("!"{BNopt})|("not"{BN}+))?
278HEXDIGIT ({DIGIT}|[a-f]|[A-F])
279ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
280SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)(((~|!){BN}*)?{ID})
281TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&,:]*">")?
282CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
285CHARLIT (("'"\\x[0-9a-fA-F]{1,2}"'")|("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
286PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
287PHPUSEKW ("public"|"private"|"protected")
288IDLATTR ("["[^\]]*"]"){BN}*
289TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
290RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
291RAWEND ")"[^ \t\(\)\\]{0,16}\"
292ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
293ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
294LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"|"<=>"
295BITOP "&"|"|"|"^"|"<<"|">>"|"~"
296OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
297FUNCOP "operator"("()"|"[]"|{B}+[^;\n]+)
298MODULE_ID ({ID}".")*{ID}
299LINENR {B}*[1-9][0-9]*
300FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
301FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
302FILECHARS {FILEICHAR}*{FILEECHAR}+
303HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
304VFILEMASK {FILECHARS}("."{FILECHARS})*
305FILEMASK {VFILEMASK}|{HFILEMASK}
316DCOMMC ("/\*!"|"/\**")
318DCOMMCPP ("/\/!"|"/\/\/")
320DCOMM {DCOMMC}|{DCOMMCPP}
391%x TryFunctionBlockEnd
406%x SkipInterpVerbString
421%x UNOIDLAttributeBlock
451%x SpecializationSingleQuote
452%x SpecializationDoubleQuote
485%x SliceDictionaryName
516<*>"DEPRECATED_ATTRIBUTE" {
517 if (!yyextra->insideObjC) REJECT;
519<*>"DEPRECATED_MSG_ATTRIBUTE(\"" {
520 if (!yyextra->insideObjC) REJECT;
521 yyextra->lastDeprecatedContext=YY_START;
522 yyextra->lastStringContext=Deprecated_round;
525<Deprecated_round>")" {
526 BEGIN(yyextra->lastDeprecatedContext);
528<Deprecated_round>{BNopt} {
531<Deprecated_round>. { }
533 yyextra->curlyCount=0;
534 yyextra->needsSemi =
true;
535 BEGIN(SkipCurlyBlock);
538 yyextra->roundCount=0;
539 BEGIN(SkipRoundBlock);
542 ++yyextra->roundCount;
545 if (yyextra->roundCount )
546 --yyextra->roundCount ;
551 ++yyextra->curlyCount ;
554 if( yyextra->curlyCount )
556 --yyextra->curlyCount ;
558 else if (yyextra->needsSemi)
564 BEGIN( FindMembers );
568 if (yyextra->insidePHP)
570 yyextra->lastStringContext=NextSemi;
571 BEGIN(SkipPHPString);
574<NextSemi>{CHARLIT} {
if (yyextra->insidePHP) REJECT; }
576 yyextra->lastStringContext=NextSemi;
581 BEGIN( FindMembers );
585 BEGIN( FindMembers );
588 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
592<FindMembers>"<?php" {
593 yyextra->insidePHP =
true;
595<FindMembersPHP>"<?"("php"?) {
596 BEGIN( FindMembers );
598<FindMembersPHP>"<script"{BN}+"language"{BN}*"="{BN}*['"]?"php"['"]?{BN}*">" {
600 BEGIN( FindMembers );
602<FindMembers>"?>"|"</script>" {
603 if (yyextra->insidePHP)
604 BEGIN( FindMembersPHP );
608<FindMembersPHP>[^\n<]+ {
615<FindMembers>{PHPKW} {
if (yyextra->insidePHP)
620<FindMembers>"%{"[^\n]* {
621 if (!yyextra->insideIDL)
625 if (!yyextra->insideIDL)
628<FindMembers>{B}*("properties"){BN}*":"{BN}* {
630 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
633<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* {
635 yyextra->current->mtype = yyextra->mtype = MethodTypes::DCOP;
638<FindMembers>{B}*("signals"|"Q_SIGNALS"){BN}*":"{BN}* {
640 yyextra->current->mtype = yyextra->mtype = MethodTypes::Signal;
643<FindMembers>{B}*"public"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
645 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
648<FindMembers>{B}*"protected"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
650 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
653<FindMembers>{B}*"private"{BN}*("slots"|"Q_SLOTS"){BN}*":"{BN}* {
655 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
657<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
660<FindMembers>{B}*"internal"{BN}*":"{BN}* {
661 if (yyextra->insideCli)
670<FindMembers>{B}*"protected"{BN}*":"{BN}* {
673<FindMembers>{B}*"private"{BN}*":"{BN}* {
676<FindMembers>{B}*"public"/({BN}|{CCS}|{CPPC}) {
677 if (!yyextra->insideCpp) REJECT;
681<FindMembers>{B}*"protected"/({BN}|{CCS}|{CPPC}) {
682 if (!yyextra->insideCpp) REJECT;
686<FindMembers>{B}*"private"/({BN}|{CCS}|{CPPC}) {
687 if (!yyextra->insideCpp) REJECT;
699<CppProt>{CPPC}.*\n {
lineCount(yyscanner); }
700<CppProt>{CCS} { yyextra->lastCContext = YY_START ;
701 BEGIN( SkipComment ) ;
703<CppProt>("slots"|"Q_SLOTS") {
704 yyextra->current->mtype = yyextra->mtype = MethodTypes::Slot;
706<FindMembers>{B}*"event"{BN}+ {
707 if (yyextra->insideCli)
711 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
712 yyextra->current->bodyLine = yyextra->yyLineNr;
713 yyextra->current->bodyColumn = yyextra->yyColNr;
714 yyextra->curlyCount=0;
715 BEGIN( CliPropertyType );
717 else if (yyextra->insideCS)
720 yyextra->current->mtype = MethodTypes::Event;
721 yyextra->current->bodyLine = yyextra->yyLineNr;
722 yyextra->current->bodyColumn = yyextra->yyColNr;
729<FindMembers>{B}*"property"{BN}+ {
730 if (yyextra->insideCli)
734 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
735 yyextra->current->bodyLine = yyextra->yyLineNr;
736 yyextra->current->bodyColumn = yyextra->yyColNr;
737 yyextra->curlyCount=0;
738 BEGIN( CliPropertyType );
745<CliPropertyType>{ID} {
747 yyextra->current->name = yytext;
749<CliPropertyType>"[" {
750 yyextra->current->args =
"[";
751 BEGIN( CliPropertyIndex );
753<CliPropertyType>"{" {
754 yyextra->curlyCount=0;
756 BEGIN( CSAccessorDecl );
758<CliPropertyType>";" {
760 BEGIN( FindMembers );
765<CliPropertyType>{B}* {
769 yyextra->current->type += yytext;
771<CliPropertyIndex>"]" {
772 BEGIN( CliPropertyType );
773 yyextra->current->args+=yytext;
776 yyextra->current->args+=yytext;
791<FindMembers>{B}*"@private"{BN}+ {
794<FindMembers>{B}*"@protected"{BN}+ {
797<FindMembers>{B}*"@public"{BN}+ {
800<FindMembers>[\-+]{BN}* {
801 if (!yyextra->insideObjC)
807 yyextra->current->fileName = yyextra->fileName;
808 yyextra->current->startLine = yyextra->yyLineNr;
809 yyextra->current->startColumn = yyextra->yyColNr;
810 yyextra->current->bodyLine = yyextra->yyLineNr;
811 yyextra->current->bodyColumn = yyextra->yyColNr;
812 yyextra->current->section = EntryType::makeFunction();
813 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
814 yyextra->insideObjC =
true;
815 yyextra->yyBegColNr = yyextra->yyColNr;
816 yyextra->yyBegLineNr = yyextra->yyLineNr;
817 yyextra->current->virt = Specifier::Virtual;
819 yyextra->current->isStatic=yytext[0]==
'+';
825 BEGIN( ObjCReturnType );
826 yyextra->current->type.clear();
827 yyextra->roundCount=0;
830 if (yyextra->current->type.empty())
832 yyextra->current->type +=
"id";
834 yyextra->current->name = yytext;
838 yyextra->current->name +=
':';
840 yyextra->current->argList.push_back(a);
This class contains the information about the argument of a function or template.
843<ObjCReturnType>[^()]* {
844 yyextra->current->type += yytext;
846<ObjCReturnType>"(^)(" {
847 yyextra->current->type += yytext;
848 yyextra->roundCount++;
851 yyextra->current->type += yytext;
852 yyextra->roundCount++;
855 if (yyextra->roundCount<=0)
861 yyextra->current->type += yytext;
862 yyextra->roundCount--;
865<ObjCParams>({ID})?{BN}*":" {
870 yyextra->current->name +=
" :";
874 yyextra->current->name += keyw+
":";
876 if (yyextra->current->argList.back().type.empty())
878 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.
884<ObjCParams>{ID}{BN}* {
886 yyextra->current->argList.back().name=
DString(yytext).stripWhiteSpace();
888<ObjCParams>","{BN}*"..." {
903 yyextra->roundCount=0;
904 yyextra->current->argList.back().type.clear();
905 BEGIN( ObjCParamType );
908 yyextra->roundCount++;
909 yyextra->current->argList.back().type+=yytext;
911<ObjCParamType>")"/{B}* {
912 if (yyextra->roundCount<=0)
918 yyextra->current->argList.back().type+=yytext;
919 yyextra->roundCount--;
922<ObjCParamType>[^()]* {
923 yyextra->current->argList.back().type+=
DString(yytext).stripWhiteSpace();
925<ObjCMethod,ObjCParams>";" {
926 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
928 yyextra->current->argList.back().type=
"id";
930 if (yyextra->current->argList.empty())
932 yyextra->current->argList.setNoParameters(
true);
DString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
939<ObjCMethod,ObjCParams>(";"{BN}+)?"{" {
944 if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.empty())
946 yyextra->current->argList.back().type=
"id";
948 if (yyextra->current->argList.empty())
950 yyextra->current->argList.setNoParameters(
true);
956<FindMembers>{B}*"sequence"{BN}*"<"{BN}* {
957 if (yyextra->insideSlice)
960 yyextra->current->bodyLine = yyextra->yyLineNr;
961 yyextra->current->bodyColumn = yyextra->yyColNr;
962 yyextra->current->fileName = yyextra->fileName ;
963 yyextra->current->startLine = yyextra->yyLineNr ;
964 yyextra->current->startColumn = yyextra->yyColNr;
965 yyextra->current->args.clear();
966 yyextra->current->section = EntryType::makeTypedef();
967 yyextra->isTypedef =
true;
968 BEGIN( SliceSequence );
973<FindMembers>{B}*"dictionary"{BN}*"<"{BN}* {
974 if (yyextra->insideSlice)
977 yyextra->current->bodyLine = yyextra->yyLineNr;
978 yyextra->current->bodyColumn = yyextra->yyColNr;
979 yyextra->current->fileName = yyextra->fileName ;
980 yyextra->current->startLine = yyextra->yyLineNr ;
981 yyextra->current->startColumn = yyextra->yyColNr;
982 yyextra->current->args.clear();
983 yyextra->current->section = EntryType::makeTypedef() ;
984 yyextra->isTypedef =
true;
985 BEGIN( SliceDictionary );
990<FindMembers>{BN}{1,80} {
993<FindMembers>"@"({ID}".")*{ID}{BN}*"(" {
994 if (yyextra->insideJava)
997 yyextra->lastSkipRoundContext = YY_START;
998 yyextra->roundCount=0;
1003 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1004 yyextra->current->spec.setReadable(
true).setWritable(
true).setAssign(
true);
1005 yyextra->current->protection = Protection::Public ;
1007 BEGIN( ObjCPropAttr );
bool literal_at(const char *data, const char(&str)[N])
returns true iff data points to a substring that matches string literal str
1014<ObjCPropAttr>"getter="{ID} {
1015 yyextra->current->read = yytext+7;
1017<ObjCPropAttr>"setter="{ID} {
1018 yyextra->current->write = yytext+7;
1020<ObjCPropAttr>"readonly" {
1021 yyextra->current->spec.setWritable(
false);
1023<ObjCPropAttr>"readwrite" {
1025<ObjCPropAttr>"assign" {
1027<ObjCPropAttr>"unsafe_unretained" {
1028 yyextra->current->spec.setAssign(
false);
1029 yyextra->current->spec.setUnretained(
true);
1031<ObjCPropAttr>"retain" {
1032 yyextra->current->spec.setAssign(
false);
1033 yyextra->current->spec.setRetain(
true);
1035<ObjCPropAttr>"copy" {
1036 yyextra->current->spec.setAssign(
false);
1037 yyextra->current->spec.setCopy(
true);
1039<ObjCPropAttr>"weak" {
1040 yyextra->current->spec.setAssign(
false);
1041 yyextra->current->spec.setWeak(
true);
1043<ObjCPropAttr>"strong" {
1044 yyextra->current->spec.setAssign(
false);
1045 yyextra->current->spec.setStrong(
true);
1047<ObjCPropAttr>"nonatomic" {
1048 yyextra->current->spec.setNonAtomic(
true);
1053<FindMembers>"@"{ID}("."{ID})+ {
1054 if (yyextra->insideJava)
1063<FindMembers>"@"{ID} {
1064 if (yyextra->insideJava)
1068 else if (
dstrcmp(yytext,
"@property")==0)
1070 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
1071 yyextra->current->spec.setWritable(
true).setReadable(
true);
1072 yyextra->current->protection = Protection::Public ;
1074 else if (
dstrcmp(yytext,
"@synthesize")==0)
1076 BEGIN( ObjCSkipStatement );
1078 else if (
dstrcmp(yytext,
"@dynamic")==0)
1080 BEGIN( ObjCSkipStatement );
int dstrcmp(const char *str1, const char *str2)
1087<ObjCSkipStatement>";" {
1090<PackageName>{ID}(("."|"\\"){ID})* {
1091 yyextra->isTypedef=
false;
1093 yyextra->current->name = yytext;
1094 yyextra->current->name =
substitute(yyextra->current->name,
".",
"::");
1095 yyextra->current->name =
substitute(yyextra->current->name,
"\\",
"::");
1096 yyextra->current->section = EntryType::makeNamespace();
1097 yyextra->current->type =
"namespace" ;
1098 yyextra->current->fileName = yyextra->fileName;
1099 yyextra->current->startLine = yyextra->yyLineNr;
1100 yyextra->current->startColumn = yyextra->yyColNr;
1101 yyextra->current->bodyLine = yyextra->yyLineNr;
1102 yyextra->current->bodyColumn = yyextra->yyColNr;
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
1106 std::shared_ptr<Entry> tmp = yyextra->current;
1107 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1108 yyextra->current_root = std::move(tmp);
1113 yyextra->curlyCount=0;
1114 BEGIN( ReadNSBody );
1116<FindMembers>{B}*"export"{BN}+"module"{BN}+ {
1117 if (!yyextra->insideCpp) REJECT;
1119 yyextra->current->exported =
true;
1121 BEGIN( ModuleName );
1123<FindMembers>{B}*"module"{BN}*";" {
1124 if (!yyextra->insideCpp) REJECT;
1125 if (!yyextra->current->type.empty() || !yyextra->current->name.empty()) REJECT;
1128 BEGIN( FindMembers );
1130<FindMembers>{B}*"module"{BN}+ {
1131 if (!yyextra->insideCpp) REJECT;
1133 yyextra->current->exported =
false;
1135 BEGIN( ModuleName );
1137<FindMembers>{B}*"export"{BN}+"import"{BN}+ {
1138 if (!yyextra->insideCpp) REJECT;
1139 yyextra->current->exported =
true;
1141 BEGIN( ModuleImport );
1143<FindMembers>{B}*"import"{BN}+ {
1144 if (!yyextra->insideCpp) REJECT;
1146 BEGIN( ModuleImport );
1148<ModuleName>{MODULE_ID}{BN}*":"{BN}*{MODULE_ID} {
1150 size_t i = name.
find(
':');
1156 yyextra->current->exported,
1159 yyextra->current->section = EntryType::makeModuleDoc();
1160 yyextra->isTypedef=
false;
1162 yyextra->current->type +=
" module";
1163 yyextra->current->fileName = yyextra->fileName;
1164 yyextra->current->startLine = yyextra->yyLineNr;
1165 yyextra->current->startColumn = yyextra->yyColNr;
1166 yyextra->current->bodyLine = yyextra->yyLineNr;
1167 yyextra->current->bodyColumn = yyextra->yyColNr;
1168 yyextra->current->name = name+
":"+partition;
DString mid(size_t index, size_t len=npos) const
size_t find(char c, size_t pos=0) const
static ModuleManager & instance()
void createModuleDef(const DString &fileName, int line, int column, bool exported, const DString &moduleName, const DString &partitionName=DString())
1171<ModuleName>{MODULE_ID} {
1175 yyextra->current->exported,
1177 yyextra->current->section = EntryType::makeModuleDoc();
1178 yyextra->isTypedef=
false;
1180 yyextra->current->type +=
" module";
1181 yyextra->current->fileName = yyextra->fileName;
1182 yyextra->current->startLine = yyextra->yyLineNr;
1183 yyextra->current->startColumn = yyextra->yyColNr;
1184 yyextra->current->bodyLine = yyextra->yyLineNr;
1185 yyextra->current->bodyColumn = yyextra->yyColNr;
1186 yyextra->current->name = yytext;
1189<ModuleName>":"{BN}+"private" {
1190 yyextra->current->exported = yyextra->exported =
false;
1193<ModuleName>";" { unput(
';');
1198<ModuleImport>"\""[^"\n]*"\"" {
1201 DString(yytext).mid(1,yyleng-2),
void addHeader(const DString &moduleFile, int line, const DString &headerName, bool isSystem)
1204<ModuleImport>"<"[^>\n]*">" {
1207 DString(yytext).mid(1,yyleng-2),
1210<ModuleImport>{MODULE_ID}?{BN}*":"{BN}*{MODULE_ID} {
1212 size_t i = name.
find(
':');
1218 yyextra->current->exported,
void addImport(const DString &moduleFile, int line, const DString &importName, bool isExported, const DString &partitionName=DString())
1222<ModuleImport>{MODULE_ID} {
1226 yyextra->current->exported);
1229<ModuleImport>";" { BEGIN(FindMembers); }
1230<ModuleImport>\n {
lineCount(yyscanner); }
1232<FindMembers>{B}*"export"{BN}+"{" {
1233 yyextra->current->exported = yyextra->exported =
true;
1235<FindMembers>{B}*"export"{BN}+ {
1236 if (!yyextra->insideCpp) REJECT;
1237 yyextra->current->exported=
true;
1239<FindMembers>{B}*"initonly"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1240 yyextra->current->type +=
" initonly ";
1241 if (yyextra->insideCli) yyextra->current->spec.setInitonly(
true);
1244<FindMembers>{B}*"static"{BN}*/"{" { yyextra->current->type +=
" static ";
1245 yyextra->current->isStatic =
true;
1248<FindMembers>{B}*"static"{BN}+ { yyextra->current->type +=
" static ";
1249 yyextra->current->isStatic =
true;
1252<FindMembers>{B}*"extern"{BN}+ {
if (yyextra->insideJava) REJECT;
1253 yyextra->current->isStatic =
false;
1254 yyextra->current->explicitExternal =
true;
1257<FindMembers>{B}*"const"{BN}+ {
if (yyextra->insideCS)
1259 yyextra->current->type +=
" const ";
1260 if (yyextra->insideCS) yyextra->current->isStatic =
true;
1268<FindMembers>{B}*"virtual"{BN}+ {
if (yyextra->insideJava) REJECT;
1269 yyextra->current->type +=
" virtual ";
1270 yyextra->current->virt = Specifier::Virtual;
1273<FindMembers>{B}*"constexpr"{BN}+ {
1274 if (yyextra->insideCpp)
1276 yyextra->current->spec.setConstExpr(
true);
1280<FindMembers>{B}*"consteval"{BN}+ {
1281 if (yyextra->insideCpp)
1283 yyextra->current->spec.setConstEval(
true);
1287<FindMembers>{B}*"constinit"{BN}+ {
1288 if (yyextra->insideCpp)
1290 yyextra->current->spec.setConstInit(
true);
1294<FindMembers>{B}*"published"{BN}+ {
1295 if (yyextra->insideIDL)
1298 yyextra->current->spec.setPublished(
true);
1305<FindMembers>{B}*"sealed"{BN}+ {
1306 if (yyextra->insideCS)
1308 yyextra->current->spec.setSealed(
true);
1315<FindMembers>{B}*"abstract"{BN}+ {
1316 if (yyextra->insidePHP || yyextra->insideCS)
1318 yyextra->current->spec.setAbstract(
true);
1322 if (yyextra->insideCpp) REJECT;
1323 yyextra->current->type +=
" abstract ";
1324 if (!yyextra->insideJava)
1326 yyextra->current->virt = Specifier::Pure;
1330 yyextra->current->spec.setAbstract(
true);
1335<FindMembers>{B}*"inline"{BN}+ {
if (yyextra->insideJava) REJECT;
1336 yyextra->current->spec.setInline(
true);
1339<FindMembers>{B}*"mutable"{BN}+ {
if (yyextra->insideJava) REJECT;
1340 yyextra->current->spec.setMutable(
true);
1343<FindMembers>{B}*"thread_local"{BN}+ {
if (yyextra->insideJava) REJECT;
1344 yyextra->current->spec.setThreadLocal(
true);
1347<FindMembers>{B}*"explicit"{BN}+ {
if (yyextra->insideJava) REJECT;
1348 yyextra->current->spec.setExplicit(
true);
1351<FindMembers>{B}*"local"{BN}+ {
if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1352 yyextra->current->spec.setLocal(
true);
1355<FindMembers>{B}*"@required"{BN}+ {
1356 yyextra->current->spec.setOptional(
false).setRequired(
true);
1359<FindMembers>{B}*"@optional"{BN}+ {
1360 yyextra->current->spec.setRequired(
false).setOptional(
true);
1368<FindMembers>{B}*"typename"{BN}+ {
lineCount(yyscanner); }
1369<FindMembers>{B}*"namespace"{BNopt}/[^a-z_A-Z0-9] {
if (yyextra->insideJava) REJECT;
1370 yyextra->isTypedef=
false;
1371 yyextra->current->section = EntryType::makeNamespace();
1372 yyextra->current->type =
"namespace" ;
1373 yyextra->current->fileName = yyextra->fileName;
1374 yyextra->current->startLine = yyextra->yyLineNr;
1375 yyextra->current->startColumn = yyextra->yyColNr;
1376 yyextra->current->bodyLine = yyextra->yyLineNr;
1377 yyextra->current->bodyColumn = yyextra->yyColNr;
1379 if (yyextra->insidePHP)
1381 BEGIN( PackageName );
1385 BEGIN( CompoundName );
1388<FindMembers>{B}*"module"{BN}+ {
1390 if (yyextra->insideIDL || yyextra->insideSlice)
1392 yyextra->isTypedef=
false;
1393 yyextra->current->section = EntryType::makeNamespace();
1394 yyextra->current->type =
"module" ;
1395 yyextra->current->fileName = yyextra->fileName;
1396 yyextra->current->startLine = yyextra->yyLineNr;
1397 yyextra->current->startColumn = yyextra->yyColNr;
1398 yyextra->current->bodyLine = yyextra->yyLineNr;
1399 yyextra->current->bodyColumn = yyextra->yyColNr;
1400 BEGIN( CompoundName );
1402 else if (yyextra->insideD)
1410 yyextra->current->name =
DString(yytext).stripWhiteSpace();
1413<FindMembers>{B}*"library"{BN}+ {
1415 if (yyextra->insideIDL)
1417 yyextra->isTypedef=
false;
1418 yyextra->current->section = EntryType::makeNamespace();
1419 yyextra->current->type =
"library" ;
1420 yyextra->current->fileName = yyextra->fileName;
1421 yyextra->current->startLine = yyextra->yyLineNr;
1422 yyextra->current->startColumn = yyextra->yyColNr;
1423 yyextra->current->bodyLine = yyextra->yyLineNr;
1424 yyextra->current->bodyColumn = yyextra->yyColNr;
1425 BEGIN( CompoundName );
1430 yyextra->current->name =
DString(yytext).stripWhiteSpace();
1433<FindMembers>{B}*"constants"{BN}+ {
1435 if (yyextra->insideIDL)
1437 yyextra->isTypedef=
false;
1438 yyextra->current->section = EntryType::makeNamespace();
1439 yyextra->current->type =
"constants";
1440 yyextra->current->fileName = yyextra->fileName;
1441 yyextra->current->startLine = yyextra->yyLineNr;
1442 yyextra->current->startColumn = yyextra->yyColNr;
1443 yyextra->current->bodyLine = yyextra->yyLineNr;
1444 yyextra->current->bodyColumn = yyextra->yyColNr;
1445 BEGIN( CompoundName );
1450 yyextra->current->name =
DString(yytext).stripWhiteSpace();
1453<FindMembers>{BN}*("service"){BN}+ {
1455 if (yyextra->insideIDL)
1457 yyextra->isTypedef=
false;
1458 yyextra->current->section = EntryType::makeClass();
1462 setOptional(spec.isOptional()).setPublished(spec.isPublished());
1464 yyextra->current->type +=
" service " ;
1465 yyextra->current->fileName = yyextra->fileName;
1466 yyextra->current->startLine = yyextra->yyLineNr;
1467 yyextra->current->bodyLine = yyextra->yyLineNr;
1468 yyextra->current->bodyColumn = yyextra->yyColNr;
1469 BEGIN( CompoundName );
1474 yyextra->current->name =
DString(yytext).stripWhiteSpace();
Wrapper class for a number of boolean properties.
constexpr TypeSpecifier() noexcept
1477<FindMembers>{BN}*("singleton"){BN}+ {
1479 if (yyextra->insideIDL)
1481 yyextra->isTypedef=
false;
1482 yyextra->current->section = EntryType::makeClass();
1484 yyextra->current->spec =
TypeSpecifier().setSingleton(
true).
1485 setPublished(spec.isPublished());
1487 yyextra->current->type +=
" singleton " ;
1488 yyextra->current->fileName = yyextra->fileName;
1489 yyextra->current->startLine = yyextra->yyLineNr;
1490 yyextra->current->bodyLine = yyextra->yyLineNr;
1491 yyextra->current->bodyColumn = yyextra->yyColNr;
1492 BEGIN( CompoundName );
1497 yyextra->current->name =
DString(yytext).stripWhiteSpace();
1500<FindMembers>{BN}*((("disp")?"interface")|"valuetype"){BN}+ {
1502 if (yyextra->insideIDL || yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideSlice)
1504 yyextra->isTypedef=
false;
1505 yyextra->current->section = EntryType::makeClass();
1507 yyextra->current->spec =
TypeSpecifier().setInterface(
true).
1509 setOptional(spec.isOptional()).
1510 setPublished(spec.isPublished()).
1511 setLocal(spec.isLocal());
1513 yyextra->current->type +=
" interface" ;
1514 yyextra->current->fileName = yyextra->fileName;
1515 yyextra->current->startLine = yyextra->yyLineNr;
1516 yyextra->current->startColumn = yyextra->yyColNr;
1517 yyextra->current->bodyLine = yyextra->yyLineNr;
1518 yyextra->current->bodyColumn = yyextra->yyColNr;
1520 BEGIN( CompoundName );
1525 yyextra->current->name =
DString(yytext).stripWhiteSpace();
1528<FindMembers>{B}*"@implementation"{BN}+ {
1530 yyextra->isTypedef=
false;
1531 yyextra->current->section = EntryType::makeObjcImpl();
1532 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1533 yyextra->insideObjC =
true;
1534 yyextra->current->protection = yyextra->protection = Protection::Public ;
1536 yyextra->current->type +=
" implementation" ;
1537 yyextra->current->fileName = yyextra->fileName;
1538 yyextra->current->startLine = yyextra->yyLineNr;
1539 yyextra->current->bodyLine = yyextra->yyLineNr;
1540 yyextra->current->bodyColumn = yyextra->yyColNr;
1541 BEGIN( CompoundName );
1543<FindMembers>{B}*"@interface"{BN}+ {
1545 yyextra->isTypedef=
false;
1546 yyextra->current->section = EntryType::makeClass();
1547 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1548 if (!yyextra->insideJava)
1550 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1551 yyextra->insideObjC =
true;
1553 yyextra->current->protection = yyextra->protection = Protection::Public ;
1555 yyextra->current->type +=
" interface" ;
1556 yyextra->current->fileName = yyextra->fileName;
1557 yyextra->current->startLine = yyextra->yyLineNr;
1558 yyextra->current->startColumn = yyextra->yyColNr;
1559 yyextra->current->bodyLine = yyextra->yyLineNr;
1560 yyextra->current->bodyColumn = yyextra->yyColNr;
1561 BEGIN( CompoundName );
1563<FindMembers>{B}*"@protocol"{BN}+ {
1565 yyextra->isTypedef=
false;
1566 yyextra->current->section = EntryType::makeClass();
1568 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1569 yyextra->insideObjC =
true;
1570 yyextra->current->protection = yyextra->protection = Protection::Public ;
1572 yyextra->current->type +=
" protocol" ;
1573 yyextra->current->fileName = yyextra->fileName;
1574 yyextra->current->startLine = yyextra->yyLineNr;
1575 yyextra->current->startColumn = yyextra->yyColNr;
1576 yyextra->current->bodyLine = yyextra->yyLineNr;
1577 yyextra->current->bodyColumn = yyextra->yyColNr;
1578 BEGIN( CompoundName );
1580<FindMembers>{B}*"exception"{BN}+ {
1581 if (yyextra->insideJava || yyextra->insideCpp) REJECT;
1582 yyextra->isTypedef=
false;
1583 yyextra->current->section = EntryType::makeClass();
1586 yyextra->current->spec =
TypeSpecifier().setException(
true).
1587 setPublished(spec.isPublished()).setLocal(spec.isLocal());
1589 yyextra->current->type +=
" exception" ;
1590 yyextra->current->fileName = yyextra->fileName;
1591 yyextra->current->startLine = yyextra->yyLineNr;
1592 yyextra->current->startColumn = yyextra->yyColNr;
1593 yyextra->current->bodyLine = yyextra->yyLineNr;
1594 yyextra->current->bodyColumn = yyextra->yyColNr;
1596 BEGIN( CompoundName );
1598<FindMembers>"@class" |
1599<FindMembers>{B}*{TYPEDEFPREFIX}"class{" |
1600<FindMembers>{B}*{TYPEDEFPREFIX}"class"{BN}+ {
1605 yyextra->current->section = EntryType::makeClass();
1607 if (yyextra->insidePHP && yyextra->current->spec.isAbstract())
1610 yyextra->current->spec.setAbstract(
false).setAbstractClass(
true);
1612 if (yyextra->insideSlice && yyextra->current->spec.isLocal())
1614 yyextra->current->spec.setLocal(
true);
1618 yyextra->current->type +=
" const";
1620 else if (isVolatile)
1622 yyextra->current->type +=
" volatile";
1624 yyextra->current->type +=
" class" ;
1625 yyextra->current->fileName = yyextra->fileName;
1626 yyextra->current->startLine = yyextra->yyLineNr;
1627 yyextra->current->startColumn = yyextra->yyColNr;
1628 yyextra->current->bodyLine = yyextra->yyLineNr;
1629 yyextra->current->bodyColumn = yyextra->yyColNr;
1632 yyextra->language = yyextra->current->lang = SrcLangExt::ObjC;
1633 yyextra->insideObjC =
true;
1636 if (yytext[yyleng-1]==
'{') unput(
'{');
1637 BEGIN( CompoundName ) ;
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
1639<FindMembers>{B}*"value class{" |
1640<FindMembers>{B}*"value class"{BN}+ {
1641 yyextra->isTypedef=
false;
1642 yyextra->current->section = EntryType::makeClass();
1645 yyextra->current->type +=
" value class" ;
1646 yyextra->current->fileName = yyextra->fileName;
1647 yyextra->current->startLine = yyextra->yyLineNr;
1648 yyextra->current->startColumn = yyextra->yyColNr;
1649 yyextra->current->bodyLine = yyextra->yyLineNr;
1650 yyextra->current->bodyColumn = yyextra->yyColNr;
1652 if (yytext[yyleng-1]==
'{') unput(
'{');
1653 BEGIN( CompoundName ) ;
1655<FindMembers>{B}*"ref class{" |
1656<FindMembers>{B}*"ref class"{BN}+ {
1657 yyextra->isTypedef=
false;
1658 yyextra->current->section = EntryType::makeClass();
1661 yyextra->current->type +=
" ref class" ;
1662 yyextra->current->fileName = yyextra->fileName;
1663 yyextra->current->startLine = yyextra->yyLineNr;
1664 yyextra->current->startColumn = yyextra->yyColNr;
1665 yyextra->current->bodyLine = yyextra->yyLineNr;
1666 yyextra->current->bodyColumn = yyextra->yyColNr;
1668 if (yytext[yyleng-1]==
'{') unput(
'{');
1669 BEGIN( CompoundName ) ;
1671<FindMembers>{B}*"interface class{" |
1672<FindMembers>{B}*"interface class"{BN}+ {
1673 yyextra->isTypedef=
false;
1674 yyextra->current->section = EntryType::makeClass();
1675 yyextra->current->spec =
TypeSpecifier().setInterface(
true);
1677 yyextra->current->type +=
" interface class" ;
1678 yyextra->current->fileName = yyextra->fileName;
1679 yyextra->current->startLine = yyextra->yyLineNr;
1680 yyextra->current->startColumn = yyextra->yyColNr;
1681 yyextra->current->bodyLine = yyextra->yyLineNr;
1682 yyextra->current->bodyColumn = yyextra->yyColNr;
1684 if (yytext[yyleng-1]==
'{') unput(
'{');
1685 BEGIN( CompoundName ) ;
1687<FindMembers>{B}*"coclass"{BN}+ {
1688 if (yyextra->insideIDL)
1690 yyextra->isTypedef=
false;
1691 yyextra->current->section = EntryType::makeClass();
1693 yyextra->current->type +=
" coclass" ;
1694 yyextra->current->fileName = yyextra->fileName;
1695 yyextra->current->startLine = yyextra->yyLineNr;
1696 yyextra->current->startColumn = yyextra->yyColNr;
1697 yyextra->current->bodyLine = yyextra->yyLineNr;
1698 yyextra->current->bodyColumn = yyextra->yyColNr;
1700 BEGIN( CompoundName ) ;
1705 yyextra->current->name = yytext;
1706 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
1710<FindMembers>{B}*{TYPEDEFPREFIX}"struct{" |
1711<FindMembers>{B}*{TYPEDEFPREFIX}"struct"/{BN}+ {
1712 if (yyextra->insideJava) REJECT;
1717 yyextra->current->section = EntryType::makeClass() ;
1721 setPublished(spec.isPublished()).
1722 setInline(spec.isInline()).
1723 setLocal(spec.isLocal());
1729 yyextra->current->type +=
" const";
1731 else if (isVolatile)
1733 yyextra->current->type +=
" volatile";
1735 yyextra->current->type +=
" struct" ;
1736 yyextra->current->fileName = yyextra->fileName;
1737 yyextra->current->startLine = yyextra->yyLineNr;
1738 yyextra->current->startColumn = yyextra->yyColNr;
1739 yyextra->current->bodyLine = yyextra->yyLineNr;
1740 yyextra->current->bodyColumn = yyextra->yyColNr;
1742 if (yytext[yyleng-1]==
'{') unput(
'{');
1743 BEGIN( CompoundName ) ;
1745<FindMembers>{B}*"value struct{" |
1746<FindMembers>{B}*"value struct"{BN}+ {
1747 yyextra->isTypedef=
false;
1748 yyextra->current->section = EntryType::makeClass();
1749 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setValue(
true);
1751 yyextra->current->type +=
" value struct" ;
1752 yyextra->current->fileName = yyextra->fileName;
1753 yyextra->current->startLine = yyextra->yyLineNr;
1754 yyextra->current->startColumn = yyextra->yyColNr;
1755 yyextra->current->bodyLine = yyextra->yyLineNr;
1756 yyextra->current->bodyColumn = yyextra->yyColNr;
1758 if (yytext[yyleng-1]==
'{') unput(
'{');
1759 BEGIN( CompoundName ) ;
1761<FindMembers>{B}*"ref struct{" |
1762<FindMembers>{B}*"ref struct"{BN}+ {
1763 yyextra->isTypedef=
false;
1764 yyextra->current->section = EntryType::makeClass();
1765 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setRef(
true);
1767 yyextra->current->type +=
" ref struct" ;
1768 yyextra->current->fileName = yyextra->fileName;
1769 yyextra->current->startLine = yyextra->yyLineNr;
1770 yyextra->current->startColumn = yyextra->yyColNr;
1771 yyextra->current->bodyLine = yyextra->yyLineNr;
1772 yyextra->current->bodyColumn = yyextra->yyColNr;
1774 if (yytext[yyleng-1]==
'{') unput(
'{');
1775 BEGIN( CompoundName ) ;
1777<FindMembers>{B}*"interface struct{" |
1778<FindMembers>{B}*"interface struct"{BN}+ {
1779 yyextra->isTypedef=
false;
1780 yyextra->current->section = EntryType::makeClass();
1781 yyextra->current->spec =
TypeSpecifier().setStruct(
true).setInterface(
true);
1783 yyextra->current->type +=
" interface struct";
1784 yyextra->current->fileName = yyextra->fileName;
1785 yyextra->current->startLine = yyextra->yyLineNr;
1786 yyextra->current->startColumn = yyextra->yyColNr;
1787 yyextra->current->bodyLine = yyextra->yyLineNr;
1788 yyextra->current->bodyColumn = yyextra->yyColNr;
1790 if (yytext[yyleng-1]==
'{') unput(
'{');
1791 BEGIN( CompoundName ) ;
1793<FindMembers>{B}*{TYPEDEFPREFIX}"union{" |
1794<FindMembers>{B}*{TYPEDEFPREFIX}"union"{BN}+ {
1795 if (yyextra->insideJava) REJECT;
1800 yyextra->current->section = EntryType::makeClass();
1807 yyextra->current->type +=
" const";
1809 else if (isVolatile)
1811 yyextra->current->type +=
" volatile";
1813 yyextra->current->type +=
" union" ;
1814 yyextra->current->fileName = yyextra->fileName;
1815 yyextra->current->startLine = yyextra->yyLineNr;
1816 yyextra->current->startColumn = yyextra->yyColNr;
1817 yyextra->current->bodyLine = yyextra->yyLineNr;
1818 yyextra->current->bodyColumn = yyextra->yyColNr;
1820 if (yytext[yyleng-1]==
'{') unput(
'{');
1821 BEGIN( CompoundName ) ;
1823<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?"{" |
1824<FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ {
1829 if (yyextra->insideJava)
1831 yyextra->current->section = EntryType::makeClass();
1837 yyextra->current->section = EntryType::makeEnum() ;
1840 yyextra->current->type +=
" enum";
1843 yyextra->current->spec.setStrong(
true);
1847 yyextra->current->spec.setStrong(
true).setEnumStruct(
true);
1849 yyextra->current->fileName = yyextra->fileName;
1850 yyextra->current->startLine = yyextra->yyLineNr;
1851 yyextra->current->startColumn = yyextra->yyColNr;
1852 yyextra->current->bodyLine = yyextra->yyLineNr;
1853 yyextra->current->bodyColumn = yyextra->yyColNr;
1855 if (yytext[yyleng-1]==
'{') unput(
'{');
1856 BEGIN( CompoundName ) ;
1858<FindMembers>{B}*"concept"{BN}+ {
1859 if (yyextra->insideJava) REJECT;
1860 yyextra->isTypedef=
false;
1861 yyextra->current->section = EntryType::makeConcept();
1863 yyextra->current->type +=
" concept";
1864 yyextra->current->fileName = yyextra->fileName;
1865 yyextra->current->startLine = yyextra->yyLineNr;
1866 yyextra->current->startColumn = yyextra->yyColNr;
1867 yyextra->current->bodyLine = yyextra->yyLineNr;
1868 yyextra->current->bodyColumn = yyextra->yyColNr;
1869 yyextra->current->args = yyextra->fullArgString;
1870 yyextra->keepComment =
true;
1872 BEGIN( ConceptName ) ;
1874<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" {
1876 yyextra->current->name +=
"()";
1877 BEGIN( FindMembers );
1879<Operator>"("{BN}*")"{BNopt}/("[["[^\]]*"]]"){BNopt}"(" {
1881 yyextra->current->name += yytext ;
1882 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1883 BEGIN( FindMembers ) ;
1885<Operator>"("{BN}*")"{BNopt}/"(" {
1887 yyextra->current->name += yytext ;
1888 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1889 BEGIN( FindMembers ) ;
1893 BEGIN( FindMembers ) ;
1897 yyextra->current->name += *yytext ;
1899<Operator>"<"({B}*{ID}{B}*(","{B}*{BN})*{B}*)?">" {
1900 if (!yyextra->current->type.startsWith(
"friend "))
1902 yyextra->current->name += yytext;
1906 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
1908 BEGIN( FindMembers ) ;
1910<FindMembers>("template"|"generic")({BN}*)"<"/[>]? {
1913 yyextra->current->tArgLists.
push_back(al);
1914 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
1915 yyextra->templateStr=
"<";
1916 yyextra->fullArgString = yyextra->templateStr;
1917 yyextra->copyArgString = &yyextra->templateStr;
1918 yyextra->currentArgumentContext = FindMembers;
1919 BEGIN( ReadTempArgs );
void push_back(const Argument &a)
1921<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" {
1922 if (yyextra->insideJava) REJECT;
1924 BEGIN( NSAliasName );
1927 yyextra->aliasName = yytext;
1928 BEGIN( NSAliasArg );
1930<NSAliasArg>({ID}"::")*{ID} {
1932 std::string ctx = yyextra->current_root->name.str();
static NamespaceAliasInfoMap namespaceAliasMap
1943 BEGIN( FindMembers );
1945<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
1947 yyextra->aliasName=yytext;
1950<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
1954 yyextra->current->fileName = yyextra->fileName;
1956 yyextra->current->section = EntryType::makeUsingDecl();
1957 yyextra->current_root->copyToSubEntry(yyextra->current);
1959 yyextra->current->section = EntryType::makeUsingDir();
1960 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
1962 yyextra->aliasName.clear();
DString removeRedundantWhiteSpace(const DString &s)
1964<PHPUseAs>{BN}+"as"{BN}+ {
1967<PHPUseAs>{PHPUSEKW} {
1971 if (!yyextra->aliasName.empty())
1976 yyextra->aliasName.clear();
const std::string & str() const
NamespaceAliasInfo(const std::string &a, const std::string &ctx=std::string())
1978<PHPUse,PHPUseAs>[,;] {
1988<JavaImport>({ID}{BN}*"."{BN}*)+"*" {
1992 yyextra->current->fileName = yyextra->fileName;
1999 yyextra->current->section = EntryType::makeUsingDir();
2000 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
static FileNameLinkedMap * inputNameLinkedMap
A model of a file symbol.
virtual void addIncludeDependency(const FileDef *fd, const DString &incName, IncludeKind kind)=0
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const DString &n, bool &ambig)
2004<JavaImport>({ID}{BN}*"."{BN}*)+{ID} {
2008 yyextra->current->fileName = yyextra->fileName;
2020 if (yyextra->insideD)
2022 yyextra->current->section = EntryType::makeUsingDir();
2027 yyextra->current->section = EntryType::makeUsingDecl();
2029 yyextra->previous = yyextra->current;
2030 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
virtual const DString & docName() const =0
virtual void addIncludedByDependency(const FileDef *fd, const DString &incName, IncludeKind kind)=0
2034<IDLImport>"\""[^"]*"\"" {
2035 DString fileName(&yytext[1],yyleng-2);
2051<FindMembers>"using"{BN}+/("::"{ID}("::"{ID})*)? {
2052 if (yyextra->insideJava) REJECT;
2053 yyextra->current->startLine=yyextra->yyLineNr;
2054 yyextra->current->startColumn = yyextra->yyColNr;
2058<Using>"namespace"{BN}+ {
lineCount(yyscanner); BEGIN(UsingDirective); }
2059<Using>("::")?({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}|{FUNCOP}) {
2061 yyextra->current->name=yytext;
2062 yyextra->current->fileName = yyextra->fileName;
2063 yyextra->current->section = EntryType::makeUsingDecl();
2064 yyextra->current->startLine = yyextra->yyLineNr;
2065 yyextra->usingNewVarNeeded =
true;
2066 if (yyextra->insideCS)
2071 yyextra->current->name=yytext;
2072 yyextra->current->fileName = yyextra->fileName;
2073 yyextra->current->startLine = yyextra->yyLineNr;
2074 yyextra->current->startColumn = yyextra->yyColNr;
2075 yyextra->current->section = EntryType::makeUsingDir();
2076 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2081<Using>({ID}{BN}*("::"|"."){BN}*)*({ID}|{OPERATOR}){BN}*"=" {
2082 yyextra->current->name=
DString(yytext).left(yyleng-1).stripWhiteSpace();
2083 yyextra->current->fileName = yyextra->fileName;
2084 yyextra->current->section = EntryType::makeUsingDecl();
2085 yyextra->current->startLine = yyextra->yyLineNr;
2086 yyextra->current->bodyLine = yyextra->yyLineNr;
2087 yyextra->current->bodyColumn = yyextra->yyColNr;
2088 yyextra->lastInitializerContext = UsingAlias;
2089 yyextra->sharpCount=0;
2090 yyextra->initBracketCount=0;
2092 BEGIN(ReadInitializer);
2095 if (yyextra->usingNewVarNeeded)
2097 yyextra->previous = yyextra->current;
2098 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2100 yyextra->usingNewVarNeeded =
false;
2105 yyextra->lastInitializerContext = UsingAlias;
2106 yyextra->sharpCount=0;
2107 yyextra->initBracketCount=0;
2109 yyextra->usingNewVarNeeded =
false;
2110 BEGIN(ReadInitializer);
2113 yyextra->lastCContext = YY_START ;
2114 BEGIN( SkipComment ) ;
2117 yyextra->lastCContext = YY_START ;
2118 BEGIN( SkipCxxComment ) ;
2122 if (yyextra->usingNewVarNeeded)
2124 yyextra->previous = yyextra->current;
2125 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2127 yyextra->usingNewVarNeeded =
false;
2131 yyextra->current->section = EntryType::makeVariable();
2132 DString init = yyextra->current->initializer.str();
2133 init.stripPrefix(
"class ");
2134 init.stripPrefix(
"struct ");
2136 yyextra->current->type =
"typedef "+
init;
2137 yyextra->current->args.clear();
2138 yyextra->current->spec.setAlias(
true);
2139 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2144 yyextra->current->initializer << yytext;
2147 yyextra->current->initializer << yytext;
2151 yyextra->current->fileName = yyextra->fileName;
2152 yyextra->current->section = EntryType::makeUsingDir();
2153 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2155 yyextra->usingNewVarNeeded =
false;
2158<FindMembers>{SCOPENAME}{BN}*"<>" {
2163<FindMembers>{SCOPENAME}{BNopt}/"<" {
2165 if (yyextra->insideCpp && name==
"import") REJECT;
2166 yyextra->roundCount=0;
2167 yyextra->sharpCount=0;
2170 yyextra->current->name=name;
2176 BEGIN( EndTemplate );
2178<FindMemberName>{SCOPENAME}{BNopt}/"<" {
2179 yyextra->sharpCount=0;
2180 yyextra->roundCount=0;
2188 BEGIN( EndTemplate );
std::string_view stripWhiteSpace(std::string_view s)
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trai...
2191 if (!yyextra->insidePHP)
2197 yyextra->lastHereDocContext = YY_START;
2201<ClassTemplSpec,EndTemplate>("<<"|"<=") {
2202 yyextra->current->name+=yytext;
2206 if (yyextra->roundCount==0)
2209 yyextra->sharpCount++;
2211 yyextra->current->name+=yytext;
2213<ClassTemplSpec,EndTemplate>">=" {
2214 yyextra->current->name+=yytext;
2216<ClassTemplSpec,EndTemplate>(">>") {
2217 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideCli || yyextra->roundCount==0)
2225 yyextra->current->name+=yytext;
2230 yyextra->current->name+=
'>';
2232 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2234 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
2239<EndTemplate>">"{BN}*"(" {
2241 yyextra->current->name+=
'>';
2243 if (yyextra->roundCount==0)
2245 --yyextra->sharpCount;
2247 if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
2249 yyextra->current->bodyLine = yyextra->yyLineNr;
2250 yyextra->current->bodyColumn = yyextra->yyColNr;
2251 yyextra->current->args =
"(";
2252 yyextra->currentArgumentContext = FuncQual;
2253 yyextra->fullArgString = yyextra->current->args;
2254 yyextra->copyArgString = &yyextra->current->args;
2256 BEGIN( ReadFuncArgType ) ;
2260 yyextra->current->name+=
"(";
2261 yyextra->roundCount++;
2264<EndTemplate>">"{BNopt}/"("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+ {
2266 yyextra->current->name+=
'>';
2267 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2272<EndTemplate>">"{BNopt}/"::" {
2274 yyextra->current->name+=
'>';
2276 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
2278 BEGIN(FindMemberName);
2281<ClassTemplSpec,EndTemplate>"(" { yyextra->current->name+=*yytext;
2282 yyextra->roundCount++;
2284<ClassTemplSpec,EndTemplate>")" { yyextra->current->name+=*yytext;
2285 if (yyextra->roundCount>0) yyextra->roundCount--;
2288 yyextra->current->name+=*yytext;
2291<FindMembers>"define"{BN}*"("{BN}*["'] {
2292 if (yyextra->insidePHP)
2294 yyextra->current->bodyLine = yyextra->yyLineNr;
2295 yyextra->current->bodyColumn = yyextra->yyColNr;
2302 yyextra->delimiter = yytext;
2303 *yyextra->pCopyHereDocGString << yytext;
2304 BEGIN(CopyHereDocEnd);
2306<CopyHereDoc>"\""{ID}/"\"" {
2307 yyextra->delimiter = &yytext[1];
2308 *yyextra->pCopyHereDocGString << yytext;
2309 BEGIN(CopyHereDocEnd);
2311<CopyHereDoc>"'"{ID}/"'" {
2312 yyextra->delimiter = &yytext[1];
2313 *yyextra->pCopyHereDocGString << yytext;
2314 BEGIN(CopyHereDocEnd);
2317 yyextra->delimiter = yytext;
2320<HereDoc>"\""{ID}/"\"" {
2321 yyextra->delimiter = &yytext[1];
2324<HereDoc>"'"{ID}/"'" {
2325 yyextra->delimiter = &yytext[1];
2328<HereDocEnd>^{Bopt}{ID} {
2331 BEGIN(yyextra->lastHereDocContext);
2335<CopyHereDocEnd>^{Bopt}{ID} {
2336 *yyextra->pCopyHereDocGString << yytext;
2339 BEGIN(yyextra->lastHereDocContext);
2344 *yyextra->pCopyHereDocGString << yytext;
2346<CopyHereDocEnd>{ID} {
2347 *yyextra->pCopyHereDocGString << yytext;
2350 *yyextra->pCopyHereDocGString << yytext;
2352<FindMembers>"Q_OBJECT"|"Q_GADGET" {
2354<FindMembers>"Q_PROPERTY" {
2355 yyextra->yyBegLineNr = yyextra->yyLineNr;
2356 yyextra->yyBegColNr = yyextra->yyColNr;
2357 yyextra->current->protection = Protection::Public ;
2358 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
2359 yyextra->current->type.clear();
2369 yyextra->current->name+=yytext;
2372 yyextra->current->type+= yyextra->current->name;
2373 yyextra->current->type+= yytext;
2374 yyextra->current->name=
"";
2376<QtPropType>({TSCOPE}"::")*{TSCOPE} {
2377 yyextra->current->type+= yyextra->current->name;
2378 yyextra->current->name=yytext;
2380<QtPropType,QtPropAttr>{BN}+"READ"{BN}+ {
2381 yyextra->current->spec.setReadable(
true);
2384<QtPropType,QtPropAttr>{BN}+"WRITE"{BN}+ {
2385 yyextra->current->spec.setWritable(
true);
2388<QtPropType,QtPropAttr>{BN}+"MEMBER"{BN}+{ID} |
2389<QtPropType,QtPropAttr>{BN}+"RESET"{BN}+{ID} |
2390<QtPropType,QtPropAttr>{BN}+"SCRIPTABLE"{BN}+{ID} |
2391<QtPropType,QtPropAttr>{BN}+"DESIGNABLE"{BN}+{ID} |
2392<QtPropType,QtPropAttr>{BN}+"NOTIFY"{BN}+{ID} |
2393<QtPropType,QtPropAttr>{BN}+"REVISION"{BN}+{ID} |
2394<QtPropType,QtPropAttr>{BN}+"STORED"{BN}+{ID} |
2395<QtPropType,QtPropAttr>{BN}+"USER"{BN}+{ID} |
2396<QtPropType,QtPropAttr>{BN}+"CONSTANT"{BN} |
2397<QtPropType,QtPropAttr>{BN}+"FINAL"{BN} {
2401 yyextra->current->read = yytext;
2405 yyextra->current->write = yytext;
2408<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
2409 yyextra->current->name=yytext;
2413<FindMembers>"requires" {
2414 if (yyextra->insideJava) REJECT;
2415 yyextra->current->req.clear();
2416 yyextra->requiresContext = YY_START;
2417 BEGIN(RequiresClause);
2419<RequiresClause>"requires"{BN}*/"{" {
2420 if (yyextra->insideJava) REJECT;
2422 yyextra->current->req+=yytext;
2423 BEGIN( RequiresExpression ) ;
2425<RequiresClause>"requires"{BN}*"(" {
2426 if (yyextra->insideJava) REJECT;
2428 yyextra->current->req+=yytext;
2429 yyextra->lastRoundContext=RequiresExpression;
2430 yyextra->pCopyRoundString=&yyextra->current->req;
2431 yyextra->roundCount=0;
2432 BEGIN( CopyRound ) ;
2434<RequiresExpression>"{" {
2435 yyextra->current->req+=yytext;
2436 yyextra->lastCurlyContext=RequiresClause;
2437 yyextra->pCopyCurlyString=&yyextra->current->req;
2438 yyextra->curlyCount=0;
2439 BEGIN( CopyCurly ) ;
2441<RequiresExpression>\n {
2442 yyextra->current->req+=
' ';
2445<RequiresExpression>. {
2446 yyextra->current->req+=yytext;
2448<RequiresClause>"(" {
2449 yyextra->current->req+=yytext;
2450 yyextra->lastRoundContext=RequiresClause;
2451 yyextra->pCopyRoundString=&yyextra->current->req;
2452 yyextra->roundCount=0;
2453 BEGIN( CopyRound ) ;
2455<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"(" {
2459 yyextra->current->req+=yytext;
2460 yyextra->lastRoundContext=RequiresClause;
2461 yyextra->pCopyRoundString=&yyextra->current->req;
2462 yyextra->roundCount=0;
2470<RequiresClause>{NOTopt}{SCOPENAME}{BNopt}"<" {
2474 yyextra->current->req+=yytext;
2475 yyextra->lastSharpContext=RequiresClause;
2476 yyextra->pCopySharpString=&yyextra->current->req;
2477 yyextra->sharpCount=0;
2485<RequiresClause>{NOTopt}{SCOPENAME} {
2489 yyextra->current->req=yytext;
2490 BEGIN(yyextra->requiresContext);
2497<RequiresClause>{NOTopt}"::"{ID} {
2499 yyextra->current->req+=yytext;
2501<RequiresClause>"||"|"&&"|"!"|("or"{BN}+)|("and"{BN}+)|("not"{BN}+) {
2503 yyextra->current->req+=yytext;
2505<RequiresClause>{BN}+ {
2506 yyextra->current->req+=
' ';
2511 yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
2512 BEGIN(yyextra->requiresContext);
2514<FindMembers,FindMemberName>{SCOPENAME} {
2516 yyextra->yyBegColNr=yyextra->yyColNr;
2517 yyextra->yyBegLineNr=yyextra->yyLineNr;
2519 if (yyextra->insideIDL && yyleng==9 &&
dstrcmp(yytext,
"cpp_quote")==0)
2523 else if ((yyextra->insideIDL || yyextra->insideJava || yyextra->insideD) && yyleng==6 &&
dstrcmp(yytext,
"import")==0)
2525 if (yyextra->insideIDL)
2530 else if (yyextra->insidePHP &&
dstrcmp(yytext,
"use")==0)
2534 else if (yyextra->insideJava &&
dstrcmp(yytext,
"package")==0)
2539 else if (yyextra->insideIDL &&
dstrcmp(yytext,
"case")==0)
2541 BEGIN(IDLUnionCase);
2543 else if (yyextra->insideTryBlock &&
dstrcmp(yytext,
"catch")==0)
2545 yyextra->insideTryBlock=
false;
2546 BEGIN(TryFunctionBlock);
2548 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"alignas")==0)
2550 yyextra->lastAlignAsContext = YY_START;
2553 else if (yyextra->insideJS &&
dstrcmp(yytext,
"var")==0)
2555 yyextra->current->type=
"var";
2557 else if (yyextra->insideJS &&
dstrcmp(yytext,
"function")==0)
2559 yyextra->current->type=
"function";
2561 else if (yyextra->insideCS &&
dstrcmp(yytext,
"this")==0)
2565 yyextra->current->name=
"this";
2568 else if (yyextra->insideCpp && (
dstrcmp(yytext,
"static_assert")==0 ||
dstrcmp(yytext,
"_Static_assert")==0))
2571 BEGIN(StaticAssert);
2573 else if (yyextra->insideCpp &&
dstrcmp(yytext,
"decltype")==0)
2577 if (!yyextra->current->type.empty()) yyextra->current->type+=
' ';
2578 yyextra->current->type+=yytext;
2581 else if (yyextra->insideSlice &&
dstrcmp(yytext,
"optional")==0)
2583 if (yyextra->current->type.empty())
2585 yyextra->current->type =
"optional";
2589 yyextra->current->type +=
" optional";
2591 yyextra->lastModifierContext = YY_START;
2592 BEGIN(SliceOptional);
2596 if (YY_START==FindMembers)
2600 bool javaLike = yyextra->insideJava || yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS;
2601 if (javaLike &&
dstrcmp(yytext,
"public")==0)
2603 yyextra->current->protection = Protection::Public;
2605 else if (javaLike &&
dstrcmp(yytext,
"protected")==0)
2607 yyextra->current->protection = Protection::Protected;
2609 else if ((yyextra->insideCS || yyextra->insideD || yyextra->insidePHP || yyextra->insideJS) &&
dstrcmp(yytext,
"internal")==0)
2611 yyextra->current->protection = Protection::Package;
2613 else if (javaLike &&
dstrcmp(yytext,
"private")==0)
2615 yyextra->current->protection = Protection::Private;
2617 else if (javaLike &&
dstrcmp(yytext,
"static")==0)
2619 if (YY_START==FindMembers)
2620 yyextra->current->name = yytext;
2622 yyextra->current->name += yytext;
2623 yyextra->current->isStatic =
true;
2627 if (YY_START==FindMembers)
2628 yyextra->current->name = yytext;
2630 yyextra->current->name += yytext;
2631 if (yyextra->current->name.startsWith(
"static "))
2633 yyextra->current->isStatic =
true;
2634 yyextra->current->name= yyextra->current->name.mid(7);
2636 else if (yyextra->current->name.startsWith(
"inline "))
2638 if (yyextra->current->type.empty())
2640 yyextra->current->type=
"inline";
2644 yyextra->current->type+=
"inline ";
2646 yyextra->current->name= yyextra->current->name.mid(7);
2648 else if (yyextra->current->name.startsWith(
"constexpr "))
2650 if (yyextra->current->type.empty())
2652 yyextra->current->type=
"constexpr";
2656 yyextra->current->type+=
"constexpr ";
2658 yyextra->current->name=yyextra->current->name.mid(10);
2660 else if (yyextra->current->name.startsWith(
"consteval "))
2662 if (yyextra->current->type.empty())
2664 yyextra->current->type=
"consteval";
2668 yyextra->current->type+=
"consteval ";
2670 yyextra->current->name=yyextra->current->name.mid(10);
2672 else if (yyextra->current->name.startsWith(
"constinit "))
2674 if (yyextra->current->type.empty())
2676 yyextra->current->type=
"constinit";
2680 yyextra->current->type+=
"constinit ";
2682 yyextra->current->name=yyextra->current->name.mid(10);
2684 else if (yyextra->current->name.startsWith(
"const "))
2686 if (yyextra->current->type.empty())
2688 yyextra->current->type=
"const";
2692 yyextra->current->type+=
"const ";
2694 yyextra->current->name=yyextra->current->name.mid(6);
2696 else if (yyextra->current->name.startsWith(
"volatile "))
2698 if (yyextra->current->type.empty())
2700 yyextra->current->type=
"volatile";
2704 yyextra->current->type+=
"volatile ";
2706 yyextra->current->name=yyextra->current->name.mid(9);
2708 else if (yyextra->current->name.startsWith(
"typedef "))
2710 if (yyextra->current->type.empty())
2712 yyextra->current->type=
"typedef";
2716 yyextra->current->type+=
"typedef ";
2718 yyextra->current->name=yyextra->current->name.mid(8);
2728 yyextra->externLinkage=
false;
2732 yyextra->current->name = yyextra->current->name.removeWhiteSpace();
2735 yyextra->lastSkipRoundContext = FindMembers;
2736 yyextra->roundCount=0;
2739<StaticAssert>{BN}+ {
lineCount(yyscanner); }
2745 yyextra->current->type+=yytext;
2746 yyextra->lastRoundContext=FindMembers;
2747 yyextra->pCopyRoundString=&yyextra->current->type;
2748 yyextra->roundCount=0;
2751<DeclType>{BN}+ {
lineCount(yyscanner); }
2756<CSIndexer>"["[^\n\]]*"]" {
2760<FindMembers>[0-9]{ID} {
2763 if (yyextra->insideJava || yyextra->insideCS || yyextra->insideD)
2765 yyextra->current->name+=
".";
2769 yyextra->current->name+=yytext;
2771<CppQuote>"("{B}*"\"" {
2772 yyextra->insideCppQuote=
true;
2776<IDLUnionCase>":" { BEGIN(FindMembers); }
2777<IDLUnionCase>\n {
lineCount(yyscanner); }
2779<TryFunctionBlock>\n {
lineCount(yyscanner); }
2780<TryFunctionBlock>"{" {
2781 yyextra->curlyCount=0;
2782 yyextra->lastCurlyContext = TryFunctionBlockEnd ;
2786<TryFunctionBlockEnd>{BN}*"catch" {
lineCount(yyscanner); BEGIN(TryFunctionBlock);
2788<TryFunctionBlockEnd>\n { unput(*yytext);
2789 BEGIN( FindMembers );
2791<TryFunctionBlockEnd>. { unput(*yytext);
2792 BEGIN( FindMembers );
2795 yyextra->insideCppQuote=
false;
2798<FindConceptParts>[^\/\n]* {
2799 yyextra->current->initializer << yytext;
2801<FindConceptParts>. {
2802 yyextra->current->initializer << yytext;
2804<FindConceptParts>\n {
2805 yyextra->current->initializer << yytext;
2806 yyextra->yyLineNr++;
2808<FindConceptParts>{CCS} {
2809 yyextra->current->initializer << yytext;
2811<FindConceptParts>{CPPC} {
2812 yyextra->current->initializer << yytext;
2814<FindConceptParts>^[ \t]*{CCS}[!*] {
2816 size_t indent = text.
find(
'/');
2818 if (!yyextra->current->initializer.empty())
2820 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2823 yyextra->current->section = EntryType::makeConceptDocPart();
2824 yyextra->current->startLine = yyextra->yyLineNr;
2825 yyextra->current->startColumn = indent;
2826 yyextra->current->initializer.clear();
2827 BEGIN(FindConceptDocs);
2829<FindConceptParts>^[ \t]*{CPPC}[!/].*\n {
2830 if (!yyextra->current->initializer.empty())
2832 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2836 size_t indent = line.find(
'/');
2837 yyextra->current->section = EntryType::makeConceptDocPart();
2838 yyextra->current->startLine = yyextra->yyLineNr;
2839 yyextra->current->startColumn = indent;
2840 yyextra->current->initializer.clear();
2841 yyextra->current->initializer << line.mid(indent+3);
2842 yyextra->yyLineNr++;
2843 BEGIN(FindConceptCxxDocs);
2845<FindConceptCxxDocs>^[ \t]*{CPPC}.*\n {
2847 size_t p = line.find(
'/');
2848 if (line.at(p+2)==
'!' || line.at(p+2)==
'/') p++;
2849 yyextra->current->initializer << line.mid(p+2);
2850 yyextra->yyLineNr++;
2852<FindConceptCxxDocs>{CCS}|{CCE}|{CPPC} {
2853 yyextra->current->initializer << yytext;
2855<FindConceptCxxDocs>. {
2856 if (!yyextra->current->initializer.empty())
2860 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2864 yyextra->current->section = EntryType::makeConceptCodePart();
2865 yyextra->current->startLine = yyextra->yyLineNr;
2866 BEGIN(FindConceptParts);
2868<FindConceptDocs>^[ \t]*"*"+/[^/] {
2870<FindConceptDocs>[^\*\n]+ {
2871 yyextra->current->initializer << yytext;
2873<FindConceptDocs>\n {
2874 yyextra->current->initializer << yytext;
2875 yyextra->yyLineNr++;
2877<FindConceptDocs>"*"*{CCE}[ t]*\n? {
2878 if (!yyextra->current->initializer.empty())
2882 yyextra->current->section = EntryType::makeConceptDocPart();
2883 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2887 yyextra->current->section = EntryType::makeConceptCodePart();
2888 yyextra->current->startLine = yyextra->yyLineNr;
2889 BEGIN(FindConceptParts);
2891<FindConceptDocs>"*"*{CCE} {
2892 if (!yyextra->current->initializer.empty())
2896 yyextra->current->section = EntryType::makeConceptDocPart();
2897 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2900 yyextra->current->section = EntryType::makeConceptCodePart();
2901 yyextra->current->startLine = yyextra->yyLineNr;
2902 BEGIN(FindConceptParts);
2904<FindConceptParts><<EOF>> {
2905 if (!yyextra->current->initializer.empty())
2907 if (!yyextra->current->section.isConceptCodePart())
2909 yyextra->current->section = EntryType::makeConceptDocPart();
2911 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
2916<FindMembers,FindFields>{B}*"#" {
if (yyextra->insidePHP)
2918 yyextra->lastCPPContext = YY_START;
2921<FindMembers,FindFields>{B}*"#"{B}*"cmakedefine01" |
2922<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" {
2923 if (yyextra->insidePHP)
2925 yyextra->current->bodyLine = yyextra->yyLineNr;
2926 yyextra->current->bodyColumn = yyextra->yyColNr;
2927 yyextra->current->fileName = yyextra->fileName;
2928 yyextra->current->startLine = yyextra->yyLineNr;
2929 yyextra->current->startColumn = yyextra->yyColNr;
2930 yyextra->current->type.clear();
2931 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
2932 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
2933 yyextra->current->section = EntryType::makeDefine();
2934 yyextra->lastDefineContext = YY_START;
2937<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" {
2938 yyextra->yyLineNr = atoi(&yytext[1]);
2940 yyextra->lastPreLineCtrlContext = YY_START;
2941 if (YY_START==ReadBody ||
2942 YY_START==ReadNSBody ||
2943 YY_START==ReadBodyIntf)
2945 yyextra->current->program << yytext;
2947 BEGIN( PreLineCtrl );
2949<PreLineCtrl>"\""[^\n\"]*"\"" {
2951 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2952 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2953 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2955 yyextra->current->program << yytext;
2959 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2960 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2961 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2963 yyextra->current->program << yytext;
2967 if (yyextra->lastPreLineCtrlContext==ReadBody ||
2968 yyextra->lastPreLineCtrlContext==ReadNSBody ||
2969 yyextra->lastPreLineCtrlContext==ReadBodyIntf)
2971 yyextra->current->program << yytext;
2974 BEGIN( yyextra->lastPreLineCtrlContext );
2977<SkipCPP>\\[\r]*"\n"[\r]* {
lineCount(yyscanner); }
2978<SkipCPP>[\r]*\n[\r]* {
lineCount(yyscanner);
2979 BEGIN( yyextra->lastCPPContext) ;
2981<SDefine>{ID}{B}*"(" {
2982 yyextra->current->name = yytext;
2983 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
2984 yyextra->current->args =
"(";
2985 yyextra->current->bodyLine = yyextra->yyLineNr;
2986 yyextra->current->bodyColumn = yyextra->yyColNr;
2987 yyextra->currentArgumentContext = DefineEnd;
2988 yyextra->fullArgString=yyextra->current->args;
2989 yyextra->copyArgString=&yyextra->current->args;
2990 BEGIN( ReadFuncArgType ) ;
3005 yyextra->current->bodyLine = yyextra->yyLineNr;
3006 yyextra->current->bodyColumn = yyextra->yyColNr;
3007 yyextra->current->name = yytext;
3014 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3016 BEGIN(yyextra->lastDefineContext);
3020 yyextra->current->fileName = yyextra->fileName;
3021 yyextra->current->startLine = yyextra->yyLineNr;
3022 yyextra->current->startColumn = yyextra->yyColNr;
3023 yyextra->current->type.clear();
3024 yyextra->current->type =
"const";
3025 DString init = yyextra->current->initializer.str();
3028 yyextra->current->initializer.str(
init.str());
3029 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3030 yyextra->current->section = EntryType::makeVariable();
3031 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3036<DefineEnd>\\[\r]?\n {
3038 yyextra->current->endBodyLine = yyextra->yyLineNr;
3041 if (yyextra->insideIDL && yyextra->insideCppQuote)
3047 yyextra->lastStringContext=DefineEnd;
3052<DefinePHP>{ID}["']{BN}*","{BN}* {
3053 yyextra->current->name = yytext;
3054 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3055 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
3056 yyextra->current->name = yyextra->current->name.left(yyextra->current->name.length()-1);
3057 yyextra->current->bodyLine = yyextra->yyLineNr;
3058 yyextra->current->bodyColumn = yyextra->yyColNr;
3059 yyextra->lastRoundContext = DefinePHPEnd;
3060 yyextra->pCopyRoundGString = &yyextra->current->initializer;
3061 yyextra->roundCount = 0;
3062 BEGIN( GCopyRound );
3066 if (yyextra->insideCli)
3069 yyextra->current->name = yytext ;
3077 yyextra->current->name += yytext ;
3080<FindMembers,MemberSpec,SFunction,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs,DefinePHPEnd>";"{BN}*{DCOMM}"<" {
3081 if (YY_START==ReadInitializer && yyextra->keepComment)
3087 if (yyextra->current->bodyLine==-1)
3089 yyextra->current->bodyLine=yyextra->yyLineNr;
3090 yyextra->current->bodyColumn = yyextra->yyColNr;
3092 yyextra->docBlockContext = YY_START;
3093 yyextra->docBlockInBody =
false;
3094 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3096 if (YY_START==MemberSpec && yyextra->memspecEntry && yyextra->memspecEntry->briefFile.empty())
3098 if (yytext[yyleng-3]==
'/')
3100 yyextra->memspecEntry->briefFile = yyextra->fileName;
3101 yyextra->memspecEntry->briefLine = yyextra->yyLineNr;
3105 yyextra->memspecEntry->docFile = yyextra->fileName;
3106 yyextra->memspecEntry->docLine = yyextra->yyLineNr;
3112 yyextra->docBlock.
str(indent.
str());
3116 yyextra->docBlockTerm =
';';
3117 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3119 yyextra->current->bitfields =
":"+yyextra->current->args;
3120 yyextra->current->args.clear();
3121 yyextra->current->section = EntryType::makeVariable();
3123 if (yytext[yyleng-3]==
'/')
DString fill(char c, int len=-1)
Fills a string with a predefined character.
#define Config_getBool(name)
static void startCommentBlock(yyscan_t yyscanner, bool)
3135<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>","{BN}*{DCOMM}"<" {
3136 if (YY_START==ReadInitializer && yyextra->keepComment)
3142 yyextra->docBlockContext = YY_START;
3143 yyextra->docBlockInBody =
false;
3144 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3149 yyextra->docBlock.
str(indent.
str());
3152 yyextra->docBlockTerm =
',';
3153 if (YY_START==EnumBaseType && yyextra->current->section.isEnum())
3155 yyextra->current->bitfields =
":"+yyextra->current->args;
3156 yyextra->current->args.clear();
3157 yyextra->current->section = EntryType::makeVariable();
3159 if (yytext[yyleng-3]==
'/')
3171<DefineEnd,FindFields,ReadInitializer,ReadInitializerPtr,OldStyleArgs>{BN}*{DCOMM}"<" {
3172 if (YY_START==ReadInitializer && yyextra->keepComment)
3178 if (yyextra->current->bodyLine==-1)
3180 yyextra->current->bodyLine=yyextra->yyLineNr;
3181 yyextra->current->bodyColumn = yyextra->yyColNr;
3183 yyextra->docBlockContext = YY_START;
3184 yyextra->docBlockInBody =
false;
3185 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3189 yyextra->docBlock.
str(indent.
str());
3192 yyextra->docBlockTerm = 0;
3193 if (yytext[yyleng-3]==
'/')
3206<FindMembers,FindFields>({CPPC}([!/]){B}*{CMD}"{")|({CCS}([!*]){B}*{CMD}"{") {
3208 if (yyextra->previous && yyextra->previous->section.isGroupDoc())
3211 yyextra->commentScanner.open(yyextra->previous.get(),yyextra->fileName,yyextra->yyLineNr);
3216 yyextra->commentScanner.open(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr);
3222 if (yytext[2]==
'!' || yytext[2]==
'/')
3224 yyextra->docBlockContext = YY_START;
3225 yyextra->docBlockInBody =
false;
3226 yyextra->docBlockAutoBrief =
false;
3227 yyextra->docBlock.str(std::string());
3228 yyextra->docBlockTerm = 0;
3234 yyextra->lastCContext=YY_START;
3235 BEGIN(SkipCxxComment);
3240 if (yytext[2]==
'!' || yytext[2]==
'*')
3242 yyextra->docBlockContext = YY_START;
3243 yyextra->docBlockInBody =
false;
3244 yyextra->docBlock.str(std::string());
3245 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
3247 yyextra->docBlockTerm = 0;
3253 yyextra->lastCContext=YY_START;
3258<FindMembers,FindFields,ReadInitializer,ReadInitializerPtr>{CPPC}([!/]){B}*{CMD}"}".*|{CCS}([!*]){B}*{CMD}"}"[^*]*{CCE} {
3259 bool insideEnum = YY_START==FindFields || ((YY_START==ReadInitializer || YY_START==ReadInitializerPtr) && yyextra->lastInitializerContext==FindFields);
3260 yyextra->commentScanner.close(yyextra->current.get(),yyextra->fileName,yyextra->yyLineNr,insideEnum);
3264 if (!yyextra->insideCS) REJECT;
3265 yyextra->current->bodyLine = yyextra->yyLineNr;
3266 yyextra->current->bodyColumn = yyextra->yyColNr;
3267 yyextra->current->initializer.str(yytext);
3268 yyextra->lastInitializerContext = YY_START;
3269 yyextra->sharpCount=0;
3270 yyextra->initBracketCount=0;
3271 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
3272 yyextra->current->spec.setGettable(
true);
3273 BEGIN(ReadInitializerPtr);
3276 yyextra->current->bodyLine = yyextra->yyLineNr;
3277 yyextra->current->bodyColumn = yyextra->yyColNr;
3278 yyextra->current->initializer.str(
" ");
3279 for (
int ii = 2 ; ii < yyextra->yyColNr; ii++)
3280 yyextra->current->initializer <<
" ";
3281 yyextra->current->initializer <<
"=";
3282 yyextra->lastInitializerContext = YY_START;
3283 yyextra->sharpCount=0;
3284 yyextra->initBracketCount=0;
3285 BEGIN(ReadInitializer);
3287<UNOIDLAttributeBlock>{BN}*[gs]"et"{BN}+"raises"{BN}*"("{BN}*{SCOPENAME}{BN}*(","{BN}*{SCOPENAME}{BN}*)*")"{BN}*";" {
3289 yyextra->current->exception +=
" ";
3292<UNOIDLAttributeBlock>"}" {
3293 yyextra->current->exception +=
" }";
3297<ReadInitializer,ReadInitializerPtr>"(" {
3298 yyextra->lastRoundContext=YY_START;
3299 yyextra->pCopyRoundGString=&yyextra->current->initializer;
3300 yyextra->roundCount=0;
3301 yyextra->current->initializer << *yytext;
3304<ReadInitializer,ReadInitializerPtr>"[" {
3305 if (!yyextra->insidePHP) REJECT;
3306 yyextra->lastSquareContext=YY_START;
3307 yyextra->pCopySquareGString=&yyextra->current->initializer;
3308 yyextra->squareCount=0;
3309 yyextra->current->initializer << *yytext;
3312<ReadInitializer,ReadInitializerPtr>"{" {
3313 yyextra->lastCurlyContext=YY_START;
3314 yyextra->pCopyCurlyGString=&yyextra->current->initializer;
3315 yyextra->curlyCount=0;
3316 yyextra->current->initializer << *yytext;
3319<ReadInitializer,ReadInitializerPtr>[;,] {
3321 if (*yytext==
';' && yyextra->current_root->spec.isEnum())
3323 yyextra->current->fileName = yyextra->fileName;
3324 yyextra->current->startLine = yyextra->yyLineNr;
3325 yyextra->current->startColumn = yyextra->yyColNr;
3326 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
3327 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
3328 yyextra->current->section = EntryType::makeVariable();
3329 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
3333 else if (*yytext==
';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0))
3336 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3337 BEGIN(yyextra->lastInitializerContext);
3339 else if (*yytext==
',' && yyextra->initBracketCount==0)
3342 if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
3343 BEGIN(yyextra->lastInitializerContext);
3347 yyextra->current->initializer << *yytext;
3350<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} {
3351 if (!yyextra->insideCpp)
3357 yyextra->current->initializer << yytext;
3359 yyextra->lastRawStringContext = YY_START;
3360 yyextra->pCopyRawGString = &yyextra->current->initializer;
DString extractBeginRawStringDelimiter(const char *rawStart)
3365<ReadInitializer>{CPPC}.* {
3366 if (yyextra->keepComment)
3368 yyextra->current->initializer << yytext;
3375<ReadInitializer>{CCS} {
3376 if (yyextra->keepComment)
3378 yyextra->current->initializer << yytext;
3379 BEGIN(InitCopyComment);
3386<InitCopyComment>{CCE} {
3387 yyextra->current->initializer << yytext;
3388 BEGIN(ReadInitializer);
3390<InitCopyComment>\n {
3392 yyextra->current->initializer << yytext;
3395 yyextra->current->initializer << yytext;
3397<InitCopyComment><<EOF>> {
3398 warn(yyextra->fileName,yyextra->yyLineNr,
3399 "reached end of file while inside a C style comment block!");
#define warn(file, line, fmt,...)
3402<RawGString>{RAWEND} {
3405 *yyextra->pCopyRawGString << yytext;
3406 BEGIN(yyextra->lastRawStringContext);
DString extractEndRawStringDelimiter(const char *rawEnd)
3413<RawGString>[^)\n]+ {
3414 *yyextra->pCopyRawGString << yytext;
3417 *yyextra->pCopyRawGString << yytext;
3420 *yyextra->pCopyRawGString << yytext;
3423<RawString>{RAWEND} {
3424 *yyextra->pCopyRawString+=yytext;
3425 yyextra->fullArgString+=yytext;
3428 BEGIN(yyextra->lastRawStringContext);
3432 *yyextra->pCopyRawString += yytext;
3433 yyextra->fullArgString+=yytext;
3436 *yyextra->pCopyRawString += yytext;
3437 yyextra->fullArgString+=yytext;
3440 *yyextra->pCopyRawString += yytext;
3441 yyextra->fullArgString+=yytext;
3444<ReadInitializer,ReadInitializerPtr>\" {
3445 if (yyextra->insideIDL && yyextra->insideCppQuote)
3451 yyextra->lastStringContext=YY_START;
3452 yyextra->current->initializer << yytext;
3453 yyextra->pCopyQuotedGString=&yyextra->current->initializer;
3454 yyextra->stopAtInvalidString=
false;
3458<ReadInitializer,ReadInitializerPtr>"->" {
3459 yyextra->current->initializer << yytext;
3461<ReadInitializer,ReadInitializerPtr>("<<"|"<=") {
3462 yyextra->current->initializer << yytext;
3464<ReadInitializer,ReadInitializerPtr>(">>") {
3465 if (yyextra->initBracketCount<=yyextra->sharpCount && yyextra->sharpCount>=2)
3468 yyextra->initBracketCount-=2;
3469 yyextra->sharpCount-=2;
3471 yyextra->current->initializer << yytext;
3473<ReadInitializer,ReadInitializerPtr>(">=") {
3474 yyextra->current->initializer << yytext;
3476<ReadInitializer,ReadInitializerPtr>[<\[{(] {
3477 yyextra->initBracketCount++;
3478 yyextra->sharpCount++;
3479 yyextra->current->initializer << *yytext;
3481<ReadInitializer,ReadInitializerPtr>[>\]})] {
3482 yyextra->initBracketCount--;
3483 yyextra->sharpCount--;
3486 yyextra->current->endBodyLine=yyextra->yyLineNr;
3488 yyextra->current->initializer << *yytext;
3490<ReadInitializer,ReadInitializerPtr>\' {
3491 if (yyextra->insidePHP)
3493 yyextra->current->initializer << yytext;
3494 yyextra->pCopyQuotedGString = &yyextra->current->initializer;
3495 yyextra->lastStringContext=YY_START;
3496 BEGIN(CopyPHPGString);
3500 yyextra->current->initializer << yytext;
3503<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
3504 if (yyextra->insidePHP)
3510 yyextra->current->initializer << yytext;
3513<ReadInitializer,ReadInitializerPtr>\n {
3514 yyextra->current->initializer << *yytext;
3517<ReadInitializer,ReadInitializerPtr>"@\"" {
3519 yyextra->current->initializer << yytext;
3520 if (!yyextra->insideCS && !yyextra->insideObjC)
3527 yyextra->lastSkipVerbStringContext=YY_START;
3528 yyextra->pSkipVerbString=&yyextra->current->initializer;
3529 BEGIN(SkipVerbString);
3532<SkipVerbString>[^\n"\\]+ {
3533 *yyextra->pSkipVerbString << yytext;
3535<SkipVerbString>"\\\\" {
3536 if (yyextra->insideCS) REJECT
3537 *yyextra->pSkipVerbString << yytext;
3539<SkipVerbString>"\\\"" {
3540 if (yyextra->insideCS) REJECT
3541 *yyextra->pSkipVerbString << yytext;
3543<SkipVerbString>"\"\"" {
3544 *yyextra->pSkipVerbString << yytext;
3546<SkipVerbString>"\"" {
3547 *yyextra->pSkipVerbString << *yytext;
3548 BEGIN(yyextra->lastSkipVerbStringContext);
3551 *yyextra->pSkipVerbString << *yytext;
3555 *yyextra->pSkipVerbString << *yytext;
3557<ReadInitializer,ReadInitializerPtr>"?>" {
3558 if (yyextra->insidePHP)
3559 BEGIN( FindMembersPHP );
3561 yyextra->current->initializer << yytext;
3563<ReadInitializer,ReadInitializerPtr>. {
3564 yyextra->current->initializer << *yytext;
3568<CopyString,CopyPHPString>\\. {
3569 *yyextra->pCopyQuotedString+=yytext;
3572 *yyextra->pCopyQuotedString+=*yytext;
3573 BEGIN( yyextra->lastStringContext );
3576 *yyextra->pCopyQuotedString+=*yytext;
3577 BEGIN( yyextra->lastStringContext );
3579<CopyString,CopyPHPString>{CCS}|{CCE}|{CPPC} {
3580 *yyextra->pCopyQuotedString+=yytext;
3582<CopyString,CopyPHPString>\n {
3583 *yyextra->pCopyQuotedString+=*yytext;
3586<CopyString,CopyPHPString>. {
3587 *yyextra->pCopyQuotedString+=*yytext;
3591<CopyGString,CopyPHPGString>\\. {
3592 *yyextra->pCopyQuotedGString << yytext;
3595 *yyextra->pCopyQuotedGString << *yytext;
3596 BEGIN( yyextra->lastStringContext );
3599 *yyextra->pCopyQuotedGString << *yytext;
3600 BEGIN( yyextra->lastStringContext );
3602<CopyGString,CopyPHPGString>"<?php" {
3603 *yyextra->pCopyQuotedGString << yytext;
3604 BEGIN( yyextra->lastStringContext );
3606<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
3607 *yyextra->pCopyQuotedGString << yytext;
3609<CopyGString,CopyPHPGString>\n {
3610 *yyextra->pCopyQuotedGString << *yytext;
3611 if (yyextra->stopAtInvalidString)
3613 BEGIN( yyextra->lastStringContext );
3620<CopyGString,CopyPHPGString>. {
3621 *yyextra->pCopyQuotedGString << *yytext;
3625<CopyC11Attribute>\" {
3626 *yyextra->pCopyC11AttributeString += *yytext;
3627 yyextra->pCopyQuotedString=yyextra->pCopyC11AttributeString;
3628 yyextra->lastStringContext=YY_START;
3631<CopyC11Attribute>\n {
3633 *yyextra->pCopyC11AttributeString += *yytext;
3635<CopyC11Attribute>{ID} {
3636 if (
dstrcmp(yytext,
"nodiscard")==0)
3638 yyextra->current->spec.setNoDiscard(
true);
3640 *yyextra->pCopyC11AttributeString += yytext;
3642<CopyC11Attribute>. {
3643 *yyextra->pCopyC11AttributeString += *yytext;
3645<CopyC11Attribute>"]]" {
3646 yyextra->commentScanner.addDeprecatedDocs(yyextra->current.get(),
3649 yyextra->thisParser);
3650 BEGIN(yyextra->lastC11AttributeContext);
3656 *yyextra->pCopyRoundString += *yytext;
3657 yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
3658 yyextra->lastStringContext=YY_START;
3662 *yyextra->pCopyRoundString += *yytext;
3663 yyextra->roundCount++;
3666 *yyextra->pCopyRoundString += *yytext;
3667 if (--yyextra->roundCount<0)
3668 BEGIN(yyextra->lastRoundContext);
3672 *yyextra->pCopyRoundString += *yytext;
3675 if (yyextra->insidePHP)
3677 yyextra->current->initializer << yytext;
3678 yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
3679 yyextra->lastStringContext=YY_START;
3680 BEGIN(CopyPHPString);
3684 *yyextra->pCopyRoundString += yytext;
3687<CopyRound>{CHARLIT} {
3688 if (yyextra->insidePHP)
3694 *yyextra->pCopyRoundString+=yytext;
3697<CopyRound>[^"'()\n,]+ {
3698 *yyextra->pCopyRoundString+=yytext;
3701 *yyextra->pCopyRoundString+=*yytext;
3706 *yyextra->pCopySharpString += *yytext;
3707 yyextra->pCopyQuotedString=yyextra->pCopySharpString;
3708 yyextra->lastStringContext=YY_START;
3712 *yyextra->pCopySharpString += *yytext;
3713 yyextra->sharpCount++;
3716 *yyextra->pCopySharpString += *yytext;
3717 if (--yyextra->sharpCount<0)
3719 BEGIN(yyextra->lastSharpContext);
3724 *yyextra->pCopySharpString += *yytext;
3727 if (yyextra->insidePHP)
3729 yyextra->current->initializer << yytext;
3730 yyextra->pCopyQuotedString = yyextra->pCopySharpString;
3731 yyextra->lastStringContext=YY_START;
3732 BEGIN(CopyPHPString);
3736 *yyextra->pCopySharpString += yytext;
3739<CopySharp>{CHARLIT} {
3740 if (yyextra->insidePHP)
3746 *yyextra->pCopySharpString+=yytext;
3749<CopySharp>[^"'<>\n,]+ {
3750 *yyextra->pCopySharpString+=yytext;
3753 *yyextra->pCopySharpString+=*yytext;
3759 *yyextra->pCopyRoundGString << *yytext;
3760 yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
3761 yyextra->lastStringContext=YY_START;
3765 *yyextra->pCopyRoundGString << *yytext;
3766 yyextra->roundCount++;
3769 *yyextra->pCopyRoundGString << *yytext;
3770 if (--yyextra->roundCount<0)
3771 BEGIN(yyextra->lastRoundContext);
3775 *yyextra->pCopyRoundGString << *yytext;
3778 if (yyextra->insidePHP)
3780 yyextra->current->initializer << yytext;
3781 yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
3782 yyextra->lastStringContext=YY_START;
3783 BEGIN(CopyPHPGString);
3787 *yyextra->pCopyRoundGString << yytext;
3790<GCopyRound>{CHARLIT} {
3791 if (yyextra->insidePHP)
3797 *yyextra->pCopyRoundGString << yytext;
3801 if (!yyextra->insideCS) REJECT;
3802 *yyextra->pCopyRoundGString << yytext;
3803 yyextra->lastSkipVerbStringContext=YY_START;
3804 yyextra->pSkipVerbString=yyextra->pCopyRoundGString;
3805 BEGIN(SkipVerbString);
3807<GCopyRound>[^"'()\n\/,R]+ {
3808 *yyextra->pCopyRoundGString << yytext;
3810<GCopyRound>{RAWBEGIN} {
3811 *yyextra->pCopyRoundGString << yytext;
3813 yyextra->lastRawStringContext = YY_START;
3814 yyextra->pCopyRawGString = yyextra->pCopyRoundGString;
3818 *yyextra->pCopyRoundGString << *yytext;
3823 *yyextra->pCopySquareGString << *yytext;
3824 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3825 yyextra->lastStringContext=YY_START;
3829 *yyextra->pCopySquareGString << *yytext;
3830 if (yyextra->insidePHP)
3832 yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
3833 yyextra->lastStringContext=YY_START;
3834 BEGIN(CopyPHPGString);
3838 *yyextra->pCopySquareGString << *yytext;
3839 yyextra->squareCount++;
3842 *yyextra->pCopySquareGString << *yytext;
3843 if (--yyextra->squareCount<0)
3844 BEGIN(yyextra->lastSquareContext);
3848 *yyextra->pCopySquareGString << *yytext;
3851 if (yyextra->insidePHP)
3853 yyextra->current->initializer << yytext;
3854 yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
3855 yyextra->lastStringContext=YY_START;
3856 BEGIN(CopyPHPGString);
3860 *yyextra->pCopySquareGString << yytext;
3863<GCopySquare>{CHARLIT} {
3864 if (yyextra->insidePHP)
3870 *yyextra->pCopySquareGString << yytext;
3873<GCopySquare>[^"'\[\]\n\/,]+ {
3874 *yyextra->pCopySquareGString << yytext;
3877 *yyextra->pCopySquareGString << *yytext;
3882 *yyextra->pCopyCurlyString += *yytext;
3883 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3884 yyextra->lastStringContext=YY_START;
3885 yyextra->keepComment=
false;
3889 *yyextra->pCopyCurlyString += *yytext;
3890 if (yyextra->insidePHP)
3892 yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
3893 yyextra->lastStringContext=YY_START;
3894 yyextra->keepComment=
false;
3895 BEGIN(CopyPHPString);
3899 *yyextra->pCopyCurlyString += *yytext;
3900 yyextra->curlyCount++;
3903 *yyextra->pCopyCurlyString += *yytext;
3904 if (--yyextra->curlyCount<0)
3906 yyextra->keepComment=
false;
3907 BEGIN(yyextra->lastCurlyContext);
3910<CopyCurly>{CHARLIT} {
if (yyextra->insidePHP)
3916 *yyextra->pCopyCurlyString += yytext;
3919<CopyCurly>[^"'{}\/\n,]+ {
3920 *yyextra->pCopyCurlyString += yytext;
3922<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
3925 *yyextra->pCopyCurlyString += *yytext;
3928 *yyextra->pCopyCurlyString += *yytext;
3930<CopyCurly>{CPPC}[^\n]* {
3931 if (yyextra->keepComment)
3933 *yyextra->pCopyCurlyString += yytext;
3941 if (yyextra->keepComment)
3943 *yyextra->pCopyCurlyString += yytext;
3952 *yyextra->pCopyCurlyString += yytext;
3957 *yyextra->pCopyCurlyString += *yytext;
3960 *yyextra->pCopyCurlyString += *yytext;
3962<CopyComment><<EOF>> {
3963 warn(yyextra->fileName,yyextra->yyLineNr,
3964 "reached end of file while inside a C style comment block!");
3969<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"1"{B}*\n? {
3971<GCopyCurly>^"#"{B}+[0-9]+{B}+"\""[^\"\n]+"\""{B}+"2"{B}*\n? {
3973 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 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4769 yyextra->current = std::make_shared<Entry>(*yyextra->memspecEntry);
4770 if (yyextra->current->section.isNamespace() ||
4771 yyextra->current->spec.isInterface() ||
4772 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
4773 yyextra->insideSlice
4776 yyextra->current->reset();
4777 yyextra->current_root = std::move(original_root);
4779 yyextra->memspecEntry.reset();
4780 BEGIN( FindMembers ) ;
4785 yyextra->current->doc.clear();
4786 yyextra->current->brief.clear();
4787 BEGIN( MemberSpec ) ;
bool startsWith(const char *s) const
4793<ReadBody>"}"{BN}+"typedef"{BN}+ {
4795 if ( yyextra->curlyCount>0 )
4797 yyextra->current->program << yytext ;
4798 --yyextra->curlyCount ;
4802 yyextra->isTypedef =
true;
4803 yyextra->current->endBodyLine = yyextra->yyLineNr;
4804 DString &cn = yyextra->current->name;
4805 DString rn = yyextra->current_root->name;
4810 BEGIN( TypedefName );
4813<TypedefName>("const"|"volatile"){BN} {
4815 yyextra->current->type.prepend(yytext);
4818 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4820 yyextra->current->program <<
",";
4822 yyextra->current->name=yytext;
4824 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4825 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4827 if (!yyextra->firstTypedefEntry)
4829 yyextra->firstTypedefEntry = yyextra->current;
4831 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4833 yyextra->isTypedef=
true;
4834 BEGIN(MemberSpecSkip);
4838 if (yyextra->current->section.isEnum() || yyextra->current->spec.isEnum())
4840 yyextra->current->program <<
',';
4843 yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
4844 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
4845 yyextra->memspecEntry = yyextra->current;
4846 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
4849 BEGIN( MemberSpec ) ;
DString generateAnonymousAnchor(const DString &fileName, int count)
4851<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* {
4853 int i=0,l=(int)yyleng;
4854 while (i<l && (!
isId(yytext[i]))) i++;
4855 yyextra->msName =
DString(yytext).right(l-i).stripWhiteSpace();
4858 yyextra->msArgs=yyextra->msName.mid(j);
4859 yyextra->msName=yyextra->msName.left(j);
4861 yyextra->msType=
DString(yytext).left(i);
4864 if (yyextra->firstTypedefEntry)
4866 if (yyextra->firstTypedefEntry->spec.isStruct())
4868 yyextra->msType.prepend(
"struct "+yyextra->firstTypedefEntry->name);
4870 else if (yyextra->firstTypedefEntry->spec.isUnion())
4872 yyextra->msType.prepend(
"union "+yyextra->firstTypedefEntry->name);
4874 else if (yyextra->firstTypedefEntry->section.isEnum())
4876 yyextra->msType.prepend(
"enum "+yyextra->firstTypedefEntry->name);
4880 yyextra->msType.prepend(yyextra->firstTypedefEntry->name);
4886 yyextra->current->name = yyextra->msName;
4893 if (yyextra->msName.empty() && !yyextra->current->name.empty())
4899 const Entry *p=yyextra->current.get();
4917 if (p==yyextra->current.get()) p=yyextra->current_root.get();
else p=p->
parent();
4921 if (!yyextra->msName.empty()
4927 if (typedefHidesStruct &&
4928 yyextra->isTypedef &&
4929 ((yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) || yyextra->current->section.isEnum()) &&
4930 yyextra->msType.stripWhiteSpace().empty() &&
4931 yyextra->memspecEntry)
4933 yyextra->memspecEntry->name=yyextra->msName;
4937 std::shared_ptr<Entry> varEntry=std::make_shared<Entry>();
4938 varEntry->lang = yyextra->language;
4939 varEntry->protection = yyextra->current->protection ;
4940 varEntry->mtype = yyextra->current->mtype;
4941 varEntry->virt = yyextra->current->virt;
4942 varEntry->isStatic = yyextra->current->isStatic;
4943 varEntry->section = EntryType::makeVariable();
4944 varEntry->name = yyextra->msName.stripWhiteSpace();
4945 varEntry->type = yyextra->current->type.simplifyWhiteSpace()+
" ";
4946 varEntry->args = yyextra->msArgs;
4947 if (yyextra->isTypedef)
4949 varEntry->type.prepend(
"typedef ");
4952 if (typedefHidesStruct &&
4953 yyextra->isTypedef &&
4954 (yyextra->current->spec.isStruct() || yyextra->current->spec.isUnion()) &&
4955 yyextra->memspecEntry
4958 varEntry->type+=yyextra->memspecEntry->name+yyextra->msType;
4962 varEntry->type+=yyextra->current->name+yyextra->msType;
4964 varEntry->fileName = yyextra->fileName;
4965 varEntry->startLine = yyextra->yyLineNr;
4966 varEntry->startColumn = yyextra->yyColNr;
4967 varEntry->doc = yyextra->current->doc;
4968 varEntry->brief = yyextra->current->brief;
4969 varEntry->mGrpId = yyextra->current->mGrpId;
4970 varEntry->initializer.str(yyextra->current->initializer.str());
4971 varEntry->groups = yyextra->current->groups;
4972 varEntry->sli = yyextra->current->sli;
4977 yyextra->current_root->moveToSubEntryAndKeep(varEntry);
4982 if (!yyextra->isTypedef && yyextra->msName.empty() &&
4983 yyextra->memspecEntry && yyextra->current->section.isCompound())
4985 if (!yyextra->current->doc.empty())
4987 yyextra->memspecEntry->doc += yyextra->current->doc;
4989 if (!yyextra->current->brief.empty())
4991 yyextra->memspecEntry->brief += yyextra->current->brief;
4994 yyextra->msType.clear();
4995 yyextra->msName.clear();
4996 yyextra->msArgs.clear();
4997 yyextra->isTypedef=
false;
4998 yyextra->firstTypedefEntry.reset();
4999 yyextra->memspecEntry.reset();
5000 yyextra->current->reset();
5002 BEGIN( FindMembers );
5006 yyextra->current->doc.clear();
5007 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
5012 yyextra->lastInitializerContext=YY_START;
5013 yyextra->sharpCount=0;
5014 yyextra->initBracketCount=0;
5015 yyextra->current->initializer.str(yytext);
5016 BEGIN(ReadInitializer);
5027<MemberSpecSkip>"," { BEGIN(MemberSpec); }
5028<MemberSpecSkip>";" { unput(
';'); BEGIN(MemberSpec); }
5029<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
5032<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] {
5033 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
5035 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
5036 yyextra->insideObjC=
false;
5037 BEGIN( FindMembers );
5039<ReadBody,ReadNSBody,ReadBodyIntf>\\. { yyextra->current->program << yytext ; }
5040<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
5042<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" |
5043<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ {
5044 if (yyextra->insidePHP)
5050 yyextra->current->bodyLine = yyextra->yyLineNr;
5051 yyextra->current->bodyColumn = yyextra->yyColNr;
5054 yyextra->funcPtrType=yytext;
5055 yyextra->roundCount=0;
5060<FuncPtr>{SCOPENAME} {
5061 yyextra->current->name = yytext;
5064 BEGIN( FuncPtrOperator );
5068 if (yyextra->current->name==
"const" || yyextra->current->name==
"volatile")
5070 yyextra->funcPtrType += yyextra->current->name;
5074 BEGIN( EndFuncPtr );
5081<FuncPtrOperator>"("{BN}*")"{BNopt}/"(" {
5082 yyextra->current->name += yytext;
5083 yyextra->current->name = yyextra->current->name.simplifyWhiteSpace();
5086<FuncPtrOperator>\n {
5088 yyextra->current->name += *yytext;
5090<FuncPtrOperator>"(" {
5092 BEGIN( EndFuncPtr );
5095 yyextra->current->name += *yytext;
5097<EndFuncPtr>")"{BNopt}/";" {
5099 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5102<EndFuncPtr>")"{BNopt}/"(" {
5104 if (yyextra->funcPtrType!=
"(")
5106 yyextra->current->type+=yyextra->funcPtrType+
")";
5110<EndFuncPtr>")"{BNopt}/"[" {
5112 yyextra->current->type+=yyextra->funcPtrType;
5113 yyextra->current->args +=
")";
5118 yyextra->current->args += *yytext ;
5121 yyextra->current->bodyLine = yyextra->yyLineNr;
5122 yyextra->current->bodyColumn = yyextra->yyColNr;
5123 yyextra->currentArgumentContext = FuncFuncEnd;
5124 yyextra->fullArgString=yyextra->current->args;
5125 yyextra->copyArgString=&yyextra->current->args;
5126 BEGIN( ReadFuncArgType ) ;
5128<EndFuncPtr>"["[^\n\]]*"]" {
5129 yyextra->funcPtrType+=yytext;
5135 yyextra->current->args += *yytext ;
5136 ++yyextra->roundCount;
5139 yyextra->current->args += *yytext ;
5140 if ( yyextra->roundCount )
5141 --yyextra->roundCount;
5147<FuncFuncEnd>")"{BN}*"(" {
5149 yyextra->current->type+=yyextra->funcPtrType+
")(";
5150 BEGIN(FuncFuncType);
5152<FuncFuncEnd>")"{BNopt}/[;{] {
5154 yyextra->current->type+=yyextra->funcPtrType.mid(1);
5157<FuncFuncEnd>")"{BNopt}/"[" {
5159 yyextra->current->type+=yyextra->funcPtrType;
5160 yyextra->current->args+=
")";
5161 BEGIN(FuncFuncArray);
5164 yyextra->current->args += *yytext;
5167 yyextra->current->type += *yytext;
5168 yyextra->roundCount++;
5171 yyextra->current->type += *yytext;
5172 if (yyextra->roundCount)
5173 --yyextra->roundCount;
5177<FuncFuncType>{BN}*","{BN}* {
lineCount(yyscanner) ; yyextra->current->type +=
", " ; }
5178<FuncFuncType>{BN}+ {
lineCount(yyscanner) ; yyextra->current->type +=
' ' ; }
5180 yyextra->current->type += *yytext;
5182<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" {
5183 if (yyextra->current->type.startsWith(
"typedef") &&
5184 yyextra->current->bodyLine==-1)
5187 yyextra->current->bodyLine = yyextra->yyLineNr;
5188 yyextra->current->bodyColumn = yyextra->yyColNr;
5189 BEGIN( GetCallType );
5191 else if (!yyextra->current->name.empty())
5193 yyextra->current->args = yytext;
5194 yyextra->current->bodyLine = yyextra->yyLineNr;
5195 yyextra->current->bodyColumn = yyextra->yyColNr;
5196 yyextra->currentArgumentContext = FuncQual;
5197 yyextra->fullArgString=yyextra->current->args;
5198 yyextra->copyArgString=&yyextra->current->args;
5199 BEGIN( ReadFuncArgType ) ;
5203<GetCallType>{BN}*{ID}{BN}*"*" {
5206 yyextra->funcPtrType=
"(";
5207 yyextra->funcPtrType+=yytext;
5208 yyextra->roundCount=0;
5212 if (!yyextra->current->name.empty())
5214 yyextra->current->args = yytext;
5215 yyextra->current->bodyLine = yyextra->yyLineNr;
5216 yyextra->current->bodyColumn = yyextra->yyColNr;
5217 yyextra->currentArgumentContext = FuncQual;
5218 yyextra->fullArgString=yyextra->current->args;
5219 yyextra->copyArgString=&yyextra->current->args;
5220 BEGIN( ReadFuncArgType ) ;
5227<ReadFuncArgType>[^ \/\r\t\n\[\]\)\(\"\'#]+ { *yyextra->copyArgString+=yytext;
5228 if (yyextra->insideCS) yyextra->fullArgString+=
substitute(yytext,
".",
"::");
5229 else yyextra->fullArgString+=yytext;
5231<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *yyextra->copyArgString+=yytext;
5232 yyextra->fullArgString+=yytext;
5234<CopyArgRound>[^\/\n\)\(\"\']+ {
5235 *yyextra->copyArgString+=yytext;
5236 yyextra->fullArgString+=yytext;
5238<CopyArgSquare>[^\/\n\]\[\"\']+ {
5239 *yyextra->copyArgString+=yytext;
5240 yyextra->fullArgString+=yytext;
5242<ReadFuncArgType,ReadTempArgs>{BN}* {
5243 *yyextra->copyArgString+=
" ";
5244 yyextra->fullArgString+=
" ";
5247<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
5249 yyextra->lastRawStringContext = YY_START;
5250 yyextra->pCopyRawString = yyextra->copyArgString;
5251 *yyextra->pCopyRawString+=yytext;
5252 yyextra->fullArgString+=yytext;
5255<ReadFuncArgType,CopyArgRound,CopyArgSquare,CopyArgSharp,ReadTempArgs>\" {
5256 *yyextra->copyArgString+=*yytext;
5257 yyextra->fullArgString+=*yytext;
5258 yyextra->lastCopyArgStringContext = YY_START;
5259 BEGIN( CopyArgString );
5261<ReadFuncArgType>"[" {
5262 if (!yyextra->insidePHP) REJECT;
5263 *yyextra->copyArgString+=*yytext;
5264 yyextra->fullArgString+=*yytext;
5265 yyextra->argSquareCount=0;
5266 yyextra->lastCopyArgContext = YY_START;
5267 BEGIN( CopyArgSquare );
5269<ReadFuncArgType,ReadTempArgs>"(" {
5270 *yyextra->copyArgString+=*yytext;
5271 yyextra->fullArgString+=*yytext;
5272 yyextra->argRoundCount=0;
5273 yyextra->lastCopyArgContext = YY_START;
5274 BEGIN( CopyArgRound );
5276<ReadFuncArgType>")" {
5277 *yyextra->copyArgString+=*yytext;
5278 yyextra->fullArgString+=*yytext;
5280 if (yyextra->insideJS)
5291 yyextra->docBackup = yyextra->current->doc;
5292 yyextra->briefBackup = yyextra->current->brief;
5294 BEGIN( yyextra->currentArgumentContext );
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)
5297<ReadFuncArgType,ReadTempArgs>({CCS}[*!]|{CPPC}[/!])("<"?) {
5298 if (yyextra->currentArgumentContext==DefineEnd)
5302 int i;
for (i=(
int)yyleng-1;i>=0;i--)
5308 BEGIN( yyextra->currentArgumentContext );
5314 yyextra->fullArgString+=yytext;
5315 yyextra->lastCopyArgChar=0;
5316 yyextra->lastCommentInArgContext=YY_START;
5318 BEGIN( CopyArgCommentLine );
5320 BEGIN( CopyArgComment );
5324<ReadFuncArgType,ReadTempArgs>{CCS}{CCE} { }
5325<ReadFuncArgType,ReadTempArgs>{CCS} {
5326 yyextra->lastCContext = YY_START;
5327 BEGIN( SkipComment );
5329<ReadFuncArgType,ReadTempArgs>{CPPC} {
5330 yyextra->lastCContext = YY_START;
5331 BEGIN( SkipCxxComment );
5347<ReadFuncArgType>")"{BN}*({CCS}[*!]|{CPPC}[/!])"<" {
5349 if (yyextra->currentArgumentContext==DefineEnd)
5353 int i;
for (i=(
int)yyleng-1;i>0;i--)
5357 *yyextra->copyArgString+=*yytext;
5358 yyextra->fullArgString+=*yytext;
5361 BEGIN( yyextra->currentArgumentContext );
5367 yyextra->lastCopyArgChar=*yytext;
5370 yyextra->lastCommentInArgContext=YY_START;
5371 yyextra->fullArgString+=text;
5373 BEGIN( CopyArgCommentLine );
5375 BEGIN( CopyArgComment );
5378<CopyArgComment>^{B}*"*"+/{BN}+
5379<CopyArgComment>[^\n\\\@\*]+ { yyextra->fullArgString+=yytext; }
5380<CopyArgComment>{CCE} { yyextra->fullArgString+=yytext;
5381 if (yyextra->lastCopyArgChar!=0)
5382 unput(yyextra->lastCopyArgChar);
5383 BEGIN( yyextra->lastCommentInArgContext );
5385<CopyArgCommentLine>\n { yyextra->fullArgString+=yytext;
5387 if (yyextra->lastCopyArgChar!=0)
5388 unput(yyextra->lastCopyArgChar);
5389 BEGIN( yyextra->lastCommentInArgContext );
5391<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
5392 yyextra->docBlockName=
"uml";
5393 yyextra->fullArgString+=yytext;
5394 BEGIN(CopyArgVerbatim);
5396<CopyArgCommentLine>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
5397 yyextra->docBlockName=&yytext[1];
5398 yyextra->fullArgString+=yytext;
5399 BEGIN(CopyArgVerbatim);
5401<CopyArgCommentLine>{CMD}("f$"|"f["|"f{"|"f(") {
5402 yyextra->docBlockName=&yytext[1];
5403 if (yyextra->docBlockName.at(1)==
'[')
5405 yyextra->docBlockName.at(1)=
']';
5407 if (yyextra->docBlockName.at(1)==
'{')
5409 yyextra->docBlockName.at(1)=
'}';
5411 if (yyextra->docBlockName.at(1)==
'(')
5413 yyextra->docBlockName.at(1)=
')';
5415 yyextra->fullArgString+=yytext;
5416 BEGIN(CopyArgVerbatim);
5418<CopyArgVerbatim>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9\-] {
5419 yyextra->fullArgString+=yytext;
5420 if (&yytext[4]==yyextra->docBlockName)
5422 yyextra->docBlockName=
"";
5423 BEGIN(CopyArgCommentLine);
5426<CopyArgVerbatim>{CMD}("f$"|"f]"|"f}"|"f)") {
5427 yyextra->fullArgString+=yytext;
5428 if (yyextra->docBlockName==&yytext[1])
5430 yyextra->docBlockName=
"";
5431 BEGIN(CopyArgCommentLine);
5434<CopyArgCommentLine>[^\\\@\n]+ { yyextra->fullArgString+=yytext; }
5435<CopyArgCommentLine>. { yyextra->fullArgString+=*yytext; }
5436<CopyArgComment,CopyArgVerbatim>\n { yyextra->fullArgString+=*yytext;
lineCount(yyscanner); }
5437<CopyArgComment,CopyArgVerbatim>. { yyextra->fullArgString+=*yytext; }
5438<CopyArgComment>{CMD}("brief"|"short"){B}+ {
5439 warn(yyextra->fileName,yyextra->yyLineNr,
5440 "Ignoring {:c}brief command inside argument documentation",*yytext
5442 yyextra->fullArgString+=
' ';
5445 *yyextra->copyArgString+=*yytext;
5446 yyextra->fullArgString+=*yytext;
5447 yyextra->argSharpCount=1;
5448 BEGIN( CopyArgSharp );
5451 *yyextra->copyArgString+=*yytext;
5452 yyextra->fullArgString+=*yytext;
5454 *yyextra->currentArgumentList = *
stringToArgumentList(yyextra->language, yyextra->fullArgString);
5456 BEGIN( yyextra->currentArgumentContext );
5459 yyextra->argRoundCount++;
5460 *yyextra->copyArgString+=*yytext;
5461 yyextra->fullArgString+=*yytext;
5464 *yyextra->copyArgString+=*yytext;
5465 yyextra->fullArgString+=*yytext;
5466 if (yyextra->argRoundCount>0)
5467 yyextra->argRoundCount--;
5469 BEGIN( yyextra->lastCopyArgContext );
5472 yyextra->argSquareCount++;
5473 *yyextra->copyArgString+=*yytext;
5474 yyextra->fullArgString+=*yytext;
5477 *yyextra->copyArgString+=*yytext;
5478 yyextra->fullArgString+=*yytext;
5479 if (yyextra->argSquareCount>0)
5480 yyextra->argSquareCount--;
5482 BEGIN( yyextra->lastCopyArgContext );
5485 *yyextra->copyArgString+=*yytext;
5486 yyextra->fullArgString+=*yytext;
5487 yyextra->argRoundCount=0;
5488 yyextra->lastCopyArgContext = YY_START;
5489 BEGIN( CopyArgRound );
5492 yyextra->argSharpCount++;
5494 *yyextra->copyArgString+=*yytext;
5495 yyextra->fullArgString+=*yytext;
5498 *yyextra->copyArgString+=*yytext;
5499 yyextra->fullArgString+=*yytext;
5500 yyextra->argSharpCount--;
5501 if (yyextra->argSharpCount>0)
5507 BEGIN( ReadTempArgs );
5511<CopyArgString,CopyArgPHPString>\\. {
5512 *yyextra->copyArgString+=yytext;
5513 yyextra->fullArgString+=yytext;
5516 *yyextra->copyArgString+=*yytext;
5517 yyextra->fullArgString+=*yytext;
5518 BEGIN( yyextra->lastCopyArgStringContext );
5520<CopyArgPHPString>\' {
5521 *yyextra->copyArgString+=*yytext;
5522 yyextra->fullArgString+=*yytext;
5523 BEGIN( yyextra->lastCopyArgStringContext );
5525<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>{CHARLIT} {
5526 if (yyextra->insidePHP)
5532 *yyextra->copyArgString+=yytext;
5533 yyextra->fullArgString+=yytext;
5536<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSquare,CopyArgSharp>\' {
5537 *yyextra->copyArgString+=yytext;
5538 yyextra->fullArgString+=yytext;
5539 if (yyextra->insidePHP)
5541 yyextra->lastCopyArgStringContext=YY_START;
5542 BEGIN(CopyArgPHPString);
5545<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>"<="|">="|"<=>" {
5546 *yyextra->copyArgString+=yytext;
5547 yyextra->fullArgString+=yytext;
5549<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>\n {
5551 *yyextra->copyArgString+=*yytext;
5552 yyextra->fullArgString+=*yytext;
5554<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>{ID} {
5555 *yyextra->copyArgString+=yytext;
5556 yyextra->fullArgString+=yytext;
5558<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSquare,CopyArgSharp>. {
5559 *yyextra->copyArgString+=*yytext;
5560 yyextra->fullArgString+=*yytext;
5568<FuncRound>"(" { yyextra->current->args += *yytext ;
5569 ++yyextra->roundCount ;
5571<FuncRound>")" { yyextra->current->args += *yytext ;
5572 if ( yyextra->roundCount )
5573 --yyextra->roundCount ;
5585 if (
dstrcmp(yytext,
";")==0 &&
5586 ((yyextra->insideJS || yyextra->insidePHP) &&
5589 yyextra->current->reset();
5591 BEGIN( FindMembers );
5595 unput(*yytext); BEGIN( SFunction );
bool containsWord(const DString &str, const char *word)
returns true iff string s contains word w
5598<FuncQual>{BN}*"abstract"{BN}* {
5600 yyextra->current->virt = Specifier::Pure;
5601 yyextra->current->args +=
" override ";
5603<FuncQual,TrailingReturn>{BN}*"override"{BN}* {
5605 yyextra->current->spec.setOverride(
true);
5606 yyextra->current->args +=
" override ";
5607 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5610<FuncQual,TrailingReturn>{BN}*"final"{BN}* {
5612 yyextra->current->spec.setFinal(
true);
5613 yyextra->current->args +=
" final ";
5614 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5617<FuncQual>{BN}*"sealed"{BN}* {
5619 yyextra->current->spec.setSealed(
true);
5620 yyextra->current->args +=
" sealed ";
5622<FuncQual>{BN}*"new"{BN}* {
5624 yyextra->current->spec.setNew(
true);
5625 yyextra->current->args +=
" new ";
5627<FuncQual>{BN}*"const"{BN}* {
5629 yyextra->current->args +=
" const ";
5630 yyextra->current->argList.setConstSpecifier(
true);
5632<FuncQual>{BN}*"volatile"{BN}* {
5634 yyextra->current->args +=
" volatile ";
5635 yyextra->current->argList.setVolatileSpecifier(
true);
5637<FuncQual>{BN}*"noexcept"{BN}* {
5639 yyextra->current->args +=
" noexcept ";
5640 yyextra->current->spec.setNoExcept(
true);
5642<FuncQual>{BN}*"noexcept"{BN}*"("{B}*false{B}*")"{BN}* {
5644 yyextra->current->args +=
" noexcept(false)";
5646<FuncQual>{BN}*"noexcept"{BN}*"(" {
5648 yyextra->current->args +=
" noexcept(";
5649 yyextra->current->spec.setNoExcept(
true);
5650 yyextra->lastRoundContext=FuncQual;
5651 yyextra->pCopyRoundString=&yyextra->current->args;
5652 yyextra->roundCount=0;
5656 yyextra->current->args +=
" &";
5659<FuncQual>{BN}*"&&" {
5660 yyextra->current->args +=
" &&";
5664<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* {
5666 yyextra->current->args +=
" = 0";
5667 yyextra->current->virt = Specifier::Pure;
5668 yyextra->current->argList.setPureSpecifier(
true);
5669 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5672<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* {
5674 yyextra->current->args +=
" = delete";
5675 yyextra->current->spec.setDelete(
true);
5676 yyextra->current->argList.setIsDeleted(
true);
5677 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5680<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* {
5682 yyextra->current->args +=
" = default";
5683 yyextra->current->spec.setDefault(
true);
5684 if (YY_START==TrailingReturn) yyextra->current->argList.finishTrailingReturnType();
5687<FuncQual>{BN}*"->"{BN}* {
5689 yyextra->current->argList.setTrailingReturnType(
" -> ");
5690 yyextra->current->args +=
" -> ";
5691 yyextra->roundCount=0;
5692 BEGIN(TrailingReturn);
5694<TrailingReturn>[{;] {
5695 if (yyextra->roundCount>0) REJECT;
5697 yyextra->current->argList.finishTrailingReturnType();
5700<TrailingReturn>"requires"{BN}+ {
5701 if (yyextra->insideJava) REJECT;
5702 yyextra->requiresContext = FuncQual;
5703 yyextra->current->req+=
' ';
5704 yyextra->current->argList.finishTrailingReturnType();
5705 BEGIN(RequiresClause);
5707<TrailingReturn>"(" {
5708 yyextra->roundCount++;
5709 yyextra->current->argList.appendTrailingReturnType(yytext);
5710 yyextra->current->args+=yytext;
5712<TrailingReturn>")" {
5713 if (yyextra->roundCount>0)
5715 yyextra->roundCount--;
5719 warn(yyextra->fileName,yyextra->yyLineNr,
5720 "Found ')' without opening '(' for trailing return type '{})...'",
5721 yyextra->current->argList.trailingReturnType());
5723 yyextra->current->argList.appendTrailingReturnType(yytext);
5724 yyextra->current->args+=yytext;
5727 yyextra->current->argList.appendTrailingReturnType(yytext);
5728 yyextra->current->args+=yytext;
5732 yyextra->current->argList.appendTrailingReturnType(yytext);
5733 yyextra->current->args+=
' ';
5735<FuncRound,FuncFunc>{BN}*","{BN}* {
5737 yyextra->current->args +=
", " ;
5739<FuncQual,FuncRound,FuncFunc>{BN}+ {
5741 yyextra->current->args +=
' ' ;
5743<SFunction,FuncQual,FuncRound,FuncFunc>"#" {
if (yyextra->insidePHP)
5745 yyextra->lastCPPContext = YY_START;
5749 if (!yyextra->insideCS)
5756 if (yyextra->insideCli && yyextra->current_root->section.isCompound())
5763 yyextra->lastInitializerContext=YY_START;
5764 yyextra->sharpCount=0;
5765 yyextra->initBracketCount=0;
5766 yyextra->current->initializer.str(yytext);
5767 BEGIN(ReadInitializer);
5770<ReadExpressionBody>";" {
5771 if (!yyextra->current->sli.empty() && yyextra->previous)
5773 yyextra->previous->sli = yyextra->current->sli;
5774 yyextra->current->sli.clear();
5776 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
5791 if (yyextra->insideCpp &&
dstrcmp(yytext,
"requires")==0)
5794 yyextra->requiresContext = YY_START;
5795 if (!yyextra->current->req.empty())
5797 yyextra->current->req+=
" && ";
5799 BEGIN(RequiresClause);
5801 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
5804 yyextra->current->typeConstr.clear();
5805 yyextra->current->typeConstr.push_back(
Argument());
5806 yyextra->lastCSConstraint = YY_START;
5807 BEGIN( CSConstraintName );
5811 yyextra->current->args = yytext;
5812 yyextra->oldStyleArgType.clear();
5813 BEGIN(OldStyleArgs);
5817 yyextra->current->args += yytext;
5823 splitKnRArg(yyscanner,oldStyleArgPtr,oldStyleArgName);
5825 if (yyextra->current->doc!=yyextra->docBackup)
5827 doc=yyextra->current->doc;
5828 yyextra->current->doc=yyextra->docBackup;
5830 if (yyextra->current->brief!=yyextra->briefBackup)
5832 brief=yyextra->current->brief;
5833 yyextra->current->brief=yyextra->briefBackup;
5835 addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
5836 oldStyleArgName,brief,doc);
5837 yyextra->current->args.clear();
5838 if (*yytext==
';') yyextra->oldStyleArgType.clear();
5840<OldStyleArgs>{ID} { yyextra->current->args += yytext; }
5842 if (yyextra->current->argList.empty())
5844 yyextra->current->argList.setNoParameters(
true);
5850<OldStyleArgs>. { yyextra->current->args += *yytext; }
5851<FuncQual,FuncRound,FuncFunc>\" {
5852 if (yyextra->insideIDL && yyextra->insideCppQuote)
5858 yyextra->current->args += *yytext;
5861<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
5862<FuncQual>{BN}*"try:" |
5863<FuncQual>{BN}*"try"{BN}+ {
5864 yyextra->insideTryBlock=
true;
5866 if (yytext[yyleng-1]==
':')
5872<FuncQual>{BN}*"throw"{BN}*"(" {
5873 yyextra->current->exception =
" throw (" ;
5874 yyextra->roundCount=0;
5876 BEGIN( ExcpRound ) ;
5878<FuncQual>{BN}*"raises"{BN}*"(" {
5879 yyextra->current->exception =
" raises (" ;
5881 yyextra->roundCount=0;
5882 BEGIN( ExcpRound ) ;
5884<FuncQual>{BN}*"throws"{BN}+ {
5885 yyextra->current->exception =
" throws " ;
5889<ExcpRound>"(" { yyextra->current->exception += *yytext ;
5890 ++yyextra->roundCount ;
5892<ExcpRound>")" { yyextra->current->exception += *yytext ;
5893 if ( yyextra->roundCount )
5894 --yyextra->roundCount ;
5899 yyextra->current->exception += *yytext;
5902 unput(
'{'); BEGIN( FuncQual );
5905 unput(
';'); BEGIN( FuncQual );
5908 yyextra->current->exception +=
' ';
5912 yyextra->current->exception += *yytext;
5914<SFunction>"(" { yyextra->current->type += yyextra->current->name ;
5915 yyextra->current->name = yyextra->current->args ;
5916 yyextra->current->args = yytext ;
5917 yyextra->roundCount=0;
5918 BEGIN( FuncRound ) ;
5921 if (!yyextra->insidePHP) BEGIN(SkipInits);
5927 yyextra->current->fileName = yyextra->fileName;
5928 yyextra->current->startLine = yyextra->yyBegLineNr;
5929 yyextra->current->startColumn = yyextra->yyBegColNr;
5930 static const reg::Ex re(R
"(\([^)]*[*&][^)]*\))");
5932 std::string type = yyextra->current->type.str();
5936 ti =
match.position();
5940 if (
size_t di = yyextra->current->type.find(
"decltype(");
5946 size_t ts=yyextra->current->type.find(
'<');
5947 size_t te=yyextra->current->type.rfind(
'>');
5950 bool startsWithTypedef = yyextra->current->type.startsWith(
"typedef ");
5953 bool isVariable = !yyextra->current->type.empty() &&
5954 (!isFunction || startsWithTypedef);
5959 if (*yytext!=
';' || yyextra->current_root->section.isCompound())
5964 if (yyextra->isTypedef && !startsWithTypedef)
5966 yyextra->current->type.prepend(
"typedef ");
5968 yyextra->current->section = EntryType::makeVariable() ;
5973 yyextra->current->section = EntryType::makeFunction() ;
5974 yyextra->current->proto = *yytext==
';';
5982 if (yyextra->isTypedef && !startsWithTypedef)
5984 yyextra->current->type.prepend(
"typedef ");
5987 yyextra->current->section = EntryType::makeVariable();
5992 yyextra->current->section = EntryType::makeFunction();
5993 yyextra->current->proto =
true;
5997 if ( yyextra->insidePHP)
6001 yyextra->current->spec.setFinal(
true);
6005 yyextra->current->spec.setAbstract(
true);
6008 if ( yyextra->insidePHP && !
containsWord(yyextra->current->type,
"function"))
6011 if ( *yytext ==
'{' )
6013 yyextra->lastCurlyContext = FindMembers;
6014 yyextra->curlyCount=0;
6019 BEGIN( FindMembers );
6024 if ( yyextra->insidePHP)
6028 yyextra->previous = yyextra->current;
6029 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6032 if (yyextra->previous->spec.isOptional() || yyextra->previous->spec.isRequired())
6034 yyextra->current->spec.setOptional(
true).setRequired(
true);
6036 yyextra->lastCurlyContext = FindMembers;
6037 if ( *yytext ==
',' )
6039 yyextra->current->type =
stripFuncPtr(yyextra->previous->type);
6041 if ( *yytext ==
'{' )
6043 if ( !yyextra->insidePHP && yyextra->current_root->section.isCompound() )
6045 yyextra->previous->spec.setInline(
true);
6047 yyextra->curlyCount=0;
6048 BEGIN( SkipCurly ) ;
6050 else if ( *yytext ==
'=' )
6052 yyextra->previous->spec.setInline(
true);
6053 yyextra->curlyCount=0;
6054 BEGIN( ReadExpressionBody );
6058 if (!yyextra->previous->section.isVariable())
6059 yyextra->previous->bodyLine=-1;
6060 BEGIN( FindMembers ) ;
Class representing a regular expression.
Object representing the matching results.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
bool findAndRemoveWord(DString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
6064<SkipInits>">"{BN}*"{" {
6066 yyextra->curlyCount=1;
6067 BEGIN(SkipC11Inits);
6069<SkipInits>{ID}{BN}*"{" {
6071 yyextra->curlyCount=1;
6072 BEGIN(SkipC11Inits);
6075 ++yyextra->curlyCount;
6078 if ( --yyextra->curlyCount<=0 )
6089 ++yyextra->curlyCount ;
6091<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | )
6094 if( yyextra->curlyCount )
6096 --yyextra->curlyCount ;
6100 if (!yyextra->current->sli.empty() && yyextra->previous)
6102 yyextra->previous->sli = yyextra->current->sli;
6103 yyextra->current->sli.clear();
6105 if (yyextra->previous) yyextra->previous->endBodyLine=yyextra->yyLineNr;
6106 BEGIN( yyextra->lastCurlyContext ) ;
6109<SkipCurly>"}"{BN}*{DCOMM}"<" {
6111 if ( yyextra->curlyCount )
6114 --yyextra->curlyCount ;
6118 yyextra->current->endBodyLine=yyextra->yyLineNr;
6119 yyextra->tempEntry = yyextra->current;
6120 yyextra->current = yyextra->previous;
6122 yyextra->docBlockContext = SkipCurlyEndDoc;
6123 yyextra->docBlockInBody =
false;
6124 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6126 yyextra->docBlock.str(std::string());
6127 yyextra->docBlockTerm =
'}';
6128 if (yytext[yyleng-3]==
'/')
6140<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
6141 yyextra->docBlockContext = SkipCurlyEndDoc;
6142 yyextra->docBlockInBody =
false;
6143 yyextra->docBlockAutoBrief = ( yytext[yyleng-2]==
'*' &&
Config_getBool(JAVADOC_AUTOBRIEF) ) ||
6145 yyextra->docBlock.str(std::string());
6146 yyextra->docBlockTerm =
'}';
6147 if (yytext[yyleng-3]==
'/')
6158<SkipCurlyEndDoc>"}" {
6160 if (yyextra->tempEntry)
6162 yyextra->current = yyextra->tempEntry;
6163 yyextra->tempEntry.reset();
6165 BEGIN( yyextra->lastCurlyContext );
6167<SkipCurly,ReadExpressionBody>\" {
6169 yyextra->lastStringContext=YY_START;
6170 BEGIN( SkipString );
6172<SkipCurly>^{B}*"#" {
6173 if (yyextra->insidePHP)
6176 BEGIN( SkipCurlyCpp );
6178<SkipCurly,SkipC11Inits,SkipInits,ReadExpressionBody>\n {
6182<SkipCurly,SkipCurlyCpp,ReadInitializer,ReadInitializerPtr>"<<<" {
6183 if (!yyextra->insidePHP)
6189 yyextra->lastHereDocContext = YY_START;
6193<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
6195 yyextra->lastRawStringContext = YY_START;
6196 yyextra->dummyRawString.clear();
6197 yyextra->pCopyRawString = &yyextra->dummyRawString;
6198 *yyextra->pCopyRawString += yytext;
6201<SkipCurly,SkipCurlyCpp>[^\n#"R'@\\/{}<\$]+ {
6205<SkipCurly,SkipCurlyCpp>"\$" {}
6209 yyextra->lastCurlyContext = FindMembers;
6212<SkipCurlyCpp>\\[\r]*"\n"[\r]* {
6216<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CCS} {
6218 yyextra->lastCContext = YY_START;
6221<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,CopyC11Attribute,ReadExpressionBody>{CPPC} {
6223 yyextra->lastCContext = YY_START;
6224 BEGIN(SkipCxxComment);
6226<SkipInits,SkipC11Inits>"(" {
6227 yyextra->roundCount=0;
6228 yyextra->lastSkipRoundContext=YY_START;
6231<SkipInits,SkipC11Inits>\" {
6232 yyextra->lastStringContext=YY_START;
6233 BEGIN( SkipString );
6236 warn(yyextra->fileName,yyextra->yyLineNr,
6237 "Found ';' while parsing initializer list! "
6238 "(doxygen could be confused by a macro call without semicolon)"
6240 BEGIN( FindMembers );
6242<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
6243 if (!yyextra->insidePHP)
6246 yyextra->lastCContext = YY_START;
6247 BEGIN(SkipCxxComment);
6249<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>@\" {
6250 if (!yyextra->insideCS) REJECT;
6253 yyextra->lastSkipVerbStringContext=YY_START;
6254 yyextra->pSkipVerbString=&yyextra->dummyTextStream;
6255 yyextra->dummyTextStream.clear();
6256 BEGIN(SkipVerbString);
6258<SkipInits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>{CHARLIT} {
6259 if (yyextra->insidePHP) REJECT;
6261<SkipInits,SkipCurly,SkipCurlyCpp>\' {
6262 if (yyextra->insidePHP)
6264 yyextra->lastStringContext=YY_START;
6265 BEGIN(SkipPHPString);
6268<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp,ReadExpressionBody>. { }
6269<SkipString,SkipPHPString>\\. { }
6271 BEGIN( yyextra->lastStringContext );
6274 BEGIN( yyextra->lastStringContext );
6276<SkipString,SkipPHPString>{CCS}|{CCE}|{CPPC} { }
6277<SkipString,SkipPHPString>\n {
6281<SkipString,SkipPHPString>. { }
6287 yyextra->current->section = EntryType::makeEmpty() ;
6288 yyextra->current->type.clear() ;
6289 yyextra->current->name.clear() ;
6290 yyextra->current->args.clear() ;
6291 yyextra->current->argList.clear();
6292 BEGIN( FindMembers ) ;
6295 if (yyextra->insideIDL && (yyextra->current->spec.isSingleton() || yyextra->current->spec.isService()))
6299 if (!yyextra->current->name.empty() && !yyextra->current_root->name.empty())
6303 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6305 if (!yyextra->baseName.empty())
6307 yyextra->current->extends.emplace_back(
6308 yyextra->baseName,Protection::Public,Specifier::Normal);
6309 yyextra->baseName.clear();
6311 yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
6316 yyextra->current->section = EntryType::makeEmpty() ;
6317 yyextra->current->type.clear() ;
6318 yyextra->current->name.clear() ;
6319 yyextra->current->args.clear() ;
6320 yyextra->current->argList.clear();
6322 BEGIN( FindMembers ) ;
6324<CompoundName>{SCOPENAME}/{BN}*"<" {
6325 yyextra->sharpCount = 0;
6326 yyextra->current->name = yytext ;
6328 if (yyextra->current->spec.isProtocol())
6330 yyextra->current->name+=
"-p";
6333 yyextra->lastClassTemplSpecContext = ClassVar;
6334 if (yyextra->insideObjC)
6336 BEGIN( ObjCProtocolList );
6338 else if (yyextra->insideCS)
6345 yyextra->roundCount=0;
6346 BEGIN( ClassTemplSpec );
6353 yyextra->current->tArgLists.
push_back(al);
6354 yyextra->currentArgumentList = &yyextra->current->tArgLists.back();
6355 yyextra->templateStr=
"<";
6356 yyextra->current->name +=
"<";
6357 yyextra->fullArgString = yyextra->templateStr;
6358 yyextra->copyArgString = &yyextra->current->name;
6360 yyextra->currentArgumentContext = ClassVar;
6361 BEGIN( ReadTempArgs );
6363<ObjCProtocolList>"<" {
6364 yyextra->insideProtocolList=
true;
6367<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
6368 yyextra->current->name += yytext;
6370 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
6373 if (yyextra->current->spec.isProtocol())
6380 BEGIN( yyextra->lastClassTemplSpecContext );
6384<ClassTemplSpec>"<" {
6385 yyextra->current->name += yytext;
6386 if (yyextra->roundCount==0) yyextra->sharpCount++;
6389 yyextra->current->name += yytext;
6391<CompoundName>({SCOPENAME}|{CSSCOPENAME}){BN}*";" {
6392 if (yyextra->insideCS && yyextra->current->type ==
"namespace")
6396 yyextra->current->name =
substitute(yytext,
".",
"::");
6397 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6402 else if (!yyextra->current->tArgLists.empty())
6406 yyextra->current->name = yytext;
6407 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6410 DString rn = yyextra->current_root->name;
6412 if (!yyextra->current->name.empty() && !rn.
empty())
6416 yyextra->current->spec.setForwardDecl(
true);
6417 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6419 else if (yyextra->insideIDL &&
6420 (((yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isService()) &&
6421 yyextra->current->spec.isInterface()) ||
6422 ((yyextra->current_root->spec.isService() || yyextra->current_root->spec.isSingleton()) &&
6423 yyextra->current->spec.isService())
6431 yyextra->current->name = yytext;
6432 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
6433 yyextra->current->section = yyextra->current->spec.isInterface() ? EntryType::makeExportedInterface()
6436 yyextra->current->spec.setInterface(
false).setService(
false);
6440 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
6443 if (!(yyextra->insideCS && yyextra->current->type ==
"namespace"))
6446 yyextra->current->reset();
6448 if (yyextra->insideObjC)
6450 yyextra->language = yyextra->current->lang = SrcLangExt::Cpp;
6451 yyextra->insideObjC =
false;
6453 if (yyextra->isTypedef)
6455 yyextra->current->type.prepend(
"typedef");
6457 BEGIN( FindMembers );
Wrapper class for the Entry type.
6460<CompoundName>{SCOPENAME}/{BN}*"(" {
6461 yyextra->current->name = yytext ;
6464 if (yyextra->insideCpp && yyextra->current->name==
"alignas")
6466 yyextra->lastAlignAsContext = YY_START;
6471 if (yyextra->current->spec.isProtocol())
6473 yyextra->current->name +=
"-p";
6478<AlignAs>"(" { yyextra->roundCount=0;
6479 BEGIN( AlignAsEnd );
6483<AlignAsEnd>"(" { yyextra->roundCount++; }
6484<AlignAsEnd>")" {
if (--yyextra->roundCount<0)
6486 BEGIN( yyextra->lastAlignAsContext );
6492 yyextra->current->name = yytext ;
6496 yyextra->current->bodyLine = yyextra->yyLineNr;
6497 yyextra->current->bodyColumn = yyextra->yyColNr;
6498 yyextra->current->initializer.str(std::string());
6499 yyextra->lastInitializerContext = FindMembers;
6500 yyextra->sharpCount=0;
6501 yyextra->initBracketCount=0;
6502 BEGIN(ReadInitializer);
6504<CompoundName>{SCOPENAME}/{BN}*"," {
6506 yyextra->current->reset();
6509<CompoundName>{SCOPENAME} {
6510 yyextra->current->name = yytext ;
6513 if (yyextra->current->spec.isProtocol())
6515 yyextra->current->name +=
"-p";
6517 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6523<CompoundName>({ID}{BN}*"::"{BN}*)+("inline"{BN}+({ID}{BN}*"::"{BN}*)*)+{ID} {
6524 if (yyextra->current->section.isNamespace())
6526 yyextra->current->name =
DString(yytext).simplifyWhiteSpace();
6536<CompoundName>{CSSCOPENAME} {
6537 yyextra->current->name =
substitute(yytext,
".",
"::");
6541<ClassVar>{SCOPENAME}{BNopt}/"(" {
6542 if (yyextra->insideIDL &&
literal_at(yytext,
"switch") && !
isId(yytext[6]))
6545 yyextra->roundCount=0;
6546 BEGIN(SkipUnionSwitch);
6551 yyextra->yyBegColNr=yyextra->yyColNr;
6552 yyextra->yyBegLineNr=yyextra->yyLineNr;
6553 yyextra->current->name = yytext;
6554 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
6557 BEGIN( FindMembers );
6561 if (yyextra->isTypedef)
6565 yyextra->current->type.prepend(
"typedef ");
6573<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
6574 if (yyextra->insideCli)
6577 yyextra->current->spec.setSealedClass(
true);
6579 yyextra->current->spec.setAbstractClass(
true);
6587<ClassVar>({ID}{BN}*"::"{BN}*)+{ID} {
6588 yyextra->yyBegColNr=yyextra->yyColNr;
6589 yyextra->yyBegLineNr=yyextra->yyLineNr;
6592 if (yyextra->current->section.isEnum())
6594 yyextra->current->section = EntryType::makeVariable() ;
6596 yyextra->current->type +=
' ' ;
6597 yyextra->current->type += yyextra->current->name ;
6598 yyextra->current->name =
DString(yytext).simplifyWhiteSpace();
6606 yyextra->yyBegColNr=yyextra->yyColNr;
6607 yyextra->yyBegLineNr=yyextra->yyLineNr;
6609 if (yyextra->insideIDL &&
dstrcmp(yytext,
"switch")==0)
6612 yyextra->roundCount=0;
6613 BEGIN(SkipUnionSwitch);
6615 else if ((yyextra->insideJava || yyextra->insidePHP || yyextra->insideJS || yyextra->insideSlice) && (
dstrcmp(yytext,
"implements")==0 ||
dstrcmp(yytext,
"extends")==0))
6617 yyextra->current->type.clear();
6618 yyextra->baseProt = Protection::Public;
6619 yyextra->baseVirt = Specifier::Normal;
6620 yyextra->baseName.clear();
6621 BEGIN( BasesProt ) ;
6623 else if (yyextra->insideCS &&
dstrcmp(yytext,
"where")==0)
6625 yyextra->current->typeConstr.clear();
6626 yyextra->current->typeConstr.push_back(
Argument());
6627 yyextra->lastCSConstraint = YY_START;
6628 BEGIN( CSConstraintName );
6630 else if (yyextra->insideCli &&
dstrcmp(yytext,
"abstract")==0)
6632 yyextra->current->spec.setAbstract(
true);
6634 else if (yyextra->insideCli &&
dstrcmp(yytext,
"sealed")==0)
6636 yyextra->current->spec.setSealed(
true);
6638 else if (
dstrcmp(yytext,
"final")==0)
6640 yyextra->current->spec.setFinal(
true);
6644 if (yyextra->current->section.isEnum())
6646 yyextra->current->section = EntryType::makeVariable() ;
6648 yyextra->current->type +=
' ' ;
6649 yyextra->current->type += yyextra->current->name ;
6650 yyextra->current->name = yytext ;
6659 if (yyextra->insideObjC && *yytext==
'(')
6661 yyextra->current->name+=
'(';
6662 yyextra->current->spec.setCategory(
true);
6663 BEGIN( ClassCategory );
6665 else if (yyextra->insideCS && *yytext==
'(')
6667 yyextra->current->args=yytext;
6668 yyextra->currentArgumentContext = ClassVar;
6669 yyextra->fullArgString = yyextra->current->args;
6670 yyextra->copyArgString = &yyextra->current->args;
6671 BEGIN( ReadFuncArgType ) ;
6677 BEGIN( FindMembers );
6680<CSConstraintType,CSConstraintName>{CCS}{CCE} { }
6681<CSConstraintType,CSConstraintName>({CCS}[*!]|{CPPC}[/!])("<"?) {
6682 yyextra->fullArgString.clear();
6683 yyextra->lastCopyArgChar=
'#';
6684 yyextra->lastCommentInArgContext=YY_START;
6686 BEGIN( CopyArgCommentLine );
6688 BEGIN( CopyArgComment );
6690<CSConstraintType,CSConstraintName>"#" {
6691 yyextra->current->typeConstr.back().docs = yyextra->fullArgString;
6693<CSConstraintType>"=>" {
6698 BEGIN( yyextra->lastCSConstraint );
6700<CSConstraintType>"{" {
6704 BEGIN( yyextra->lastCSConstraint );
6706<CSConstraintType,CSConstraintName>";" {
6709 BEGIN( yyextra->lastCSConstraint );
6711<CSConstraintName>":" {
6712 BEGIN( CSConstraintType );
6714<CSConstraintName>{ID} {
6716 yyextra->current->typeConstr.back().name=yytext;
6718<CSConstraintType>"where" {
6719 yyextra->current->typeConstr.push_back(
Argument());
6720 BEGIN( CSConstraintName );
6722<CSConstraintType>({ID}".")*{ID}("<"{ID}">")?("()")? {
6723 if (yyextra->current->typeConstr.back().type.empty())
6726 yyextra->current->typeConstr.back().type=yytext;
6730 DString name = yyextra->current->typeConstr.
back().name;
6731 yyextra->current->typeConstr.push_back(
Argument());
6732 yyextra->current->typeConstr.back().name=name;
6733 yyextra->current->typeConstr.
back().type=yytext;
char & back()
Returns a reference to the last character.
6736<CSConstraintName,CSConstraintType>\n {
6739<CSConstraintName,CSConstraintType>. {
6741<ClassCategory>{ID} {
6742 yyextra->current->name+=yytext;
6744<ClassCategory>")"/{BN}*"{" {
6745 yyextra->current->name+=
')';
6748<ClassCategory>")"/{BN}*"<" {
6749 yyextra->current->name+=
')';
6750 BEGIN( ObjCProtocolList );
6753 yyextra->current->name+=
')';
6754 if (yyextra->current->spec.isProtocol() || yyextra->current->section.isObjcImpl())
6766 if (yyextra->current->section.isVariable())
6768 yyextra->current->bitfields+=
":";
6769 yyextra->current->args.clear();
6772 else if (yyextra->current->section.isEnum())
6775 yyextra->current->args.clear();
6776 BEGIN(EnumBaseType);
6780 yyextra->current->type.clear();
6781 if (yyextra->current->spec.isInterface() ||
6782 yyextra->current->spec.isStruct() ||
6783 yyextra->current->spec.isRef() ||
6784 yyextra->current->spec.isValue() ||
6785 yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL
6788 yyextra->baseProt = Protection::Public;
6792 yyextra->baseProt = Protection::Private;
6794 yyextra->baseVirt = Specifier::Normal;
6795 yyextra->baseName.clear();
6796 BEGIN( BasesProt ) ;
6800 if (yyextra->isTypedef)
6802 yyextra->current->type.prepend(
"typedef");
6804 if ((yytext[0]==
'*' || yytext[0]==
'&') && yyextra->current->section.isEnum())
6806 yyextra->current->section = EntryType::makeVariable() ;
6808 if (yytext[0]==
';' && yyextra->current->section.isEnum())
6810 yyextra->current->reset();
6817 BEGIN( FindMembers );
6819<Bases,ClassVar>{CPPC}"/"/[^/] {
6820 if (!yyextra->insideObjC)
6827 yyextra->current->program << yytext;
6828 yyextra->current->fileName = yyextra->fileName ;
6829 yyextra->current->startLine = yyextra->yyLineNr ;
6830 yyextra->current->startColumn = yyextra->yyColNr;
6831 yyextra->curlyCount=0;
6832 BEGIN( ReadBodyIntf );
6835<Bases,ClassVar>({CPPC}{B}*)?{CCS}"*"/{NCOMM} |
6836<Bases,ClassVar>({CPPC}{B}*)?{CCS}"!" |
6837<Bases,ClassVar>{CPPC}"!" |
6838<Bases,ClassVar>[\-+]{BN}* {
6839 if (!yyextra->insideObjC)
6846 yyextra->current->program << yytext;
6847 yyextra->current->fileName = yyextra->fileName ;
6848 yyextra->current->startLine = yyextra->yyLineNr ;
6849 yyextra->current->startColumn = yyextra->yyColNr;
6850 yyextra->curlyCount=0;
6851 BEGIN( ReadBodyIntf );
6854<CompoundName,ClassVar>{B}*"{"{B}* {
6855 yyextra->current->program.str(std::string());
6856 yyextra->current->fileName = yyextra->fileName ;
6857 yyextra->current->bodyLine = yyextra->yyLineNr;
6858 yyextra->current->bodyColumn = yyextra->yyColNr;
6860 if (yyextra->current->name.empty() && !yyextra->isTypedef)
6862 if (yyextra->current->section.isNamespace())
6866 yyextra->current->name=
"anonymous_namespace{"+
stripPath(yyextra->current->fileName)+
"}";
6878 yyextra->curlyCount=0;
6879 if (yyextra->current_root &&
6880 !yyextra->current_root->spec.isInterface() &&
6881 (yyextra->current->spec.isInterface() ||
6882 yyextra->current->spec.isProtocol() ||
6883 yyextra->current->spec.isCategory() ||
6884 yyextra->current->section.isObjcImpl()
6889 BEGIN( ReadBodyIntf );
6891 else if (yyextra->current->section.isNamespace())
6893 BEGIN( ReadNSBody );
DString stripPath(const DString &s)
6900<BasesProt>"virtual"{BN}+ {
lineCount(yyscanner); yyextra->baseVirt = Specifier::Virtual; }
6901<BasesProt>"public"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Public; }
6902<BasesProt>"protected"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Protected; }
6903<BasesProt>"internal"{BN}+ {
if (!yyextra->insideCli) REJECT ;
lineCount(yyscanner); yyextra->baseProt = Protection::Package; }
6904<BasesProt>"private"{BN}+ {
lineCount(yyscanner); yyextra->baseProt = Protection::Private; }
6905<BasesProt>{BN} {
lineCount(yyscanner); }
6906<BasesProt>. { unput(*yytext); BEGIN(Bases); }
6907<Bases>"decltype"{BN}*"(" {
6909 yyextra->roundCount=0;
6910 yyextra->lastSkipRoundContext=YY_START;
6913<Bases>("\\")?({ID}"\\")*{ID} {
6914 if (!yyextra->insidePHP)
6923 yyextra->baseName += bn;
6924 yyextra->current->args +=
' ';
6925 yyextra->current->args += yytext;
6928<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID}("...")? {
6934 yyextra->current->typeConstr.clear();
6935 yyextra->current->typeConstr.push_back(
Argument());
6936 yyextra->lastCSConstraint = YY_START;
6937 BEGIN( CSConstraintName );
6941 yyextra->baseName+=yytext;
6942 yyextra->current->args +=
' ';
6943 yyextra->current->args += yytext;
6946<Bases>{BN}*{ID}("."{ID})* {
6948 yyextra->baseName += name;
6949 yyextra->current->args +=
' ';
6950 yyextra->current->args += name;
6952<ClassVar,Bases>\n/{BN}*[^{, \t\n:] {
6953 if (!yyextra->insideObjC)
6963<ClassVar,Bases>"@end" {
6971<ClassVar>"<" { yyextra->current->name += *yytext;
6972 yyextra->sharpCount=1;
6973 yyextra->roundCount=0;
6974 yyextra->lastSkipSharpContext = YY_START;
6975 yyextra->specName = &yyextra->current->name;
6976 BEGIN ( Specialization );
6980 yyextra->sharpCount=1;
6981 yyextra->roundCount=0;
6982 yyextra->lastSkipSharpContext = YY_START;
6983 if (yyextra->insideObjC)
6993 yyextra->templateStr = yytext;
6994 yyextra->specName = &yyextra->templateStr;
6995 BEGIN ( Specialization );
6998<Specialization>"<" { *yyextra->specName += *yytext;
6999 if (yyextra->roundCount==0) yyextra->sharpCount++;
7001<Specialization>">" {
7002 *yyextra->specName += *yytext;
7003 if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
7006 BEGIN(yyextra->lastSkipSharpContext);
7009<Specialization>{BN}+ {
lineCount(yyscanner); *yyextra->specName +=
' '; }
7010<Specialization>"<<" { *yyextra->specName += yytext; }
7011<Specialization>">>"/{B}*"::" {
7016<Specialization>">>" {
7017 if (yyextra->insideCS)
7027 if (yyextra->roundCount>0)
7029 *yyextra->specName += yytext;
7039<Specialization>"typename"{BN}+ {
lineCount(yyscanner); }
7040<Specialization>"(" { *yyextra->specName += *yytext; yyextra->roundCount++; }
7041<Specialization>")" { *yyextra->specName += *yytext; yyextra->roundCount--; }
7043<Specialization>"\\\\" { *yyextra->specName += *yytext;}
7044<Specialization>"\\'" { *yyextra->specName += *yytext;}
7045<Specialization>"\\\"" { *yyextra->specName += *yytext;}
7046<Specialization>"'" { *yyextra->specName += *yytext;BEGIN(SpecializationSingleQuote);}
7047<Specialization>"\"" { *yyextra->specName += *yytext;BEGIN(SpecializationDoubleQuote);}
7048<SpecializationSingleQuote,SpecializationDoubleQuote>"\\\\" { *yyextra->specName += *yytext;}
7049<SpecializationSingleQuote>"\\'" { *yyextra->specName += *yytext;}
7050<SpecializationSingleQuote>"'" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7051<SpecializationDoubleQuote>"\\\"" { *yyextra->specName += *yytext;}
7052<SpecializationDoubleQuote>"\"" { *yyextra->specName += *yytext; BEGIN(Specialization);}
7053<SpecializationSingleQuote,SpecializationDoubleQuote>. { *yyextra->specName += *yytext;}
7056 *yyextra->specName += *yytext;
7058<SkipRound>"(" { ++yyextra->roundCount; }
7059<SkipRound>")" {
if (--yyextra->roundCount<0)
7060 BEGIN ( yyextra->lastSkipRoundContext );
7063 yyextra->lastStringContext=SkipRound;
7066<Bases>","|(">"({BN}*"{")?)|({BN}+"implements"{BN}*) {
lineCount(yyscanner);
7067 if (yyextra->insideProtocolList)
7069 yyextra->baseName+=
"-p";
7073 yyextra->current->args +=
',' ;
7076 if (!yyextra->baseName.empty())
7078 yyextra->current->extends.emplace_back(
7079 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7082 if (yyextra->current->spec.isInterface() || yyextra->current->spec.isStruct() ||
7083 yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS ||
7084 yyextra->insideD || yyextra->insideObjC || yyextra->insideIDL || yyextra->insideSlice)
7086 yyextra->baseProt=Protection::Public;
7090 yyextra->baseProt=Protection::Private;
7092 yyextra->baseVirt=Specifier::Normal;
7093 yyextra->baseName.clear();
7096 yyextra->insideProtocolList=
false;
7099 if (yyextra->insideObjC && !yyextra->current->spec.isProtocol())
7115 if (*yytext==
',' && yyextra->insideObjC)
7117 yyextra->insideProtocolList=
true;
7123 yyextra->current->program.str(std::string());
7124 yyextra->current->fileName = yyextra->fileName ;
7125 yyextra->current->bodyLine = yyextra->yyLineNr;
7126 yyextra->current->bodyColumn = yyextra->yyColNr;
7128 if (!yyextra->baseName.empty())
7130 yyextra->current->extends.emplace_back(
7131 yyextra->baseName,yyextra->baseProt,yyextra->baseVirt
7133 yyextra->baseName.clear();
7135 yyextra->curlyCount=0;
7136 if (yyextra->insideObjC)
7138 BEGIN( ReadBodyIntf );
7145<SkipUnionSwitch>{B}*"(" {
7146 yyextra->roundCount++;
7148<SkipUnionSwitch>")" {
7149 if (--yyextra->roundCount==0)
7154<SkipUnionSwitch>\n {
lineCount(yyscanner); }
7156<Comment>{BN}+ { yyextra->current->program << yytext ;
7159<Comment>{CCS} { yyextra->current->program << yytext ; }
7160<Comment>{CPPC} { yyextra->current->program << yytext ; }
7161<Comment>{CMD}("code"|"verbatim"|"iliteral") {
7162 if (yyextra->doxygenComment) yyextra->insideCode=
true;
7163 yyextra->current->program << yytext ;
7165<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
7166 if (yyextra->doxygenComment) yyextra->insideCode=
false;
7167 yyextra->current->program << yytext ;
7169<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
7170<Comment>{CCE} { yyextra->current->program << yytext ;
7171 if (!yyextra->insideCode)
7173 yyextra->doxygenComment=
false;
7174 BEGIN( yyextra->lastContext );
7177<Comment>. { yyextra->current->program << *yytext ; }
7179<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,ReadExpressionBody,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
7181 if (!yyextra->current->doc.empty())
7183 yyextra->current->doc+=
"\n\n";
7187 yyextra->current->docLine = yyextra->yyLineNr;
7188 yyextra->current->docFile = yyextra->fileName;
7191 yyextra->lastDocContext = YY_START;
7192 if (yyextra->current_root->section.isScope())
7194 yyextra->current->inside = yyextra->current_root->name+
"::";
7196 yyextra->docBlockContext = YY_START;
7197 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7202 yyextra->docBlock.
str(indent.
str());
7204 if (yyextra->docBlockAutoBrief)
7206 yyextra->current->briefLine = yyextra->yyLineNr;
7207 yyextra->current->briefFile = yyextra->fileName;
7212<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,ReadExpressionBody,Bases,OldStyleArgs>{CCS}"*"[*]+{BL} {
7218 yyextra->lastDocContext = YY_START;
7221 if (yyextra->current_root->section.isScope())
7223 yyextra->current->inside = yyextra->current_root->name+
"::";
7225 yyextra->current->docLine = yyextra->yyLineNr;
7226 yyextra->current->docFile = yyextra->fileName;
7227 yyextra->docBlockContext = YY_START;
7228 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7230 yyextra->docBlockAutoBrief = javadocAutoBrief;
7234 yyextra->docBlock.
str(indent.
str());
7236 if (yyextra->docBlockAutoBrief)
7238 yyextra->current->briefLine = yyextra->yyLineNr;
7239 yyextra->current->briefFile = yyextra->fileName;
7246 yyextra->current->program << yytext ;
7247 yyextra->lastContext = YY_START ;
7248 yyextra->doxygenComment=
true;
7252<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,ReadExpressionBody,SkipInits,Bases,OldStyleArgs>^{B}+({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7257<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,ReadExpressionBody,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
7258 yyextra->lastDocContext = YY_START;
7261 if (yyextra->current_root->section.isScope())
7263 yyextra->current->inside = yyextra->current_root->name+
"::";
7265 yyextra->current->docLine = yyextra->yyLineNr;
7266 yyextra->current->docFile = yyextra->fileName;
7267 yyextra->docBlockContext = YY_START;
7268 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7270 yyextra->docBlockAutoBrief = javadocAutoBrief;
7274 yyextra->docBlock.
str(indent.
str());
7276 if (yyextra->docBlockAutoBrief)
7278 yyextra->current->briefLine = yyextra->yyLineNr;
7279 yyextra->current->briefFile = yyextra->fileName;
7284<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"!" {
7285 yyextra->lastDocContext = YY_START;
7286 if (yyextra->current_root->section.isScope())
7288 yyextra->current->inside = yyextra->current_root->name+
"::";
7290 yyextra->docBlockContext = YY_START;
7291 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7292 yyextra->docBlockAutoBrief =
false;
7296 yyextra->docBlock.
str(indent.
str());
7301<FindMembers,FindFields,MemberSpec,SkipCurly,ReadExpressionBody,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>{CPPC}"/"/[^/] {
7302 yyextra->lastDocContext = YY_START;
7303 if (yyextra->current_root->section.isScope())
7305 yyextra->current->inside = yyextra->current_root->name+
"::";
7307 yyextra->docBlockContext = YY_START;
7308 yyextra->docBlockInBody = YY_START==SkipCurly || YY_START==ReadExpressionBody;
7309 yyextra->docBlockAutoBrief =
false;
7312 yyextra->docBlock.
str(indent.
str());
7316<FindMembers>"extern"{BN}*"\""[^\"]+"\""{BN}*("{")? {
7318 yyextra->externLinkage=
true;
7321 if (yyextra->externLinkage)
7323 yyextra->externLinkage=
false;
7325 else if (yyextra->insideCS &&
7326 !yyextra->current->name.empty() &&
7327 !yyextra->current->type.empty())
7329 if (yyextra->current->mtype == MethodTypes::Event)
7331 yyextra->mtype = MethodTypes::Event;
7335 yyextra->current->mtype = yyextra->mtype = MethodTypes::Event;
7339 yyextra->current->mtype = yyextra->mtype = MethodTypes::Property;
7341 yyextra->current->bodyLine = yyextra->yyLineNr;
7342 yyextra->current->bodyColumn = yyextra->yyColNr;
7343 yyextra->curlyCount=0;
7344 BEGIN( CSAccessorDecl );
7346 else if (yyextra->insideIDL && yyextra->current->spec.isAttribute())
7350 yyextra->current->exception =
" {";
7351 BEGIN(UNOIDLAttributeBlock);
7355 if ((yyextra->insideJava || yyextra->insideCS || yyextra->insideD) &&
7356 yyextra->current->name.empty()
7360 yyextra->needsSemi =
false;
7361 if (yyextra->current->isStatic)
7363 yyextra->current->name=
"[static initializer]";
7364 yyextra->current->type.clear();
7368 yyextra->current->name=
"[instance initializer]";
7385 yyextra->current->bodyLine = yyextra->yyLineNr;
7386 yyextra->current->bodyColumn = yyextra->yyColNr;
7387 yyextra->current->initializer.str(yytext);
7388 yyextra->lastInitializerContext = YY_START;
7389 yyextra->sharpCount=0;
7390 yyextra->initBracketCount=1;
7391 BEGIN(ReadInitializer);
7395<CSAccessorDecl>"{" { yyextra->curlyCount++; }
7396<CSAccessorDecl>"}"{B}*"=" {
7398 if (yyextra->curlyCount != 0) REJECT;
7399 yyextra->current->initializer.str(
"=");
7400 yyextra->current->endBodyLine=yyextra->yyLineNr;
7401 yyextra->lastInitializerContext = FindMembers;
7402 BEGIN(ReadInitializer);
7404<CSAccessorDecl>"}" {
7405 if (yyextra->curlyCount)
7407 yyextra->curlyCount--;
7411 yyextra->mtype = MethodTypes::Method;
7412 yyextra->virt = Specifier::Normal;
7414 yyextra->current->endBodyLine=yyextra->yyLineNr;
7419<CSAccessorDecl>"private "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateSettable(
true); }
7420<CSAccessorDecl>"protected "{BN}*"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedSettable(
true); }
7421<CSAccessorDecl>"private "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setPrivateGettable(
true); }
7422<CSAccessorDecl>"protected "{BN}*"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setProtectedGettable(
true); }
7423<CSAccessorDecl>"set" {
if (yyextra->curlyCount==0) yyextra->current->spec.setSettable(
true); }
7424<CSAccessorDecl>"get" {
if (yyextra->curlyCount==0) yyextra->current->spec.setGettable(
true); }
7425<CSAccessorDecl>"add" {
if (yyextra->curlyCount==0) yyextra->current->spec.setAddable(
true); }
7426<CSAccessorDecl>"remove" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRemovable(
true); }
7427<CSAccessorDecl>"raise" {
if (yyextra->curlyCount==0) yyextra->current->spec.setRaisable(
true); }
7428<CSAccessorDecl>{CHARLIT} {}
7429<CSAccessorDecl>"\"" { BEGIN(CSString);}
7430<CSAccessorDecl>"." {}
7431<CSAccessorDecl>\n {
lineCount(yyscanner); }
7432<CSString>"\"" { BEGIN(CSAccessorDecl);}
7440<SliceSequence>{SCOPENAME} {
7441 if (yyextra->current->spec.isLocal())
7443 yyextra->current->type =
"local ";
7445 yyextra->current->type +=
"sequence<";
7446 yyextra->current->type += yytext;
7447 yyextra->current->type +=
">";
7450<SliceSequence>{BN}*">"{BN}* {
7452 BEGIN(SliceSequenceName);
7455<SliceSequenceName>{ID}{BN}* {
7457 yyextra->current->name = yytext ;
7458 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7461<SliceSequenceName>";" {
7462 yyextra->current->section = EntryType::makeVariable();
7463 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7468<SliceDictionary>{SCOPENAME}{BN}*","{BN}*{SCOPENAME} {
7470 if (yyextra->current->spec.isLocal())
7472 yyextra->current->type =
"local ";
7474 yyextra->current->type +=
"dictionary<";
7475 yyextra->current->type += yytext;
7476 yyextra->current->type +=
">";
7477 yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
7480<SliceDictionary>{BN}*">"{BN}* {
7482 BEGIN(SliceDictionaryName);
7485<SliceDictionaryName>{ID}{BN}* {
7487 yyextra->current->name = yytext ;
7488 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
7491<SliceDictionaryName>";" {
7492 yyextra->current->section = EntryType::makeVariable();
7493 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
7503<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
7504 int markerLen = yytext[yyleng-1]==
'<' ? 4 : 3;
7505 yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
7508<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
7509 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7510 BEGIN( yyextra->docBlockContext );
7512<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
7513 yyextra->docBlock << yytext;
7514 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7515 BEGIN( yyextra->docBlockContext );
7517<DocLine>{NONLopt}/"\n" {
7518 yyextra->docBlock << yytext;
7519 handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.empty());
7520 BEGIN( yyextra->docBlockContext );
7525<DocBlock>"*"*{CCE} {
7527 BEGIN(yyextra->docBlockContext);
7529<DocBlock>"\\ilinebr "{B}*"*"/[^/] {
7532 yyextra->docBlock <<
"\\ilinebr " << indent;
7534<DocBlock>^{B}*"*"+/[^/] {
7537 yyextra->docBlock << indent;
7539<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
7542 yyextra->docBlock << indent;
7544<DocBlock>^{B}*({CPPC}){B}* {
7547 yyextra->docBlock << yytext;
7551 yyextra->docBlock << yytext;
7553<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
7554 yyextra->docBlock << yytext;
7556<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
7557 yyextra->docBlock << yytext;
7558 char blockName[] =
"f$";
7560 if (c==
'[') blockName[1]=
']';
7561 else if (c==
'{') blockName[1]=
'}';
7562 else if (c==
'(') blockName[1]=
')';
7564 BEGIN(DocCopyBlock);
7566<DocBlock>{CMD}"ifile"{B}+"\""[^\n\"]+"\"" {
7567 yyextra->fileName = &yytext[6];
7568 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7569 yyextra->fileName = yyextra->fileName.mid(1,yyextra->fileName.length()-2);
7570 yyextra->docBlock << yytext;
7572<DocBlock>{CMD}"ifile"{B}+{FILEMASK} {
7573 yyextra->fileName = &yytext[6];
7574 yyextra->fileName = yyextra->fileName.stripWhiteSpace();
7575 yyextra->docBlock << yytext;
7577<DocBlock>{CMD}"iline"{LINENR}{B} {
7579 int nr =
DString(&yytext[6]).toInt(&ok);
7582 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
7586 yyextra->yyLineNr = nr;
7588 yyextra->docBlock << yytext;
7590<DocBlock>{B}*"<"{PRE}">" {
7591 yyextra->docBlock << yytext;
7593 BEGIN(DocCopyBlock);
7595<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
7596 yyextra->docBlock << yytext;
7598 BEGIN(DocCopyBlock);
7600<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid")/[^a-z_A-Z0-9\-] {
7601 yyextra->docBlock << yytext;
7603 BEGIN(DocCopyBlock);
7605<DocBlock>{CMD}("code")/[^a-z_A-Z0-9\-] {
7606 yyextra->docBlock << yytext;
7608 BEGIN(DocCopyBlock);
7610<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7612 yyextra->docBlock <<
"\\ilinebr ";
7613 yyextra->docBlock << pat;
7615 BEGIN(DocCopyBlock);
7617<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7619 yyextra->docBlock << pat;
7621 BEGIN(DocCopyBlock);
7623<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7624<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7625<DocBlock>"\\ilinebr "({B}*"*"+)?{B}{0,3}"```"[`]* {
7627 yyextra->docBlock <<
"\\ilinebr ";
7628 yyextra->docBlock << pat;
7630 BEGIN(DocCopyBlock);
7632<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/(".")?[a-zA-Z0-9#_-]+ |
7633<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]*/"{"[^}]+"}" |
7634<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7636 yyextra->docBlock << pat;
7638 BEGIN(DocCopyBlock);
7641 yyextra->docBlock <<
"```";
7644 yyextra->docBlock << yytext;
7647 yyextra->docBlock << yytext;
7649 BEGIN(DocCopyBlock);
7651<DocBlock>{B}*"<"{CODE}">" {
7652 if (yyextra->insideCS)
7654 yyextra->docBlock << yytext;
7656 BEGIN(DocCopyBlock);
7663<DocBlock>[^@*~`'\/\\\n]+ {
7664 yyextra->docBlock << yytext;
7668 yyextra->docBlock << *yytext;
7671 yyextra->docBlock << *yytext;
7676<DocCopyBlock>"</"{PRE}">" {
7681 yyextra->docBlock << yytext;
7683<DocCopyBlock>"</"{CODE}">" {
7688 yyextra->docBlock << yytext;
7690<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
7695 yyextra->docBlock << yytext;
7697<DocCopyBlock>[\\@]("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
7702 yyextra->docBlock << yytext;
7704<DocCopyBlock>^{B}*"*"+/{BN}+ {
7705 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7713 yyextra->docBlock << indent;
7716<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
7717 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7721 yyextra->docBlock << indent;
7728<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
7729 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7733 yyextra->docBlock << indent+
"*";
7740<DocCopyBlock>^{B}*"*"+/{BN}* {
7741 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
7744 if (yyextra->nestedComment>0)
7747 yyextra->docBlock << indent+
"*";
7752 yyextra->docBlock << indent;
7760<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
7766 yyextra->docBlock << pat;
7768<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
7774 yyextra->docBlock << pat;
7776<DocCopyBlock>"```" {
7777 if (yyextra->docBlockName==
"``")
7779 yyextra->docBlock <<
"`";
7781 yyextra->docBlock <<
"``";
7786 yyextra->docBlock << yytext;
7789<DocCopyBlock>"''"/[^a-z_A-Z0-9-] {
7794 yyextra->docBlock << yytext;
7796<DocCopyBlock>"'"/[^'a-z_A-Z0-9-] {
7801 yyextra->docBlock << yytext;
7803<DocCopyBlock>"`"{1,2} {
7808 yyextra->docBlock << yytext;
7810<DocCopyBlock>[^<@/\*\]`'~"\$\\\n]+ {
7811 yyextra->docBlock << yytext;
7814 yyextra->docBlock << yytext;
7815 if (yyextra->docBlockName==
"code" || yyextra->docBlockName==
"iliteral")
7819 yyextra->lastStringContext=YY_START;
7820 yyextra->pCopyQuotedGString=&yyextra->docBlock;
7821 yyextra->stopAtInvalidString=
true;
7825<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
7828 yyextra->nestedComment++;
7830 else if (yytext[0]==
'*' && yyextra->nestedComment>0)
7832 yyextra->nestedComment--;
7834 else if (yytext[0]==
'*' && yyextra->nestedComment==0 && yyextra->isCodeBlock)
7836 warn(yyextra->fileName,yyextra->yyLineNr,
7837 "Found end of C comment inside a '{}' block without matching start of the comment!"
7838 " Maybe the end marker for the block is missing?",
7839 yyextra->docBlockName);
7842 yyextra->docBlock << yytext;
7845 yyextra->docBlock << *yytext;
7849 yyextra->docBlock << *yytext;
7851<DocCopyBlock><<EOF>> {
7852 warn(yyextra->fileName,yyextra->yyLineNr,
7853 "reached end of file while inside a '{}' block!"
7854 " The command that should end the block seems to be missing!",
7855 yyextra->docBlockName);
7862<Prototype>"operator"{B}*"("{B}*")" {
7863 yyextra->current->name+=yytext;
7866 yyextra->current->args+=*yytext;
7867 yyextra->currentArgumentContext = PrototypeQual;
7868 yyextra->fullArgString = yyextra->current->args;
7869 yyextra->copyArgString = &yyextra->current->args;
7870 BEGIN( ReadFuncArgType ) ;
7872<Prototype>"("({ID}"::")*({B}*[&*])+ {
7873 if (yyextra->insidePHP)
7879 yyextra->current->type+=yyextra->current->name+yytext;
7880 yyextra->current->name.clear();
7881 BEGIN( PrototypePtr );
7884<PrototypePtr>{SCOPENAME} {
7885 yyextra->current->name+=yytext;
7888 yyextra->current->args+=*yytext;
7889 yyextra->currentArgumentContext = PrototypeQual;
7890 yyextra->fullArgString = yyextra->current->args;
7891 yyextra->copyArgString = &yyextra->current->args;
7892 BEGIN( ReadFuncArgType ) ;
7895 yyextra->current->type+=
')';
7899 yyextra->current->name+=yytext;
7902 BEGIN( PrototypeSkipLine);
7904<PrototypeQual>{B}*"const"{B}* {
7905 yyextra->current->args +=
" const ";
7906 yyextra->current->argList.setConstSpecifier(
true);
7908<PrototypeQual>{B}*"volatile"{B}* {
7909 yyextra->current->args +=
" volatile ";
7910 yyextra->current->argList.setVolatileSpecifier(
true);
7912<PrototypeQual>{B}*"="{B}*"0"{B}* {
7913 yyextra->current->args +=
" = 0";
7914 yyextra->current->virt = Specifier::Pure;
7915 yyextra->current->argList.setPureSpecifier(
true);
7917<PrototypeQual>"throw"{B}*"(" {
7918 yyextra->current->exception =
"throw(";
7919 BEGIN(PrototypeExc);
7922 yyextra->current->exception +=
')';
7923 BEGIN(PrototypeQual);
7926 yyextra->current->exception += *yytext;
7929 yyextra->current->args += *yytext;
7932 yyextra->current->name += *yytext;
7934<PrototypeSkipLine>. {
7940<SkipCxxComment>.*"\\\n" {
7941 if (yyextra->insideCS)
7950<SkipCxxComment>{ANYopt}/\n {
7951 BEGIN( yyextra->lastCContext ) ;
7953<SkipComment>[^\*\n]+
7958 if (!yyextra->insideCpp) REJECT;
7959 if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
7960 yyextra->lastC11AttributeContext = YY_START;
7961 yyextra->pCopyC11AttributeString = &yyextra->current->attributes;
7962 BEGIN( CopyC11Attribute );
7967 if (yyextra->insideIDL && yyextra->insideCppQuote)
7971 else if (yyextra->insidePHP)
7973 yyextra->lastStringContext=YY_START;
7978 if (!yyextra->insidePHP)
7980 yyextra->lastCPPContext = YY_START;
7985 yyextra->lastCContext = YY_START ;
7986 BEGIN( SkipCxxComment ) ;
7990 if (!yyextra->insidePHP)
7992 yyextra->lastCContext = YY_START ;
7993 BEGIN( SkipCxxComment ) ;
7996 if (yyextra->insidePHP)
7998 yyextra->lastStringContext=YY_START;
7999 BEGIN(SkipPHPString);
8003 if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
8005 if (yyextra->current->type.empty())
8007 if (yyextra->current->name.empty())
8008 yyextra->current->name=
"?";
8010 yyextra->current->name+=
"?";
8014 yyextra->current->type+=
"?";
8018<*>"}" { yyextra->exported=
false; }
8020<SkipComment>{CPPC}|{CCS}
8021<*>{CCS} { yyextra->lastCContext = YY_START ;
8022 BEGIN( SkipComment ) ;
8024<SkipComment>{B}*{CCE} { BEGIN( yyextra->lastCContext ) ; }
8026 yyextra->lastCContext = YY_START ;
8027 BEGIN( SkipCxxComment ) ;
8030 if (yyextra->insideCS && yyextra->fakeNS)
8034 BEGIN ( ReadNSBody);
8046 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8048 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
8050 *buf = yyextra->inputString[yyextra->inputPosition++] ;
8060 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8061 yyextra->outerScopeEntries.clear();
8062 yyextra->baseName.clear();
8063 yyextra->protection = Protection::Public;
8064 yyextra->baseProt = Protection::Public;
8065 yyextra->sharpCount = 0;
8066 yyextra->roundCount = 0;
8067 yyextra->curlyCount = 0;
8068 yyextra->mtype = MethodTypes::Method;
8069 yyextra->isStatic =
false;
8070 yyextra->virt = Specifier::Normal;
8071 yyextra->baseVirt = Specifier::Normal;
8072 yyextra->isTypedef =
false;
8073 yyextra->insideTryBlock =
false;
8074 yyextra->insideFormula =
false;
8075 yyextra->insideCode=
false;
8077 yyextra->previous = 0;
8078 yyextra->firstTypedefEntry.reset();
8079 yyextra->memspecEntry.reset();
8084 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8085 if (yyextra->insideJava)
8087 yyextra->protection = (yyextra->current_root->spec.isInterface() || yyextra->current_root->spec.isEnum()) ? Protection::Public : Protection::Package;
8089 yyextra->current->protection = yyextra->protection;
8090 yyextra->current->exported = yyextra->exported ;
8091 yyextra->current->mtype = yyextra->mtype;
8092 yyextra->current->virt = yyextra->virt;
8093 yyextra->current->isStatic = yyextra->isStatic;
8094 yyextra->current->lang = yyextra->language;
8096 yyextra->commentScanner.initGroupInfo(yyextra->current.get());
8097 yyextra->isTypedef=
false;
8105 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8106 if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
8108 yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,
id);
8114 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8117 for (p = yytext ; *p ; ++p )
8121 yyextra->yyLineNr++;
8127 yyextra->column+=tabSize - (yyextra->column%tabSize);
8140 int col=startIndent;
8146 if (c==
'\t') col+=tabSize-(col%tabSize);
8147 else if (c==
'\n') col=0;
8155 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8156 yyextra->current->protection = yyextra->protection = prot;
8157 yyextra->current->mtype = yyextra->mtype = MethodTypes::Method;
8158 yyextra->current->type.clear();
8159 yyextra->current->name.clear();
8160 yyextra->current->args.clear();
8161 yyextra->current->argList.clear();
8167 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8168 size_t tl=yyextra->current->type.length();
8169 if( tl>0 && !yyextra->current->name.empty() && yyextra->current->type.at(tl-1)!=
'.')
8171 yyextra->current->type +=
' ' ;
8173 yyextra->current->type += yyextra->current->name;
8174 yyextra->current->name.clear() ;
8175 tl=yyextra->current->type.length();
8176 if( tl>0 && !yyextra->current->args.empty() && yyextra->current->type.at(tl-1)!=
'.')
8178 yyextra->current->type +=
' ' ;
8180 yyextra->current->type += yyextra->current->args ;
8181 yyextra->current->args.clear() ;
8182 yyextra->current->argList.clear();
8189 if (s==
nullptr || *s==0)
return name;
8191 if (name.
at(0)==
'"' && name.
at(name.
length()-1)==
'"')
8203 bool funcPtr = i>0 && type[i-1]==
')';
8205 while (i>0 && (type[i-1]==
'*' || type[i-1]==
'&' || type[i-1]==
' ')) i--;
8206 if (funcPtr && i>0 && type[i-1]==
'(') i--;
8207 return type.
left(i);
8213 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8216 yyextra->docBlock <<
"\\iskip";
8218 yyextra->docBlockName=blockName;
8219 yyextra->fencedSize=fencedSize;
8220 yyextra->isCodeBlock=codeBlock;
8221 yyextra->nestedComment=0;
8227 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8228 if (yyextra->docBlockName==blockName && (fencedSize==0 || fencedSize==yyextra->fencedSize))
8232 yyextra->docBlock <<
"\\endiskip";
8234 yyextra->docBlockName=
"";
8254 size_t i=name.
find(
"operator");
8256 if (i==0 && !
isId(name.
at(8)))
return true;
8257 if (i>0 && !
isId(name.
at(i-1)) && !
isId(name.
at(i+8)))
return true;
8265 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8267 yyextra->insideIDL = yyextra->language==SrcLangExt::IDL;
8268 yyextra->insideJava = yyextra->language==SrcLangExt::Java;
8269 yyextra->insideCS = yyextra->language==SrcLangExt::CSharp;
8270 yyextra->insideD = yyextra->language==SrcLangExt::D;
8271 yyextra->insidePHP = yyextra->language==SrcLangExt::PHP;
8272 yyextra->insideObjC = yyextra->language==SrcLangExt::ObjC;
8273 yyextra->insideJS = yyextra->language==SrcLangExt::JS;
8274 yyextra->insideSlice = yyextra->language==SrcLangExt::Slice;
8275 yyextra->insideCpp = (yyextra->language==SrcLangExt::Cpp ||
8276 yyextra->language==SrcLangExt::Lex);
8287 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8288 if (yyextra->current_root->section.isScope())
8291 yyextra->current->name.prepend(yyextra->current_root->name+
"::");
8293 for (
const ArgumentList &srcAl : yyextra->current_root->tArgLists)
8295 yyextra->current->tArgLists.insert(yyextra->current->tArgLists.begin(),srcAl);
8305 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8306 if (!yyextra->fileName.lower().endsWith(
".c"))
return false;
8307 if (yyextra->current->argList.empty())
return false;
8308 for (
const Argument &a : yyextra->current->argList)
8319 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8320 if (yyextra->insideJava)
8323 yyextra->current->protection = Protection::Public;
8325 yyextra->current->protection = Protection::Protected;
8327 yyextra->current->protection = Protection::Private;
8329 yyextra->current->protection = Protection::Package;
8336 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8337 int si =
static_cast<int>(yyextra->current->args.length());
8338 if (yyextra->oldStyleArgType.empty())
8340 std::string args = yyextra->current->args.str();
8341 static const reg::Ex re(R
"(\([^)]*\).*)");
8347 bi1=(int)match.position();
8348 size_t secondMatchStart = match.position()+match.length();
8351 bi2=(int)match.position();
8355 if (bi1!=-1 && bi2!=-1)
8358 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8360 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8361 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8363 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8364 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8365 yyextra->oldStyleArgType+=yyextra->current->args.
mid(i);
8370 yyextra->oldStyleArgType = yyextra->current->args.left(s);
8373 while (i<si && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i++;
8374 yyextra->oldStyleArgType += yyextra->current->args.mid(s,i-s);
8376 while (i<si &&
isId(yyextra->current->args.at(i))) i++;
8377 oldStyleArgName = yyextra->current->args.
mid(s,i-s);
8383 while (i>=0 &&
isId(yyextra->current->args.at(i))) i--;
8386 while (i>=0 && ((c=yyextra->current->args.at(i))==
'*' || isspace((uint8_t)c))) i--;
8390 yyextra->oldStyleArgType=yyextra->current->args.left(i);
8391 oldStyleArgPtr=yyextra->current->args.
mid(i,j-i);
8404 while (j<l && ((c=yyextra->current->args.at(j))==
'*' || isspace((uint8_t)c))) j++;
8407 oldStyleArgPtr=yyextra->current->args.
left(j);
8426 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8427 for (
Argument &a : yyextra->current->argList)
8436 a.
docs=brief+
"\n\n"+docs;
8438 else if (!brief.
empty())
8468 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8471 yyextra->current->briefFile = yyextra->fileName;
8472 yyextra->current->briefLine = yyextra->yyLineNr;
8476 yyextra->current->docFile = yyextra->fileName;
8477 yyextra->current->docLine = yyextra->yyLineNr;
8485 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8486 if (yyextra->tempEntry==0)
8491 yyextra->previous = yyextra->current;
8492 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8496 yyextra->previous = yyextra->current;
8497 yyextra->current = yyextra->tempEntry;
8498 yyextra->tempEntry.reset();
8505 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8508 if (yyextra->docBlockInBody && hideInBodyDocs)
return;
8509 int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
8512 std::shared_ptr<Entry> docEntry = yyextra->docBlockInBody && yyextra->previous ? yyextra->previous : yyextra->current;
8513 if (yyextra->docBlockInBody && docEntry && docEntry->inbodyLine==-1)
8515 docEntry->inbodyFile = yyextra->fileName;
8516 docEntry->inbodyLine = lineNr;
8520 bool needsEntry=
false;
8522 Markdown markdown(yyextra->fileName,lineNr);
8525 while (yyextra->commentScanner.parseCommentBlock(
8526 yyextra->thisParser,
8527 yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
8531 yyextra->docBlockInBody ?
false : brief,
8532 yyextra->docBlockInBody ?
false : yyextra->docBlockAutoBrief,
8533 yyextra->docBlockInBody,
8534 yyextra->protection,
8545 DString docFile = yyextra->current->docFile;
8547 yyextra->current->docFile = docFile;
8548 yyextra->current->docLine = lineNr;
8556 if (yyextra->docBlockTerm)
8558 unput(yyextra->docBlockTerm);
8559 yyextra->docBlockTerm=0;
8566 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8577 DString orgDoc = yyextra->current->doc;
8578 DString orgBrief = yyextra->current->brief;
8579 int orgDocLine = yyextra->current->docLine;
8580 int orgBriefLine = yyextra->current->briefLine;
8582 yyextra->current->doc.
clear();
8583 yyextra->current->brief.clear();
8586 int lineNr = orgDocLine;
8588 Markdown markdown(yyextra->fileName,lineNr);
8591 while (yyextra->commentScanner.parseCommentBlock(
8592 yyextra->thisParser,
8593 yyextra->current.get(),
8600 yyextra->protection,
8609 if (needsEntry)
newEntry(yyscanner);
8615 a.
docs = yyextra->current->doc;
8618 yyextra->current->doc = orgDoc;
8619 yyextra->current->brief = orgBrief;
8620 yyextra->current->docLine = orgDocLine;
8621 yyextra->current->briefLine = orgBriefLine;
8632 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8633 for (
const auto &ce : rt->children())
8635 if (!ce->program.empty())
8639 yyextra->padCount=0;
8641 yyextra->programStr = ce->program.str();
8642 yyextra->inputString = yyextra->programStr.data();
8643 yyextra->inputPosition = 0;
8644 if (ce->section.isEnum() || ce->spec.isEnum())
8645 BEGIN( FindFields ) ;
8647 BEGIN( FindMembers ) ;
8648 yyextra->current_root = ce;
8649 yyextra->fileName = ce->fileName;
8651 yyextra->yyLineNr = ce->bodyLine;
8652 yyextra->yyColNr = ce->bodyColumn;
8653 yyextra->insideObjC = ce->lang==SrcLangExt::ObjC;
8655 yyextra->current = std::make_shared<Entry>();
8656 yyextra->isStatic =
false;
8661 if (autoGroupNested && !rt->groups.empty() && !ce->section.isEnum() && !ce->spec.isEnum())
8663 ce->groups = rt->groups;
8666 size_t ni=ce->name.rfind(
"::");
8669 if ( ce->section.isClass() )
8671 if (yyextra->insidePHP || yyextra->insideD || yyextra->insideJS || yyextra->insideIDL || yyextra->insideSlice)
8673 yyextra->current->protection = yyextra->protection = Protection::Public ;
8675 else if (yyextra->insideJava)
8677 yyextra->current->protection = yyextra->protection = (ce->spec.isInterface() || ce->spec.isEnum()) ? Protection::Public : Protection::Package;
8679 else if (ce->spec.isInterface() || ce->spec.isRef() || ce->spec.isValue() || ce->spec.isStruct() || ce->spec.isUnion())
8681 if (ce->lang==SrcLangExt::ObjC)
8683 yyextra->current->protection = yyextra->protection = Protection::Protected ;
8687 yyextra->current->protection = yyextra->protection = Protection::Public ;
8692 yyextra->current->protection = yyextra->protection = Protection::Private ;
8695 else if (ce->section.isEnum() )
8697 yyextra->current->protection = yyextra->protection = ce->protection;
8699 else if (!ce->name.empty() && ce->name.at(ni)==
'@')
8701 if (ce->section.isNamespace() )
8703 yyextra->current->isStatic = yyextra->isStatic =
true;
8705 yyextra->current->protection = yyextra->protection = ce->protection;
8706 yyextra->current->exported = yyextra->exported =
false;
8708 else if (ce->section.isNamespace() )
8710 yyextra->current->protection = yyextra->protection = Protection::Public ;
8711 yyextra->current->exported = yyextra->exported = ce->exported;
8715 yyextra->current->protection = yyextra->protection = Protection::Public ;
8716 yyextra->current->exported = yyextra->exported =
false;
8718 yyextra->mtype = MethodTypes::Method;
8719 yyextra->virt = Specifier::Normal;
8726 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
8728 scannerYYlex(yyscanner);
8731 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,name);
8733 yyextra->programStr.clear();
8734 ce->program.str(std::string());
8748 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8749 for (
const auto &ce : rt->children())
8751 if (ce->section.isConcept())
8755 yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8757 yyextra->padCount =0;
8759 yyextra->programStr = ce->initializer.str();
8760 yyextra->inputString = yyextra->programStr.data();
8761 yyextra->inputPosition = 0;
8762 yyextra->current_root = ce;
8763 yyextra->fileName = ce->fileName;
8764 yyextra->yyLineNr = ce->bodyLine;
8765 yyextra->yyColNr = ce->bodyColumn;
8766 yyextra->insideObjC =
false;
8767 yyextra->current = std::make_shared<Entry>();
8771 indent.
fill(
' ',std::max(0,ce->startColumn-1));
8773 if (!ce->args.empty())
8775 templArgs=indent+
"template"+ce->args+
"\n";
8777 yyextra->current->initializer.
str(
DString(templArgs+indent+
"concept "+ce->name+
" =").str());
8779 yyextra->isStatic =
false;
8781 yyextra->current->section = EntryType::makeConceptCodePart();
8782 yyextra->current->startLine = yyextra->yyLineNr;
8783 BEGIN( FindConceptParts );
8784 scannerYYlex(yyscanner);
8785 yyextra->commentScanner.leaveCompound(yyextra->fileName,yyextra->yyLineNr,ce->name);
8796 const char *fileBuf,
8797 const std::shared_ptr<Entry> &rt,
8801 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8804 yyextra->inputString = fileBuf;
8805 yyextra->inputPosition = 0;
8806 yyextra->column = 0;
8807 scannerYYrestart(
nullptr,yyscanner);
8810 yyextra->protection = Protection::Public;
8811 yyextra->mtype = MethodTypes::Method;
8812 yyextra->isStatic =
false;
8813 yyextra->exported =
false;
8814 yyextra->virt = Specifier::Normal;
8815 yyextra->current_root = rt;
8816 yyextra->yyLineNr = 1 ;
8817 yyextra->yyBegLineNr = 1;
8818 yyextra->yyBegColNr = 0;
8819 yyextra->anonCount = 0;
8820 yyextra->anonNSCount = 0;
8821 yyextra->fileName = fileName;
8822 yyextra->clangParser = clangParser;
8824 rt->lang = yyextra->language;
8825 msg(
"Parsing file {}...\n",yyextra->fileName);
8827 yyextra->current_root = rt;
8829 yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->yyLineNr);
8830 yyextra->current = std::make_shared<Entry>();
8835 yyextra->current->name = yyextra->fileName;
8836 yyextra->current->section = sec;
8837 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8839 yyextra->current->reset();
8841 if ( yyextra->insidePHP )
8843 BEGIN( FindMembersPHP );
8845 else if ( yyextra->insideJava )
8847 yyextra->current->name=
"java::lang";
8848 yyextra->current->fileName = yyextra->fileName;
8849 yyextra->current->section = EntryType::makeUsingDir();
8850 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
8852 BEGIN( FindMembers );
8856 BEGIN( FindMembers );
8859 scannerYYlex(yyscanner);
8861 if (YY_START==Comment)
8863 warn(yyextra->fileName,yyextra->yyLineNr,
"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
8867 yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->yyLineNr);
8869 yyextra->programStr.clear();
8870 rt->program.str(std::string());
8875 yyextra->anonNSCount++;
8878 for (
auto &[
parent,child]: yyextra->outerScopeEntries)
8881 parent->moveToSubEntryAndKeep(child);
8883 yyextra->outerScopeEntries.clear();
8892 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
8895 warn(yyextra->fileName,yyextra->yyLineNr,
"Empty prototype found!");
8898 if (!yyextra->current)
8903 const char *orgInputString;
8904 int orgInputPosition;
8905 YY_BUFFER_STATE orgState;
8908 orgState = YY_CURRENT_BUFFER;
8909 yy_switch_to_buffer(yy_create_buffer(
nullptr,
YY_BUF_SIZE, yyscanner), yyscanner);
8910 orgInputString = yyextra->inputString;
8911 orgInputPosition = yyextra->inputPosition;
8914 yyextra->inputString = text.
data();
8915 yyextra->inputPosition = 0;
8916 yyextra->column = 0;
8917 scannerYYrestart(
nullptr, yyscanner);
8919 scannerYYlex(yyscanner);
8921 yyextra->current->name = yyextra->current->name.stripWhiteSpace();
8922 if (yyextra->current->section.isMemberDoc() && yyextra->current->args.empty())
8924 yyextra->current->section = EntryType::makeVariableDoc();
8928 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
8929 yy_switch_to_buffer(orgState, yyscanner);
8930 yyextra->inputString = orgInputString;
8931 yyextra->inputPosition = orgInputPosition;
8947 scannerYYlex_init_extra(&
p->state,&
p->yyscanner);
8955 scannerYYlex_destroy(
p->yyscanner);
8959 const char *fileBuf,
8960 const std::shared_ptr<Entry> &root,
8964 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
8965 yyextra->thisParser =
this;
8969 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
8977 return (SrcLangExt::Cpp == lang) || (SrcLangExt::Lex == lang) ||
8978 !( fe==
".java" || fe==
".as" || fe==
".d" || fe==
".php" ||
8979 fe==
".php4" || fe==
".inc" || fe==
".phtml"|| fe==
".php5"
8990#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
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)
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)
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)
static void parsePrototype(yyscan_t yyscanner, const DString &text)
static void parseCompounds(yyscan_t yyscanner, std::shared_ptr< Entry > rt)
static void parseMain(yyscan_t yyscanner, const DString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, ClangTUParser *clangParser)
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)
EntryType guessSection(const DString &name)