GNOME Bugzilla – Bug 704518
Fortran whitespace rules confuse parser
Last modified: 2013-07-20 13:53:37 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...
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.
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.