Problems generating mixed c/fortran documentation

don hinton <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
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

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.