Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13086 lines (9868 sloc) 239 KB
/* VhdlParser.cc */
#include "./VhdlParser.h"
namespace vhdl {
namespace parser {
unsigned int jj_la1_0[] = {
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x90404000,0x20080000,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x90404000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x40000000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x40020000,0x40020001,0x0,0x0,0x0,0x40000000,0xd0020000,0x0,0x0,0x800000,0x0,0x0,0x80004000,0x400000,0x0,0x0,0x80404000,0x0,0x0,0x0,0x0,0x8000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x10000,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x10000000,0x0,0x50000000,0x8000,0x0,0x80000000,0x0,0x80000000,0x80000000,0x4000000,0x8000000,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x800,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80004000,0x0,0x80004000,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x0,0x90404000,0x0,0x0,0x0,0x40000000,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x8000,0x0,0x0,0x41000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x2000,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90c04000,0x20080000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
unsigned int jj_la1_1[] = {
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x125808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x1000,0x104800,0x1008,0x20000,0x125808,0x10000,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x1000,0x1000000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x20000,0x1000,0x0,0x4000000,0x4000000,0x0,0x400000,0x4000101,0x4000101,0x0,0x10,0x0,0x100,0x12024900,0x0,0x0,0x0,0x100,0x0,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x81000,0x0,0x0,0x0,0x0,0x0,0x40,0x20,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x800,0x0,0x0,0x0,0x8a00000,0x0,0x0,0x1000,0x1,0x0,0x0,0x1000,0x0,0x0,0x8a00000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x40000,0x400000,0x0,0x0,0x104800,0x20000,0x124800,0x0,0x0,0x10000,0x10000,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x0,0x0,0x100,0x0,0x0,0x104800,0x0,0x20000,0x124800,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x20081200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x104000,0x1000000,0x1104800,0x0,0x20000,0x1124800,0x4000,0x0,0x100000,0x100000,0x0,0x104000,0x20081200,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x1104800,0x0,0x20000,0x1124800,0x0,0x104000,0x104000,0x4000001,0x1,0x0,0x4000001,0x10000,0x10000,0x10000,0x0,0x0,0x125808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x20,0x0,0x200000,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x200000,0x0,0x0,0x0,0x200000,0x0,0x20,0x104000,0x100000,0x100000,0x0,0x1000000,0x0,0x0,0x104000,};
unsigned int jj_la1_2[] = {
0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x110000,0x28000,0x0,0x20000000,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x4000,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x4000,0x4000,0x0,0x0,0x0,0x0,0x28000,0x0,0x0,0x0,0x400,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x400000,0x8000,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000000,0x1000,0x1000,0x0,0x0,0x0,0x100,0x11000,0x0,0x0,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x4000,0x0,0x400,0x8000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x209,0x209,0x0,0x32,0x100,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x0,0x0,0x0,0x400,0x1000,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x1000,0x20,0x0,0x0,0x0,0x10,0x800,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000,0x0,0x110000,0x0,0x110000,0x1000,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x2,0x0,0x1000,0x0,0x110000,0x0,0x0,0x110000,0x0,0x8000,0x0,0x0,0x0,0x8000,0x0,0x20000024,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x200000,0x1000,0x0,0x0,0x20,0xc0000000,0xc0000000,0x0,0x1000000,0x0,0x800000,0x0,0x800000,0x0,0x400,0x0,0x0,0x0,0x0,0x10000,0x0,0x110000,0x0,0x110000,0x0,0x0,0x110000,0x10000,0x0,0x100000,0x100000,0x0,0x110000,0x20000024,0x0,0x0,0x0,0x600000,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x32,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x110000,0x110000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x110000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x800,0x32,0x0,0x0,0x0,0x0,0x1000000,0x0,0x800,0x0,0x0,0x0,0x800,0x0,0x0,0x110000,0x100000,0x100000,0x0,0x0,0x2000,0x0,0x138000,};
unsigned int jj_la1_3[] = {
0x0,0x0,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x188830,0x8000000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x80000,0x0,0x108830,0x80000,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x2000000,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x2000000,0x0,0x0,0x80000,0x80000,0x0,0x0,0x80000,0x80000,0x0,0x4000,0x80000,0x80000,0x0,0x2000,0x0,0x0,0x128810,0x0,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x108030,0x0,0x100030,0x100030,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x108030,0x0,0x4000,0x0,0x0,0x188820,0x0,0x188820,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x3c0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x8000000,0x20,0x0,0x0,0x0,0x40000,0x0,0x0,0x10000,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x80000,0x80000,0x80000,0x0,0x0,0x80000,0x0,0x0,0x0,0x2000000,0x0,0x188830,0x8000000,0x100010,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x2000000,0x0,0x0,0x8000000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
unsigned int jj_la1_4[] = {
0x0,0x0,0x60000,0x30,0x40,0x100,0x0,0x0,0x0,0x0,0x40000,0x0,0x40001,0x0,0x0,0x0,0x0,0x40,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x40001,0x0,0x0,0x0,0x0,0x10000000,0x200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x20000,0x40,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x40000,0x40000,0x40000,0x40000,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x4,0x40001,0x0,0x0,0x40000,0x1,0x0,0x0,0x40000,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x40031,0x0,0x1,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x40000008,0x40000,0x40,0x1,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x0,0x40001,0x1,0x0,0x40000,0xfc00,0xfc00,0x0,0x0,0x0,0x40031,0x1,0x0,0x40,0x40,0x0,0x0,0x0,0x30,0x0,0x40001,0x0,0x80,0x0,0x40,0x40000,0x40,0x40000,0x0,0x30,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x40001,0x0,0x40001,0x0,0x1,0x0,0x40,0x40,0x40001,0x0,0x80,0x0,0x0,0x0,0x0,0x40,0x40031,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40001,0x0,0xa0000000,0x20000000,0x0,0x1,0x40001,0x0,0x0,0x0,0x0,0x40031,0x0,0x8000000,0x40000,0x8000000,0x0,0x8000000,0x0,0x240,0x240,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x0,0x1,0x0,};
unsigned int jj_la1_5[] = {
0x1420,0x0,0x1c0,0x0,0x0,0x0,0x2,0x3c0,0x0,0x0,0x1c0,0x0,0x200001c0,0x0,0x0,0x0,0x180,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x200001c0,0x180,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x20000000,0x20000000,0x2,0x0,0x0,0x3c0,0x3c0,0x1c0,0x1c0,0x3c0,0x380,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x1e0,0x0,0x180,0x0,0x3c0,0x0,0x180,0x0,0x180,0x0,0x0,0x180,0x0,0x1017e0,0x0,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x180,0x0,0x180,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x180,0x180,0x0,0x180,0x1420,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x1c0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x180,0x1c0,0x0,0x0,0x180,0x0,0x180,0x1017e0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x1c0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x240,0x1c0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x200001c0,0x0,0x1,0x0,0x1,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x180,};
/** Constructor with user supplied TokenManager. */
QCString VhdlParser::abstract_literal() {Token *tok;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DECIMAL_LITERAL:{if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
case INTEGER:{if (!hasError) {
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
case BASED_LITERAL:{if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
default:
jj_la1[0] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;if (!hasError) {
tok = jj_consume_token(ACCESS_T);
}
if (!hasError) {
str1 = subtype_indication();
}
str=tok->image.c_str(); return str+str1;
assert(false);
}
QCString VhdlParser::actual_designator() {QCString str;Token *t=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case OPEN_T:{if (!hasError) {
t = jj_consume_token(OPEN_T);
}
if (!hasError) {
return t->image.c_str();
}
break;
}
default:
jj_la1[1] = jj_gen;
if (jj_2_1(2147483647)) {if (!hasError) {
str = expression();
}
if (!hasError) {
return str;
}
} else if (jj_2_2(2147483647)) {if (!hasError) {
str = name();
}
if (!hasError) {
return str;
}
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
QCString VhdlParser::actual_parameter_part() {QCString s;if (!hasError) {
s = association_list();
}
return s;
assert(false);
}
QCString VhdlParser::actual_part() {QCString s,s1;
if (jj_2_3(2147483647)) {if (!hasError) {
s = actual_designator();
}
if (!hasError) {
return s;
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BOX_T:{if (!hasError) {
jj_consume_token(BOX_T);
}
if (!hasError) {
return "<>";
}
break;
}
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = name();
}
if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
s1 = actual_designator();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
if (!hasError) {
s+="(";s+=s1+")";return s;
}
break;
}
default:
jj_la1[2] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
QCString VhdlParser::adding_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PLUS_T:{if (!hasError) {
jj_consume_token(PLUS_T);
}
if (!hasError) {
return "+";
}
break;
}
case MINUS_T:{if (!hasError) {
jj_consume_token(MINUS_T);
}
if (!hasError) {
return "-";
}
break;
}
case AMPERSAND_T:{if (!hasError) {
jj_consume_token(AMPERSAND_T);
}
if (!hasError) {
return "&";
}
break;
}
default:
jj_la1[3] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::aggregate() {QCString s,s1,s2;if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
s = element_association();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
;
break;
}
default:
jj_la1[4] = jj_gen;
goto end_label_1;
}if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
s1 = element_association();
}
if (!hasError) {
s+=","+s1;
}
}
end_label_1: ;
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
return "("+s+")";
assert(false);
}
QCString VhdlParser::alias_declaration() {QCString s,s1,s2;if (!hasError) {
jj_consume_token(ALIAS_T);
}
if (!hasError) {
s2 = alias_designator();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COLON_T:{if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s+=":";
}
if (!hasError) {
s1 = subtype_indication();
}
if (!hasError) {
s+=s1;
}
break;
}
default:
jj_la1[5] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
s+=" is ";
}
if (!hasError) {
s1 = name();
}
if (!hasError) {
s+=s1;
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LBRACKET_T:{if (!hasError) {
s1 = signature();
}
if (!hasError) {
s+=s1;
}
break;
}
default:
jj_la1[6] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
addVhdlType(s2.data(),getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
return s2+" "+s+";";
assert(false);
}
QCString VhdlParser::alias_designator() {Token *tok=0;QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = identifier();
}
if (!hasError) {
return s;
}
break;
}
case CHARACTER_LITERAL:{if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
case STRINGLITERAL:{if (!hasError) {
s = operator_symbol();
}
if (!hasError) {
return s;
}
break;
}
default:
jj_la1[7] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
void VhdlParser::allocator() {
if (jj_2_4(3)) {if (!hasError) {
jj_consume_token(NEW_T);
}
if (!hasError) {
qualified_expression();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NEW_T:{if (!hasError) {
jj_consume_token(NEW_T);
}
if (!hasError) {
subtype_indication();
}
break;
}
default:
jj_la1[8] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
void VhdlParser::architecture_body() {QCString s,s1;if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(OF_T);
}
if (!hasError) {
s1 = name();
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
QCString t=s1+"::"+s;
genLabels.resize(0);
pushLabel(genLabels,s1);
lastCompound=current;
addVhdlType(t,getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
if (!hasError) {
try {if (!hasError) {
architecture_declarative_part();
}
} catch ( ...) {
error_skipto(BEGIN_T);
}
}
if (!hasError) {
jj_consume_token(BEGIN_T);
}
if (!hasError) {
architecture_statement_part();
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:{if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
break;
}
default:
jj_la1[9] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
name();
}
break;
}
default:
jj_la1[10] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
lastEntity=0;lastCompound=0; genLabels.resize(0);
}
void VhdlParser::architecture_declarative_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
case ATTRIBUTE_T:
case COMPONENT_T:
case CONSTANT_T:
case DISCONNECT_T:
case FILE_T:
case FOR_T:
case FUNCTION_T:
case GROUP_T:
case IMPURE_T:
case PROCEDURE_T:
case PURE_T:
case SIGNAL_T:
case SHARED_T:
case SUBTYPE_T:
case TYPE_T:
case USE_T:
case VARIABLE_T:{
;
break;
}
default:
jj_la1[11] = jj_gen;
goto end_label_2;
}if (!hasError) {
block_declarative_item();
}
}
end_label_2: ;
}
}
void VhdlParser::architecture_statement_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
case CASE_T:
case POSTPONED_T:
case PROCESS_T:
case WITH_T:
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
case VHDL2008TOOLDIR:{
;
break;
}
default:
jj_la1[12] = jj_gen;
goto end_label_3;
}if (!hasError) {
concurrent_statement();
}
}
end_label_3: ;
}
}
QCString VhdlParser::array_type_definition() {QCString s;
if (jj_2_5(2147483647)) {if (!hasError) {
s = unconstraint_array_definition();
}
if (!hasError) {
return s;
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARRAY_T:{if (!hasError) {
s = constraint_array_definition();
}
if (!hasError) {
return s;
}
break;
}
default:
jj_la1[13] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
jj_consume_token(ASSERT_T);
}
if (!hasError) {
s = condition();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case REPORT_T:{if (!hasError) {
t = jj_consume_token(REPORT_T);
}
if (!hasError) {
s1 = expression();
}
break;
}
default:
jj_la1[14] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SEVERITY_T:{if (!hasError) {
t1 = jj_consume_token(SEVERITY_T);
}
if (!hasError) {
s2 = expression();
}
break;
}
default:
jj_la1[15] = jj_gen;
;
}
}
s.prepend("assert ");
if(t) s1.prepend(" report ");
if(t1) s2.prepend(" report ");
return s+s1+s2;
assert(false);
}
QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = label();
}
if (!hasError) {
t = jj_consume_token(COLON_T);
}
break;
}
default:
jj_la1[16] = jj_gen;
;
}
}
if (!hasError) {
s1 = assertion();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
if(t) s+=":";
return s+s1+";";
assert(false);
}
QCString VhdlParser::association_element() {QCString s,s1;if (!hasError) {
if (jj_2_6(2147483647)) {if (!hasError) {
s = formal_part();
}
if (!hasError) {
jj_consume_token(ARROW_T);
}
} else {
;
}
}
if (!hasError) {
s1 = actual_part();
}
return s+" => "+s1;
assert(false);
}
QCString VhdlParser::association_list() {QCString s,s1;if (!hasError) {
s = association_element();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
;
break;
}
default:
jj_la1[17] = jj_gen;
goto end_label_4;
}if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
s1 = association_element();
}
if (!hasError) {
s+=","+s1;
}
}
end_label_4: ;
}
return s;
assert(false);
}
QCString VhdlParser::attribute_declaration() {QCString s,s1;if (!hasError) {
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s1 = type_mark();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
return " attribute "+s+":"+s1+";";
assert(false);
}
QCString VhdlParser::attribute_designator() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = identifier();
}
if (!hasError) {
return s;
}
break;
}
case RANGE_T:{if (!hasError) {
tok = jj_consume_token(RANGE_T);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
default:
jj_la1[18] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::attribute_name() {QCString s,s1;if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
s1 = name();
}
if (!hasError) {
s+="'"+s1;
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:{if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
s1 = expression();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
if (!hasError) {
s+"("+s1+")";
}
break;
}
default:
jj_la1[19] = jj_gen;
;
}
}
return s;
assert(false);
}
QCString VhdlParser::attribute_specification() {QCString s,s1,s2;if (!hasError) {
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
s = attribute_designator();
}
if (!hasError) {
jj_consume_token(OF_T);
}
if (!hasError) {
s1 = entity_specification();
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
s2 = expression();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
QCString t= s1+" is "+s2;
addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
return " attribute "+s+" of "+s1+ " is "+s2+";";
assert(false);
}
QCString VhdlParser::base() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(INTEGER);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::base_specifier() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::base_unit_declaration() {QCString s;if (!hasError) {
s = identifier();
}
return s;
assert(false);
}
QCString VhdlParser::based_integer() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::based_literal() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::basic_identifier() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
return tok->image.c_str();
assert(false);
}
void VhdlParser::binding_indication() {if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case USE_T:{if (!hasError) {
jj_consume_token(USE_T);
}
if (!hasError) {
entity_aspect();
}
break;
}
default:
jj_la1[20] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:{if (!hasError) {
generic_map_aspect();
}
break;
}
default:
jj_la1[21] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
port_map_aspect();
}
break;
}
default:
jj_la1[22] = jj_gen;
;
}
}
}
QCString VhdlParser::bit_string_literal() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BIT_STRING_LITERAL);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::bit_value() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
return tok->image.c_str();
assert(false);
}
void VhdlParser::block_configuration() {if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
block_specification();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case USE_T:{
;
break;
}
default:
jj_la1[23] = jj_gen;
goto end_label_5;
}if (!hasError) {
use_clause();
}
}
end_label_5: ;
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:{
;
break;
}
default:
jj_la1[24] = jj_gen;
goto end_label_6;
}if (!hasError) {
configuration_item();
}
}
end_label_6: ;
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::block_declarative_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
case PURE_T:{if (!hasError) {
subprogram_declaration();
}
break;
}
case TYPE_T:{if (!hasError) {
type_declaration();
}
break;
}
case SUBTYPE_T:{if (!hasError) {
subtype_declaration();
}
break;
}
case CONSTANT_T:{if (!hasError) {
constant_declaration();
}
break;
}
case SIGNAL_T:{if (!hasError) {
signal_declaration();
}
break;
}
case SHARED_T:
case VARIABLE_T:{if (!hasError) {
variable_declaration();
}
break;
}
case FILE_T:{if (!hasError) {
file_declaration();
}
break;
}
case ALIAS_T:{if (!hasError) {
alias_declaration();
}
break;
}
case COMPONENT_T:{if (!hasError) {
component_declaration();
}
break;
}
default:
jj_la1[25] = jj_gen;
if (jj_2_7(2147483647)) {if (!hasError) {
attribute_declaration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:{if (!hasError) {
attribute_specification();
}
break;
}
case FOR_T:{if (!hasError) {
configuration_specification();
}
break;
}
case DISCONNECT_T:{if (!hasError) {
disconnection_specification();
}
break;
}
case USE_T:{if (!hasError) {
use_clause();
}
break;
}
default:
jj_la1[26] = jj_gen;
if (jj_2_8(3)) {if (!hasError) {
group_template_declaration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GROUP_T:{if (!hasError) {
group_declaration();
}
break;
}
default:
jj_la1[27] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
}
}
}
void VhdlParser::block_declarative_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
case ATTRIBUTE_T:
case COMPONENT_T:
case CONSTANT_T:
case DISCONNECT_T:
case FILE_T:
case FOR_T:
case FUNCTION_T:
case GROUP_T:
case IMPURE_T:
case PROCEDURE_T:
case PURE_T:
case SIGNAL_T:
case SHARED_T:
case SUBTYPE_T:
case TYPE_T:
case USE_T:
case VARIABLE_T:{
;
break;
}
default:
jj_la1[28] = jj_gen;
goto end_label_7;
}if (!hasError) {
block_declarative_item();
}
}
end_label_7: ;
}
}
void VhdlParser::block_header() {if (!hasError) {
if (jj_2_9(2147483647)) {if (!hasError) {
generic_clause();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:{if (!hasError) {
generic_map_aspect();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
break;
}
default:
jj_la1[29] = jj_gen;
;
}
}
} else {
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
port_clause();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
port_map_aspect();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
break;
}
default:
jj_la1[30] = jj_gen;
;
}
}
break;
}
default:
jj_la1[31] = jj_gen;
;
}
}
}
void VhdlParser::block_specification() {if (!hasError) {
name();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:{if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
index_specification();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
break;
}
default:
jj_la1[32] = jj_gen;
;
}
}
}
void VhdlParser::block_statement() {QCString s;if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
jj_consume_token(BLOCK_T);
}
if (!hasError) {
pushLabel(genLabels,s);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:{if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
expression();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
break;
}
default:
jj_la1[33] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IS_T:{if (!hasError) {
jj_consume_token(IS_T);
}
break;
}
default:
jj_la1[34] = jj_gen;
;
}
}
if (!hasError) {
block_header();
}
if (!hasError) {
block_declarative_part();
}
if (!hasError) {
jj_consume_token(BEGIN_T);
}
if (!hasError) {
block_statement_part();
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
jj_consume_token(BLOCK_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
identifier();
}
break;
}
default:
jj_la1[35] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
genLabels=popLabel(genLabels);
}
void VhdlParser::block_statement_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
case CASE_T:
case POSTPONED_T:
case PROCESS_T:
case WITH_T:
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
case VHDL2008TOOLDIR:{
;
break;
}
default:
jj_la1[36] = jj_gen;
goto end_label_8;
}if (!hasError) {
concurrent_statement();
}
}
end_label_8: ;
}
}
void VhdlParser::case_statement() {QCString s;if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
break;
}
default:
jj_la1[37] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(CASE_T);
}
if (!hasError) {
s = expression();
}
if (!hasError) {
QCString ca="case "+s;
FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
case_statement_alternative();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{
;
break;
}
default:
jj_la1[38] = jj_gen;
goto end_label_9;
}if (!hasError) {
case_statement_alternative();
}
}
end_label_9: ;
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
jj_consume_token(CASE_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
identifier();
}
break;
}
default:
jj_la1[39] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
FlowChart::moveToPrevLevel();
FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
}
void VhdlParser::case_statement_alternative() {QCString s;if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
s = choices();
}
if (!hasError) {
jj_consume_token(ARROW_T);
}
if (!hasError) {
QCString t="when ";
t+=s+"=> ";
FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
}
if (!hasError) {
sequence_of_statement();
}
FlowChart::moveToPrevLevel();
}
QCString VhdlParser::character_literal() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::choice() {QCString s;
if (jj_2_10(2147483647)) {if (!hasError) {
s = discrete_range();
}
if (!hasError) {
return s;
}
} else if (jj_2_11(2147483647)) {if (!hasError) {
s = simple_expression();
}
if (!hasError) {
return s;
}
} else if (jj_2_12(2147483647)) {if (!hasError) {
s = identifier();
}
if (!hasError) {
return s;
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case OTHER_T:{if (!hasError) {
jj_consume_token(OTHER_T);
}
if (!hasError) {
return " others ";
}
break;
}
default:
jj_la1[40] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
QCString VhdlParser::choices() {QCString s,s1;if (!hasError) {
s = choice();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BAR_T:{
;
break;
}
default:
jj_la1[41] = jj_gen;
goto end_label_10;
}if (!hasError) {
jj_consume_token(BAR_T);
}
if (!hasError) {
s1 = choice();
}
if (!hasError) {
s+="|";s+=s1;
}
}
end_label_10: ;
}
return s;
assert(false);
}
void VhdlParser::component_configuration() {if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
component_specification();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:
case PORT_T:
case USE_T:
case SEMI_T:{if (!hasError) {
binding_indication();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
break;
}
default:
jj_la1[42] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:{if (!hasError) {
block_configuration();
}
break;
}
default:
jj_la1[43] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::component_declaration() {QCString s;if (!hasError) {
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IS_T:{if (!hasError) {
jj_consume_token(IS_T);
}
break;
}
default:
jj_la1[44] = jj_gen;
;
}
}
if (!hasError) {
currP=VhdlDocGen::COMPONENT;
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:{if (!hasError) {
generic_clause();
}
break;
}
default:
jj_la1[45] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
port_clause();
}
break;
}
default:
jj_la1[46] = jj_gen;
;
}
}
if (!hasError) {
addVhdlType(s.data(),getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
currP=0;
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
identifier();
}
break;
}
default:
jj_la1[47] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::component_instantiation_statement() {QCString s,s1;if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s1 = instantiation_unit();
}
if (!hasError) {
QCString s3;
if (s1.contains("|")) {
s3=VhdlDocGen::getIndexWord(s1.data(),0);
s1=VhdlDocGen::getIndexWord(s1.data(),1);
}
addCompInst(s.lower().data(),s1.lower().data(),s3.data(),getLine());
}
if (!hasError) {
if (jj_2_13(2147483647)) {if (!hasError) {
generic_map_aspect();
}
} else {
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
port_map_aspect();
}
break;
}
default:
jj_la1[48] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::component_specification() {if (!hasError) {
instantiation_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
name();
}
}
QCString VhdlParser::composite_type_definition() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARRAY_T:{if (!hasError) {
s = array_type_definition();
}
if (!hasError) {
return s;
}
break;
}
case RECORD_T:{if (!hasError) {
record_type_definition();
}
if (!hasError) {
return s+"#";
}
break;
}
default:
jj_la1[49] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
void VhdlParser::concurrent_assertion_statement() {if (!hasError) {
if (jj_2_14(2)) {if (!hasError) {
identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
} else {
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:{if (!hasError) {
jj_consume_token(POSTPONED_T);
}
break;
}
default:
jj_la1[50] = jj_gen;
;
}
}
if (!hasError) {
assertion();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::concurrent_procedure_call_statement() {if (!hasError) {
if (jj_2_15(2)) {if (!hasError) {
identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
} else {
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:{if (!hasError) {
jj_consume_token(POSTPONED_T);
}
break;
}
default:
jj_la1[51] = jj_gen;
;
}
}
if (!hasError) {
procedure_call();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::concurrent_signal_assignment_statement() {if (!hasError) {
if (jj_2_16(2)) {if (!hasError) {
identifier();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
} else {
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:{if (!hasError) {
jj_consume_token(POSTPONED_T);
}
break;
}
default:
jj_la1[52] = jj_gen;
;
}
}
if (!hasError) {
if (jj_2_17(2147483647)) {if (!hasError) {
conditional_signal_assignment();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WITH_T:{if (!hasError) {
selected_signal_assignment();
}
break;
}
default:
jj_la1[53] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
}
void VhdlParser::concurrent_statement() {
if (jj_2_18(2147483647)) {if (!hasError) {
block_statement();
}
} else if (jj_2_19(2147483647)) {if (!hasError) {
process_statement();
}
} else if (jj_2_20(2147483647)) {if (!hasError) {
generate_statement();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CASE_T:{if (!hasError) {
case_scheme();
}
break;
}
default:
jj_la1[54] = jj_gen;
if (jj_2_21(2147483647)) {if (!hasError) {
concurrent_assertion_statement();
}
} else if (jj_2_22(2147483647)) {if (!hasError) {
concurrent_signal_assignment_statement();
}
} else if (jj_2_23(2147483647)) {if (!hasError) {
component_instantiation_statement();
}
} else if (jj_2_24(2147483647)) {if (!hasError) {
concurrent_procedure_call_statement();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case VHDL2008TOOLDIR:{if (!hasError) {
jj_consume_token(VHDL2008TOOLDIR);
}
break;
}
default:
jj_la1[55] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
}
}
QCString VhdlParser::condition() {QCString s;if (!hasError) {
s = expression();
}
return s;
assert(false);
}
QCString VhdlParser::condition_clause() {QCString s;if (!hasError) {
jj_consume_token(UNTIL_T);
}
if (!hasError) {
s = condition();
}
return " until "+s;
assert(false);
}
void VhdlParser::conditional_signal_assignment() {if (!hasError) {
target();
}
if (!hasError) {
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
options();
}
if (!hasError) {
conditional_waveforms();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::conditional_waveforms() {if (!hasError) {
waveform();
}
if (!hasError) {
while (!hasError) {
if (jj_2_25(2147483647)) {
;
} else {
goto end_label_11;
}if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
condition();
}
if (!hasError) {
jj_consume_token(ELSE_T);
}
if (!hasError) {
waveform();
}
}
end_label_11: ;
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
condition();
}
break;
}
default:
jj_la1[56] = jj_gen;
;
}
}
}
void VhdlParser::configuration_declaration() {QCString s,s1;if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(OF_T);
}
if (!hasError) {
s1 = name();
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
confName=s+"::"+s1;
addVhdlType(s.data(),getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
}
if (!hasError) {
configuration_declarative_part();
}
if (!hasError) {
block_configuration();
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONFIGURATION_T:{if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
break;
}
default:
jj_la1[57] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
name();
}
break;
}
default:
jj_la1[58] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
genLabels.resize(0); confName="";
}
void VhdlParser::configuration_declarative_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case USE_T:{if (!hasError) {
use_clause();
}
break;
}
case ATTRIBUTE_T:{if (!hasError) {
attribute_specification();
}
break;
}
case GROUP_T:{if (!hasError) {
group_declaration();
}
break;
}
default:
jj_la1[59] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
void VhdlParser::configuration_declarative_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:
case GROUP_T:
case USE_T:{
;
break;
}
default:
jj_la1[60] = jj_gen;
goto end_label_12;
}if (!hasError) {
configuration_declarative_item();
}
}
end_label_12: ;
}
}
void VhdlParser::configuration_item() {
if (jj_2_26(2147483647)) {if (!hasError) {
component_configuration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:{if (!hasError) {
block_configuration();
}
break;
}
default:
jj_la1[61] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
void VhdlParser::configuration_specification() {if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
component_specification();
}
if (!hasError) {
binding_indication();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;if (!hasError) {
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
s = identifier_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s1 = subtype_indication();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case VARASSIGN_T:{if (!hasError) {
t = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
s2 = expression();
}
break;
}
default:
jj_la1[62] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
if(t)
s2.prepend(":=");
QCString it=s1+s2;
addVhdlType(s.data(),getLine(CONSTANT_T),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data(),Public);
it.prepend("constant ");
return it;
assert(false);
}
QCString VhdlParser::constraint_array_definition() {QCString s,s1;if (!hasError) {
jj_consume_token(ARRAY_T);
}
if (!hasError) {
s = index_constraint();
}
if (!hasError) {
jj_consume_token(OF_T);
}
if (!hasError) {
s1 = subtype_indication();
}
return s+" "+s1;
assert(false);
}
void VhdlParser::context_clause() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LIBRARY_T:
case USE_T:{
;
break;
}
default:
jj_la1[63] = jj_gen;
goto end_label_13;
}if (!hasError) {
context_item();
}
}
end_label_13: ;
}
}
QCString VhdlParser::constraint() {QCString s;
if (jj_2_27(2147483647)) {if (!hasError) {
s = range_constraint();
}
if (!hasError) {
return s;
}
} else if (jj_2_28(2147483647)) {if (!hasError) {
s = index_constraint();
}
if (!hasError) {
return s;
}
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
void VhdlParser::context_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LIBRARY_T:{if (!hasError) {
library_clause();
}
break;
}
case USE_T:{if (!hasError) {
use_clause();
}
break;
}
default:
jj_la1[64] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
QCString VhdlParser::decimal_literal() {Token *tok=0;if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::delay_mechanism() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case TRANSPORT_T:{if (!hasError) {
jj_consume_token(TRANSPORT_T);
}
if (!hasError) {
return " transport ";
}
break;
}
case INERTIAL_T:
case REJECT_T:{if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case REJECT_T:{if (!hasError) {
jj_consume_token(REJECT_T);
}
if (!hasError) {
s = expression();
}
if (!hasError) {
s.prepend(" reject ");
}
break;
}
default:
jj_la1[65] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(INERTIAL_T);
}
if (!hasError) {
return s+" inertial ";
}
break;
}
default:
jj_la1[66] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
void VhdlParser::design_file() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
case CONFIGURATION_T:
case CONTEXT_T:
case ENTITY_T:
case LIBRARY_T:
case PACKAGE_T:
case USE_T:{if (!hasError) {
while (!hasError) {if (!hasError) {
design_unit();
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
case CONFIGURATION_T:
case CONTEXT_T:
case ENTITY_T:
case LIBRARY_T:
case PACKAGE_T:
case USE_T:{
;
break;
}
default:
jj_la1[67] = jj_gen;
goto end_label_14;
}
}
end_label_14: ;
}
if (!hasError) {
}
break;
}
case 0:{if (!hasError) {
jj_consume_token(0);
}
break;
}
default:
jj_la1[68] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
void VhdlParser::design_unit() {if (!hasError) {
context_clause();
}
if (!hasError) {
library_unit();
}
}
QCString VhdlParser::designator() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = identifier();
}
if (!hasError) {
return s;
}
break;
}
case STRINGLITERAL:{if (!hasError) {
s = operator_symbol();
}
if (!hasError) {
return s;
}
break;
}
default:
jj_la1[69] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::direction() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case TO_T:{if (!hasError) {
tok = jj_consume_token(TO_T);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
case DOWNTO_T:{if (!hasError) {
tok = jj_consume_token(DOWNTO_T);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
default:
jj_la1[70] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
void VhdlParser::disconnection_specification() {if (!hasError) {
jj_consume_token(DISCONNECT_T);
}
if (!hasError) {
guarded_signal_specificatio();
}
if (!hasError) {
jj_consume_token(AFTER_T);
}
if (!hasError) {
expression();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
}
void VhdlParser::guarded_signal_specificatio() {if (!hasError) {
signal_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
name();
}
}
QCString VhdlParser::discrete_range() {QCString s;
if (jj_2_29(2147483647)) {if (!hasError) {
s = range();
}
if (!hasError) {
return s;
}
} else if (jj_2_30(2147483647)) {if (!hasError) {
s = subtype_indication();
}
if (!hasError) {
return s;
}
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::element_association() {QCString s,s1;if (!hasError) {
if (jj_2_31(2147483647)) {if (!hasError) {
s = choices();
}
if (!hasError) {
jj_consume_token(ARROW_T);
}
} else {
;
}
}
if (!hasError) {
s1 = expression();
}
if(!s.isEmpty())
return s+"=>"+s1;
return s1;
assert(false);
}
QCString VhdlParser::element_declaration() {QCString s,s1;if (!hasError) {
s = identifier_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s1 = subtype_indication();
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
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);
}
QCString VhdlParser::entity_aspect() {Token *tok=0;QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ENTITY_T:{if (!hasError) {
tok = jj_consume_token(ENTITY_T);
}
if (!hasError) {
s = name();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:{if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
s1 = identifier();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
if (!hasError) {
s+="("+s1+")";
}
break;
}
default:
jj_la1[71] = jj_gen;
;
}
}
if (!hasError) {
return s;
}
break;
}
case CONFIGURATION_T:{if (!hasError) {
tok = jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
s = name();
}
if (!hasError) {
return tok->image.c_str()+s;
}
break;
}
case OPEN_T:{if (!hasError) {
tok = jj_consume_token(OPEN_T);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
default:
jj_la1[72] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::entity_class() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ENTITY_T:{if (!hasError) {
jj_consume_token(ENTITY_T);
}
if (!hasError) {
return "entity";
}
break;
}
case ARCHITECTURE_T:{if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
return "architecture";
}
break;
}
case CONFIGURATION_T:{if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
return "configuration";
}
break;
}
case PROCEDURE_T:{if (!hasError) {
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
return "procedure";
}
break;
}
case FUNCTION_T:{if (!hasError) {
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
return "function";
}
break;
}
case PACKAGE_T:{if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
return "package";
}
break;
}
case TYPE_T:{if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
return "type";
}
break;
}
case SUBTYPE_T:{if (!hasError) {
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
return "subtype";
}
break;
}
case CONSTANT_T:{if (!hasError) {
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
return "constant";
}
break;
}
case SIGNAL_T:{if (!hasError) {
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
return "signal";
}
break;
}
case VARIABLE_T:{if (!hasError) {
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
return "variable";
}
break;
}
case COMPONENT_T:{if (!hasError) {
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
return "component";
}
break;
}
case LABEL_T:{if (!hasError) {
jj_consume_token(LABEL_T);
}
if (!hasError) {
return "label";
}
break;
}
case LITERAL_T:{if (!hasError) {
jj_consume_token(LITERAL_T);
}
if (!hasError) {
return "literal";
}
break;
}
case UNITS_T:{if (!hasError) {
jj_consume_token(UNITS_T);
}
if (!hasError) {
return "units";
}
break;
}
case GROUP_T:{if (!hasError) {
jj_consume_token(GROUP_T);
}
if (!hasError) {
return "group";
}
break;
}
case FILE_T:{if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
return "file";
}
break;
}
default:
jj_la1[73] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::entity_class_entry() {QCString s;if (!hasError) {
s = entity_class();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BOX_T:{if (!hasError) {
jj_consume_token(BOX_T);
}
if (!hasError) {
s+="<>";
}
break;
}
default:
jj_la1[74] = jj_gen;
;
}
}
return s;
assert(false);
}
QCString VhdlParser::entity_class_entry_list() {QCString s,s1,s2;if (!hasError) {
if (!hasError) {
s1 = entity_class_entry();
}
if (!hasError) {
s+=s1;
}
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
;
break;
}
default:
jj_la1[75] = jj_gen;
goto end_label_15;
}if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
s = entity_class_entry();
}
if (!hasError) {
s2+=",";s2+=s;
}
}
end_label_15: ;
}
return s1+s2;
assert(false);
}
void VhdlParser::entity_declaration() {QCString s;if (!hasError) {
jj_consume_token(ENTITY_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
lastEntity=current;
lastCompound=0;
addVhdlType(s.data(),getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
}
if (!hasError) {
entity_header();
}
if (!hasError) {
entity_declarative_part();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BEGIN_T:{if (!hasError) {
jj_consume_token(BEGIN_T);
}
if (!hasError) {
entity_statement_part();
}
break;
}
default:
jj_la1[76] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ENTITY_T:{if (!hasError) {
jj_consume_token(ENTITY_T);
}
break;
}
default:
jj_la1[77] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
name();
}
break;
}
default:
jj_la1[78] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
lastEntity=0;lastCompound=0; genLabels.resize(0);
}
void VhdlParser::entity_declarative_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
case PURE_T:{if (!hasError) {
subprogram_declaration();
}
break;
}
case TYPE_T:{if (!hasError) {
type_declaration();
}
break;
}
case SUBTYPE_T:{if (!hasError) {
subtype_declaration();
}
break;
}
case CONSTANT_T:{if (!hasError) {
constant_declaration();
}
break;
}
case SIGNAL_T:{if (!hasError) {
signal_declaration();
}
break;
}
case SHARED_T:
case VARIABLE_T:{if (!hasError) {
variable_declaration();
}
break;
}
case FILE_T:{if (!hasError) {
file_declaration();
}
break;
}
case ALIAS_T:{if (!hasError) {
alias_declaration();
}
break;
}
default:
jj_la1[79] = jj_gen;
if (jj_2_32(2147483647)) {if (!hasError) {
attribute_declaration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:{if (!hasError) {
attribute_specification();
}
break;
}
case DISCONNECT_T:{if (!hasError) {
disconnection_specification();
}
break;
}
case USE_T:{if (!hasError) {
use_clause();
}
break;
}
default:
jj_la1[80] = jj_gen;
if (jj_2_33(3)) {if (!hasError) {
group_template_declaration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GROUP_T:{if (!hasError) {
group_declaration();
}
break;
}
default:
jj_la1[81] = jj_gen;
if (jj_2_34(5)) {if (!hasError) {
package_instantiation_declaration();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PACKAGE_T:{if (!hasError) {
package_declaration();
}
break;
}
case VHDL2008TOOLDIR:{if (!hasError) {
jj_consume_token(VHDL2008TOOLDIR);
}
break;
}
default:
jj_la1[82] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
}
}
}
}
}
void VhdlParser::entity_declarative_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
case ATTRIBUTE_T:
case CONSTANT_T:
case DISCONNECT_T:
case FILE_T:
case FUNCTION_T:
case GROUP_T:
case IMPURE_T:
case PACKAGE_T:
case PROCEDURE_T:
case PURE_T:
case SIGNAL_T:
case SHARED_T:
case SUBTYPE_T:
case TYPE_T:
case USE_T:
case VARIABLE_T:
case VHDL2008TOOLDIR:{
;
break;
}
default:
jj_la1[83] = jj_gen;
goto end_label_16;
}if (!hasError) {
entity_declarative_item();
}
}
end_label_16: ;
}
}
QCString VhdlParser::entity_designator() {QCString s,s1;if (!hasError) {
s = entity_tag();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LBRACKET_T:{if (!hasError) {
s1 = signature();
}
break;
}
default:
jj_la1[84] = jj_gen;
;
}
}
return s+s1;
assert(false);
}
void VhdlParser::entity_header() {if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:{if (!hasError) {
currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC;
}
if (!hasError) {
generic_clause();
}
break;
}
default:
jj_la1[85] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PORT_T:{if (!hasError) {
currP=VhdlDocGen::PORT;
}
if (!hasError) {
port_clause();
}
break;
}
default:
jj_la1[86] = jj_gen;
;
}
}
}
QCString VhdlParser::entity_name_list() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
case CHARACTER_LITERAL:{if (!hasError) {
while (!hasError) {if (!hasError) {
s1 = entity_designator();
}
if (!hasError) {
s+=s1;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
case CHARACTER_LITERAL:{
;
break;
}
default:
jj_la1[87] = jj_gen;
goto end_label_17;
}
}
end_label_17: ;
}
if (!hasError) {
return s;
}
break;
}
case OTHER_T:{if (!hasError) {
jj_consume_token(OTHER_T);
}
if (!hasError) {
return "other";
}
break;
}
case ALL_T:{if (!hasError) {
jj_consume_token(ALL_T);
}
if (!hasError) {
return "all";
}
break;
}
default:
jj_la1[88] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::entity_specification() {QCString s,s1;if (!hasError) {
s = entity_name_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s1 = entity_class();
}
return s+":"+s1;
assert(false);
}
void VhdlParser::entity_statement() {
if (jj_2_35(2147483647)) {if (!hasError) {
concurrent_assertion_statement();
}
} else if (jj_2_36(2147483647)) {if (!hasError) {
process_statement();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
concurrent_procedure_call_statement();
}
break;
}
default:
jj_la1[89] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
void VhdlParser::entity_statement_part() {if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
case POSTPONED_T:
case PROCESS_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{
;
break;
}
default:
jj_la1[90] = jj_gen;
goto end_label_18;
}if (!hasError) {
entity_statement();
}
}
end_label_18: ;
}
}
QCString VhdlParser::entity_tag() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = name();
}
if (!hasError) {
return s;
}
break;
}
case CHARACTER_LITERAL:{if (!hasError) {
s = character_literal();
}
if (!hasError) {
return s;
}
break;
}
default:
jj_la1[91] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::enumeration_literal() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = identifier();
}
if (!hasError) {
return s;
}
break;
}
case CHARACTER_LITERAL:{if (!hasError) {
s = character_literal();
}
if (!hasError) {
return s;
}
break;
}
default:
jj_la1[92] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::enumeration_type_definition() {QCString s,s1;if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
s = enumeration_literal();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
;
break;
}
default:
jj_la1[93] = jj_gen;
goto end_label_19;
}if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
s1 = enumeration_literal();
}
if (!hasError) {
s+=",";s+=s1;
}
}
end_label_19: ;
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
return "("+s+")";
assert(false);
}
QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = identifier();
}
if (!hasError) {
t = jj_consume_token(COLON_T);
}
break;
}
default:
jj_la1[94] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(EXIT_T);
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s1 = identifier();
}
break;
}
default:
jj_la1[95] = jj_gen;
;
}
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{if (!hasError) {
t1 = jj_consume_token(WHEN_T);
}
if (!hasError) {
s2 = condition();
}
break;
}
default:
jj_la1[96] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
return s+s1+s2+";";
assert(false);
}
QCString VhdlParser::expression() {QCString s,s1,s2;if (!hasError) {
s = relation();
}
if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case AND_T:
case NAND_T:
case NOR_T:
case OR_T:
case XOR_T:
case XNOR_T:{
;
break;
}
default:
jj_la1[97] = jj_gen;
goto end_label_20;
}if (!hasError) {
s1 = logop();
}
if (!hasError) {
s2 = relation();
}
if (!hasError) {
s+=s1;s+=s2;
}
}
end_label_20: ;
}
return s;
assert(false);
}
QCString VhdlParser::logop() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case AND_T:{if (!hasError) {
jj_consume_token(AND_T);
}
if (!hasError) {
return "and" ;
}
break;
}
case NAND_T:{if (!hasError) {
jj_consume_token(NAND_T);
}
if (!hasError) {
return "nand" ;
}
break;
}
case NOR_T:{if (!hasError) {
jj_consume_token(NOR_T);
}
if (!hasError) {
return "nor" ;
}
break;
}
case XNOR_T:{if (!hasError) {
jj_consume_token(XNOR_T);
}
if (!hasError) {
return "xnor" ;
}
break;
}
case XOR_T:{if (!hasError) {
jj_consume_token(XOR_T);
}
if (!hasError) {
return "xor" ;
}
break;
}
case OR_T:{if (!hasError) {
jj_consume_token(OR_T);
}
if (!hasError) {
return "or" ;
}
break;
}
default:
jj_la1[98] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::extended_identifier() {Token *t;if (!hasError) {
t = jj_consume_token(EXTENDED_CHARACTER);
}
return t->image.c_str();
assert(false);
}
QCString VhdlParser::factor() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NEW_T:
case NULL_T:
case LPAREN_T:
case SLSL_T:
case INTEGER:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
case BIT_STRING_LITERAL:{if (!hasError) {
s = primary();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOUBLEMULT_T:{if (!hasError) {
jj_consume_token(DOUBLEMULT_T);
}
if (!hasError) {
s1 = primary();
}
if (!hasError) {
s+="**";s+=s1;
}
break;
}
default:
jj_la1[99] = jj_gen;
;
}
}
if (!hasError) {
return s;
}
break;
}
case ABS_T:{if (!hasError) {
jj_consume_token(ABS_T);
}
if (!hasError) {
s = primary();
}
if (!hasError) {
s1 = "abs "; return s1+s;
}
break;
}
case NOT_T:{if (!hasError) {
jj_consume_token(NOT_T);
}
if (!hasError) {
s = primary();
}
if (!hasError) {
s1="not ";return s1+s;
}
break;
}
default:
jj_la1[100] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
s = identifier_list();
}
if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
s2 = subtype_indication();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IS_T:
case OPEN_T:{if (!hasError) {
s3 = file_open_information();
}
break;
}
default:
jj_la1[101] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(SEMI_T);
}
QCString t1=s2+" "+s3;
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
return " file "+s+":"+s2+" "+s3+";";
assert(false);
}
QCString VhdlParser::file_logical_name() {QCString s;if (!hasError) {
s = expression();
}
return s;
assert(false);
}
QCString VhdlParser::file_open_information() {QCString s,s1,s2;if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case OPEN_T:{if (!hasError) {
jj_consume_token(OPEN_T);
}
if (!hasError) {
s = expression();
}
break;
}
default:
jj_la1[102] = jj_gen;
;
}
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
s1 = file_logical_name();
}
s2="open "+s+" is "+s1; return s2;
assert(false);
}
QCString VhdlParser::file_type_definition() {QCString s,s1;if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
jj_consume_token(OF_T);
}
if (!hasError) {
s = type_mark();
}
s1=" file of "+s; return s1;
assert(false);
}
QCString VhdlParser::floating_type_definition() {QCString s;if (!hasError) {
s = range_constraint();
}
return s;
assert(false);
}
QCString VhdlParser::formal_designator() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{if (!hasError) {
s = name();
}
if (!hasError) {
return s;
}
break;
}
case INTEGER:{if (!hasError) {
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
return tok->image.c_str();
}
break;
}
default:
jj_la1[103] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
QCString VhdlParser::formal_parameter_list() {QCString s;if (!hasError) {
s = interface_list();
}
return s;
assert(false);
}
QCString VhdlParser::formal_part() {QCString s,s1;if (!hasError) {
s = name();
}
if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:{if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
formal_designator();
}
if (!hasError) {
jj_consume_token(RPAREN_T);
}
if (!hasError) {
s+"("+s1+")";
}
break;
}
default:
jj_la1[104] = jj_gen;
;
}
}
return s;
assert(false);
}
QCString VhdlParser::full_type_declaration() {Entry *tmpEntry;QCString s,s1,s2;if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
s = identifier();
}
if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
tmpEntry=current;
addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
}
if (!hasError) {
try {if (!hasError) {