stfc / fparser

This project maintains and develops a Fortran parser called fparser2 written purely in Python which supports Fortran 2003 and some Fortran 2008. A legacy parser fparser1 is also available but is not supported. The parsers were originally part of the f2py project by Pearu Peterson.
https://fparser.readthedocs.io
Other
63 stars 29 forks source link

Incompatible attributes in variable declarations #413

Open sergisiso opened 1 year ago

sergisiso commented 1 year ago

fparser accepts declarations with incompatible attributes e.g.: INTEGER, PARAMETER, SAVE :: l1 = 1 INTEGER, PARAMETER, INTENT(IN) :: l1 = 1 INTEGER, PARAMETER, ALLOCATABLE :: l1 = 1 INTEGER, INTENT(INOUT), SAVE :: l1 INTEGER, INTENT(IN), INTENT(OUT) :: l1 But any of these are valid Fortran. PSyclone now has checks for these issues, but this could be reported earlier by fparser.