summaryrefslogtreecommitdiff
path: root/numpy/f2py/crackfortran.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-10-05 16:59:15 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-10-05 16:59:15 +0000
commit22f16b38b8086cfcef5dc86c852f88a9e777bb92 (patch)
tree9794a4805513819a832b86a926c9e86c0e2c2737 /numpy/f2py/crackfortran.py
parentf0bfc449991703abef349b844764dc3f3abc9fef (diff)
downloadnumpy-22f16b38b8086cfcef5dc86c852f88a9e777bb92.tar.gz
Bug fix for DATA statement with components containing subexpressions.
Diffstat (limited to 'numpy/f2py/crackfortran.py')
-rwxr-xr-xnumpy/f2py/crackfortran.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 74007c0c7..9659e0249 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -999,10 +999,13 @@ def analyzeline(m,case,line):
groupcache[groupcounter]['implicit']=impl
elif case=='data':
ll=[]
- dl='';il='';f=0;fc=1
+ dl='';il='';f=0;fc=1;inp=0
for c in m.group('after'):
- if c=="'": fc=not fc
- if c=='/' and fc: f=f+1;continue
+ if not inp:
+ if c=="'": fc=not fc
+ if c=='/' and fc: f=f+1;continue
+ if c=='(': inp = inp + 1
+ elif c==')': inp = inp - 1
if f==0: dl=dl+c
elif f==1: il=il+c
elif f==2: