RE: Writing a Fortran parser...
meek_at_skyway.usask.ca
Date: 08/26/04
- Next message: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Previous message: Danguard: "Re: Current Usses for Fortran ??"
- In reply to: Rich Townsend: "Writing a Fortran parser..."
- Next in thread: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Reply: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 AUG 04 08:56:07 GMT
In a previous article, Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote:
>Hi all --
>
>I've recently been kicking around the idea of writing a (limited)
>Fortran 77/90/95 parser, since I'm wanting to write a set of toolbox
>utilities to perform preprocessing & dependency checking (yes, I know
>stuff already exists, but it doesn't meet my needs...).
>
>After a little digging, I found a c.l.f post by James Giles claiming
>that Fortran is LR(1), which gave me hope. However, further digging
>seemed to suggest that things are rather more compilicated than that.
>Can anyone offer any advice or insights?
>
>While on this subject, would everyone mind try to compile the following
>program:
>
>program foo
> i = 1
> if(i > 0) then j = 1.23456
> print *,thenj
>end program foo
>
>My experience so far:
>
>Lahey 6.2b for Linux : OK
>NAG 4.0a (304) for Linux : fails
>Intel 8.0.50 for Linux : fails
>Compaq 5.5-1877 for Tru64 : fails
>Sun 7.1 Patch 112762-10 for Solaris : fails
>
>Note: I'm aware that many of these compilers are out of date; I was just
>conducting a quick poll of the tools I had to hand...
>
>With this nasty little example in mind, what are the rules governing the
>appearance of blanks in source code?
>
>cheers,
>
>Rich
You might want to try
if(i.gt.0)j=1.2
( i.e. without the "then")
Chris
- Next message: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Previous message: Danguard: "Re: Current Usses for Fortran ??"
- In reply to: Rich Townsend: "Writing a Fortran parser..."
- Next in thread: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Reply: meek_at_skyway.usask.ca: "RE: Writing a Fortran parser..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|