This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Translating gfortran's parser to Fortran


On Tue, Jan 13, 2009 at 11:35:05PM -0700, William B. Clodius wrote:
> As an old Fortran programmer with an interest in programming language  
> implementations, I am interested in translating part of gfortran's  
> front end to a subset of Fortran 2003. In doing so I hope to  
> strengthen my very weak C skills, and learn more about the structure  
> of compilers. This will be a very part time effort, and progress, if  
> any, will be slow. If I make significant progress I plan to release  
> the code to the gfortran team to do with as they will. At a minimum it  
> should serve as a test of the compiler's ability to handle Fortran  
> text processing code. However any release of my effort will require  
> permission from my employer though I plan to do my work on my own  
> time, and I do not plan to tackle its substantial bureaucracy until I  
> see whether I can make substantial progress. Do members of gfortran's  
> team have opinions about such a project and the postponement of  
> permissions?
> 
> If the project is acceptable to the gfortran team, my plan was to  
> first tackle gfortran.h in preparation for match.c, match.h, parse.c  
> and parse.h. In translating the code the first two issues I would want  
> to address are setting up a comment style, and deciding how to handle  
> enums.

The gfortran source code is freely available.  You can do whatever
you want with the code as long as you abid by the terms of the
applicable license.  The frontend code is covered by the GPL and
the runtime library is covered by the GPL with the linking exception
(version 2 for older source and version 3 for newer code).

I suspect no one has responded previously because we simply don't
see a need in translating the parser to Fortran.  The Fortran code
would not replace the C code in the source tree because it would
require an existing Fortran compiler to bootstrap gfortran.

> !  gfortran module file
> !  Copyright (C) 2009
> !  William B. Clodius

(brevity)

> perhaps also adding appropriate permissions from my employer. Is this  
> reasonable?

I think you need to talk with a copyright attorney, your employer,
and your employer's legal council.  If I translate a "Harry Potter"
book from English into Latin, I doubt that I could assert a copyright
on the result.  No, I'm not going to contact an attorney to obtain
an opinion.

> As to enums at the moment I am inclined to use the C interoperability  
> enumeration, but I am not happy with that choice.

Why not use Fortran enumeration?

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]