Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #501 +/- ##
=======================================
Coverage 92.21% 92.21%
=======================================
Files 87 87
Lines 13832 13843 +11
=======================================
+ Hits 12755 12766 +11
Misses 1077 1077 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
While this indeed fixes the issue, it is only fixed for the 2003 standard. Fab uses (by default) F2008, and F2008 still runs forever 😢 |
|
Ah, fixing F2008 was actually trivial :) Ready for a first review. |
|
I actually got an idea for testing: adding an invalid/not-parsable Fortran statement after a loop - if a do loop is parsed without error, it means that the error wasn't reached, and therefore it stopped early. Marking this as 'in progress' again :) |
…s in case of a non-blocking loop works.
|
An incorrect statement didn't really work, but I could just check the error message when blocking doesn't parse. If it points at the labeled statement that finished a non-blocked loop, the shortcut works. If it points at the end of the file, it doesn't - hooray ;) |
Fixes the exponential behaviour with number of non-blocked loops in one Fortran unit. This is done by detecting when searching for a blocked loop in e.g.:
That the statement with label 10 indicates that there is no matching
10 enddo(or continue) statement coming, and therefore abooting earlier.It cuts down parse time for a socrates file that was not parsed in 40 minutes(!!) down to 7 seconds.
Problem: I don't know how to test this patch. During development, the existing tests have flagged some issues I had, so the code is definitely used, and would trigger a failed test if it is really broken. But I don't really know how to test if it triggers as expected (since the function itself would return None without this patch as well ... just later)
Suggestions welcome