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
61 stars 29 forks source link

Create defined operator class for rule R311. #157

Closed rupertford closed 5 years ago

rupertford commented 5 years ago

The Defined_Operator class is specified in Fortran2003.py but is not implemented. It is associated with Fortran 2003 rule 311. This issue will check whether it is required and, if it is, will implement it based on what was done in pr #142.

rupertford commented 5 years ago

The only place the the Defined_Operator rule is used is in rule R1207 where it is used as OPERATOR ( defined_operator ). An example of this use is ...

program test
   interface operator (.avg.)
    function ComputeAvg(x, y)
      real, INTENT(IN) :: x
      real, INTENT(IN) :: y
      real :: ComputeAvg
    end function 
   end interface
end program test

which gives ...

NameError: global name 'Defined_Operator' is not defined

So we do need it!

rupertford commented 5 years ago

Created branch add_defined_operator

arporter commented 5 years ago

158 has been merged to master. Closing Issue.