|References on parsing / data structures firstname.lastname@example.org (1995-04-03)|
|From:||email@example.com (Mr. P. Booth)|
|Keywords:||Fortran, analysis, question, comment|
|Organization:||Imperial College Centre for Environmental Technology|
|Date:||Mon, 3 Apr 1995 10:13:29 GMT|
My day job involves maintaining existing Fortran software written
by a variety of programmers using various stylistic conventions.
This software uses many global (COMMON) variables in addition to
formal arguments to routines and is quite difficult to read. I
am currently teaching myself C++ using Lippmann's "C++ Primer" and
I am keen to leverage this learning by working on a "real" C++ application
that would be useful to me in my day job.
I intend writing a source code reformatter similar, in some ways, to
GNU indent, that will reformat Fortran source code with options to
generate declarations for undeclared local variables and to
capitalise symbolic names according to meaning, i.e.:
GlobalVariable = sqrt( local) * CONSTANT
I also want this tool to generate administrative comments like:
I haven't done a class in compiler construction and don't have knowledge
of the theory of parsing or data structures that would best suit my problem.
Can anyone recommend either good references that are relevant to this
application domain or examples of good public domain source code which will
parse source code. If the code is written in C++ then so the better.
My primary objective is developing my C++ skills. I also hope to write
something that is more useful than the available public domain tools I
Peter Booth Email: P.Booth@ic.ac.uk
Imperial College Centre for Environmental Technology
48 Prince's Gardens, London SW7 2PE
0171-594 9296 (ph)
0171-581 0245 (FAX)
[Parsing Fortran is a major pain in the neck. See my Fortran subset parser in
the compilers archives here at iecc.com for an example of what you have to do.
Return to the
Search the comp.compilers archives again.