Permalink
Browse files

BUG: f2py fix to scan literal strings with ! character, fixes ticket #…

  • Loading branch information...
1 parent f2419c0 commit 225f28c7cffc2ec4914cf34b9abf6c121cb990a8 @pearu pearu committed Mar 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 numpy/f2py/crackfortran.py
@@ -283,7 +283,7 @@ def readfortrancode(ffile,dowithline=show,istop=1):
cont=0
finalline=''
ll=''
- commentline=re.compile(r'(?P<line>([^"]*"[^"]*"[^"!]*|[^\']*\'[^\']*\'[^\'!]*|[^!]*))!{1}(?P<rest>.*)')
+ commentline=re.compile(r'(?P<line>([^"]*["][^"]*["][^"!]*|[^\']*\'[^\']*\'[^\'!]*|[^!\'"]*))!{1}(?P<rest>.*)')
includeline=re.compile(r'\s*include\s*(\'|")(?P<name>[^\'"]*)(\'|")',re.I)
cont1=re.compile(r'(?P<line>.*)&\s*\Z')
cont2=re.compile(r'(\s*&|)(?P<line>.*)')

0 comments on commit 225f28c

Please sign in to comment.