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
35#include <unordered_set>
63#define YY_NO_UNISTD_H 1
67#define DBG_CTX(x) do { } while(0)
151#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
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.
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 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, const QCString &curr_class=QCString())
static void appStringLower(QCString &qcs, const char *text)
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static void codifyLines(yyscan_t yyscanner, const QCString &text, const QCString &cl=QCString(), bool classlink=false, bool comment=false)
static void writeWord(yyscan_t yyscanner, const QCString &word, const QCString &curr_class=QCString(), bool classLink=false)
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 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 startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void codifyMapLines(yyscan_t yyscanner, const QCString &text)
static bool checkVhdlString(yyscan_t yyscanner, QCString &name)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
static const char * getLexerFILE()
static void writeFuncProto(yyscan_t yyscanner)
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
static void writeFont(yyscan_t yyscanner, const char *s, const QCString &text, bool specialComment=false)
163NAME [a-z_A-Z][ a-z_A-Z0-9]*
164FUNCNAME [a-z_A-Z"][a-z_A-Z0-9+*"/=<>-]*
165ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
166SPECSIGN [:;, +*&\/=<>'\t]*
167DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
168ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
169ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
171ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
172PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
174END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
175END2 [^a-zA-Z_]("end"){BN}*[;]
176END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
177END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
178ENDEFUNC {END3}|{END4}|{END2}
180KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
181TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
182FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
184ARITHOP "+"|"-"|"/"|"*"|"%"|"/="|":="
185ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
186LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
187BITOP "&"|"|"|"^"|"<<"|">>"|"~"
188OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
190PORT {B}*("port"){BN}*("(")
191GENERIC {B}*("generic"){BN}*("(")
198MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
199MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1}
200MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
201MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1})
203XILINX "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"
226 yyextra->braceCount++;
234 auto ql =
split(tt.str(),
"=>");
237 unsigned int index=0;
239 char cc=t1.at(index);
240 while (cc==
' ' || cc==
'\t')
245 yyextra->code->codify(c2);
247 if (index>=t1.size())
break;
256 while (index++<t1.size())
259 if (cc==
' ' || cc==
'\t')
264 yyextra->code->codify(c2);
272 while (cc==
' ' || cc==
'\t')
277 yyextra->code->codify(c2);
279 if (index>=t1.size())
break;
282 s2=s2.stripWhiteSpace();
287 while (index++<t1.size())
289 if (t1.at(index)==
' ')
291 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)
static void codifyLines(yyscan_t yyscanner, const QCString &text)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
308 yyextra->braceCount--;
310 if (yyextra->braceCount==0)
316<ParseFuncProto>{NAME} {
318 tmp=tmp.stripWhiteSpace();
320 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
static bool isNumber(const std::string &s)
343 yyextra->funcProto.append(yytext);
344 if (yyextra->isProto)
353 yyextra->funcProto.append(yytext);
354 if (yyextra->isProto)
361<ParseType>{ENDEFUNC} {
366 tt.stripWhiteSpace();
367 static const reg::Ex regg(R
"(\s+)");
368 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
385 yyextra->vhdlKeyDict.clear();
388<ParseType>^{B}*("begin "|"begin") {
390 yyextra->isFuncProto=
false;
393<ParseType>{SPECSIGN} {
394 yyextra->funcProto.append(yytext);
395 if (yyextra->isProto)
401<ParseType>["_a-zA-Z0-9]* {
403 yyextra->funcProto.append(yytext);
406 if (yyextra->isFuncProto && yyextra->braceCount==0)
408 yyextra->vhdlKeyDict.insert(yyextra->prevString.str());
411 if (yyextra->isProto)
415 if (!yyextra->isFuncProto &&
416 yyextra->vhdlKeyDict.find(yyextra->prevString.str())==yyextra->vhdlKeyDict.end())
418 val=val.stripWhiteSpace();
static void startFontClass(yyscan_t yyscanner, const char *s, bool specialComment=false)
static void endFontClass(yyscan_t yyscanner, bool specialComment=false)
439<ParseType>{BRACEOPEN} {
440 yyextra->braceCount++;
441 yyextra->funcProto+=
'(';
442 if (yyextra->isProto)
449<ParseType>{BRACECLOSE} {
450 yyextra->braceCount--;
451 yyextra->funcProto+=
')';
452 if (yyextra->isProto)
456 if (yyextra->braceCount==0 && !yyextra->isProto)
458 yyextra->isProto=
true;
463 if (yyextra->isPackageBody)
470<ClassesName>{FUNCNAME} {
472 yyextra->currClass.clear();
473 yyextra->currClass.append(yytext);
474 yyextra->currClass=yyextra->currClass.stripWhiteSpace();
static void generateClassOrGlobalLink(yyscan_t yyscanner, OutputCodeList &ol, const QCString &clName, bool typeOnly=FALSE, bool varOnly=FALSE)
481<ParseComponent>{BRACEOPEN} {
482 yyextra->braceCount++;
483 yyextra->code->codify(yytext);
487<ParseComponent>{BRACECLOSE} {
488 yyextra->braceCount--;
489 yyextra->code->codify(yytext);
490 if (yyextra->braceCount==0 && !yyextra->isComponent)
492 yyextra->tempComp.clear();
497 BEGIN(ParseComponent);
501<ParseComponent>{B}*"-" {
502 if (strlen(yytext)>=2)
512<ParseComponent>{SPECSIGN} {
518<ParseComponent>"\n"|" " {
522<ParseComponent>{DIGITSS} {
528<ParseComponent>{PORT} {
530 yyextra->braceCount=1;
531 yyextra->isComponent=
false;
534<ParseComponent>{GENERIC} {
536 yyextra->braceCount=1;
539<ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* {
551<ParseComponent>{STRING} {
560<ParseProcessProto>[^()]* {
561 yyextra->funcProto.append(yytext);
566<ParseProcessProto>{BRACEOPEN} {
567 yyextra->funcProto.append(yytext);
568 yyextra->braceCount++;
571<ParseProcessProto>{BRACECLOSE} {
572 yyextra->funcProto.append(yytext);
573 yyextra->braceCount--;
574 if (yyextra->braceCount==0)
581<ParsePackage>[^:;]* {
604 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
609<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3}|{MAPCOMPONENT4} {
617 tt=tt.right(tt.length()-j-1);
621 j=left.
find(
'(',
false);
626 yyextra->PortMapComp=name;
633 tt.stripPrefix(left);
635 yyextra->PortMapComp=left;
642 if (tt.contains(
':',
false))
651 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)
655<Bases>^{B}*("component"){BN}+{FUNCNAME} {
660 yyextra->tempComp=temp;
662 yyextra->braceCount=0;
663 yyextra->isComponent=
true;
664 BEGIN(ParseComponent);
669<Bases>{ARCHITECTURE} {
670 yyextra->PortMapComp.clear();
672 yyextra->currArch =
true;
675 yyextra->currClass=temp;
678 yyextra->isPackageBody=
false;
682<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} {
691 yyextra->currClass.clear();
692 yyextra->currClass=temp;
693 yyextra->isProto=
false;
694 yyextra->isPackageBody=
true;
const std::string & str() const
698 yyextra->isFuncProto=
true;
699 yyextra->funcProto.clear();
700 yyextra->funcProto.append(yytext);
701 yyextra->vhdlKeyDict.clear();
703 if (yyextra->prevString.contains(
'('))
705 yyextra->braceCount=1;
706 BEGIN(ParseProcessProto);
714<Bases>("end"){BN}+("process") {
715 yyextra->isFuncProto=
false;
721<Bases>^{B}*("begin "|"begin") {
722 yyextra->isFuncProto=
false;
723 writeFont(yyscanner,
"vhdlkeyword",yytext);
726<Bases>^{B}*("use"|"library"){BN}+ {
727 writeFont(yyscanner,
"vhdlkeyword",yytext);
732<Bases>^{B}*("use"){BN}+("configuration")[^\n]* {
737 yyextra->vhdlKeyDict.clear();
738 yyextra->funcProto.clear();
739 yyextra->isProto=
false;
740 yyextra->funcProto.append(yytext);
741 yyextra->braceCount=1;
745<Bases>^{B}*("entity"|"package"){BN}+ {
747 writeFont(yyscanner,
"keywordflow",yytext);
748 yyextra->isPackageBody=
false;
752<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
753 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
754 yyextra->currArch =
false;
756<Bases>"end"{BN}+{FUNCNAME} {
757 if (yyextra->currArch)
759 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
760 yyextra->currArch =
false;
794 yyextra->code->codify(yytext);
813<Bases,ParseComponent>{DIGITSS} {
819<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
820 codifyLines(yyscanner,yytext,yyextra->currClass,
true);
826 if (yyextra->isFuncProto)
828 BEGIN(ParseFuncProto);
838 yyextra->code->codify(yytext);
842<Bases>","|"."|":"|"'"|"("|")" {
844 yyextra->code->codify(yytext);
863<Bases>{B}*"#"[^\n]* {
867<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
872<Bases>^{B}*"set_"[^\n]* {
882 yyextra->code->codify(yytext);
885 yyextra->code->codify(yytext);
889<*>\n?"--!"[^\n]*/\n{B}*"--!" {
890 if (YY_START!=CopyComment)
893 yyextra->lastCopyCommentContext=YY_START;
900 int i=text.
find(
"--");
901 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
902 if (isSpecialComment && YY_START!=CopyComment)
907 if (isSpecialComment)
911 if (YY_START==CopyComment)
913 BEGIN(yyextra->lastCopyCommentContext);
918 int i=text.
find(
"--");
919 bool isSpecialComment = i!=-1 && yytext[i+2]==
'!';
920 if (isSpecialComment)
925 if (isSpecialComment)
938 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
939 int inputPosition = yyextra->inputPosition;
940 const char *s = yyextra->inputString + inputPosition;
942 while( c < max_size && *s)
947 yyextra->inputPosition += c;
953 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
956 if (yyextra->searchCtx)
969 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
970 if (name.
isEmpty())
return false;
973 if (len>2 && name.
at(0)==
'"' && name.
at(len-1)==
'"')
976 static const reg::Ex regg(R
"(\s+)");
980 yyextra->code->codify(
"\"");
982 yyextra->code->codify(inside);
984 yyextra->code->codify(
"\"");
989 yyextra->code->codify(name);
998 yyextra->code->codify(name);
1018 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1019 while (!yyextra->foldStack.empty())
1021 const Definition *dd = yyextra->foldStack.back();
1024 yyextra->code->endFold();
1026 yyextra->foldStack.pop_back();
1037 if (endLine!=-1 && startLine!=endLine && (yyextra->foldStack.empty() || yyextra->foldStack.back()->getEndBodyLine()!=startLine))
1040 yyextra->code->startFold(yyextra->yyLineNr,
"",
"");
1041 yyextra->foldStack.push_back(d);
1053 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1055 if (yyextra->sourceFileDef && yyextra->lineNumbers)
1062 const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
1064 if (!yyextra->includeCodeFragment && d)
1066 yyextra->currentDefinition = d;
1067 yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
1068 if (!yyextra->tempComp.isEmpty() && yyextra->currentMemberDef )
1071 QCString nn=yyextra->currentMemberDef->name();
1075 yyextra->currentMemberDef=mdeff;
1080 lineAnchor.
sprintf(
"l%05d",yyextra->yyLineNr);
1081 if (yyextra->currentMemberDef)
1084 yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
1085 yyextra->currentMemberDef->getOutputFileBase(),
1086 yyextra->currentMemberDef->anchor(),yyextra->yyLineNr,
1087 !yyextra->includeCodeFragment);
1096 !yyextra->includeCodeFragment);
1108 !yyextra->includeCodeFragment);
1111 yyextra->code->startCodeLine(yyextra->yyLineNr);
1112 yyextra->insideCodeLine=
true;
1113 if (yyextra->currentFontClass)
1115 yyextra->code->startFontClass(yyextra->currentFontClass);
1121 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1123 yyextra->code->endCodeLine();
1124 yyextra->insideCodeLine=
false;
1129 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1130 if (yyextra->insideCodeLine)
1134 const char *fc = yyextra->currentFontClass;
1135 if (yyextra->yyLineNr<yyextra->inputLines)
1137 yyextra->currentFontClass = fc;
1149 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1155 for (
unsigned int j=0;j<ttt.
length();j++)
1158 if (c==
' '|| c==
',' || c==
';' || c==
':' || c==
'(' || c==
')' || c==
'\r' || c==
'\t' || c==
'.')
1182 yyextra->code->codify(temp);
1193 yyextra->code->codify(cc);
1223 yyextra->code->codify(temp);
1228 yyextra->code->codify(temp);
1241 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1244 const char *p=text.
data(),*sp=p;
1250 while ((c=*p++) && c!=
'\n') {}
1253 yyextra->yyLineNr++;
1255 line = line.
left((
int)(p-sp)-1);
1289 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1292 yyextra->tooltipManager.addTooltip(d);
1297 if (!sourceTooltips)
1302 const char *p=text.
data();
1307 while ((c=*p++) && c!=
'\n') {}
1310 yyextra->yyLineNr++;
1343 if (memberName.
isEmpty())
return;
1383 if (className.
isEmpty())
return;
1390 if (!cd && !curr_class.
isEmpty())
1436 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1437 const char *p=yyextra->inputString;
1443 if (c==
'\n') count++;
1445 if (p>yyextra->inputString && *(p-1)!=
'\n')
1455 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1458 if (yyextra->currentFontClass)
1460 yyextra->code->endFontClass();
1461 yyextra->currentFontClass=0;
1463 if (specialComment && yyextra->insideSpecialComment)
1465 yyextra->code->endSpecialComment();
1466 yyextra->insideSpecialComment=
false;
1472 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1473 if (s==
nullptr)
return;
1478 yyextra->code->startSpecialComment();
1479 yyextra->insideSpecialComment =
true;
1481 if (
qstrcmp(yyextra->currentFontClass,s)!=0)
1484 yyextra->code->startFontClass(s);
1485 yyextra->currentFontClass=s;
1491 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1492 if (s==
nullptr || text.
isEmpty())
return;
1495 yyextra->code->codify(text);
1511 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1518 const char *p=text.
data();
1524 while ((c=*p++) && c!=
'\n' && c!=
':' && c !=
' ' && c !=
'(' && c!=
'\0' && c!=
'\t')
1529 if (c==
'\0')
return;
1530 if (!temp.
isEmpty()) wordCounter++;
1538 if (wordCounter==2 || wordCounter==3)
1541 if (q==
"entity" || q==
"component" || q==
"configuration" || q==
"port" || q==
"generic")
1547 yyextra->PortMapComp=temp;
1569 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1575 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1581 yyextra->funcProto.stripPrefix(temp);
1583 temp=yyextra->currClass;
1584 if (yyextra->isPackageBody)
1593 yyextra->funcProto.stripPrefix(name);
1594 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1598 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1606 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1607 codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
1608 yyextra->vhdlKeyDict.clear();
1635 vhdlcodeYYlex_init_extra(&
p->state,&
p->yyscanner);
1644 vhdlcodeYYlex_destroy(
p->yyscanner);
1649 p->state.vhdlKeyDict.clear();
1656 bool stripCodeComments,
1661 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1669 if (dd) yyextra->currClass = dd->
name();
1673 yyextra->code = &od;
1674 yyextra->inputString = s.
data();
1675 yyextra->inputPosition = 0;
1676 yyextra->currentFontClass =
nullptr;
1677 yyextra->insideCodeLine =
false;
1678 yyextra->searchCtx = options.
searchCtx();
1679 yyextra->insideSpecialComment =
false;
1682 yyextra->foldStack.clear();
1685 yyextra->exampleBlock = options.
isExample();
1687 yyextra->sourceFileDef = options.
fileDef();
1693 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
1695 if (yyextra->sourceFileDef)
1699 yyextra->currentDefinition =
nullptr;
1700 yyextra->currentMemberDef =
nullptr;
1701 yyextra->vhdlMember =
nullptr;
1702 if (!yyextra->exampleName.isEmpty())
1708 if (!yyextra->lexInit)
1711 yyextra->lexInit=
true;
1713 vhdlcodeYYrestart(
nullptr, yyscanner );
1715 vhdlcodeYYlex(yyscanner);
1716 if (yyextra->insideCodeLine)
1722 while (!yyextra->foldStack.empty())
1724 yyextra->code->endFold();
1725 yyextra->foldStack.pop_back();
1728 if (yyextra->exampleFileDef)
1731 yyextra->exampleFileDef.reset();
1732 yyextra->sourceFileDef =
nullptr;
1736 yyextra->tooltipManager.writeTooltips(od);
1739#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 writeMultiLineCodeLink(yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const QCString &text)
static void endCodeLine(yyscan_t yyscanner)
static void nextCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
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 void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
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)