-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fortran difficulties with case matching and submodules #402
Comments
I've fixed most of the issues you mentioned. Except this one:
Can you confirm if this test case makes sense? |
If I'm understanding correctly, that input string shouldn't return anything, because as far as I'm aware it isn't a valid way to define procedures in Fortran. A subroutine or a function are a procedure, but you cannot use I'm not sure how the parsing works, but I suspect the current way the parsing is done might cause some misleading results in the case of interface blocks.
An interface block must be defined above the Once again I don't know how the parsing currently works, but it seemed to be via regex, so a potentially further issue might be the any ordered-ness of procedure attributes. Keywords like submodule (parent) child
contains
elemental module subroutine sub1(x)
integer :: x
end subroutine
module recursive function fxn1() result(y)
real :: y
end function
real impure module elemental function fxn1()
contains
subroutine fxn_sub1()
character(20) :: str
end subroutine
end function
end submodule I hope this helps. |
It seems there is a parsing error for fortran submodules. I couldn't determine exactly what was going wrong because it didn't seem to be consistent procedure to procedure within a submodule. I suspect the first issue encountered might mess it up for procedures further down by putting the parser into an incorrect state.
When using the syntax
Module Subroutine
orModule Function
there appear to be some parsing difficulties.Additionally there seem to be some case matching errors. Fortran isn't case sensitive, but in some cases that appears to make the parser miss the subroutines and functions. For some reason the recursive or elemental decorator for the procedures seems to help them be found even with a module decorator.
The text was updated successfully, but these errors were encountered: