Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victorliu/f2cpp
Fortran to C++ "converter"
https://github.com/victorliu/f2cpp
Last synced: 2 months ago
JSON representation
Fortran to C++ "converter"
- Host: GitHub
- URL: https://github.com/victorliu/f2cpp
- Owner: victorliu
- Created: 2010-01-24T03:05:15.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2010-02-10T10:39:17.000Z (almost 15 years ago)
- Last Synced: 2023-10-20T23:40:30.787Z (about 1 year ago)
- Language: Perl
- Homepage: http://cylith.dyndns.org/code/f2cpp
- Size: 82 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-fortran-77 - f2cpp
README
#
# f2cpp.pl - Converts Fortran 77 code to C++
#
# Unlike f2c, the output of f2cpp.pl may or may not compile, however,
# only a small number of hand-tuned changes are typically needed.
# The resulting code is much cleaner than f2c's output, and much closer
# to the original intent of the original Fortran code.
#
# The resulting C++ code is very C-style; we basically only want C++
# for its std::complex<> type and operator overloading.
#
# Assumes single subroutine per file, and that there are
# no lines of significance above the subroutine declaration.
#
# TODOs:
# - Make the first step of conversion breaking up the input into chunks
# delimited by subroutine boundaries. This will require full on parsing
# of blocks.
# - Some declarations are generated incorrectly, like IZAMAX, whose array
# argument is never an array.
# - Fix by-value argument passing of expressions (currently lets through
# things like (-&std::conj(tau)).
# - Generate proper subroutine declarations for character arguments
# (should be const char *, not char).
# - Determine const-ness of function declaration parameters through program
# analysis.
#