GNOME Bugzilla – Bug 644350
Fortran: fails to parse some continuation lines
Last modified: 2013-01-20 17:34:37 UTC
The Fortran standard states [1] that, for fixed form, "any character other than blank or zero" can be used as a continuation character in column 6. However, certain characters confuse Doxygen and produce incorrect output. The attached file contains the same function but with a different continuation character for each. It compiles with `gfortran -Wall -ffixed-form test.f` and all functions produce the same output when run. The subroutine `foo8` uses * as the continuation character, and Doxygen uses * as the type of the variable n instead of integer. The subroutine `foo3` uses # as the continuation character but I left it commented because Doxygen fails to parse the entire file if that subroutine is uncommented. [1] For example, http://j3-fortran.org/doc/standing/archive/007/97-007r2/pdf/97-007r2.pdf section 3.3.2.3
Created attachment 183029 [details] Test Fortran source code
This is a duplicate of bug 521861. I've run the file with the problems with the version of Doxygen I have (i.e. with the patch for bug 521861) and it look to me that the results are OK.
There were still 2 problems with the version in repository: 1) # was handled by preprocessor, although file extension was .f 2) * was a candidate for comment and then ignored by continuation rule Both fixed in https://github.com/ogbash/doxygen-f90/commit/830e288d7c14e9aec6ed9934c52f867b344eac2d
In respect to problem 2) hasn't this been (more extensively) fixed with the bugfix as reported with bug 521861 ?
(In reply to comment #4) Sorry, I wrongly assumed everything is already on the trunk. It seems to do exactly the same, although differently. I revert my changes to avoid confusion.
Created attachment 226922 [details] PATCH: Handle continuation charaters in source code
For fixed formatted code position 6 is of importance (continuation character). The previously attached patch (comment 6)checks whether position 6 in fixed source form is used. Especially the following characters: ' (single quote). " (double quote), #( hash), ! (exclamation mark) still made some problems. The problems regarding position 6 in the fortranscanner.l were already handled, here the problems in fortrancode.l are handled.
Thanks, I'll include the patch in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.3.1. 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.
Code is in, works as expected.