This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Fortran parser
- From: "Arjen Markus" <arjen dot markus at wldelft dot nl>
- To: "Philippe Marguinaud" <philippe dot marguinaud at meteo dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 28 Nov 2008 16:06:07 +0100 (CET)
- Subject: Re: Fortran parser
- References: <492FFEB3.6000507@meteo.fr>
- Reply-to: arjen dot markus at wldelft dot nl
> 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