18%option never-interactive
19%option case-insensitive
20%option prefix="vhdlcodeYY"
22%option extra-type="struct vhdlcodeYY_state *"
26#define YY_TYPEDEF_YY_SCANNER_T
33#include <unordered_set>
61#define YY_NO_UNISTD_H 1
65#define DBG_CTX(x) do { } while(0)
149#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
152static inline const char *
getLexerFILE() {
return __FILE__;}
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.
This is an alternative implementation of QCString.
static void writeMultiLineCodeLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const QCString &text)
static void endCodeLine(yyscan_t yyscanner)
static void generateClassOrGlobalLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &clName, bool typeOnly=FALSE, bool varOnly=FALSE)
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static void codifyLines(yyscan_t yyscanner, const QCString &text)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static int countLines(yyscan_t yyscanner)
static void addToSearchIndex(yyscan_t yyscanner, const QCString &text)
static const char * stateToString(int state)
static void startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
static const char * getLexerFILE()
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
Web server based search engine.
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 generateMemLink(yyscan_t yyscanner, OutputCodeList &ol, QCString &clName, QCString &memberName)
static void appStringLower(QCString &qcs, const char *text)
static void writeWord(yyscan_t yyscanner, const QCString &word, const QCString &curr_class=QCString(), bool classLink=false)
static bool writeColoredWord(yyscan_t yyscanner, QCString &word)
static void generateFuncLink(yyscan_t yyscanner, OutputCodeList &ol, const MemberDef *mdef)
static void writeProcessProto(yyscan_t yyscanner)
static void codifyMapLines(yyscan_t yyscanner, const QCString &text)
static bool checkVhdlString(yyscan_t yyscanner, QCString &name)
static void writeFuncProto(yyscan_t yyscanner)
static void writeFont(yyscan_t yyscanner, const char *s, const QCString &text, bool specialComment=false)
161NAME [a-z_A-Z][ a-z_A-Z0-9]*
162FUNCNAME [a-z_A-Z"][a-z_A-Z0-9+*"/=<>-]*
163ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
164SPECSIGN [:;, +*&\/=<>'\t]*
165DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
166ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
167ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
169ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
170PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
172END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
173END2 [^a-zA-Z_]("end"){BN}*[;]
174END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
175END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
176ENDEFUNC {END3}|{END4}|{END2}
178KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
179TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
180FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
182ARITHOP "+"|"-"|"/"|"*"|"%"|"/="|":="
183ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
184LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
185BITOP "&"|"|"|"^"|"<<"|">>"|"~"
186OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
188PORT {B}*("port"){BN}*("(")
189GENERIC {B}*("generic"){BN}*("(")
196MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
197MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1}
198MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
199MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1})
201XILINX "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"
224 yyextra->braceCount++;
232 auto ql =
split(tt.str(),
"=>");
235 unsigned int index=0;
237 char cc=t1.at(index);
238 while (cc==
' ' || cc==
'\t')
243 yyextra->code->codify(c2);
245 if (index>=t1.size())
break;
254 while (index++<t1.size())
257 if (cc==
' ' || cc==
'\t')
262 yyextra->code->codify(c2);
270 while (cc==
' ' || cc==
'\t')
275 yyextra->code->codify(c2);
277 if (index>=t1.size())
break;
280 s2=s2.stripWhiteSpace();
285 while (index++<t1.size())
287 if (t1.at(index)==
' ')
289 yyextra->code->codify(
" ");
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
static void deleteAllChars(QCString &s, char c)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
306 yyextra->braceCount--;
308 if (yyextra->braceCount==0)
314<ParseFuncProto>{NAME} {
316 tmp=tmp.stripWhiteSpace();
318 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
static bool isNumber(const std::string &s)
341 yyextra->funcProto.append(yytext);
342 if (yyextra->isProto)
351 yyextra->funcProto.append(yytext);
352 if (yyextra->isProto)
359<ParseType>{ENDEFUNC} {
364 tt.stripWhiteSpace();
365 static const reg::Ex regg(R
"(\s+)");
366 auto ql =
split(tt.str(),regg);
Class representing a regular expression.
int findIndex(const StringVector &sv, const std::string &s)
find the index of a string in a vector of strings, returns -1 if the string could not be found
383 yyextra->vhdlKeyDict.clear();
386<ParseType>^{B}*("begin "|"begin") {
388 yyextra->isFuncProto=
false;
391<ParseType>{SPECSIGN} {
392 yyextra->funcProto.append(yytext);
393 if (yyextra->isProto)
399<ParseType>["_a-zA-Z0-9]* {
401 yyextra->funcProto.append(yytext);
404 if (yyextra->isFuncProto && yyextra->braceCount==0)
406 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
409 if (yyextra->isProto)
413 if (!yyextra->isFuncProto &&
414 yyextra->vhdlKeyDict.find(yyextra->prevString.str())==yyextra->vhdlKeyDict.end())
416 val=val.stripWhiteSpace();
437<ParseType>{BRACEOPEN} {
438 yyextra->braceCount++;
439 yyextra->funcProto+=
'(';
440 if (yyextra->isProto)
447<ParseType>{BRACECLOSE} {
448 yyextra->braceCount--;
449 yyextra->funcProto+=
')';
450 if (yyextra->isProto)
454 if (yyextra->braceCount==0 && !yyextra->isProto)
456 yyextra->isProto=
true;
461 if (yyextra->isPackageBody)
468<ClassesName>{FUNCNAME} {
470 yyextra->currClass.clear();
471 yyextra->currClass.append(yytext);
472 yyextra->currClass=yyextra->currClass.stripWhiteSpace();
479<ParseComponent>{BRACEOPEN} {
480 yyextra->braceCount++;
481 yyextra->code->codify(yytext);
485<ParseComponent>{BRACECLOSE} {
486 yyextra->braceCount--;
487 yyextra->code->codify(yytext);
488 if (yyextra->braceCount==0 && !yyextra->isComponent)
490 yyextra->tempComp.clear();
495 BEGIN(ParseComponent);
499<ParseComponent>{B}*"-" {
500 if (strlen(yytext)>=2)
510<ParseComponent>{SPECSIGN} {
516<ParseComponent>"\n"|" " {
520<ParseComponent>{DIGITSS} {
526<ParseComponent>{PORT} {
528 yyextra->braceCount=1;
529 yyextra->isComponent=
false;
532<ParseComponent>{GENERIC} {
534 yyextra->braceCount=1;
537<ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* {
549<ParseComponent>{STRING} {
558<ParseProcessProto>[^()]* {
559 yyextra->funcProto.append(yytext);
564<ParseProcessProto>{BRACEOPEN} {
565 yyextra->funcProto.append(yytext);
566 yyextra->braceCount++;
569<ParseProcessProto>{BRACECLOSE} {
570 yyextra->funcProto.append(yytext);
571 yyextra->braceCount--;
572 if (yyextra->braceCount==0)
579<ParsePackage>[^:;]* {
602 writeFont(yyscanner,
"keywordflow",yytext);
A abstract class representing of a compound symbol.
QCString & prepend(const char *s)
QCString & append(char c)
static ClassDef * getPackageName(const QCString &name)
std::vector< std::string > StringVector
607<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3}|{MAPCOMPONENT4} {
615 tt=tt.right(tt.length()-j-1);
619 j=left.
find(
'(',
false);
624 yyextra->PortMapComp=name;
631 tt.stripPrefix(left);
633 yyextra->PortMapComp=left;
640 if (tt.contains(
':',
false))
649 yyextra->braceCount=1;
int find(char c, int index=0, bool cs=TRUE) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString right(size_t len) const
QCString left(size_t len) const
static QCString getIndexWord(const QCString &, int index)
653<Bases>^{B}*("component"){BN}+{FUNCNAME} {
658 yyextra->tempComp=temp;
660 yyextra->braceCount=0;
661 yyextra->isComponent=
true;
662 BEGIN(ParseComponent);
667<Bases>{ARCHITECTURE} {
668 yyextra->PortMapComp.clear();
670 yyextra->currArch =
true;
673 yyextra->currClass=temp;
676 yyextra->isPackageBody=
false;
680<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} {
689 yyextra->currClass.clear();
690 yyextra->currClass=temp;
691 yyextra->isProto=
false;
692 yyextra->isPackageBody=
true;
const std::string & str() const
696 yyextra->isFuncProto=
true;
697 yyextra->funcProto.clear();
698 yyextra->funcProto.append(yytext);
699 yyextra->vhdlKeyDict.clear();
701 if (yyextra->prevString.contains(
'('))
703 yyextra->braceCount=1;
704 BEGIN(ParseProcessProto);
712<Bases>("end"){BN}+("process") {
713 yyextra->isFuncProto=
false;
719<Bases>^{B}*("begin "|"begin") {
720 yyextra->isFuncProto=
false;
721 writeFont(yyscanner,
"vhdlkeyword",yytext);
724<Bases>^{B}*("use"|"library"){BN}+ {
725 writeFont(yyscanner,
"vhdlkeyword",yytext);
730<Bases>^{B}*("use"){BN}+("configuration")[^\n]* {
735 yyextra->vhdlKeyDict.clear();
736 yyextra->funcProto.clear();
737 yyextra->isProto=
false;
738 yyextra->funcProto.append(yytext);
739 yyextra->braceCount=1;
743<Bases>^{B}*("entity"|"package"){BN}+ {
745 writeFont(yyscanner,
"keywordflow",yytext);
746 yyextra->isPackageBody=
false;
750<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
751 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
752 yyextra->currArch =
false;
754<Bases>"end"{BN}+{FUNCNAME} {
755 if (yyextra->currArch)
757 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
758 yyextra->currArch =
false;
792 yyextra->code->codify(yytext);
811<Bases,ParseComponent>{DIGITSS} {
817<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
818 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
824 if (yyextra->isFuncProto)
826 BEGIN(ParseFuncProto);
836 yyextra->code->codify(yytext);
840<Bases>","|"."|":"|"'"|"("|")" {
842 yyextra->code->codify(yytext);
861<Bases>{B}*"#"[^\n]* {
865<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
870<Bases>^{B}*"set_"[^\n]* {
880 yyextra->code->codify(yytext);
883 yyextra->code->codify(yytext);
887<*>\n?"--!"[^\n]*/\n{B}*"--!" {
888 if (YY_START!=CopyComment)
891 yyextra->lastCopyCommentContext=YY_START;
898 int i=text.
find(
"--");
899 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
900 if (isSpecialComment && YY_START!=CopyComment)
905 if (isSpecialComment)
909 if (YY_START==CopyComment)
911 BEGIN(yyextra->lastCopyCommentContext);
916 int i=text.
find(
"--");
917 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
918 if (isSpecialComment)
923 if (isSpecialComment)
936 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
937 int inputPosition = yyextra->inputPosition;
938 const char *s = yyextra->inputString + inputPosition;
940 while( c < max_size && *s)
945 yyextra->inputPosition += c;
951 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
954 if (yyextra->searchCtx)
967 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
968 if (name.
isEmpty())
return false;
971 if (len>2 && name.
at(0)==
'"' && name.
at(len-1)==
'"')
974 static const reg::Ex regg(R
"(\s+)");
978 yyextra->code->codify(
"\"");
980 yyextra->code->codify(inside);
982 yyextra->code->codify(
"\"");
987 yyextra->code->codify(name);
996 yyextra->code->codify(name);
1016 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1017 while (!yyextra->foldStack.empty())
1019 const Definition *dd = yyextra->foldStack.back();
1022 yyextra->code->endFold();
1024 yyextra->foldStack.pop_back();
1035 if (endLine!=-1 && startLine!=endLine && (yyextra->foldStack.empty() || yyextra->foldStack.back()->getEndBodyLine()!=startLine))
1038 yyextra->code->startFold(yyextra->yyLineNr,
"",
"");
1039 yyextra->foldStack.push_back(d);
1051 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1053 if (yyextra->sourceFileDef && yyextra->lineNumbers)
1060 const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
1062 if (!yyextra->includeCodeFragment && d)
1064 yyextra->currentDefinition = d;
1065 yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
1066 if (!yyextra->tempComp.isEmpty() && yyextra->currentMemberDef )
1069 QCString nn=yyextra->currentMemberDef->name();
1073 yyextra->currentMemberDef=mdeff;
1078 lineAnchor.
sprintf(
"l%05d",yyextra->yyLineNr);
1079 if (yyextra->currentMemberDef)
1082 yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
1083 yyextra->currentMemberDef->getOutputFileBase(),
1084 yyextra->currentMemberDef->anchor(),yyextra->yyLineNr,
1085 !yyextra->includeCodeFragment);
1094 !yyextra->includeCodeFragment);
1106 !yyextra->includeCodeFragment);
1109 yyextra->code->startCodeLine(yyextra->yyLineNr);
1110 yyextra->insideCodeLine=
true;
1111 if (yyextra->currentFontClass)
1113 yyextra->code->startFontClass(yyextra->currentFontClass);
1119 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1121 yyextra->code->endCodeLine();
1122 yyextra->insideCodeLine=
false;
1127 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1128 if (yyextra->insideCodeLine)
1132 const char *fc = yyextra->currentFontClass;
1133 if (yyextra->yyLineNr<yyextra->inputLines)
1135 yyextra->currentFontClass = fc;
1147 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1152 if (ttt.isEmpty())
return;
1153 for (
unsigned int j=0;j<ttt.length();j++)
1156 if (c==
' '|| c==
',' || c==
';' || c==
':' || c==
'(' || c==
')' || c==
'\r' || c==
'\t' || c==
'.')
1165 if (!tclass.isEmpty())
1180 yyextra->code->codify(temp);
1191 yyextra->code->codify(cc);
1204 if (!tclass.isEmpty())
1221 yyextra->code->codify(temp);
1226 yyextra->code->codify(temp);
1239 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1242 const char *p=text.
data(),*sp=p;
1248 while ((c=*p++) && c!=
'\n') {}
1251 yyextra->yyLineNr++;
1253 line = line.
left((
int)(p-sp)-1);
1287 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1290 yyextra->tooltipManager.addTooltip(d);
1295 if (!sourceTooltips)
1300 const char *p=text.
data();
1305 while ((c=*p++) && c!=
'\n') {}
1308 yyextra->yyLineNr++;
1381 if (className.
isEmpty())
return;
1388 if (!cd && !curr_class.
isEmpty())
1434 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1435 const char *p=yyextra->inputString;
1441 if (c==
'\n') count++;
1443 if (p>yyextra->inputString && *(p-1)!=
'\n')
1453 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1456 if (yyextra->currentFontClass)
1458 yyextra->code->endFontClass();
1459 yyextra->currentFontClass=0;
1461 if (specialComment && yyextra->insideSpecialComment)
1463 yyextra->code->endSpecialComment();
1464 yyextra->insideSpecialComment=
false;
1470 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1471 if (s==
nullptr)
return;
1476 yyextra->code->startSpecialComment();
1477 yyextra->insideSpecialComment =
true;
1479 if (
qstrcmp(yyextra->currentFontClass,s)!=0)
1482 yyextra->code->startFontClass(s);
1483 yyextra->currentFontClass=s;
1489 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1490 if (s==
nullptr || text.
isEmpty())
return;
1493 yyextra->code->codify(text);
1509 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1516 const char *p=text.
data();
1522 while ((c=*p++) && c!=
'\n' && c!=
':' && c !=
' ' && c !=
'(' && c!=
'\0' && c!=
'\t')
1527 if (c==
'\0')
return;
1528 if (!temp.
isEmpty()) wordCounter++;
1536 if (wordCounter==2 || wordCounter==3)
1539 if (q==
"entity" || q==
"component" || q==
"configuration" || q==
"port" || q==
"generic")
1545 yyextra->PortMapComp=temp;
1567 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1573 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1579 yyextra->funcProto.stripPrefix(temp);
1581 temp=yyextra->currClass;
1582 if (yyextra->isPackageBody)
1591 yyextra->funcProto.stripPrefix(name);
1592 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1596 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1604 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1605 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1606 yyextra->vhdlKeyDict.clear();
1633 vhdlcodeYYlex_init_extra(&
p->state,&
p->yyscanner);
1642 vhdlcodeYYlex_destroy(
p->yyscanner);
1647 p->state.vhdlKeyDict.clear();
1654 bool stripCodeComments,
1659 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1667 if (dd) yyextra->currClass = dd->
name();
1671 yyextra->code = &od;
1672 yyextra->inputString = s.
data();
1673 yyextra->inputPosition = 0;
1674 yyextra->currentFontClass =
nullptr;
1675 yyextra->insideCodeLine =
false;
1676 yyextra->searchCtx = options.
searchCtx();
1677 yyextra->insideSpecialComment =
false;
1680 yyextra->foldStack.clear();
1683 yyextra->exampleBlock = options.
isExample();
1685 yyextra->sourceFileDef = options.
fileDef();
1691 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
1693 if (yyextra->sourceFileDef)
1697 yyextra->currentDefinition =
nullptr;
1698 yyextra->currentMemberDef =
nullptr;
1699 yyextra->vhdlMember =
nullptr;
1700 if (!yyextra->exampleName.isEmpty())
1706 if (!yyextra->lexInit)
1709 yyextra->lexInit=
true;
1711 vhdlcodeYYrestart(
nullptr, yyscanner );
1713 vhdlcodeYYlex(yyscanner);
1714 if (yyextra->insideCodeLine)
1720 while (!yyextra->foldStack.empty())
1722 yyextra->code->endFold();
1723 yyextra->foldStack.pop_back();
1726 if (yyextra->exampleFileDef)
1729 yyextra->exampleFileDef.reset();
1730 yyextra->sourceFileDef =
nullptr;
1734 yyextra->tooltipManager.writeTooltips(od);
1737#include "vhdlcode.l.h"
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
static bool isFlagSet(const DebugMask mask)
virtual int getEndBodyLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual bool isLinkableInProject() const =0
virtual int getStartDefLine() const =0
virtual QCString getReference() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual const QCString & name() const =0
static SearchIndexIntf searchIndex
virtual QCString fileName() const =0
virtual const ClassDef * getClassDef() const =0
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip)
void stripCodeComments(bool b)
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
QCString & sprintf(const char *format,...)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool stripPrefix(const QCString &prefix)
void resetCodeParserState() override
Resets the state of the code parser.
void parseCode(OutputCodeList &codeOutIntf, const QCString &scopeName, const QCString &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 MemberDef * findFunction(const QCString &name, const QCString &package)
static void parseFuncProto(const QCString &text, QCString &name, QCString &ret, bool doc=false)
static ClassDef * getClass(const QCString &name)
static const MemberDef * findMember(const QCString &className, const QCString &memName)
static const char * findKeyWord(const QCString &word)
ClassDef * getClass(const QCString &n)
ClassDef * toClassDef(Definition *d)
static void codeFolding(yyscan_t yyscanner, const Definition *d)
#define Config_getBool(name)
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
const char * qPrint(const char *s)
int qstrcmp(const char *str1, const char *str2)
Options to configure the code parser.
const Definition * searchCtx() const
const FileDef * fileDef() const
const MemberDef * memberDef() const
bool showLineNumbers() const
bool inlineFragment() const
QCString exampleName() const
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)