Tom.Clune> ... my guess is that it [Perl] would be a more suitable
Tom.Clune> language for the preprocessor than fortran per se. Another
Tom.Clune> responder suggested using m4.
I give students in my compiler classes a compiler-construction framework
written in Pascal, Modula-2, Ada 95 or Fortran 90. The ones in Ada and
Fortran 90 are tied, in my opinion, for cleanliness. If you write the
preprocessor using ad hoc search-and-replace methods instead of using
the usual systematic compiler construction methods, Perl or m4 might be
more appropriate. William Clodius has a parser for Fortran 90 at
http://hometown.aol.com/wclodius/index.html. There's also a more
substantial front-end at http://ftp.digital.com/pub/plan/eli/Examples/.
Tom.Clune> ... Do "extended" objects inherit
Tom.Clune> methods from the parent object, or just the components?
The current F2K design inherits "methods." They're called "type-bound
procedures" in the draft.
Tom.Clune> ... by the time I implement a preprocessor
Tom.Clune> of this power, converting it to accept a different syntax (F2K <->
Tom.Clune> C++) will be relatively easy....
I hope you're also planning to make a preprocessor that will accept the
old syntax as input, and emit the new syntax (perhaps pure F2k) as
output. Or would you rather ask your clients either to throw away their
"legacy" code or re-write it?
--
What fraction of Americans believe | Van Snyder
Wrestling is real and NASA is fake? | [log in to unmask]
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Dan Goldin, Bill Clinton, the Pope, or anybody else.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|