diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-11-17 21:22:48 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-11-17 21:22:48 (GMT) |
commit | 720d85edd0316e1cedec3402e204ce418174305d (patch) | |
tree | 0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/vhdlcode.l | |
parent | 8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (diff) | |
download | Doxygen-720d85edd0316e1cedec3402e204ce418174305d.zip Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.gz Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.bz2 |
Release-1.7.5.1-20111117
Diffstat (limited to 'src/vhdlcode.l')
-rw-r--r-- | src/vhdlcode.l | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/vhdlcode.l b/src/vhdlcode.l index f0b02b5..4500140 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -119,7 +119,7 @@ static void setCurrentDoc(const QCString &name,const QCString &base,const QCStri } } -static bool checkString(QCString &name) +static bool checkVhdlString(QCString &name) { if (name.isEmpty()) return FALSE; static QRegExp regg("[\\s\"]"); @@ -286,7 +286,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F } else { - if (!checkString(temp)) + if (!checkVhdlString(temp)) g_code->codify(temp.data()); } } @@ -775,6 +775,8 @@ MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1} MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1}) MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}) +XILINX "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" + %option noyywrap %option nounput @@ -856,7 +858,7 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ cc=t1.at(index); } s2=s2.stripWhiteSpace(); - if (!checkString(s2)) + if (!checkVhdlString(s2)) generateMemLink(*g_code,g_CurrClass,s2); while (index++<t1.size()) { @@ -1114,7 +1116,7 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ <ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* { QCString temp(vhdlcodeYYtext); appStringLower(g_PrevString,vhdlcodeYYtext); - if (!checkString(temp)){ + if (!checkVhdlString(temp)){ if (!writeColoredWord(g_PrevString)) { generateMemLink(*g_code,g_tempComp,temp); @@ -1124,7 +1126,7 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ <ParseComponent>{STRING} { QCString temp(vhdlcodeYYtext); - if (!checkString(temp)) + if (!checkVhdlString(temp)) codifyLines(vhdlcodeYYtext); } @@ -1214,8 +1216,8 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ else { generateClassOrGlobalLink(*g_code,left.data()); - tt=tt.right(tt.length()-left.length()-1); - tt.prepend(" "); + tt.stripPrefix(left.data()); //=tt.right(tt.length()-left.length()-1); + g_PortMapComp=left; codifyLines(tt.data()); } @@ -1424,6 +1426,19 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ writeFont("keyword",vhdlcodeYYtext); } +<Bases>{B}*"#"[^\n]* { + writeFont("keyword",vhdlcodeYYtext); + } + +<Bases>^{B}*{XILINX}[^\n]* { + writeWord(yytext); + //codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE); + } + +<Bases>^{B}*"set_"[^\n]* { + writeWord(yytext); + } + <*>\n { codifyLines(vhdlcodeYYtext); BEGIN(Bases); @@ -1443,7 +1458,7 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ } else // normal comment { - startFontClass("comment"); + startFontClass("keyword"); codifyLines(text); endFontClass(); } @@ -1458,7 +1473,7 @@ MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ } else // normal comment { - startFontClass("comment"); + startFontClass("keyword"); codifyLines(text); endFontClass(); } @@ -1541,6 +1556,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString { setParameterList(memberDef); } + int iLine=countLines(); vhdlcodeYYrestart( vhdlcodeYYin ); BEGIN( Bases ); vhdlcodeYYlex(); @@ -1555,6 +1571,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString delete g_sourceFileDef; g_sourceFileDef=0; } + assert(g_yyLineNr==iLine); return; } |