Fortran Parser Question

Tim Roberts timr at probo.com
Mon Apr 16 00:05:03 EDT 2001


Hassan Aurag <aurag at geocities.com> wrote:
>
> Ok, I will try to be clearer. But first thanks for your answers, but I
>already discovered how fortran can be tricky.
>I already encountered a case where I had something like AEBF := 2*WHATEVER.
>Now that : was allowed as a character in a variable and of course you noticed
>the damned space there.

Colon is allowed as a variable character?  Zowie.  So, you're going to have
to handle extensions as well as standard Fortran?

I suggest you start with work that has already been done.  There are
several Fortran parsers available in source form.  I'm sure some of them
could be modified to do what you want.  This might be an interesting
starting place:

http://studbolt.physast.uga.edu/templon/fortran.html

>...Maybe now the whole issue will seem trivial to you.

I'm afraid not.  Fortran is a dreadful language to parse.  You have a BIG
job ahead of you.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list