After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758495 - Bug in VHDL parser
Bug in VHDL parser
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.10
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2015-11-22 14:53 UTC by Walter Nasahl
Modified: 2015-12-30 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vhdl patch (918 bytes, patch)
2015-11-22 21:05 UTC, mk
none Details | Review

Description Walter Nasahl 2015-11-22 14:53:13 UTC
The actual VHDL parser has a problem to parse the following structure (example):

    inst_name : entity work.entity_name
    port map (  clk => clk,
                rst => rst,
                d => d_in,
                q => q_out);

The problem is that it can not find the entity_name. As a result the hierarchy for the project can not be build.

Solution for this problem:

1. Add the following function the file vhdlparser.jj:

// entity name is lib_name.entity_name or only entity_name
QCString name_entity() : {QCString s;}
 {
  (
 <BASIC_IDENTIFIER> <DOT_T> s = name()
 | s = name()
  )
 {return s;}
 }


2. change in vhdlparser.jj the following part
QCString instantiation_unit() :  {QCString s,s1,s2;Token *tok=0;}
{
[ tok=<COMPONENT_T> ] s=identifier() {s1="component"; return s; }
| tok=<ENTITY_T> s2=name() {s=tok->image.c_str()+s2;} [ <LPAREN_T> s1=identifier() <RPAREN_T> {s+="(";s+=s1;s+=")" ;}] { return s;}
| <CONFIGURATION_T> s=name() {s1="configuration ";return s;}
}

to

QCString instantiation_unit() :  {QCString s,s1,s2;Token *tok=0;}
{
[ tok=<COMPONENT_T> ] s=identifier() {s1="component"; return s; }
| tok=<ENTITY_T> s2=name_entity() {s=s2;} [ <LPAREN_T> s1=identifier() <RPAREN_T> {s+="(";s+=s1;s+=")" ;}] { return s;}
| <CONFIGURATION_T> s=name() {s1="configuration ";return s;}
}

Walter
Comment 1 mk 2015-11-22 21:05:40 UTC
Created attachment 316058 [details] [review]
vhdl patch
Comment 2 Dimitri van Heesch 2015-12-20 09:39:10 UTC
Thanks, I'll include the patch in the next GIT update.
Comment 3 Dimitri van Heesch 2015-12-30 10:19:04 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.11. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information 
that you think can be relevant (preferably in the form of a self-contained example).