Hi:
We have a large amount of legacy fortran code that is used in mixed
c/fortran libraries. Some of this code is pretty old, but is still
maintained and, as mentioned, integrated into libraries comprised of c
code as well. The original fortran files used include files with
common areas that were later used to generate c header files via a
modified version of f2c.
Therefore, all symbols have an underscore added to the end, although
we don't add additional underscores, just the one, and the c code code
that uses common areas or makes calls to the fortran subroutines or
functions, adds the underscore directly in the code, e.g., a fortran
subroutine foo(), would be called in c as foo_(). The f2c underscore
decoration makes it impossible to generate mixed c/fortran
documentation that contains appropriate links, since the symbols don't
match. I realize there are header files that can do this for you, but
we don't use them
I initially modified the existing fortran lexers to accommodate the
underscore decoration, but quickly found other issues with the current
implementation that made it impractical to use it with our code base,
e.g., seg faults on sun, so I decided to rewrite it with a proper
lexer in flex, and parser in bison. We only use fixed format
fortran77, with some extensions, so my current iteration does not
include any F90 syntax at this point, however, that should be a simple
matter of adding that to the bison grammar.
I just got permission for my employer to submit back patches to the
doxygen project, but would first like to work with some of the fortran
users/developers to make sure the new parser works correctly for both
fixed format and current free format fortran code (I've only been
working with fortran for the past 12 months, and have only been using
legacy fortran77). Once the parser is has been enhanced/validated, it
shouldn't take long to get a patch ready.
Please let me know if you are interested.
thanks...
don
|