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 593680 - Fortran: Not identifying sets of round brackets in dimension statement
Fortran: Not identifying sets of round brackets in dimension statement
Status: VERIFIED DUPLICATE of bug 565715
Product: doxygen
Classification: Other
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2009-08-31 13:51 UTC by albert
Modified: 2012-11-18 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description albert 2009-08-31 13:51:32 UTC
I have the following subroutine:
      SUBROUTINE fie(xx,xxb)
      IMPLICIT NONE

      INTEGER, PARAMETER :: A = 7
      INTEGER, PARAMETER :: B = 3
      DOUBLE PRECISION :: xx((A + 5) * B)
      DOUBLE PRECISION :: xxb(((A) + 5) * B)

      END

The result in Doxygen is:
subroutine fie  (DOUBLE PRECISION,dimension((a + 5)     xx,
                 DOUBLE PRECISION,dimension(((a)        xxb 
                ) 	

Instead of:
subroutine fie  (DOUBLE PRECISION,dimension((a + 5) * b) xx,
                 DOUBLE PRECISION,dimension(((a) + 5)    xxb	 
                )

replacing in fortranscanner.l the line:
ARGS      {BS}("("[^)]*")")
by:
NRB       [^()]*
RBWRD     "("{NRB}("("{NRB}")"|")")
WRD       {NRB}{RBWRD}
ARGS      {BS}"("{WRD}*{NRB}")"

the output is OK. I don't know if I have to change something in fortrancode.l as well?
This implementation is for a set of with a maximum of 2 levels of round brackets in the (a.o.) dimension statement. I have not been able to make a recursive version for it (I think 
RBWRD     "("{NRB}({RBWRD}|")")
might work), but I get the error message:
../lib/libdoxygen.a(doxygen.o):doxygen.cpp:(.text+0x20123): undefined reference
to `vtable for FortranLanguageScanner'
Comment 1 Daniel Franke 2010-02-26 22:24:28 UTC
Dupe of #565715.
Comment 2 albert 2010-11-06 16:11:42 UTC
Bug 565715 handles about character string, this bug about double precision.
I've added a patch to Bug 565715, fixing problems in this bugand some more.

*** This bug has been marked as a duplicate of bug 565715 ***
Comment 3 albert 2011-11-01 13:17:38 UTC
Works with fix of bug565715