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 704518 - Fortran whitespace rules confuse parser
Fortran whitespace rules confuse parser
Status: RESOLVED WONTFIX
Product: doxygen
Classification: Other
Component: general
1.8.4
Other Mac OS
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-07-19 03:02 UTC by Jiahao Chen
Modified: 2013-07-20 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jiahao Chen 2013-07-19 03:02:00 UTC
Fortran allows arbitrary amounts of whitespace (including zero) between keywords and this confuses doxygen.

For example, this is a valid Fortran program:

      program demo
      c allf(1.)
      e n d 

      subroutinef(x)
      doi=1,5
      print *, x
      enddo
      e n d s u b r o u t i n e 

This source code snippet will compile and run correctly, printing "1.00000000" five times to stdout. However, this confuses doxygen mightily:

Warning: ignoring unknown tag `program' at line 1, file b.f
Warning: ignoring unknown tag `demo' at line 1, file b.f
Warning: ignoring unknown tag `callf' at line 2, file b.f
(etc.)
********************************************************************
Error in file /Users/jiahao/demo.f line: 13, state: 10
********************************************************************

Also strange is that the reported line number where the error occurred is two lines after the last line in the program...
Comment 1 albert 2013-07-19 16:21:11 UTC
This, unfortunately, is indeed valid Fortran code, but quite unreadable and very hard to parse.
The fact that the line number is after the end of the code is due to the fact that the Doxygen parser does not understand the different words (Doxygen parser is word based) and reports this at the end of the file.

I think parsing this type of code is beyond the scope of Doxygen, my suggestion is to set this bug to not a bug.
Comment 2 Dimitri van Heesch 2013-07-20 13:53:37 UTC
I agree with Albert. If you need support for this please consider writing an input filter (see the INPUT_FILTER option) that normalizes the spaces and hands the result over to doxygen parser.