20%option never-interactive
21%option case-insensitive
22%option prefix="vhdlcodeYY"
24%option extra-type="struct vhdlcodeYY_state *"
28#define YY_TYPEDEF_YY_SCANNER_T
29#define yyguts_t vhdlcodeYYguts_t
42#include <unordered_set>
62#define YY_NO_UNISTD_H 1
66#define DBG_CTX(x) do { } while(0)
150#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
The common base class of all entity definitions found in the sources.
A model of a file symbol.
A model of a class/file/namespace member symbol.
Class representing a list of different code generators.
Web server based search engine.
Some helper functions for std::string.
const Definition * searchCtx
int yyLineNr
current line number
std::vector< const Definition * > foldStack
std::unique_ptr< FileDef > exampleFileDef
const MemberDef * vhdlMember
TooltipManager tooltipManager
int lastCopyCommentContext
std::unordered_set< std::string > vhdlKeyDict
const Definition * currentDefinition
bool insideSpecialComment
int inputPosition
read offset during parsing
const FileDef * sourceFileDef
const MemberDef * currentMemberDef
const char * inputString
the code fragment as text
const char * currentFontClass
int inputLines
number of line in the code fragment
A bunch of utility functions.
static void endCodeLine(yyscan_t yyscanner)
static void generateClassOrGlobalLink(yyscan_t yyscanner, OutputCodeList &ol, const DString &clName, bool typeOnly=false, const DString &curr_class=DString())
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static void setCurrentDoc(yyscan_t yyscanner, const DString &anchor)
static void appStringLower(DString &qcs, const char *text)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static int countLines(yyscan_t yyscanner)
static const char * stateToString(int state)
static void generateFuncLink(yyscan_t yyscanner, OutputCodeList &ol, const MemberDef *mdef)
static void codifyLines(yyscan_t yyscanner, const DString &text, const DString &cl=DString(), bool classlink=false, bool comment=false)
static void codifyMapLines(yyscan_t yyscanner, const DString &text)
static void addToSearchIndex(yyscan_t yyscanner, const DString &text)
static void writeProcessProto(yyscan_t yyscanner)
static bool writeColoredWord(yyscan_t yyscanner, DString &word)
static void startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
static void writeMultiLineCodeLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const DString &text)
static const char * getLexerFILE()
static void generateMemLink(yyscan_t yyscanner, OutputCodeList &ol, DString &clName, DString &memberName)
static void writeFuncProto(yyscan_t yyscanner)
static void writeFont(yyscan_t yyscanner, const char *s, const DString &text, bool specialComment=false)
static void writeWord(yyscan_t yyscanner, const DString &word, const DString &curr_class=DString(), bool classLink=false)
static bool checkVhdlString(yyscan_t yyscanner, DString &name)
162NAME [a-z_A-Z][ a-z_A-Z0-9]*
163FUNCNAME [a-z_A-Z"][a-z_A-Z0-9+*"/=<>-]*
164ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
165SPECSIGN [:;, +*&\/=<>'\t]*
166DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
167ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
168ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
170ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
171PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
173END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
174END2 [^a-zA-Z_]("end"){BN}*[;]
175END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
176END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
177ENDEFUNC {END3}|{END4}|{END2}
179KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
180TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
181FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
183ARITHOP "+"|"-"|"/"|"*"|"%"|"/="|":="
184ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
185LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
186BITOP "&"|"|"|"^"|"<<"|">>"|"~"
187OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
189PORT {B}*("port"){BN}*("(")
190GENERIC {B}*("generic"){BN}*("(")
197MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
198MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1}
199MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
200MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1})
202XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFIG"|"CONFIG_MODE"|"COOL_CLK"|"DATA_GATE"|"DCI_VALUE"|"DISABLE"|"DRIVE"|"DROP_SPEC"|"ENABLE"|"FAST"|"FEEDBACK"|"FILE"|"FLOAT"|"FROM-THRU-TO"|"FROM-TO"|"HBLKNM"|"HU_SET"|"INREG"|"IOB"|"IOBDELAY"|"IOSTANDARD"|"KEEP"|"KEEPER"|"LOC"|"LOCATE"|"LOCK_PINS"|"MAP"|"MAXDELAY"|"MAXPT"|"MAXSKEW"|"NODELAY"|"NOREDUCE"|"OFFSET"|"OPEN_DRAIN"|"OPT_EFFORT"|"OPTIMIZE"|"PERIOD"|"PIN"|"PRIORITY"|"PROHIBIT"|"PULLDOWN"|"PULLUP"|"PWR_MODE"|"REG"|"RLOC"|"RLOC_ORIGIN"|"RLOC_RANGE"|"SAVE NET"|"FLAG"|"SYSTEM_JITTER"|"TEMPERATURE"|"TIMEGRP"|"TIMESPEC"|"VOLTAGE"
225 yyextra->braceCount++;
233 auto ql =
split(tt.str(),
"=>");
236 unsigned int index=0;
238 char cc=t1.at(index);
239 while (cc==
' ' || cc==
'\t')
244 yyextra->code->codify(c2);
246 if (index>=t1.size())
break;
255 while (index++<t1.size())
258 if (cc==
' ' || cc==
'\t')
263 yyextra->code->codify(c2);
271 while (cc==
' ' || cc==
'\t')
276 yyextra->code->codify(c2);
278 if (index>=t1.size())
break;
281 s2=s2.stripWhiteSpace();
286 while (index++<t1.size())
288 if (t1.at(index)==
' ')
290 yyextra->code->codify(
" ");
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
static void deleteAllChars(DString &s, char c)
StringVector split(const std::string &s, const std::string &delimiter, bool retainEmpty=false)
split input string s by string delimiter delimiter.
307 yyextra->braceCount--;
309 if (yyextra->braceCount==0)
315<ParseFuncProto>{NAME} {
317 tmp=tmp.stripWhiteSpace();
319 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
static bool isNumber(const std::string &s)
342 yyextra->funcProto.append(yytext);
343 if (yyextra->isProto)
352 yyextra->funcProto.append(yytext);
353 if (yyextra->isProto)
360<ParseType>{ENDEFUNC} {
365 tt.stripWhiteSpace();
366 static const reg::Ex regg(R
"(\s+)");
367 auto ql =
split(tt.str(),regg);
372 if (index1==std::string::npos &&
373 index2==std::string::npos &&
374 index3==std::string::npos &&
375 index4==std::string::npos)
Class representing a regular expression.
size_t findIndex(const StringVector &sv, const std::string &s)
find the index of a string in a vector of strings, returns std::string::npos if the string could not ...
387 yyextra->vhdlKeyDict.clear();
390<ParseType>^{B}*("begin "|"begin") {
392 yyextra->isFuncProto=
false;
395<ParseType>{SPECSIGN} {
396 yyextra->funcProto.append(yytext);
397 if (yyextra->isProto)
403<ParseType>["_a-zA-Z0-9]* {
405 yyextra->funcProto.append(yytext);
408 if (yyextra->isFuncProto && yyextra->braceCount==0)
410 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
413 if (yyextra->isProto)
417 if (!yyextra->isFuncProto &&
418 yyextra->vhdlKeyDict.find(yyextra->prevString.str())==yyextra->vhdlKeyDict.end())
420 val=val.stripWhiteSpace();
441<ParseType>{BRACEOPEN} {
442 yyextra->braceCount++;
443 yyextra->funcProto+=
'(';
444 if (yyextra->isProto)
451<ParseType>{BRACECLOSE} {
452 yyextra->braceCount--;
453 yyextra->funcProto+=
')';
454 if (yyextra->isProto)
458 if (yyextra->braceCount==0 && !yyextra->isProto)
460 yyextra->isProto=
true;
465 if (yyextra->isPackageBody)
472<ClassesName>{FUNCNAME} {
474 yyextra->currClass.clear();
475 yyextra->currClass.append(yytext);
476 yyextra->currClass=yyextra->currClass.stripWhiteSpace();
483<ParseComponent>{BRACEOPEN} {
484 yyextra->braceCount++;
485 yyextra->code->codify(yytext);
489<ParseComponent>{BRACECLOSE} {
490 yyextra->braceCount--;
491 yyextra->code->codify(yytext);
492 if (yyextra->braceCount==0 && !yyextra->isComponent)
494 yyextra->tempComp.clear();
499 BEGIN(ParseComponent);
503<ParseComponent>{B}*"-" {
504 if (strlen(yytext)>=2)
514<ParseComponent>{SPECSIGN} {
520<ParseComponent>"\n"|" " {
524<ParseComponent>{DIGITSS} {
530<ParseComponent>{PORT} {
532 yyextra->braceCount=1;
533 yyextra->isComponent=
false;
536<ParseComponent>{GENERIC} {
538 yyextra->braceCount=1;
541<ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* {
553<ParseComponent>{STRING} {
562<ParseProcessProto>[^()]* {
563 yyextra->funcProto.append(yytext);
568<ParseProcessProto>{BRACEOPEN} {
569 yyextra->funcProto.append(yytext);
570 yyextra->braceCount++;
573<ParseProcessProto>{BRACECLOSE} {
574 yyextra->funcProto.append(yytext);
575 yyextra->braceCount--;
576 if (yyextra->braceCount==0)
583<ParsePackage>[^:;]* {
606 writeFont(yyscanner,
"keywordflow",yytext);
A abstract class representing of a compound symbol.
DString & prepend(const char *s)
static ClassDef * getPackageName(const DString &name)
std::vector< std::string > StringVector
611<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3}|{MAPCOMPONENT4} {
613 size_t j=tt.find(
'.');
628 yyextra->PortMapComp=
name;
635 tt.stripPrefix(left);
637 yyextra->PortMapComp=left;
644 if (tt.contains(
':',
false))
653 yyextra->braceCount=1;
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
size_t find(char c, size_t pos=0) const
DString left(size_t len) const
static DString getIndexWord(const DString &, int index)
const char * name(int level)
657<Bases>^{B}*("component"){BN}+{FUNCNAME} {
662 yyextra->tempComp=temp;
664 yyextra->braceCount=0;
665 yyextra->isComponent=
true;
666 BEGIN(ParseComponent);
671<Bases>{ARCHITECTURE} {
672 yyextra->PortMapComp.clear();
674 yyextra->currArch =
true;
677 yyextra->currClass=temp;
680 yyextra->isPackageBody=
false;
684<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} {
693 yyextra->currClass.clear();
694 yyextra->currClass=temp;
695 yyextra->isProto=
false;
696 yyextra->isPackageBody=
true;
const std::string & str() const
700 yyextra->isFuncProto=
true;
701 yyextra->funcProto.clear();
702 yyextra->funcProto.append(yytext);
703 yyextra->vhdlKeyDict.clear();
705 if (yyextra->prevString.contains(
'('))
707 yyextra->braceCount=1;
708 BEGIN(ParseProcessProto);
716<Bases>("end"){BN}+("process") {
717 yyextra->isFuncProto=
false;
723<Bases>^{B}*("begin "|"begin") {
724 yyextra->isFuncProto=
false;
725 writeFont(yyscanner,
"vhdlkeyword",yytext);
728<Bases>^{B}*("use"|"library"){BN}+ {
729 writeFont(yyscanner,
"vhdlkeyword",yytext);
734<Bases>^{B}*("use"){BN}+("configuration")[^\n]* {
739 yyextra->vhdlKeyDict.clear();
740 yyextra->funcProto.clear();
741 yyextra->isProto=
false;
742 yyextra->funcProto.append(yytext);
743 yyextra->braceCount=1;
747<Bases>^{B}*("entity"|"package"){BN}+ {
749 writeFont(yyscanner,
"keywordflow",yytext);
750 yyextra->isPackageBody=
false;
754<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
755 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
756 yyextra->currArch =
false;
758<Bases>"end"{BN}+{FUNCNAME} {
759 if (yyextra->currArch)
761 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
762 yyextra->currArch =
false;
796 yyextra->code->codify(yytext);
815<Bases,ParseComponent>{DIGITSS} {
821<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
822 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
828 if (yyextra->isFuncProto)
830 BEGIN(ParseFuncProto);
840 yyextra->code->codify(yytext);
844<Bases>","|"."|":"|"'"|"("|")" {
846 yyextra->code->codify(yytext);
865<Bases>{B}*"#"[^\n]* {
869<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
874<Bases>^{B}*"set_"[^\n]* {
884 yyextra->code->codify(yytext);
887 yyextra->code->codify(yytext);
891<*>\n?"--!"[^\n]*/\n{B}*"--!" {
892 if (YY_START!=CopyComment)
895 yyextra->lastCopyCommentContext=YY_START;
902 size_t i=text.
find(
"--");
903 bool isSpecialComment = i!=
DString::npos && yytext[i+2]==
'!';
904 if (isSpecialComment && YY_START!=CopyComment)
909 if (isSpecialComment)
913 if (YY_START==CopyComment)
915 BEGIN(yyextra->lastCopyCommentContext);
920 size_t i=text.
find(
"--");
921 bool isSpecialComment = i!=
DString::npos && yytext[i+2]==
'!';
922 if (isSpecialComment)
927 if (isSpecialComment)
941 int inputPosition = yyextra->inputPosition;
942 const char *s = yyextra->inputString + inputPosition;
944 while( c < max_size && *s)
949 yyextra->inputPosition += c;
958 if (yyextra->searchCtx)
972 if (name.empty())
return false;
974 size_t len=name.length();
975 if (len>2 && name.at(0)==
'"' && name.at(len-1)==
'"')
977 DString inside = name.mid(1,len-2);
978 static const reg::Ex regg(R
"(\s+)");
982 yyextra->code->codify(
"\"");
984 yyextra->code->codify(inside);
986 yyextra->code->codify(
"\"");
991 yyextra->code->codify(name);
1000 yyextra->code->codify(name);
1021 while (!yyextra->foldStack.empty())
1023 const Definition *dd = yyextra->foldStack.back();
1026 yyextra->code->endFold();
1028 yyextra->foldStack.pop_back();
1039 if (endLine!=-1 && startLine!=endLine && (yyextra->foldStack.empty() || yyextra->foldStack.back()->getEndBodyLine()!=startLine))
1042 yyextra->code->startFold(yyextra->yyLineNr,
"",
"");
1043 yyextra->foldStack.push_back(d);
1057 if (yyextra->sourceFileDef && yyextra->lineNumbers)
1064 const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
1066 if (!yyextra->includeCodeFragment && d)
1068 yyextra->currentDefinition = d;
1069 yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
1070 if (!yyextra->tempComp.empty() && yyextra->currentMemberDef )
1073 DString nn=yyextra->currentMemberDef->name();
1077 yyextra->currentMemberDef=mdeff;
1082 lineAnchor.
sprintf(
"l%05d",yyextra->yyLineNr);
1083 if (yyextra->currentMemberDef)
1086 yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
1087 yyextra->currentMemberDef->getOutputFileBase(),
1088 yyextra->currentMemberDef->anchor(),yyextra->yyLineNr,
1089 !yyextra->includeCodeFragment);
1098 !yyextra->includeCodeFragment);
1110 !yyextra->includeCodeFragment);
1113 yyextra->code->startCodeLine(yyextra->yyLineNr);
1114 yyextra->insideCodeLine=
true;
1115 if (yyextra->currentFontClass)
1117 yyextra->code->startFontClass(yyextra->currentFontClass);
1125 yyextra->code->endCodeLine();
1126 yyextra->insideCodeLine=
false;
1132 if (yyextra->insideCodeLine)
1136 const char *fc = yyextra->currentFontClass;
1137 if (yyextra->yyLineNr<yyextra->inputLines)
1139 yyextra->currentFontClass = fc;
1156 if (ttt.
empty())
return;
1157 for (
unsigned int j=0;j<ttt.
length();j++)
1160 if (c==
' '|| c==
',' || c==
';' || c==
':' || c==
'(' || c==
')' || c==
'\r' || c==
'\t' || c==
'.')
1169 if (!tclass.
empty())
1184 yyextra->code->codify(temp);
1195 yyextra->code->codify(cc);
1208 if (!tclass.
empty())
1225 yyextra->code->codify(temp);
1230 yyextra->code->codify(temp);
1244 if (text.
empty())
return;
1246 const char *p=text.
data(),*sp=p;
1252 while ((c=*p++) && c!=
'\n') {}
1255 yyextra->yyLineNr++;
1257 line = line.
left((
int)(p-sp)-1);
1292 if (text.
empty())
return;
1294 yyextra->tooltipManager.addTooltip(d);
1299 if (!sourceTooltips)
1304 const char *p=text.
data();
1309 while ((c=*p++) && c!=
'\n') {}
1312 yyextra->yyLineNr++;
1345 if (memberName.
empty())
return;
1385 if (className.
empty())
return;
1392 if (!cd && !curr_class.
empty())
1439 const char *p=yyextra->inputString;
1445 if (c==
'\n') count++;
1447 if (p>yyextra->inputString && *(p-1)!=
'\n')
1460 if (yyextra->currentFontClass)
1462 yyextra->code->endFontClass();
1463 yyextra->currentFontClass=0;
1465 if (specialComment && yyextra->insideSpecialComment)
1467 yyextra->code->endSpecialComment();
1468 yyextra->insideSpecialComment=
false;
1475 if (s==
nullptr)
return;
1480 yyextra->code->startSpecialComment();
1481 yyextra->insideSpecialComment =
true;
1483 if (
dstrcmp(yyextra->currentFontClass,s)!=0)
1486 yyextra->code->startFontClass(s);
1487 yyextra->currentFontClass=s;
1494 if (s==
nullptr || text.
empty())
return;
1497 yyextra->code->codify(text);
1514 if (text.
empty())
return;
1520 const char *p=text.
data();
1526 while ((c=*p++) && c!=
'\n' && c!=
':' && c !=
' ' && c !=
'(' && c!=
'\0' && c!=
'\t')
1531 if (c==
'\0')
return;
1532 if (!temp.
empty()) wordCounter++;
1540 if (wordCounter==2 || wordCounter==3)
1543 if (q==
"entity" || q==
"component" || q==
"configuration" || q==
"port" || q==
"generic")
1549 yyextra->PortMapComp=temp;
1577 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1583 yyextra->funcProto.stripPrefix(temp);
1585 temp=yyextra->currClass;
1586 if (yyextra->isPackageBody)
1595 yyextra->funcProto.stripPrefix(name);
1596 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1600 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1609 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1610 yyextra->vhdlKeyDict.clear();
1637 vhdlcodeYYlex_init_extra(&
p->state,&
p->yyscanner);
1646 vhdlcodeYYlex_destroy(
p->yyscanner);
1651 p->state.vhdlKeyDict.clear();
1658 bool stripCodeComments,
1665 if (s.
empty())
return;
1671 if (dd) yyextra->currClass = dd->
name();
1675 yyextra->code = &od;
1676 yyextra->inputString = s.
data();
1677 yyextra->inputPosition = 0;
1678 yyextra->currentFontClass =
nullptr;
1679 yyextra->insideCodeLine =
false;
1680 yyextra->searchCtx = options.
searchCtx();
1681 yyextra->insideSpecialComment =
false;
1684 yyextra->foldStack.clear();
1687 yyextra->exampleBlock = options.
isExample();
1689 yyextra->sourceFileDef = options.
fileDef();
1695 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
1697 if (yyextra->sourceFileDef)
1701 yyextra->currentDefinition =
nullptr;
1702 yyextra->currentMemberDef =
nullptr;
1703 yyextra->vhdlMember =
nullptr;
1704 if (!yyextra->exampleName.empty())
1710 if (!yyextra->lexInit)
1713 yyextra->lexInit=
true;
1715 vhdlcodeYYrestart(
nullptr, yyscanner );
1717 vhdlcodeYYlex(yyscanner);
1718 if (yyextra->insideCodeLine)
1724 while (!yyextra->foldStack.empty())
1726 yyextra->code->endFold();
1727 yyextra->foldStack.pop_back();
1730 if (yyextra->exampleFileDef)
1733 yyextra->exampleFileDef.reset();
1734 yyextra->sourceFileDef =
nullptr;
1738 yyextra->tooltipManager.writeTooltips(od);
1741#include "vhdlcode.l.h"
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
DString fill(char c, size_t len)
Fills a string with a predefined character.
char & at(size_t i)
Returns a reference to the character at index i.
DString right(size_t len) const
DString & sprintf(const char *format,...)
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.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
static bool isFlagSet(const DebugMask mask)
virtual int getEndBodyLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual const DString & name() const =0
virtual DString briefDescriptionAsTooltip() const =0
virtual bool isLinkableInProject() const =0
virtual DString anchor() const =0
virtual int getStartDefLine() const =0
virtual DString getReference() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual Definition * getOuterScope() const =0
virtual DString getOutputFileBase() const =0
static SearchIndexIntf searchIndex
virtual DString fileName() const =0
virtual const ClassDef * getClassDef() const =0
void writeCodeLink(CodeSymbolType type, const DString &ref, const DString &file, const DString &anchor, const DString &name, const DString &tooltip)
void stripCodeComments(bool b)
void addWord(const DString &word, bool hiPriority)
void setCurrentDoc(const Definition *ctx, const DString &anchor, bool isSourceFile)
void resetCodeParserState() override
Resets the state of the code parser.
void parseCode(OutputCodeList &codeOutIntf, const DString &scopeName, const DString &input, SrcLangExt lang, bool stripCodeComments, const CodeParserOptions &options) override
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
~VHDLCodeParser() override
std::unique_ptr< Private > p
static const char * findKeyWord(const DString &word)
static const MemberDef * findFunction(const DString &name, const DString &package)
static void parseFuncProto(const DString &text, DString &name, DString &ret, bool doc=false)
static const MemberDef * findMember(const DString &className, const DString &memName)
static ClassDef * getClass(const DString &name)
ClassDef * getClass(const DString &n)
ClassDef * toClassDef(Definition *d)
#define Config_getBool(name)
int dstrcmp(const char *str1, const char *str2)
const char * qPrint(const char *s)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &dn)
Options to configure the code parser.
const Definition * searchCtx() const
DString exampleName() const
const FileDef * fileDef() const
const MemberDef * memberDef() const
bool showLineNumbers() const
bool inlineFragment() const
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
static void codeFolding(yyscan_t yyscanner, const Definition *d)