michael@ace.nl (Michael Libourel) (03/27/90)
A belated reply, but here it is... Greg p/a Andrew Csinger (csinger@cs.ubc.ca) asked: > Does anyone know of a way to translate Ratfor to C? Is the Ratfor source > around that can be modified to produce C instead of Fortran? My problem > is that I am stuck with 200,000 lines of Fortran written in Ratfor. There > are existing solutions to translate Fortran to C, but the Fortran which > Ratfor produces is "unstructured" to say the least. The thought of re- > translating this to C is unpalatable. Any ideas? ACE (see below) is now alpha-testing a Ratfor-to-C translator called RATTOC, to convert a large package written in Ratfor to maintainable C, so that the Ratfor originals can be moved to /dev/null. RATTOC preserves the Ratfor file-structuring, control structures, comments, macro constants, etc. and produces maintainable C with a minimum of manual intervention. For Fortran-features that have no (neat) C equivalent, we detect and handle easy cases automatically, and for hard cases produce pseudo-C code that won't compile but does preserve all relevant info so you/sed/awk can easily modify it to your solution for that case. Most Fortran-to-C convertors (e.g. f2c) provide automatic translation to semantically equivalent but unreadable C code; RATTOC produces near-complete code with maximum source-level compatibility. +---------+ Extended +--------+ +--------+ .c/.h Ratfor-> | ERATFOR | -> Fortran-77-> | FORTOC |-> C-> | CBUILD | -> files +---------+ +--------+ +--------+ RATTOC should be deliverable in 2nd quarter '90; please contact us if you would like to know more. Maybe you could send us some samples of your code, so we can try them on RATTOC. Our postal address etc. is: ACE Associated Computer Experts bv Van Eeghenstraat 100 1071 GL Amsterdam The Netherlands tel: +31 20 6646416 fax: +31 20 750389 tlx: 11702 (ace nl) net: michael@ace.nl Hope this helps, Michael