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

Add very basic support for F08 DO CONCURRENT #404

Closed mjklemm closed 1 year ago

mjklemm commented 1 year ago

This patch is missing support for LOCAL, LOCAL_INIT, and SHARED.

rupertford commented 1 year ago

Hi @mjklemm, after your email about this I had a look at how we would add in support for the concurrent keyword to fparser and it looks relatively straight forward. It should be done by extending the existing class in Fortran2003.py in the Fortran2008.py file as it is a Fortran2008 feature. It might be a little more complicated than the existing extended classes as I think we should probably re-use the match and tostr methods in the 2003 version and then try to match/output for the case with concurrent in the 2008 version. If you're happy to do this in this PR then great :-)

rupertford commented 1 year ago

Hi again @mjklemm, are you OK for me to close this PR as pr #408 is now ready for review? I note you mention something about LOCAL, LOCAL_INIT and SHARED but am not sure what you mean by this as I can't find anything relevant in the F2008 spec. If there is an outstanding problem please feel free to raise another issue.

mjklemm commented 1 year ago

I agree with closing this one. The code in #408 is much better. :-)

LOCAL, LOCAL_INIT, SHARED, and DEFAULT are F18. That's a bit of a pity, but that's OK, as I can work around that myself, until fparser considers adding F18 support.