diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-05 16:59:15 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-05 16:59:15 +0000 |
commit | 22f16b38b8086cfcef5dc86c852f88a9e777bb92 (patch) | |
tree | 9794a4805513819a832b86a926c9e86c0e2c2737 /numpy/f2py/crackfortran.py | |
parent | f0bfc449991703abef349b844764dc3f3abc9fef (diff) | |
download | numpy-22f16b38b8086cfcef5dc86c852f88a9e777bb92.tar.gz |
Bug fix for DATA statement with components containing subexpressions.
Diffstat (limited to 'numpy/f2py/crackfortran.py')
-rwxr-xr-x | numpy/f2py/crackfortran.py | 9 |
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: |