|Compiler vs. Translator email@example.com (Paul Robinson) (2004-05-16)|
|Re: Compiler vs. Translator firstname.lastname@example.org (2004-05-24)|
|Re: Compiler vs. Translator email@example.com (glen herrmannsfeldt) (2004-05-24)|
|Re: Compiler vs. Translator firstname.lastname@example.org (Richard F. Man) (2004-05-24)|
|Re: Compiler vs. Translator Martin.Ward@durham.ac.uk (Martin Ward) (2004-05-30)|
|Re: Compiler vs. Translator email@example.com (glen herrmannsfeldt) (2004-05-30)|
|Re: Compiler vs. Translator firstname.lastname@example.org (2004-06-06)|
|Re: Compiler vs. Translator email@example.com (2004-06-15)|
|From:||firstname.lastname@example.org (Jan Burgy)|
|Date:||15 Jun 2004 01:02:58 -0400|
|Posted-Date:||15 Jun 2004 01:02:58 EDT|
> On Sun, May 16, 2004 at 11:39:20PM -0400, Paul Robinson wrote:
> > What brought this on was that I happened to bid on a programming job
> > on rentacoder.com to write a program (in Visual Basic, of course)
> > which would translate programs written in FORTRAN into Visual Basic.
> > Well, since I've written programs for years using both languages I
> > decided to tackle this particular assignment.
> OMG... Sounds like a real ugly mess. There exists a FORTRAN to C
> translator, and what I can tell you is that it isn't pretty. The
> compiler itself is (according to Dave Wheeler's sloccount) 26,640
> source lines of code, and the accompanying runtime library is 9,609
> SLOC's, giving a total of some 36,249 source lines of code, not a
> minor project by any stretch. I suggest you give it a look at it
> Could give you some ideas on how to continue with your project.
first I want to wish you much success in your endeavour (albeit
foolish I feel it is). If I were you, I would NOT look at f2c. I have
a lot of respect for its authors but the code is a complete mess. The
part that probably interests you the most (lexing and parsing) has
been "solved" using terribly complicated lex and yacc files. If you're
going to lex and parse FORTRAN 66 or 77, you need to have a look at
Sale's algorithm[1,2]. The authors of f2j understood at least that
I haven't look at the entire project but it looks to me much more
helpful than f2c. They mention Sales' algorithm here:
Jan Burgy, PhD
 Arthur H. J. Sales, "The classification of FORTRAN statements",
The Computer Journal, Volume 14, Issue 1, pp. 10-12.
 J. K. Slape and Peter J. L. Wallis, "A Modification of Sale's
Algorithm to Accommodate FORTRAN 77", The Computer Journal Volume 34,
Issue 1, pp. 373-376.
Return to the
Search the comp.compilers archives again.