[RFC] FORTRAN95 Expression parser

Petr Sorfa petrs@caldera.com
Tue Apr 30 06:40:00 GMT 2002


Hi Michael,

> > I've created a FORTRAN95 expression parser for GDB. It is based off the
> > current FORTRAN expression parser, but has changed significantly in
> > source and functionality. I've developed it as a new separate parser
> > with the file prefix of f95-x as opposed to the existing f-x files.
> >
> > The question is whether I should submit the patch as the f95-x files
> > (which will leave the current FORTRAN parser untouched) or replace the
> > existing FORTRAN parser?
> >
> > Note that the F95 parser fully supports F77/F90/F95, but differs a bit
> > from the existing fortran gdb parser (which relies a bit heavily on C
> > notation.)
> 
> How much does it differ?  Functionally?  In user-visible ways?
> How about test suites?
It differs considerably - it supports FORTRAN expressions, not C
expressions that handle FORTRAN stuff. It supports FORTRAN intrinsics
(KIND, SIZE, LEN, ALLOCATED, ASSOCIATED, etc..). Proper FORTRAN array
subscripts (including stride). Proper print out of FORTRAN types and
variables. Supports column major notation. Supports MODULES, CONTAINS,
TYPE records, and so on.

User visible ways are considerably different, like I said, it treats
expressions like FORTRAN would.

I've added around 500 new test cases.

Petr



More information about the Gdb-patches mailing list