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)
148#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
151static 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)
160NAME [a-z_A-Z][ a-z_A-Z0-9]*
161FUNCNAME [a-z_A-Z"][a-z_A-Z0-9+*"/=<>-]*
162ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
163SPECSIGN [:;, +*&\/=<>'\t]*
164DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
165ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
166ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
168ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
169PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
171END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
172END2 [^a-zA-Z_]("end"){BN}*[;]
173END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
174END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
175ENDEFUNC {END3}|{END4}|{END2}
177KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
178TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
179FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
181ARITHOP "+"|"-"|"/"|"*"|"%"|"/="|":="
182ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
183LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
184BITOP "&"|"|"|"^"|"<<"|">>"|"~"
185OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
187PORT {B}*("port"){BN}*("(")
188GENERIC {B}*("generic"){BN}*("(")
195MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
196MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1}
197MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
198MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1})
200XILINX "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"
223 yyextra->braceCount++;
231 auto ql =
split(tt.str(),
"=>");
234 unsigned int index=0;
236 char cc=t1.at(index);
237 while (cc==
' ' || cc==
'\t')
242 yyextra->code->codify(c2);
244 if (index>=t1.size())
break;
253 while (index++<t1.size())
256 if (cc==
' ' || cc==
'\t')
261 yyextra->code->codify(c2);
269 while (cc==
' ' || cc==
'\t')
274 yyextra->code->codify(c2);
276 if (index>=t1.size())
break;
279 s2=s2.stripWhiteSpace();
284 while (index++<t1.size())
286 if (t1.at(index)==
' ')
288 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.
305 yyextra->braceCount--;
307 if (yyextra->braceCount==0)
313<ParseFuncProto>{NAME} {
315 tmp=tmp.stripWhiteSpace();
317 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
static bool isNumber(const std::string &s)
340 yyextra->funcProto.append(yytext);
341 if (yyextra->isProto)
350 yyextra->funcProto.append(yytext);
351 if (yyextra->isProto)
358<ParseType>{ENDEFUNC} {
363 tt.stripWhiteSpace();
364 static const reg::Ex regg(R
"(\s+)");
365 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
382 yyextra->vhdlKeyDict.clear();
385<ParseType>^{B}*("begin "|"begin") {
387 yyextra->isFuncProto=
false;
390<ParseType>{SPECSIGN} {
391 yyextra->funcProto.append(yytext);
392 if (yyextra->isProto)
398<ParseType>["_a-zA-Z0-9]* {
400 yyextra->funcProto.append(yytext);
403 if (yyextra->isFuncProto && yyextra->braceCount==0)
405 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
408 if (yyextra->isProto)
412 if (!yyextra->isFuncProto &&
413 yyextra->vhdlKeyDict.find(yyextra->prevString.str())==yyextra->vhdlKeyDict.end())
415 val=val.stripWhiteSpace();
436<ParseType>{BRACEOPEN} {
437 yyextra->braceCount++;
438 yyextra->funcProto+=
'(';
439 if (yyextra->isProto)
446<ParseType>{BRACECLOSE} {
447 yyextra->braceCount--;
448 yyextra->funcProto+=
')';
449 if (yyextra->isProto)
453 if (yyextra->braceCount==0 && !yyextra->isProto)
455 yyextra->isProto=
true;
460 if (yyextra->isPackageBody)
467<ClassesName>{FUNCNAME} {
469 yyextra->currClass.clear();
470 yyextra->currClass.append(yytext);
471 yyextra->currClass=yyextra->currClass.stripWhiteSpace();
478<ParseComponent>{BRACEOPEN} {
479 yyextra->braceCount++;
480 yyextra->code->codify(yytext);
484<ParseComponent>{BRACECLOSE} {
485 yyextra->braceCount--;
486 yyextra->code->codify(yytext);
487 if (yyextra->braceCount==0 && !yyextra->isComponent)
489 yyextra->tempComp.clear();
494 BEGIN(ParseComponent);
498<ParseComponent>{B}*"-" {
499 if (strlen(yytext)>=2)
509<ParseComponent>{SPECSIGN} {
515<ParseComponent>"\n"|" " {
519<ParseComponent>{DIGITSS} {
525<ParseComponent>{PORT} {
527 yyextra->braceCount=1;
528 yyextra->isComponent=
false;
531<ParseComponent>{GENERIC} {
533 yyextra->braceCount=1;
536<ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* {
548<ParseComponent>{STRING} {
557<ParseProcessProto>[^()]* {
558 yyextra->funcProto.append(yytext);
563<ParseProcessProto>{BRACEOPEN} {
564 yyextra->funcProto.append(yytext);
565 yyextra->braceCount++;
568<ParseProcessProto>{BRACECLOSE} {
569 yyextra->funcProto.append(yytext);
570 yyextra->braceCount--;
571 if (yyextra->braceCount==0)
578<ParsePackage>[^:;]* {
601 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
606<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3}|{MAPCOMPONENT4} {
614 tt=tt.right(tt.length()-j-1);
618 j=left.
find(
'(',
false);
623 yyextra->PortMapComp=name;
630 tt.stripPrefix(left);
632 yyextra->PortMapComp=left;
639 if (tt.contains(
':',
false))
648 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)
652<Bases>^{B}*("component"){BN}+{FUNCNAME} {
657 yyextra->tempComp=temp;
659 yyextra->braceCount=0;
660 yyextra->isComponent=
true;
661 BEGIN(ParseComponent);
666<Bases>{ARCHITECTURE} {
667 yyextra->PortMapComp.clear();
669 yyextra->currArch =
true;
672 yyextra->currClass=temp;
675 yyextra->isPackageBody=
false;
679<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} {
688 yyextra->currClass.clear();
689 yyextra->currClass=temp;
690 yyextra->isProto=
false;
691 yyextra->isPackageBody=
true;
const std::string & str() const
695 yyextra->isFuncProto=
true;
696 yyextra->funcProto.clear();
697 yyextra->funcProto.append(yytext);
698 yyextra->vhdlKeyDict.clear();
700 if (yyextra->prevString.contains(
'('))
702 yyextra->braceCount=1;
703 BEGIN(ParseProcessProto);
711<Bases>("end"){BN}+("process") {
712 yyextra->isFuncProto=
false;
718<Bases>^{B}*("begin "|"begin") {
719 yyextra->isFuncProto=
false;
720 writeFont(yyscanner,
"vhdlkeyword",yytext);
723<Bases>^{B}*("use"|"library"){BN}+ {
724 writeFont(yyscanner,
"vhdlkeyword",yytext);
729<Bases>^{B}*("use"){BN}+("configuration")[^\n]* {
734 yyextra->vhdlKeyDict.clear();
735 yyextra->funcProto.clear();
736 yyextra->isProto=
false;
737 yyextra->funcProto.append(yytext);
738 yyextra->braceCount=1;
742<Bases>^{B}*("entity"|"package"){BN}+ {
744 writeFont(yyscanner,
"keywordflow",yytext);
745 yyextra->isPackageBody=
false;
749<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
750 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
751 yyextra->currArch =
false;
753<Bases>"end"{BN}+{FUNCNAME} {
754 if (yyextra->currArch)
756 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
757 yyextra->currArch =
false;
791 yyextra->code->codify(yytext);
810<Bases,ParseComponent>{DIGITSS} {
816<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
817 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
823 if (yyextra->isFuncProto)
825 BEGIN(ParseFuncProto);
835 yyextra->code->codify(yytext);
839<Bases>","|"."|":"|"'"|"("|")" {
841 yyextra->code->codify(yytext);
860<Bases>{B}*"#"[^\n]* {
864<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
869<Bases>^{B}*"set_"[^\n]* {
879 yyextra->code->codify(yytext);
882 yyextra->code->codify(yytext);
886<*>\n?"--!"[^\n]*/\n{B}*"--!" {
887 if (YY_START!=CopyComment)
890 yyextra->lastCopyCommentContext=YY_START;
897 int i=text.
find(
"--");
898 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
899 if (isSpecialComment && YY_START!=CopyComment)
904 if (isSpecialComment)
908 if (YY_START==CopyComment)
910 BEGIN(yyextra->lastCopyCommentContext);
915 int i=text.
find(
"--");
916 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
917 if (isSpecialComment)
922 if (isSpecialComment)
935 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
936 int inputPosition = yyextra->inputPosition;
937 const char *s = yyextra->inputString + inputPosition;
939 while( c < max_size && *s)
944 yyextra->inputPosition += c;
950 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
953 if (yyextra->searchCtx)
966 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
967 if (name.
isEmpty())
return false;
970 if (len>2 && name.
at(0)==
'"' && name.
at(len-1)==
'"')
973 static const reg::Ex regg(R
"(\s+)");
977 yyextra->code->codify(
"\"");
979 yyextra->code->codify(inside);
981 yyextra->code->codify(
"\"");
986 yyextra->code->codify(name);
995 yyextra->code->codify(name);
1015 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1016 while (!yyextra->foldStack.empty())
1018 const Definition *dd = yyextra->foldStack.back();
1021 yyextra->code->endFold();
1023 yyextra->foldStack.pop_back();
1034 if (endLine!=-1 && startLine!=endLine && (yyextra->foldStack.empty() || yyextra->foldStack.back()->getEndBodyLine()!=startLine))
1037 yyextra->code->startFold(yyextra->yyLineNr,
"",
"");
1038 yyextra->foldStack.push_back(d);
1050 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1052 if (yyextra->sourceFileDef)
1059 const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
1061 if (!yyextra->includeCodeFragment && d)
1063 yyextra->currentDefinition = d;
1064 yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
1065 if (!yyextra->tempComp.isEmpty() && yyextra->currentMemberDef )
1068 QCString nn=yyextra->currentMemberDef->name();
1072 yyextra->currentMemberDef=mdeff;
1077 lineAnchor.
sprintf(
"l%05d",yyextra->yyLineNr);
1078 if (yyextra->currentMemberDef)
1081 yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
1082 yyextra->currentMemberDef->getOutputFileBase(),
1083 yyextra->currentMemberDef->anchor(),yyextra->yyLineNr,
1084 !yyextra->includeCodeFragment);
1093 !yyextra->includeCodeFragment);
1105 !yyextra->includeCodeFragment);
1108 yyextra->code->startCodeLine(yyextra->yyLineNr);
1109 yyextra->insideCodeLine=
true;
1110 if (yyextra->currentFontClass)
1112 yyextra->code->startFontClass(yyextra->currentFontClass);
1118 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1120 yyextra->code->endCodeLine();
1121 yyextra->insideCodeLine=
false;
1126 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1127 if (yyextra->insideCodeLine)
1131 const char *fc = yyextra->currentFontClass;
1132 if (yyextra->yyLineNr<yyextra->inputLines)
1134 yyextra->currentFontClass = fc;
1146 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1151 if (ttt.isEmpty())
return;
1152 for (
unsigned int j=0;j<ttt.length();j++)
1155 if (c==
' '|| c==
',' || c==
';' || c==
':' || c==
'(' || c==
')' || c==
'\r' || c==
'\t' || c==
'.')
1164 if (!tclass.isEmpty())
1179 yyextra->code->codify(temp);
1190 yyextra->code->codify(cc);
1203 if (!tclass.isEmpty())
1220 yyextra->code->codify(temp);
1225 yyextra->code->codify(temp);
1238 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1241 const char *p=text.
data(),*sp=p;
1247 while ((c=*p++) && c!=
'\n') {}
1250 yyextra->yyLineNr++;
1252 line = line.
left((
int)(p-sp)-1);
1286 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1289 yyextra->tooltipManager.addTooltip(d);
1294 if (!sourceTooltips)
1299 const char *p=text.
data();
1304 while ((c=*p++) && c!=
'\n') {}
1307 yyextra->yyLineNr++;
1380 if (className.
isEmpty())
return;
1387 if (!cd && !curr_class.
isEmpty())
1433 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1434 const char *p=yyextra->inputString;
1440 if (c==
'\n') count++;
1442 if (p>yyextra->inputString && *(p-1)!=
'\n')
1452 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1455 if (yyextra->currentFontClass)
1457 yyextra->code->endFontClass();
1458 yyextra->currentFontClass=0;
1460 if (specialComment && yyextra->insideSpecialComment)
1462 yyextra->code->endSpecialComment();
1463 yyextra->insideSpecialComment=
false;
1469 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1470 if (s==
nullptr)
return;
1475 yyextra->code->startSpecialComment();
1476 yyextra->insideSpecialComment =
true;
1478 if (
qstrcmp(yyextra->currentFontClass,s)!=0)
1481 yyextra->code->startFontClass(s);
1482 yyextra->currentFontClass=s;
1488 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1489 if (s==
nullptr || text.
isEmpty())
return;
1492 yyextra->code->codify(text);
1508 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1515 const char *p=text.
data();
1521 while ((c=*p++) && c!=
'\n' && c!=
':' && c !=
' ' && c !=
'(' && c!=
'\0' && c!=
'\t')
1526 if (c==
'\0')
return;
1527 if (!temp.
isEmpty()) wordCounter++;
1535 if (wordCounter==2 || wordCounter==3)
1538 if (q==
"entity" || q==
"component" || q==
"configuration" || q==
"port" || q==
"generic")
1544 yyextra->PortMapComp=temp;
1566 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1572 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1578 yyextra->funcProto.stripPrefix(temp);
1580 temp=yyextra->currClass;
1581 if (yyextra->isPackageBody)
1590 yyextra->funcProto.stripPrefix(name);
1591 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1595 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1603 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1604 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1605 yyextra->vhdlKeyDict.clear();
1632 vhdlcodeYYlex_init_extra(&
p->state,&
p->yyscanner);
1641 vhdlcodeYYlex_destroy(
p->yyscanner);
1646 p->state.vhdlKeyDict.clear();
1653 bool stripCodeComments,
1658 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1666 if (dd) yyextra->currClass = dd->
name();
1670 yyextra->code = &od;
1671 yyextra->inputString = s.
data();
1672 yyextra->inputPosition = 0;
1673 yyextra->currentFontClass =
nullptr;
1674 yyextra->insideCodeLine =
false;
1675 yyextra->searchCtx = options.
searchCtx();
1676 yyextra->insideSpecialComment =
false;
1679 yyextra->foldStack.clear();
1682 yyextra->exampleBlock = options.
isExample();
1684 yyextra->sourceFileDef = options.
fileDef();
1689 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
1691 if (yyextra->sourceFileDef)
1695 yyextra->currentDefinition =
nullptr;
1696 yyextra->currentMemberDef =
nullptr;
1697 yyextra->vhdlMember =
nullptr;
1698 if (!yyextra->exampleName.isEmpty())
1704 if (!yyextra->lexInit)
1707 yyextra->lexInit=
true;
1709 vhdlcodeYYrestart(
nullptr, yyscanner );
1711 vhdlcodeYYlex(yyscanner);
1712 if (yyextra->insideCodeLine)
1718 while (!yyextra->foldStack.empty())
1720 yyextra->code->endFold();
1721 yyextra->foldStack.pop_back();
1724 if (yyextra->exampleFileDef)
1727 yyextra->exampleFileDef.reset();
1728 yyextra->sourceFileDef =
nullptr;
1732 yyextra->tooltipManager.writeTooltips(od);
1735#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 inlineFragment() const
QCString exampleName() const
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)