Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: Fix crackfortran parsing error when a division occurs within a common block #28396

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

Merged
merged 11 commits into from
Apr 2, 2025
Merged
Prev Previous commit
Next Next commit
Use regular expression to split line
  • Loading branch information
nchristensen committed Mar 28, 2025
commit 5104cd389fc60e8cf4a27801239c870f6a80e694
23 changes: 2 additions & 21 deletions 23 numpy/f2py/crackfortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,28 +1490,9 @@ def analyzeline(m, case, line):
line = m.group('after').strip()
if not line[0] == '/':
line = '//' + line

cl = []
f = 0
bn = ''
ol = ''
nslash = 0 # For counting common block instances.
for c in line:
if c == '/' and nslash < 2:
f = f + 1
nslash = nslash + 1
continue
if f >= 3:
bn = bn.strip()
if not bn:
bn = '_BLNK_'
cl.append([bn, ol])
f = f - 2
bn = ''
ol = ''
if f % 2:
bn = bn + c
else:
ol = ol + c
[_,bn,ol] = re.split('/', line,2)
bn = bn.strip()
if not bn:
bn = '_BLNK_'
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.