isomorphic languages

John R. Levine johnl at ima.ima.isc.com
Thu Nov 3 01:44:44 AEST 1988


In article <604 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>In _one_ respect, such a conversion is easier for Fortran, because
>Fortran 77 only permits comments _between_ statements.  Bierman asks
>for the translation to be invertible if the F8x version doesn't use
>anything not in F77, a backwards translator wouldn't have to get
>within-statement comments exactly right.

Actually, section 3.2.1 of the F77 standard says that "Comment lines may
appear between the initial line and its first continuation line or between
two continuation lines."  It also says that a line which is blank in the
first 72 columns is a comment line, which is a minor pain for us compiler
writers.

Nonetheless, the whole issue of preserving comment blocks when translating
languages is a murky one, and one that I've never seen addressed very well.
But if that's the worst problem encoutered in an F77<->F8x translator, we're
in a lot better shape than I expect.
-- 
John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869
{ bbn | think | decvax | harvard | yale }!ima!johnl, Levine at YALE.something
Rome fell, Babylon fell, Scarsdale will have its turn.  -G. B. Shaw



More information about the Comp.lang.c mailing list