This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran parser


Hello Arjen,

Yes, this is the kind of issues I have to handle ( static analysis = track variables not used, undeclared functions, trace the modifications of a variable through subroutines calls, etc... ), but I want to do more than that. I want to modify the code too; you could imagine to inline calls to a subroutine automatically, unroll some specific kind of loops, etc... Please have a look at http://g95-xml.sourceforge.net/.

Regards,

Philippe

Arjen Markus a écrit :
Hi all,

I have been working for a few years on how to parse Fortran for code
maintenance purposes. I have hacked the g95 parser and I have now some
good results. You can read the whole story at
http://g95-xml.sourceforge.net/.

What do you think ?


Would the output of your parser be useable for a static analyser of sorts? I mean a program that can and will check such things as: - Function used that does not have an explicit interface (most compilers will not warn about that) - Memory allocated at line such and such is never freed (local pointer used that is never deallocated)

I imagine having the parse tree would enable someone to check for
that sort of things more easily than examining the intermediate
representation of the program.

Regards,

Arjen





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]