Skip to content

Fortran: quote in normal comment breaks Doxygen output (Origin: bugzilla #686581) #4930

@doxygen

Description

@doxygen

status VERIFIED severity normal in component general for ---
Reported in version 1.8.2-SVN on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-10-21 16:29:12 +0000, albert wrote:

Created attachment 226931
Source and Doxifile file showing the problem

When we have a '(single quote) or " (double quote) in a normal Fortran comment (odd number of quotes), the Doxygen comment convert parser is broken.
When we have the source code (aa.f):
! A normal comment line with a ' (single quote) in it.

!> just a comment
!> \MY_ALIAS
SUBROUTINE TST
END

And the alias MY_ALIAS defined as MY_ALIAS=some text one would expect the text
"just a comment some text" in the output, but just the text "just a comment" is shown and the error messages in the console output (twice): aa.f:4: warning: Found unknown command `\MY_ALIAS'

Some investigation lead to the statement:
[^"'!\/\n\\#\\-]* { /* eat anything that is not " / or \n */
in commentcnv.l on line 264, here all characters are skipped till a quote (start of a string) in case of a non-comment line, but the normal Fortran comments are not recognized properly, only Doxygen Fortran comments are recognized.

In Fortran there is of course the problem that we have the ! comments, but in the fixed format also th C,c,*,! in column 1 (and excluding the ! in columns 6 as continuation character, but this is quite rare that this is used and error prone so we can forget this one in my opinion)

On 2012-11-18 11:06:54 +0000, Dimitri van Heesch wrote:

Changed version 'latest' to '1.8.2-SVN' so I can remove 'latest' as an option as it is a moving target.

On 2013-01-09 19:36:08 +0000, albert wrote:

Created attachment 233099
PATCH: handle single quotes in normal Fortran comment

Comment handling for Fortran (fixed and free formatted) has been improved so that when there is a single quote (' or ") in normal comment this is not breaking the handling of aliases etc.

On 2013-01-15 20:19:39 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2013-01-20 13:34:55 +0000, Dimitri van Heesch wrote:

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.

On 2013-01-20 17:00:15 +0000, albert wrote:

Code is integrated and works as expected.

On 2013-01-20 17:06:39 +0000, albert wrote:

Forgot to set it to verified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions