[cfe-commits] [RFC and PATCH] Fortran

Hal Finkel hfinkel at anl.gov
Thu Jan 10 16:24:54 PST 2013


Hello again,

I started working on this again a few days ago. For those of you who might wish to follow along (or, even better, contribute), I've pushed my current work to github:

https://github.com/hfinkel/lfort
https://github.com/hfinkel/llvm-lfort

The LLVM repository contains only build-system changes so that dropping lfort into LLVM's tools directory works just like it does for clang.

The lfort repository is a renamed version of clang which is in the process of morphing into a Fortran compiler. Initial updates to the driver are done (along with many of its regression tests); language standards and token definitions, etc. have been added to the frontend, the lexer has been updated to understand fortran include statements, comments, continuations, and fixed-form line syntax (and a few other things). Finally, the parser has some stub code which makes it capable of compiling empty programs (like this):
program hello
end program

In the long run, I'd like to refactor the driver code and merge it with clang's driver library. The same may be true for the lexer/preprocessor, but I'd like to withhold judgment until the code matures.

Thanks again,
Hal

----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Chris Lattner" <clattner at apple.com>
> Cc: cfe-commits at cs.uiuc.edu
> Sent: Friday, May 4, 2012 6:31:37 PM
> Subject: Re: [cfe-commits] [RFC and PATCH] Fortran
> 
> On Fri, 04 May 2012 16:03:24 -0700
> Chris Lattner <clattner at apple.com> wrote:
> 
> > On May 4, 2012, at 12:38 PM, Hal Finkel wrote:
> > >>> If we set this up kind of like clang is
> > >>> setup, then the build system will detect whether there is a
> > >>> fortran subdirectory in clang, and if so, will build (defining
> > >>> CLANG_HAS_FORTRAN or something like that) and link the extra
> > >>> components.
> > >> 
> > >> Should "flang" (please come up with a better name! :) be in
> > >> llvm/tools/flang or in llvm/tools/clang/flang?  I think that the
> > >> former makes more sense.  These are peer projects, even if one
> > >> is
> > >> dependent on the other.
> > > 
> > > Yea, I was avoiding that :) If we really want something with
> > > 'lang'
> > > at the end, then we could call it fortlang (I am certainly open
> > > to
> > > other suggestions).
> > 
> > It doesn't have to end with "lang"!
> > 
> > > Otherwise, we could avoid the issue for now and just name
> > > the repository fortran or ffe. I think making them peer projects
> > > in
> > > reasonable. If we're reusing the built sources from clang, then
> > > we
> > > just need to setup the makefiles to make sure that clang is
> > > always
> > > built first.
> > 
> > It's not a great suggestion, but how about "lfort"?
> 
> I like that!
> 
>  -Hal
> 
> > 
> > -Chris
> 
> 
> 
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
> 1-630-252-0023
> hfinkel at anl.gov
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-commits mailing list