Add support for array specs in fortran 77 cray pointers#216
Add support for array specs in fortran 77 cray pointers#216ProgramFan wants to merge 2 commits intocamfort:mainfrom
Conversation
|
Thanks for this! Would it be possible for you to put a comment in here to explain that this is for Cray pointers and also to add an example as a test in here: https://github.com/camfort/fortran-src/blob/master/test/Language/Fortran/Parser/Fixed/Fortran77/ParserSpec.hs? |
|
Thanks for the review. I am preparing it. |
|
I added two test cases for cray pointers in the aforementioned test suite, and also a comment line in Fortran77.y. To be brief, this PR allows fortran-src to parse full cray pointers in fixed-form fortran 77 files. Cited from https://gcc.gnu.org/onlinedocs/gfortran/Cray-pointers.html:
Current Fortran77.y does contain a rule To allow for array pointees in cray pointers, this PR adds a matching rule in the I am open for any suggestions. |
|
Thanks for this work. I think we might want another |
|
No, that's wrong, I see that pointees can be array declarators. I would still hazard making separate types/constructors for them rather than using |
|
I agree with the idea of making separate constructors for cray pointers, since they can appear in both fixed and free form sources. It would also solve the awkward situation here that I need to workaround the limitation of |
This PR adds a parsing rule to handle array specs in cray pointers in fixed-form fortran. The spec is from https://docs.oracle.com/cd/E19957-01/805-4941/z40000a54ba7/index.html. Basic tests with a simple fortran 77 source with
-v f77lpassed.