|Looking for Fortran Lexer/Parser Information firstname.lastname@example.org (Christian Curtis) (2000-01-25)|
|Re: Looking for Fortran Lexer/Parser Information email@example.com (Ira D. Baxter) (2000-02-04)|
|Re: Looking for Fortran Lexer/Parser Information firstname.lastname@example.org (2000-02-04)|
|Re: Looking for Fortran Lexer/Parser Information email@example.com (Christian Curtis) (2000-02-05)|
|Date:||4 Feb 2000 02:58:51 -0500|
>I am looking for some information on lexing and parsing of Fortran.
There is also my page
Be aware that parsing and syntax analysis is generally only a small
part of the task you have set for yourself. Although Fortran is
unusual in having a relatively complex lexing and parsing task and, in
many important areas, a relatively simple semantics, even for Fortran
semantic analysis is generally a much more difficult task than parsing
the source form.
I am surprised at the mention of code optimization in your analysis.
I can think of two possible meanings for this:
1. You are planning a preprocessor with fortran both as your source
and output with perhaps an additional set of highly optimized
libraries, similar to Kuck Associates KAP preprocessor. This requires
an extremely detailed knowledge of the implementation of the
destination compiler, the semantics of Fortran in general, and a lot
of time handcoding the libraries for each destination
processor. Unless you want to go into business for yourself I suggest,
you purchase one of the commercially available preprocessors.
2. You really want a macro system which would automatically inline
code. In that case I suggest that you either use m4, or one of the
Fortran syntax aware variants of cpp, generally termed fpp. I believe
that Sun, NAG, and Michael Olagnon all provide such
preprocessors. They have problems, but it is going to take several
years of effort to better them. Ask in comp.lang.fortran for more
As to the translator to Visual Basic. Be aware that translating from
one language to another one is difficult, unless the languages are
closely related dialects with well defined differences, e.g., Ratfor
to Fortran. You need to be very aware of the subtle differences in
language semantics. For I/O in particular you are liable to wind up
with a unmaintainable mess as a result of the translation, as Fortran
I/O is one area where its semantics most definitely are not simpler
than other languages. If you can handle the translation task why do
you need support at work? Is it just buying compilers? While most
Fortran compilers are expensive, at least for WIndows there are some
compilers available at very reasonable prices. If all you need is F77
with Mil_Std extensions there is also f2c and g77.
William B. Clodius
Return to the
Search the comp.compilers archives again.