Skip to content

f2py with "associate" <-> "end associate" #2763

@fermat618

Description

@fermat618

f2py break with functions/subroutines containing associate construct.

my hack

diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 5d664e3..009fa3e 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -470,7 +470,7 @@ beginpattern90=re.compile(beforethisafter%('',groupbegins90,groupbegins90,'.*'),
 groupends=r'end|endprogram|endblockdata|endmodule|endpythonmodule|endinterface'
 endpattern=re.compile(beforethisafter%('',groupends,groupends,'[\w\s]*'),re.I),'end'
 #endifs='end\s*(if|do|where|select|while|forall)'
-endifs='(end\s*(if|do|where|select|while|forall))|(module\s*procedure)'
+endifs='(end\s*(if|do|where|select|while|forall|associate))|(module\s*procedure)'
 endifpattern=re.compile(beforethisafter%('[\w]*?',endifs,endifs,'[\w\s]*'),re.I),'endif'
 #
 implicitpattern=re.compile(beforethisafter%('','implicit','implicit','.*'),re.I),'implicit'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions