Permalink
Browse files

Various VHDL related fixes

  • Loading branch information...
Dimitri van Heesch authored and groleo committed Apr 27, 2015
1 parent 2c679e7 commit 3eed7a5c5b330736b508c722c9614c774a678ef1
Showing with 2,198 additions and 2,121 deletions.
  1. +13 −0 src/vhdldocgen.cpp
  2. +41 −17 vhdlparser/VhdlParser.cc
  3. +1,950 −1,950 vhdlparser/VhdlParser.h
  4. +141 −131 vhdlparser/VhdlParserTokenManager.cc
  5. +2 −2 vhdlparser/VhdlParserTokenManager.h
  6. +51 −21 vhdlparser/vhdlparser.jj
View
@@ -2212,6 +2212,19 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
ol.insertMemberAlign();
VhdlDocGen::formatString(ltype,ol,mdef);
break;
case VhdlDocGen::RECORD:
case VhdlDocGen::UNITS:
writeLink(mdef,ol);
ol.docify(" ");
ol.startBold();
if (ltype.isEmpty()) {
ol.docify(" ");
}
ol.insertMemberAlign();
if (!ltype.isEmpty())
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
break;
case VhdlDocGen::TYPE:
bRec=largs.stripPrefix("record") ;
bUnit=largs.stripPrefix("units") ;
View
@@ -1673,7 +1673,7 @@ assert(false);
QCString VhdlParser::choice() {QCString s;
if (jj_2_10(2147483647)) {if (!hasError) {
s = simple_expression();
s = discrete_range();
}
if (!hasError) {
@@ -1682,7 +1682,7 @@ return s;
} else if (jj_2_11(2147483647)) {if (!hasError) {
s = discrete_range();
s = simple_expression();
}
if (!hasError) {
@@ -1998,7 +1998,7 @@ return s;
}
if (!hasError) {
return s;
return s+"#";
}
break;
@@ -2960,7 +2960,9 @@ QCString VhdlParser::element_declaration() {QCString s,s1;if (!hasError) {
jj_consume_token(SEMI_T);
}
return s+":"+s1;
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
//addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
return s+":"+s1;
assert(false);
}
@@ -4411,7 +4413,7 @@ assert(false);
}
QCString VhdlParser::full_type_declaration() {QCString s,s1,s2;if (!hasError) {
QCString VhdlParser::full_type_declaration() {Entry *tmpEntry;QCString s,s1,s2;if (!hasError) {
jj_consume_token(TYPE_T);
}
@@ -4425,6 +4427,11 @@ QCString VhdlParser::full_type_declaration() {QCString s,s1,s2;if (!hasError) {
}
if (!hasError) {
tmpEntry=current;
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
}
if (!hasError) {
try {if (!hasError) {
s2 = type_definition();
@@ -4439,8 +4446,25 @@ error_skipto(SEMI_T);
jj_consume_token(SEMI_T);
}
addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::TYPE,0,s2.data(),Public);
return "type "+s+" is "+s2+";";
if (s2.contains("#")) {
VhdlDocGen::deleteAllChars(s2,'#');
tmpEntry->spec=VhdlDocGen::RECORD;
tmpEntry->type=s2.data();
//addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s2.data(),Public);
}
else if (s2.contains("%")) {
VhdlDocGen::deleteAllChars(s2,'%');
tmpEntry->spec=VhdlDocGen::UNITS;
tmpEntry->type=s2.data();
//addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,s2.data(),s2.data(),Public);
}
else {
tmpEntry->spec=VhdlDocGen::TYPE;
tmpEntry->type=s2.data();
//addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::TYPE,0,s2.data(),Public);
}
tmpEntry=0;
return "type "+s+" is "+s2+";";
assert(false);
}
@@ -7171,6 +7195,10 @@ QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;if (!hasError)
}
if (!hasError) {
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
@@ -7185,10 +7213,6 @@ QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;if (!hasError)
s1 = secondary_unit_declaration();
}
if (!hasError) {
s2+=s1;s2+="#";
}
}
end_label_31: ;
@@ -7220,10 +7244,7 @@ s2+=s1;s2+="#";
}
}
current->args=s2;
current->args.prepend("units");
current->spec=VhdlDocGen::UNITS;
return s2;
return s+"%";
assert(false);
}
@@ -8352,7 +8373,7 @@ return s;
}
if (!hasError) {
s+=" ";s+=s1;return s;
return s+" "+s1+"%";
}
break;
@@ -8407,7 +8428,10 @@ QCString VhdlParser::secondary_unit_declaration() {QCString s,s1;if (!hasError)
jj_consume_token(SEMI_T);
}
return s+"="+s1;
//printf("\n %s %s [%d]",s.data(),s1.data(),getLine());
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
return s+"="+s1;
assert(false);
}
Oops, something went wrong.

0 comments on commit 3eed7a5

Please sign in to comment.