[comp.sources.wanted] Lex/Yacc for Fortran-77

zuhn@umn-cs.CS.UMN.EDU (david d "zoo" zuhn) (06/21/89)

I will be undertaking a large scale translation from Fortran-77 to
C this summer, and I'm thinking that an automated conversion routine
can do the job well.  

To create this converter, I need a lex .l file and a yacc .y parser
for Fortran-77.  Any ideas where I can get such a beast?

Thanks to all.

David D Zuhn
Inet:  zuhn@umn-cs.cs.umn.edu, dz0w+@andrew.cmu.edu
UUCP:  ...!rutgers!umn-cs!zuhn

mark@intek01.UUCP (Mark McWiggins) (06/22/89)

In article <13729@umn-cs.CS.UMN.EDU>, zuhn@umn-cs.CS.UMN.EDU (david d "zoo" zuhn) writes:
> I will be undertaking a large scale translation from Fortran-77 to
> C this summer, and I'm thinking that an automated conversion routine
> can do the job well.  
> 
> To create this converter, I need a lex .l file and a yacc .y parser
> for Fortran-77.  Any ideas where I can get such a beast?
> 

I presume there's a public domain Yacc grammar floating around somewhere,
but Lex won't do the job for F77.  As I recall, Fortran ignores blanks and 
has no reserved words, so distinguishing identifiers from keywords is a more
challenging task than for more modern languages.

Several years ago there was a public-domain lexer available called "fortlex",
written in lowest-common-denominator F66 by Bell Labs' Stu Feldman (of "make"
fame).  I don't remember if it handled F77, but I presume it should still
be available.

Have you considered one of the commercial products that claim to do this?
It's a nontrivial task, and I believe I've seen translators for no less
than $1000 or so.

Good luck.

Mark McWiggins
Integration Technologies, Inc. (Intek)
1400 112th Ave. SE #202
Bellevue WA  98004
(206) 455-9935
uunet!intek01!mark